@qaecy/cue-ui 0.0.15 → 0.0.16

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.
package/141.js DELETED
@@ -1 +0,0 @@
1
- (self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[141],{6950(So,ei,ge){"use strict";ge.d(ei,{R:()=>pe});var y=ge(7705),S=ge(5802),Ee=ge(2271),C=ge(5547),q=ge(9079),_t=ge(4015),Ce=ge(3913);let Je=(()=>{class O{constructor(){this.vcr=(0,S.WQX)(C.c1b)}static{this.\u0275fac=function(D){return new(D||O)}}static{this.\u0275cmp=C.VBU({type:O,selectors:[["ag-component-container"]],standalone:!1,decls:0,vars:0,template:function(D,F){},encapsulation:2})}}return O})(),ti=0;const $=new Set(["doesFilterPass","isFilterActive"]);let ot=(()=>{class O extends Ce.Cf3{setViewContainerRef(v,D){this.viewContainerRef=v,this.angularFrameworkOverrides=D}createWrapper(v){const D=this.angularFrameworkOverrides,F=this;F.compShards??=function te(O){const K=new Map;for(let v=0;v<16;v++){const D=O.createComponent(Je);K.set(v,D),(0,Ce.MwW)(D.location.nativeElement)}return K}(this.viewContainerRef);const re=new class A extends Fe{init(X){D.runInsideAngular(()=>{super.init(X),this._componentRef.changeDetectorRef.detectChanges()})}createComponent(){return F.createComponent(v)}hasMethod(X){return null!=re.getFrameworkComponentInstance()[X]}callMethod(X,fe){const be=this.getFrameworkComponentInstance(),Qe=be[X];return $.has(X)?Qe.apply(be,fe):D.runInsideAngular(()=>Qe.apply(be,fe))}addMethod(X,fe){re[X]=fe}};return re}createComponent(v){return ti=(ti+1)%16,this.compShards.get(ti).instance.vcr.createComponent(v)}static{this.\u0275fac=(()=>{let v;return function(F){return(v||(v=C.xGo(O)))(F||O)}})()}static{this.\u0275prov=S.jDH({token:O,factory:O.\u0275fac})}}return O})();class Fe{init(K){this._params=K,this._componentRef=this.createComponent(),this._agAwareComponent=this._componentRef.instance,this._frameworkComponentInstance=this._componentRef.instance,this._eGui=this._componentRef.location.nativeElement,(0,Ce.MwW)(this._eGui),this._agAwareComponent.agInit(this._params)}getGui(){return this._eGui}getRootElement(){return this._eGui.firstChild}destroy(){this._frameworkComponentInstance&&"function"==typeof this._frameworkComponentInstance.destroy&&this._frameworkComponentInstance.destroy(),this._componentRef?.destroy()}getFrameworkComponentInstance(){return this._frameworkComponentInstance}}class ve{constructor(K){this.frameworkOverrides=K,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(K,v){const{frameworkOverrides:D,wrappedListeners:F}=this;let A=v;if(D.shouldWrapOutgoing){A=Z=>{D.wrapOutgoing(()=>v(Z))};let re=F.get(K);re||(re=new Map,F.set(K,re)),re.set(v,A)}return A}wrapGlobal(K){const{frameworkOverrides:v,wrappedGlobalListeners:D}=this;let F=K;return v.shouldWrapOutgoing&&(F=(A,re)=>{v.wrapOutgoing(()=>K(A,re))},D.set(K,F)),F}unwrap(K,v){const{wrappedListeners:D}=this,F=D.get(K);if(F){const A=F.get(v);if(A)return F.delete(v),0===F.size&&D.delete(K),A}return v}unwrapGlobal(K){const{wrappedGlobalListeners:v}=this,D=v.get(K);return D?(v.delete(K),D):K}}let Rt=(()=>{class O extends Ce.pow{constructor(v){super("angular"),this._ngZone=v,this.batchFrameworkComps=!0,this.isRunningWithinTestZone=!1,this.wrapIncoming=(D,F)=>this.runOutside(D,F),this.wrapOutgoing=D=>this.runInsideAngular(D),this.isRunningWithinTestZone=window?.AG_GRID_UNDER_TEST??!!window?.Zone?.AsyncTestZoneSpec,this.runOutside=this._ngZone?this.isRunningWithinTestZone?(D,F)=>"resize-observer"===F||"popupPositioning"===F?this._ngZone.runOutsideAngular(D):D():D=>this._ngZone.runOutsideAngular(D):D=>D()}get shouldWrapOutgoing(){return this._ngZone&&S.SKi.isInAngularZone()}createLocalEventListenerWrapper(v,D){if(this.shouldWrapOutgoing)return v??(D.setFrameworkOverrides(this),new ve(this))}createGlobalEventListenerWrapper(){return new ve(this)}isFrameworkComponent(v){if(!v)return!1;const D=v.prototype;return D&&"agInit"in D}runInsideAngular(v){return!this._ngZone||S.SKi.isInAngularZone()?v():this._ngZone.run(v)}runOutsideAngular(v,D){return this.runOutside(v,D)}static{this.\u0275fac=function(D){return new(D||O)(S.KVO(S.SKi))}}static{this.\u0275prov=S.jDH({token:O,factory:O.\u0275fac})}}return O})(),It=(()=>{class O{constructor(v,D,F,A){this._viewContainerRef=D,this._angularFrameworkOverrides=F,this._frameworkCompWrapper=A,this._initialised=!1,this._destroyed=!1,this._holdEvents=!0,this._fullyReady=new Promise(re=>{this._resolveFullyReady=re}),this.statusBar=void 0,this.sideBar=void 0,this.suppressContextMenu=void 0,this.preventDefaultOnContextMenu=void 0,this.allowContextMenuWithControlKey=void 0,this.columnMenu=void 0,this.suppressMenuHide=void 0,this.enableBrowserTooltips=void 0,this.tooltipTrigger=void 0,this.tooltipShowDelay=void 0,this.tooltipHideDelay=void 0,this.tooltipMouseTrack=void 0,this.tooltipShowMode=void 0,this.tooltipInteraction=void 0,this.popupParent=void 0,this.copyHeadersToClipboard=void 0,this.copyGroupHeadersToClipboard=void 0,this.clipboardDelimiter=void 0,this.suppressCopyRowsToClipboard=void 0,this.suppressCopySingleCellRanges=void 0,this.suppressLastEmptyLineOnPaste=void 0,this.suppressClipboardPaste=void 0,this.suppressClipboardApi=void 0,this.suppressCutToClipboard=void 0,this.columnDefs=void 0,this.defaultColDef=void 0,this.defaultColGroupDef=void 0,this.columnTypes=void 0,this.dataTypeDefinitions=void 0,this.maintainColumnOrder=void 0,this.enableStrictPivotColumnOrder=void 0,this.suppressFieldDotNotation=void 0,this.headerHeight=void 0,this.groupHeaderHeight=void 0,this.floatingFiltersHeight=void 0,this.pivotHeaderHeight=void 0,this.pivotGroupHeaderHeight=void 0,this.hidePaddedHeaderRows=void 0,this.allowDragFromColumnsToolPanel=void 0,this.suppressMovableColumns=void 0,this.suppressColumnMoveAnimation=void 0,this.suppressMoveWhenColumnDragging=void 0,this.suppressDragLeaveHidesColumns=void 0,this.suppressGroupChangesColumnVisibility=void 0,this.suppressMakeColumnVisibleAfterUnGroup=void 0,this.suppressRowGroupHidesColumns=void 0,this.colResizeDefault=void 0,this.suppressAutoSize=void 0,this.autoSizePadding=void 0,this.skipHeaderOnAutoSize=void 0,this.autoSizeStrategy=void 0,this.components=void 0,this.editType=void 0,this.suppressStartEditOnTab=void 0,this.getFullRowEditValidationErrors=void 0,this.invalidEditValueMode=void 0,this.singleClickEdit=void 0,this.suppressClickEdit=void 0,this.readOnlyEdit=void 0,this.stopEditingWhenCellsLoseFocus=void 0,this.enterNavigatesVertically=void 0,this.enterNavigatesVerticallyAfterEdit=void 0,this.enableCellEditingOnBackspace=void 0,this.undoRedoCellEditing=void 0,this.undoRedoCellEditingLimit=void 0,this.defaultCsvExportParams=void 0,this.suppressCsvExport=void 0,this.defaultExcelExportParams=void 0,this.suppressExcelExport=void 0,this.excelStyles=void 0,this.findSearchValue=void 0,this.findOptions=void 0,this.quickFilterText=void 0,this.cacheQuickFilter=void 0,this.includeHiddenColumnsInQuickFilter=void 0,this.quickFilterParser=void 0,this.quickFilterMatcher=void 0,this.applyQuickFilterBeforePivotOrAgg=void 0,this.excludeChildrenWhenTreeDataFiltering=void 0,this.enableAdvancedFilter=void 0,this.alwaysPassFilter=void 0,this.includeHiddenColumnsInAdvancedFilter=void 0,this.advancedFilterParent=void 0,this.advancedFilterBuilderParams=void 0,this.advancedFilterParams=void 0,this.suppressAdvancedFilterEval=void 0,this.suppressSetFilterByDefault=void 0,this.enableFilterHandlers=void 0,this.filterHandlers=void 0,this.enableCharts=void 0,this.chartThemes=void 0,this.customChartThemes=void 0,this.chartThemeOverrides=void 0,this.chartToolPanelsDef=void 0,this.chartMenuItems=void 0,this.loadingCellRenderer=void 0,this.loadingCellRendererParams=void 0,this.loadingCellRendererSelector=void 0,this.localeText=void 0,this.masterDetail=void 0,this.keepDetailRows=void 0,this.keepDetailRowsCount=void 0,this.detailCellRenderer=void 0,this.detailCellRendererParams=void 0,this.detailRowHeight=void 0,this.detailRowAutoHeight=void 0,this.context=void 0,this.alignedGrids=void 0,this.tabIndex=void 0,this.rowBuffer=void 0,this.valueCache=void 0,this.valueCacheNeverExpires=void 0,this.enableCellExpressions=void 0,this.suppressTouch=void 0,this.suppressFocusAfterRefresh=void 0,this.suppressBrowserResizeObserver=void 0,this.suppressPropertyNamesCheck=void 0,this.suppressChangeDetection=void 0,this.debug=void 0,this.loading=void 0,this.overlayLoadingTemplate=void 0,this.loadingOverlayComponent=void 0,this.loadingOverlayComponentParams=void 0,this.suppressLoadingOverlay=void 0,this.overlayNoRowsTemplate=void 0,this.noRowsOverlayComponent=void 0,this.noRowsOverlayComponentParams=void 0,this.suppressNoRowsOverlay=void 0,this.pagination=void 0,this.paginationPageSize=void 0,this.paginationPageSizeSelector=void 0,this.paginationAutoPageSize=void 0,this.paginateChildRows=void 0,this.suppressPaginationPanel=void 0,this.pivotMode=void 0,this.pivotPanelShow=void 0,this.pivotMaxGeneratedColumns=void 0,this.pivotDefaultExpanded=void 0,this.pivotColumnGroupTotals=void 0,this.pivotRowTotals=void 0,this.pivotSuppressAutoColumn=void 0,this.suppressExpandablePivotGroups=void 0,this.functionsReadOnly=void 0,this.aggFuncs=void 0,this.suppressAggFuncInHeader=void 0,this.alwaysAggregateAtRootLevel=void 0,this.aggregateOnlyChangedColumns=void 0,this.suppressAggFilteredOnly=void 0,this.removePivotHeaderRowWhenSingleValueColumn=void 0,this.animateRows=void 0,this.cellFlashDuration=void 0,this.cellFadeDuration=void 0,this.allowShowChangeAfterFilter=void 0,this.domLayout=void 0,this.ensureDomOrder=void 0,this.enableCellSpan=void 0,this.enableRtl=void 0,this.suppressColumnVirtualisation=void 0,this.suppressMaxRenderedRowRestriction=void 0,this.suppressRowVirtualisation=void 0,this.rowDragManaged=void 0,this.rowDragInsertDelay=void 0,this.suppressRowDrag=void 0,this.suppressMoveWhenRowDragging=void 0,this.rowDragEntireRow=void 0,this.rowDragMultiRow=void 0,this.rowDragText=void 0,this.dragAndDropImageComponent=void 0,this.dragAndDropImageComponentParams=void 0,this.fullWidthCellRenderer=void 0,this.fullWidthCellRendererParams=void 0,this.embedFullWidthRows=void 0,this.groupDisplayType=void 0,this.groupDefaultExpanded=void 0,this.autoGroupColumnDef=void 0,this.groupMaintainOrder=void 0,this.groupSelectsChildren=void 0,this.groupLockGroupColumns=void 0,this.groupAggFiltering=void 0,this.groupTotalRow=void 0,this.grandTotalRow=void 0,this.suppressStickyTotalRow=void 0,this.groupSuppressBlankHeader=void 0,this.groupSelectsFiltered=void 0,this.showOpenedGroup=void 0,this.groupHideParentOfSingleChild=void 0,this.groupRemoveSingleChildren=void 0,this.groupRemoveLowestSingleChildren=void 0,this.groupHideOpenParents=void 0,this.groupAllowUnbalanced=void 0,this.rowGroupPanelShow=void 0,this.groupRowRenderer=void 0,this.groupRowRendererParams=void 0,this.treeData=void 0,this.treeDataChildrenField=void 0,this.treeDataParentIdField=void 0,this.rowGroupPanelSuppressSort=void 0,this.suppressGroupRowsSticky=void 0,this.groupHierarchyConfig=void 0,this.pinnedTopRowData=void 0,this.pinnedBottomRowData=void 0,this.enableRowPinning=void 0,this.isRowPinnable=void 0,this.isRowPinned=void 0,this.rowModelType=void 0,this.rowData=void 0,this.asyncTransactionWaitMillis=void 0,this.suppressModelUpdateAfterUpdateTransaction=void 0,this.datasource=void 0,this.cacheOverflowSize=void 0,this.infiniteInitialRowCount=void 0,this.serverSideInitialRowCount=void 0,this.suppressServerSideFullWidthLoadingRow=void 0,this.cacheBlockSize=void 0,this.maxBlocksInCache=void 0,this.maxConcurrentDatasourceRequests=void 0,this.blockLoadDebounceMillis=void 0,this.purgeClosedRowNodes=void 0,this.serverSideDatasource=void 0,this.serverSideSortAllLevels=void 0,this.serverSideEnableClientSideSort=void 0,this.serverSideOnlyRefreshFilteredGroups=void 0,this.serverSidePivotResultFieldSeparator=void 0,this.viewportDatasource=void 0,this.viewportRowModelPageSize=void 0,this.viewportRowModelBufferSize=void 0,this.alwaysShowHorizontalScroll=void 0,this.alwaysShowVerticalScroll=void 0,this.debounceVerticalScrollbar=void 0,this.suppressHorizontalScroll=void 0,this.suppressScrollOnNewData=void 0,this.suppressScrollWhenPopupsAreOpen=void 0,this.suppressAnimationFrame=void 0,this.suppressMiddleClickScrolls=void 0,this.suppressPreventDefaultOnMouseWheel=void 0,this.scrollbarWidth=void 0,this.rowSelection=void 0,this.cellSelection=void 0,this.rowMultiSelectWithClick=void 0,this.suppressRowDeselection=void 0,this.suppressRowClickSelection=void 0,this.suppressCellFocus=void 0,this.suppressHeaderFocus=void 0,this.selectionColumnDef=void 0,this.rowNumbers=void 0,this.suppressMultiRangeSelection=void 0,this.enableCellTextSelection=void 0,this.enableRangeSelection=void 0,this.enableRangeHandle=void 0,this.enableFillHandle=void 0,this.fillHandleDirection=void 0,this.suppressClearOnFillReduction=void 0,this.sortingOrder=void 0,this.accentedSort=void 0,this.unSortIcon=void 0,this.suppressMultiSort=void 0,this.alwaysMultiSort=void 0,this.multiSortKey=void 0,this.suppressMaintainUnsortedOrder=void 0,this.icons=void 0,this.rowHeight=void 0,this.rowStyle=void 0,this.rowClass=void 0,this.rowClassRules=void 0,this.suppressRowHoverHighlight=void 0,this.suppressRowTransform=void 0,this.columnHoverHighlight=void 0,this.gridId=void 0,this.deltaSort=void 0,this.treeDataDisplayType=void 0,this.enableGroupEdit=void 0,this.initialState=void 0,this.theme=void 0,this.loadThemeGoogleFonts=void 0,this.themeCssLayer=void 0,this.styleNonce=void 0,this.themeStyleContainer=void 0,this.getContextMenuItems=void 0,this.getMainMenuItems=void 0,this.postProcessPopup=void 0,this.processUnpinnedColumns=void 0,this.processCellForClipboard=void 0,this.processHeaderForClipboard=void 0,this.processGroupHeaderForClipboard=void 0,this.processCellFromClipboard=void 0,this.sendToClipboard=void 0,this.processDataFromClipboard=void 0,this.isExternalFilterPresent=void 0,this.doesExternalFilterPass=void 0,this.getChartToolbarItems=void 0,this.createChartContainer=void 0,this.focusGridInnerElement=void 0,this.navigateToNextHeader=void 0,this.tabToNextHeader=void 0,this.navigateToNextCell=void 0,this.tabToNextCell=void 0,this.getLocaleText=void 0,this.getDocument=void 0,this.paginationNumberFormatter=void 0,this.getGroupRowAgg=void 0,this.isGroupOpenByDefault=void 0,this.ssrmExpandAllAffectsAllRows=void 0,this.initialGroupOrderComparator=void 0,this.processPivotResultColDef=void 0,this.processPivotResultColGroupDef=void 0,this.getDataPath=void 0,this.getChildCount=void 0,this.getServerSideGroupLevelParams=void 0,this.isServerSideGroupOpenByDefault=void 0,this.isApplyServerSideTransaction=void 0,this.isServerSideGroup=void 0,this.getServerSideGroupKey=void 0,this.getBusinessKeyForNode=void 0,this.getRowId=void 0,this.resetRowDataOnUpdate=void 0,this.processRowPostCreate=void 0,this.isRowSelectable=void 0,this.isRowMaster=void 0,this.fillOperation=void 0,this.postSortRows=void 0,this.getRowStyle=void 0,this.getRowClass=void 0,this.getRowHeight=void 0,this.isFullWidthRow=void 0,this.isRowValidDropPosition=void 0,this.toolPanelVisibleChanged=new S.bkB,this.toolPanelSizeChanged=new S.bkB,this.columnMenuVisibleChanged=new S.bkB,this.contextMenuVisibleChanged=new S.bkB,this.cutStart=new S.bkB,this.cutEnd=new S.bkB,this.pasteStart=new S.bkB,this.pasteEnd=new S.bkB,this.columnVisible=new S.bkB,this.columnPinned=new S.bkB,this.columnResized=new S.bkB,this.columnMoved=new S.bkB,this.columnValueChanged=new S.bkB,this.columnPivotModeChanged=new S.bkB,this.columnPivotChanged=new S.bkB,this.columnGroupOpened=new S.bkB,this.newColumnsLoaded=new S.bkB,this.gridColumnsChanged=new S.bkB,this.displayedColumnsChanged=new S.bkB,this.virtualColumnsChanged=new S.bkB,this.columnEverythingChanged=new S.bkB,this.columnsReset=new S.bkB,this.columnHeaderMouseOver=new S.bkB,this.columnHeaderMouseLeave=new S.bkB,this.columnHeaderClicked=new S.bkB,this.columnHeaderContextMenu=new S.bkB,this.componentStateChanged=new S.bkB,this.cellValueChanged=new S.bkB,this.cellEditRequest=new S.bkB,this.rowValueChanged=new S.bkB,this.cellEditingStarted=new S.bkB,this.cellEditingStopped=new S.bkB,this.rowEditingStarted=new S.bkB,this.rowEditingStopped=new S.bkB,this.bulkEditingStarted=new S.bkB,this.bulkEditingStopped=new S.bkB,this.batchEditingStarted=new S.bkB,this.batchEditingStopped=new S.bkB,this.undoStarted=new S.bkB,this.undoEnded=new S.bkB,this.redoStarted=new S.bkB,this.redoEnded=new S.bkB,this.cellSelectionDeleteStart=new S.bkB,this.cellSelectionDeleteEnd=new S.bkB,this.rangeDeleteStart=new S.bkB,this.rangeDeleteEnd=new S.bkB,this.fillStart=new S.bkB,this.fillEnd=new S.bkB,this.filterOpened=new S.bkB,this.filterChanged=new S.bkB,this.filterModified=new S.bkB,this.filterUiChanged=new S.bkB,this.floatingFilterUiChanged=new S.bkB,this.advancedFilterBuilderVisibleChanged=new S.bkB,this.findChanged=new S.bkB,this.chartCreated=new S.bkB,this.chartRangeSelectionChanged=new S.bkB,this.chartOptionsChanged=new S.bkB,this.chartDestroyed=new S.bkB,this.cellKeyDown=new S.bkB,this.gridReady=new S.bkB,this.firstDataRendered=new S.bkB,this.gridSizeChanged=new S.bkB,this.modelUpdated=new S.bkB,this.virtualRowRemoved=new S.bkB,this.viewportChanged=new S.bkB,this.bodyScroll=new S.bkB,this.bodyScrollEnd=new S.bkB,this.dragStarted=new S.bkB,this.dragStopped=new S.bkB,this.dragCancelled=new S.bkB,this.stateUpdated=new S.bkB,this.paginationChanged=new S.bkB,this.rowDragEnter=new S.bkB,this.rowDragMove=new S.bkB,this.rowDragLeave=new S.bkB,this.rowDragEnd=new S.bkB,this.rowDragCancel=new S.bkB,this.rowResizeStarted=new S.bkB,this.rowResizeEnded=new S.bkB,this.columnRowGroupChanged=new S.bkB,this.rowGroupOpened=new S.bkB,this.expandOrCollapseAll=new S.bkB,this.pivotMaxColumnsExceeded=new S.bkB,this.pinnedRowDataChanged=new S.bkB,this.pinnedRowsChanged=new S.bkB,this.rowDataUpdated=new S.bkB,this.asyncTransactionsFlushed=new S.bkB,this.storeRefreshed=new S.bkB,this.headerFocused=new S.bkB,this.cellClicked=new S.bkB,this.cellDoubleClicked=new S.bkB,this.cellFocused=new S.bkB,this.cellMouseOver=new S.bkB,this.cellMouseOut=new S.bkB,this.cellMouseDown=new S.bkB,this.rowClicked=new S.bkB,this.rowDoubleClicked=new S.bkB,this.rowSelected=new S.bkB,this.selectionChanged=new S.bkB,this.cellContextMenu=new S.bkB,this.rangeSelectionChanged=new S.bkB,this.cellSelectionChanged=new S.bkB,this.tooltipShow=new S.bkB,this.tooltipHide=new S.bkB,this.sortChanged=new S.bkB,this._nativeElement=v.nativeElement,this._fullyReady.then(()=>{this._holdEvents=!1})}ngAfterViewInit(){this._angularFrameworkOverrides.runOutsideAngular(()=>{this._frameworkCompWrapper.setViewContainerRef(this._viewContainerRef,this._angularFrameworkOverrides);const v=Object.keys(this).filter(Z=>!(Z.startsWith("_")||"gridOptions"==Z||"modules"==Z||this[Z]instanceof S.bkB)),D={};for(const Z of v){const X=Gt(Z,this[Z]);D[Z]=X}const F=(0,Ce.zsR)(this.gridOptions,D,v),A={globalListener:this.globalListener.bind(this),frameworkOverrides:this._angularFrameworkOverrides,providedBeanInstances:{frameworkCompWrapper:this._frameworkCompWrapper},modules:this.modules||[],setThemeOnGridDiv:!0},re=(0,Ce.Dvw)(this._nativeElement,F,A);re&&(this.api=re),this._initialised=!0,this._resolveFullyReady()})}ngOnChanges(v){this._initialised&&this._angularFrameworkOverrides.runOutsideAngular(()=>{const D={};for(const F of Object.keys(v))D[F]=v[F].currentValue;(0,Ce.Y6t)(D,this.api)})}ngOnDestroy(){this._initialised&&(this._destroyed=!0,this.api?.destroy())}isEmitterUsed(v){const F=this[v],A=F?.observed??F?.observers?.length>0,re=`on${v.charAt(0).toUpperCase()}${v.substring(1)}`;return A||!!this.gridOptions&&!!this.gridOptions[re]}globalListener(v,D){if(this._destroyed)return;const F=this[v];if(F&&this.isEmitterUsed(v)){const A=()=>this._angularFrameworkOverrides.runInsideAngular(()=>F.emit(D));this._holdEvents?this._fullyReady.then(()=>A()):A()}}static{this.\u0275fac=function(D){return new(D||O)(C.rXU(C.aKT),C.rXU(C.c1b),C.rXU(Rt),C.rXU(ot))}}static{this.\u0275cmp=C.VBU({type:O,selectors:[["ag-grid-angular"]],inputs:{gridOptions:"gridOptions",modules:"modules",statusBar:"statusBar",sideBar:"sideBar",suppressContextMenu:[2,"suppressContextMenu","suppressContextMenu",y.L39],preventDefaultOnContextMenu:[2,"preventDefaultOnContextMenu","preventDefaultOnContextMenu",y.L39],allowContextMenuWithControlKey:[2,"allowContextMenuWithControlKey","allowContextMenuWithControlKey",y.L39],columnMenu:"columnMenu",suppressMenuHide:[2,"suppressMenuHide","suppressMenuHide",y.L39],enableBrowserTooltips:[2,"enableBrowserTooltips","enableBrowserTooltips",y.L39],tooltipTrigger:"tooltipTrigger",tooltipShowDelay:"tooltipShowDelay",tooltipHideDelay:"tooltipHideDelay",tooltipMouseTrack:[2,"tooltipMouseTrack","tooltipMouseTrack",y.L39],tooltipShowMode:"tooltipShowMode",tooltipInteraction:[2,"tooltipInteraction","tooltipInteraction",y.L39],popupParent:"popupParent",copyHeadersToClipboard:[2,"copyHeadersToClipboard","copyHeadersToClipboard",y.L39],copyGroupHeadersToClipboard:[2,"copyGroupHeadersToClipboard","copyGroupHeadersToClipboard",y.L39],clipboardDelimiter:"clipboardDelimiter",suppressCopyRowsToClipboard:[2,"suppressCopyRowsToClipboard","suppressCopyRowsToClipboard",y.L39],suppressCopySingleCellRanges:[2,"suppressCopySingleCellRanges","suppressCopySingleCellRanges",y.L39],suppressLastEmptyLineOnPaste:[2,"suppressLastEmptyLineOnPaste","suppressLastEmptyLineOnPaste",y.L39],suppressClipboardPaste:[2,"suppressClipboardPaste","suppressClipboardPaste",y.L39],suppressClipboardApi:[2,"suppressClipboardApi","suppressClipboardApi",y.L39],suppressCutToClipboard:[2,"suppressCutToClipboard","suppressCutToClipboard",y.L39],columnDefs:"columnDefs",defaultColDef:"defaultColDef",defaultColGroupDef:"defaultColGroupDef",columnTypes:"columnTypes",dataTypeDefinitions:"dataTypeDefinitions",maintainColumnOrder:[2,"maintainColumnOrder","maintainColumnOrder",y.L39],enableStrictPivotColumnOrder:[2,"enableStrictPivotColumnOrder","enableStrictPivotColumnOrder",y.L39],suppressFieldDotNotation:[2,"suppressFieldDotNotation","suppressFieldDotNotation",y.L39],headerHeight:"headerHeight",groupHeaderHeight:"groupHeaderHeight",floatingFiltersHeight:"floatingFiltersHeight",pivotHeaderHeight:"pivotHeaderHeight",pivotGroupHeaderHeight:"pivotGroupHeaderHeight",hidePaddedHeaderRows:[2,"hidePaddedHeaderRows","hidePaddedHeaderRows",y.L39],allowDragFromColumnsToolPanel:[2,"allowDragFromColumnsToolPanel","allowDragFromColumnsToolPanel",y.L39],suppressMovableColumns:[2,"suppressMovableColumns","suppressMovableColumns",y.L39],suppressColumnMoveAnimation:[2,"suppressColumnMoveAnimation","suppressColumnMoveAnimation",y.L39],suppressMoveWhenColumnDragging:[2,"suppressMoveWhenColumnDragging","suppressMoveWhenColumnDragging",y.L39],suppressDragLeaveHidesColumns:[2,"suppressDragLeaveHidesColumns","suppressDragLeaveHidesColumns",y.L39],suppressGroupChangesColumnVisibility:"suppressGroupChangesColumnVisibility",suppressMakeColumnVisibleAfterUnGroup:[2,"suppressMakeColumnVisibleAfterUnGroup","suppressMakeColumnVisibleAfterUnGroup",y.L39],suppressRowGroupHidesColumns:[2,"suppressRowGroupHidesColumns","suppressRowGroupHidesColumns",y.L39],colResizeDefault:"colResizeDefault",suppressAutoSize:[2,"suppressAutoSize","suppressAutoSize",y.L39],autoSizePadding:"autoSizePadding",skipHeaderOnAutoSize:[2,"skipHeaderOnAutoSize","skipHeaderOnAutoSize",y.L39],autoSizeStrategy:"autoSizeStrategy",components:"components",editType:"editType",suppressStartEditOnTab:[2,"suppressStartEditOnTab","suppressStartEditOnTab",y.L39],getFullRowEditValidationErrors:"getFullRowEditValidationErrors",invalidEditValueMode:"invalidEditValueMode",singleClickEdit:[2,"singleClickEdit","singleClickEdit",y.L39],suppressClickEdit:[2,"suppressClickEdit","suppressClickEdit",y.L39],readOnlyEdit:[2,"readOnlyEdit","readOnlyEdit",y.L39],stopEditingWhenCellsLoseFocus:[2,"stopEditingWhenCellsLoseFocus","stopEditingWhenCellsLoseFocus",y.L39],enterNavigatesVertically:[2,"enterNavigatesVertically","enterNavigatesVertically",y.L39],enterNavigatesVerticallyAfterEdit:[2,"enterNavigatesVerticallyAfterEdit","enterNavigatesVerticallyAfterEdit",y.L39],enableCellEditingOnBackspace:[2,"enableCellEditingOnBackspace","enableCellEditingOnBackspace",y.L39],undoRedoCellEditing:[2,"undoRedoCellEditing","undoRedoCellEditing",y.L39],undoRedoCellEditingLimit:"undoRedoCellEditingLimit",defaultCsvExportParams:"defaultCsvExportParams",suppressCsvExport:[2,"suppressCsvExport","suppressCsvExport",y.L39],defaultExcelExportParams:"defaultExcelExportParams",suppressExcelExport:[2,"suppressExcelExport","suppressExcelExport",y.L39],excelStyles:"excelStyles",findSearchValue:"findSearchValue",findOptions:"findOptions",quickFilterText:"quickFilterText",cacheQuickFilter:[2,"cacheQuickFilter","cacheQuickFilter",y.L39],includeHiddenColumnsInQuickFilter:[2,"includeHiddenColumnsInQuickFilter","includeHiddenColumnsInQuickFilter",y.L39],quickFilterParser:"quickFilterParser",quickFilterMatcher:"quickFilterMatcher",applyQuickFilterBeforePivotOrAgg:[2,"applyQuickFilterBeforePivotOrAgg","applyQuickFilterBeforePivotOrAgg",y.L39],excludeChildrenWhenTreeDataFiltering:[2,"excludeChildrenWhenTreeDataFiltering","excludeChildrenWhenTreeDataFiltering",y.L39],enableAdvancedFilter:[2,"enableAdvancedFilter","enableAdvancedFilter",y.L39],alwaysPassFilter:"alwaysPassFilter",includeHiddenColumnsInAdvancedFilter:[2,"includeHiddenColumnsInAdvancedFilter","includeHiddenColumnsInAdvancedFilter",y.L39],advancedFilterParent:"advancedFilterParent",advancedFilterBuilderParams:"advancedFilterBuilderParams",advancedFilterParams:"advancedFilterParams",suppressAdvancedFilterEval:[2,"suppressAdvancedFilterEval","suppressAdvancedFilterEval",y.L39],suppressSetFilterByDefault:[2,"suppressSetFilterByDefault","suppressSetFilterByDefault",y.L39],enableFilterHandlers:[2,"enableFilterHandlers","enableFilterHandlers",y.L39],filterHandlers:"filterHandlers",enableCharts:[2,"enableCharts","enableCharts",y.L39],chartThemes:"chartThemes",customChartThemes:"customChartThemes",chartThemeOverrides:"chartThemeOverrides",chartToolPanelsDef:"chartToolPanelsDef",chartMenuItems:"chartMenuItems",loadingCellRenderer:"loadingCellRenderer",loadingCellRendererParams:"loadingCellRendererParams",loadingCellRendererSelector:"loadingCellRendererSelector",localeText:"localeText",masterDetail:[2,"masterDetail","masterDetail",y.L39],keepDetailRows:[2,"keepDetailRows","keepDetailRows",y.L39],keepDetailRowsCount:"keepDetailRowsCount",detailCellRenderer:"detailCellRenderer",detailCellRendererParams:"detailCellRendererParams",detailRowHeight:"detailRowHeight",detailRowAutoHeight:[2,"detailRowAutoHeight","detailRowAutoHeight",y.L39],context:"context",alignedGrids:"alignedGrids",tabIndex:"tabIndex",rowBuffer:"rowBuffer",valueCache:[2,"valueCache","valueCache",y.L39],valueCacheNeverExpires:[2,"valueCacheNeverExpires","valueCacheNeverExpires",y.L39],enableCellExpressions:[2,"enableCellExpressions","enableCellExpressions",y.L39],suppressTouch:[2,"suppressTouch","suppressTouch",y.L39],suppressFocusAfterRefresh:[2,"suppressFocusAfterRefresh","suppressFocusAfterRefresh",y.L39],suppressBrowserResizeObserver:[2,"suppressBrowserResizeObserver","suppressBrowserResizeObserver",y.L39],suppressPropertyNamesCheck:[2,"suppressPropertyNamesCheck","suppressPropertyNamesCheck",y.L39],suppressChangeDetection:[2,"suppressChangeDetection","suppressChangeDetection",y.L39],debug:[2,"debug","debug",y.L39],loading:[2,"loading","loading",y.L39],overlayLoadingTemplate:"overlayLoadingTemplate",loadingOverlayComponent:"loadingOverlayComponent",loadingOverlayComponentParams:"loadingOverlayComponentParams",suppressLoadingOverlay:[2,"suppressLoadingOverlay","suppressLoadingOverlay",y.L39],overlayNoRowsTemplate:"overlayNoRowsTemplate",noRowsOverlayComponent:"noRowsOverlayComponent",noRowsOverlayComponentParams:"noRowsOverlayComponentParams",suppressNoRowsOverlay:[2,"suppressNoRowsOverlay","suppressNoRowsOverlay",y.L39],pagination:[2,"pagination","pagination",y.L39],paginationPageSize:"paginationPageSize",paginationPageSizeSelector:"paginationPageSizeSelector",paginationAutoPageSize:[2,"paginationAutoPageSize","paginationAutoPageSize",y.L39],paginateChildRows:[2,"paginateChildRows","paginateChildRows",y.L39],suppressPaginationPanel:[2,"suppressPaginationPanel","suppressPaginationPanel",y.L39],pivotMode:[2,"pivotMode","pivotMode",y.L39],pivotPanelShow:"pivotPanelShow",pivotMaxGeneratedColumns:"pivotMaxGeneratedColumns",pivotDefaultExpanded:"pivotDefaultExpanded",pivotColumnGroupTotals:"pivotColumnGroupTotals",pivotRowTotals:"pivotRowTotals",pivotSuppressAutoColumn:[2,"pivotSuppressAutoColumn","pivotSuppressAutoColumn",y.L39],suppressExpandablePivotGroups:[2,"suppressExpandablePivotGroups","suppressExpandablePivotGroups",y.L39],functionsReadOnly:[2,"functionsReadOnly","functionsReadOnly",y.L39],aggFuncs:"aggFuncs",suppressAggFuncInHeader:[2,"suppressAggFuncInHeader","suppressAggFuncInHeader",y.L39],alwaysAggregateAtRootLevel:[2,"alwaysAggregateAtRootLevel","alwaysAggregateAtRootLevel",y.L39],aggregateOnlyChangedColumns:[2,"aggregateOnlyChangedColumns","aggregateOnlyChangedColumns",y.L39],suppressAggFilteredOnly:[2,"suppressAggFilteredOnly","suppressAggFilteredOnly",y.L39],removePivotHeaderRowWhenSingleValueColumn:[2,"removePivotHeaderRowWhenSingleValueColumn","removePivotHeaderRowWhenSingleValueColumn",y.L39],animateRows:[2,"animateRows","animateRows",y.L39],cellFlashDuration:"cellFlashDuration",cellFadeDuration:"cellFadeDuration",allowShowChangeAfterFilter:[2,"allowShowChangeAfterFilter","allowShowChangeAfterFilter",y.L39],domLayout:"domLayout",ensureDomOrder:[2,"ensureDomOrder","ensureDomOrder",y.L39],enableCellSpan:[2,"enableCellSpan","enableCellSpan",y.L39],enableRtl:[2,"enableRtl","enableRtl",y.L39],suppressColumnVirtualisation:[2,"suppressColumnVirtualisation","suppressColumnVirtualisation",y.L39],suppressMaxRenderedRowRestriction:[2,"suppressMaxRenderedRowRestriction","suppressMaxRenderedRowRestriction",y.L39],suppressRowVirtualisation:[2,"suppressRowVirtualisation","suppressRowVirtualisation",y.L39],rowDragManaged:[2,"rowDragManaged","rowDragManaged",y.L39],rowDragInsertDelay:"rowDragInsertDelay",suppressRowDrag:[2,"suppressRowDrag","suppressRowDrag",y.L39],suppressMoveWhenRowDragging:[2,"suppressMoveWhenRowDragging","suppressMoveWhenRowDragging",y.L39],rowDragEntireRow:[2,"rowDragEntireRow","rowDragEntireRow",y.L39],rowDragMultiRow:[2,"rowDragMultiRow","rowDragMultiRow",y.L39],rowDragText:"rowDragText",dragAndDropImageComponent:"dragAndDropImageComponent",dragAndDropImageComponentParams:"dragAndDropImageComponentParams",fullWidthCellRenderer:"fullWidthCellRenderer",fullWidthCellRendererParams:"fullWidthCellRendererParams",embedFullWidthRows:[2,"embedFullWidthRows","embedFullWidthRows",y.L39],groupDisplayType:"groupDisplayType",groupDefaultExpanded:"groupDefaultExpanded",autoGroupColumnDef:"autoGroupColumnDef",groupMaintainOrder:[2,"groupMaintainOrder","groupMaintainOrder",y.L39],groupSelectsChildren:[2,"groupSelectsChildren","groupSelectsChildren",y.L39],groupLockGroupColumns:"groupLockGroupColumns",groupAggFiltering:"groupAggFiltering",groupTotalRow:"groupTotalRow",grandTotalRow:"grandTotalRow",suppressStickyTotalRow:"suppressStickyTotalRow",groupSuppressBlankHeader:[2,"groupSuppressBlankHeader","groupSuppressBlankHeader",y.L39],groupSelectsFiltered:[2,"groupSelectsFiltered","groupSelectsFiltered",y.L39],showOpenedGroup:[2,"showOpenedGroup","showOpenedGroup",y.L39],groupHideParentOfSingleChild:"groupHideParentOfSingleChild",groupRemoveSingleChildren:[2,"groupRemoveSingleChildren","groupRemoveSingleChildren",y.L39],groupRemoveLowestSingleChildren:[2,"groupRemoveLowestSingleChildren","groupRemoveLowestSingleChildren",y.L39],groupHideOpenParents:[2,"groupHideOpenParents","groupHideOpenParents",y.L39],groupAllowUnbalanced:[2,"groupAllowUnbalanced","groupAllowUnbalanced",y.L39],rowGroupPanelShow:"rowGroupPanelShow",groupRowRenderer:"groupRowRenderer",groupRowRendererParams:"groupRowRendererParams",treeData:[2,"treeData","treeData",y.L39],treeDataChildrenField:"treeDataChildrenField",treeDataParentIdField:"treeDataParentIdField",rowGroupPanelSuppressSort:[2,"rowGroupPanelSuppressSort","rowGroupPanelSuppressSort",y.L39],suppressGroupRowsSticky:[2,"suppressGroupRowsSticky","suppressGroupRowsSticky",y.L39],groupHierarchyConfig:"groupHierarchyConfig",pinnedTopRowData:"pinnedTopRowData",pinnedBottomRowData:"pinnedBottomRowData",enableRowPinning:"enableRowPinning",isRowPinnable:"isRowPinnable",isRowPinned:"isRowPinned",rowModelType:"rowModelType",rowData:"rowData",asyncTransactionWaitMillis:"asyncTransactionWaitMillis",suppressModelUpdateAfterUpdateTransaction:[2,"suppressModelUpdateAfterUpdateTransaction","suppressModelUpdateAfterUpdateTransaction",y.L39],datasource:"datasource",cacheOverflowSize:"cacheOverflowSize",infiniteInitialRowCount:"infiniteInitialRowCount",serverSideInitialRowCount:"serverSideInitialRowCount",suppressServerSideFullWidthLoadingRow:[2,"suppressServerSideFullWidthLoadingRow","suppressServerSideFullWidthLoadingRow",y.L39],cacheBlockSize:"cacheBlockSize",maxBlocksInCache:"maxBlocksInCache",maxConcurrentDatasourceRequests:"maxConcurrentDatasourceRequests",blockLoadDebounceMillis:"blockLoadDebounceMillis",purgeClosedRowNodes:[2,"purgeClosedRowNodes","purgeClosedRowNodes",y.L39],serverSideDatasource:"serverSideDatasource",serverSideSortAllLevels:[2,"serverSideSortAllLevels","serverSideSortAllLevels",y.L39],serverSideEnableClientSideSort:[2,"serverSideEnableClientSideSort","serverSideEnableClientSideSort",y.L39],serverSideOnlyRefreshFilteredGroups:[2,"serverSideOnlyRefreshFilteredGroups","serverSideOnlyRefreshFilteredGroups",y.L39],serverSidePivotResultFieldSeparator:"serverSidePivotResultFieldSeparator",viewportDatasource:"viewportDatasource",viewportRowModelPageSize:"viewportRowModelPageSize",viewportRowModelBufferSize:"viewportRowModelBufferSize",alwaysShowHorizontalScroll:[2,"alwaysShowHorizontalScroll","alwaysShowHorizontalScroll",y.L39],alwaysShowVerticalScroll:[2,"alwaysShowVerticalScroll","alwaysShowVerticalScroll",y.L39],debounceVerticalScrollbar:[2,"debounceVerticalScrollbar","debounceVerticalScrollbar",y.L39],suppressHorizontalScroll:[2,"suppressHorizontalScroll","suppressHorizontalScroll",y.L39],suppressScrollOnNewData:[2,"suppressScrollOnNewData","suppressScrollOnNewData",y.L39],suppressScrollWhenPopupsAreOpen:[2,"suppressScrollWhenPopupsAreOpen","suppressScrollWhenPopupsAreOpen",y.L39],suppressAnimationFrame:[2,"suppressAnimationFrame","suppressAnimationFrame",y.L39],suppressMiddleClickScrolls:[2,"suppressMiddleClickScrolls","suppressMiddleClickScrolls",y.L39],suppressPreventDefaultOnMouseWheel:[2,"suppressPreventDefaultOnMouseWheel","suppressPreventDefaultOnMouseWheel",y.L39],scrollbarWidth:"scrollbarWidth",rowSelection:"rowSelection",cellSelection:"cellSelection",rowMultiSelectWithClick:[2,"rowMultiSelectWithClick","rowMultiSelectWithClick",y.L39],suppressRowDeselection:[2,"suppressRowDeselection","suppressRowDeselection",y.L39],suppressRowClickSelection:[2,"suppressRowClickSelection","suppressRowClickSelection",y.L39],suppressCellFocus:[2,"suppressCellFocus","suppressCellFocus",y.L39],suppressHeaderFocus:[2,"suppressHeaderFocus","suppressHeaderFocus",y.L39],selectionColumnDef:"selectionColumnDef",rowNumbers:"rowNumbers",suppressMultiRangeSelection:[2,"suppressMultiRangeSelection","suppressMultiRangeSelection",y.L39],enableCellTextSelection:[2,"enableCellTextSelection","enableCellTextSelection",y.L39],enableRangeSelection:[2,"enableRangeSelection","enableRangeSelection",y.L39],enableRangeHandle:[2,"enableRangeHandle","enableRangeHandle",y.L39],enableFillHandle:[2,"enableFillHandle","enableFillHandle",y.L39],fillHandleDirection:"fillHandleDirection",suppressClearOnFillReduction:[2,"suppressClearOnFillReduction","suppressClearOnFillReduction",y.L39],sortingOrder:"sortingOrder",accentedSort:[2,"accentedSort","accentedSort",y.L39],unSortIcon:[2,"unSortIcon","unSortIcon",y.L39],suppressMultiSort:[2,"suppressMultiSort","suppressMultiSort",y.L39],alwaysMultiSort:[2,"alwaysMultiSort","alwaysMultiSort",y.L39],multiSortKey:"multiSortKey",suppressMaintainUnsortedOrder:[2,"suppressMaintainUnsortedOrder","suppressMaintainUnsortedOrder",y.L39],icons:"icons",rowHeight:"rowHeight",rowStyle:"rowStyle",rowClass:"rowClass",rowClassRules:"rowClassRules",suppressRowHoverHighlight:[2,"suppressRowHoverHighlight","suppressRowHoverHighlight",y.L39],suppressRowTransform:[2,"suppressRowTransform","suppressRowTransform",y.L39],columnHoverHighlight:[2,"columnHoverHighlight","columnHoverHighlight",y.L39],gridId:"gridId",deltaSort:[2,"deltaSort","deltaSort",y.L39],treeDataDisplayType:"treeDataDisplayType",enableGroupEdit:[2,"enableGroupEdit","enableGroupEdit",y.L39],initialState:"initialState",theme:"theme",loadThemeGoogleFonts:[2,"loadThemeGoogleFonts","loadThemeGoogleFonts",y.L39],themeCssLayer:"themeCssLayer",styleNonce:"styleNonce",themeStyleContainer:"themeStyleContainer",getContextMenuItems:"getContextMenuItems",getMainMenuItems:"getMainMenuItems",postProcessPopup:"postProcessPopup",processUnpinnedColumns:"processUnpinnedColumns",processCellForClipboard:"processCellForClipboard",processHeaderForClipboard:"processHeaderForClipboard",processGroupHeaderForClipboard:"processGroupHeaderForClipboard",processCellFromClipboard:"processCellFromClipboard",sendToClipboard:"sendToClipboard",processDataFromClipboard:"processDataFromClipboard",isExternalFilterPresent:"isExternalFilterPresent",doesExternalFilterPass:"doesExternalFilterPass",getChartToolbarItems:"getChartToolbarItems",createChartContainer:"createChartContainer",focusGridInnerElement:"focusGridInnerElement",navigateToNextHeader:"navigateToNextHeader",tabToNextHeader:"tabToNextHeader",navigateToNextCell:"navigateToNextCell",tabToNextCell:"tabToNextCell",getLocaleText:"getLocaleText",getDocument:"getDocument",paginationNumberFormatter:"paginationNumberFormatter",getGroupRowAgg:"getGroupRowAgg",isGroupOpenByDefault:"isGroupOpenByDefault",ssrmExpandAllAffectsAllRows:[2,"ssrmExpandAllAffectsAllRows","ssrmExpandAllAffectsAllRows",y.L39],initialGroupOrderComparator:"initialGroupOrderComparator",processPivotResultColDef:"processPivotResultColDef",processPivotResultColGroupDef:"processPivotResultColGroupDef",getDataPath:"getDataPath",getChildCount:"getChildCount",getServerSideGroupLevelParams:"getServerSideGroupLevelParams",isServerSideGroupOpenByDefault:"isServerSideGroupOpenByDefault",isApplyServerSideTransaction:"isApplyServerSideTransaction",isServerSideGroup:"isServerSideGroup",getServerSideGroupKey:"getServerSideGroupKey",getBusinessKeyForNode:"getBusinessKeyForNode",getRowId:"getRowId",resetRowDataOnUpdate:[2,"resetRowDataOnUpdate","resetRowDataOnUpdate",y.L39],processRowPostCreate:"processRowPostCreate",isRowSelectable:"isRowSelectable",isRowMaster:"isRowMaster",fillOperation:"fillOperation",postSortRows:"postSortRows",getRowStyle:"getRowStyle",getRowClass:"getRowClass",getRowHeight:"getRowHeight",isFullWidthRow:"isFullWidthRow",isRowValidDropPosition:"isRowValidDropPosition"},outputs:{toolPanelVisibleChanged:"toolPanelVisibleChanged",toolPanelSizeChanged:"toolPanelSizeChanged",columnMenuVisibleChanged:"columnMenuVisibleChanged",contextMenuVisibleChanged:"contextMenuVisibleChanged",cutStart:"cutStart",cutEnd:"cutEnd",pasteStart:"pasteStart",pasteEnd:"pasteEnd",columnVisible:"columnVisible",columnPinned:"columnPinned",columnResized:"columnResized",columnMoved:"columnMoved",columnValueChanged:"columnValueChanged",columnPivotModeChanged:"columnPivotModeChanged",columnPivotChanged:"columnPivotChanged",columnGroupOpened:"columnGroupOpened",newColumnsLoaded:"newColumnsLoaded",gridColumnsChanged:"gridColumnsChanged",displayedColumnsChanged:"displayedColumnsChanged",virtualColumnsChanged:"virtualColumnsChanged",columnEverythingChanged:"columnEverythingChanged",columnsReset:"columnsReset",columnHeaderMouseOver:"columnHeaderMouseOver",columnHeaderMouseLeave:"columnHeaderMouseLeave",columnHeaderClicked:"columnHeaderClicked",columnHeaderContextMenu:"columnHeaderContextMenu",componentStateChanged:"componentStateChanged",cellValueChanged:"cellValueChanged",cellEditRequest:"cellEditRequest",rowValueChanged:"rowValueChanged",cellEditingStarted:"cellEditingStarted",cellEditingStopped:"cellEditingStopped",rowEditingStarted:"rowEditingStarted",rowEditingStopped:"rowEditingStopped",bulkEditingStarted:"bulkEditingStarted",bulkEditingStopped:"bulkEditingStopped",batchEditingStarted:"batchEditingStarted",batchEditingStopped:"batchEditingStopped",undoStarted:"undoStarted",undoEnded:"undoEnded",redoStarted:"redoStarted",redoEnded:"redoEnded",cellSelectionDeleteStart:"cellSelectionDeleteStart",cellSelectionDeleteEnd:"cellSelectionDeleteEnd",rangeDeleteStart:"rangeDeleteStart",rangeDeleteEnd:"rangeDeleteEnd",fillStart:"fillStart",fillEnd:"fillEnd",filterOpened:"filterOpened",filterChanged:"filterChanged",filterModified:"filterModified",filterUiChanged:"filterUiChanged",floatingFilterUiChanged:"floatingFilterUiChanged",advancedFilterBuilderVisibleChanged:"advancedFilterBuilderVisibleChanged",findChanged:"findChanged",chartCreated:"chartCreated",chartRangeSelectionChanged:"chartRangeSelectionChanged",chartOptionsChanged:"chartOptionsChanged",chartDestroyed:"chartDestroyed",cellKeyDown:"cellKeyDown",gridReady:"gridReady",firstDataRendered:"firstDataRendered",gridSizeChanged:"gridSizeChanged",modelUpdated:"modelUpdated",virtualRowRemoved:"virtualRowRemoved",viewportChanged:"viewportChanged",bodyScroll:"bodyScroll",bodyScrollEnd:"bodyScrollEnd",dragStarted:"dragStarted",dragStopped:"dragStopped",dragCancelled:"dragCancelled",stateUpdated:"stateUpdated",paginationChanged:"paginationChanged",rowDragEnter:"rowDragEnter",rowDragMove:"rowDragMove",rowDragLeave:"rowDragLeave",rowDragEnd:"rowDragEnd",rowDragCancel:"rowDragCancel",rowResizeStarted:"rowResizeStarted",rowResizeEnded:"rowResizeEnded",columnRowGroupChanged:"columnRowGroupChanged",rowGroupOpened:"rowGroupOpened",expandOrCollapseAll:"expandOrCollapseAll",pivotMaxColumnsExceeded:"pivotMaxColumnsExceeded",pinnedRowDataChanged:"pinnedRowDataChanged",pinnedRowsChanged:"pinnedRowsChanged",rowDataUpdated:"rowDataUpdated",asyncTransactionsFlushed:"asyncTransactionsFlushed",storeRefreshed:"storeRefreshed",headerFocused:"headerFocused",cellClicked:"cellClicked",cellDoubleClicked:"cellDoubleClicked",cellFocused:"cellFocused",cellMouseOver:"cellMouseOver",cellMouseOut:"cellMouseOut",cellMouseDown:"cellMouseDown",rowClicked:"rowClicked",rowDoubleClicked:"rowDoubleClicked",rowSelected:"rowSelected",selectionChanged:"selectionChanged",cellContextMenu:"cellContextMenu",rangeSelectionChanged:"rangeSelectionChanged",cellSelectionChanged:"cellSelectionChanged",tooltipShow:"tooltipShow",tooltipHide:"tooltipHide",sortChanged:"sortChanged"},features:[C.Jv_([Rt,ot]),C.OA$],decls:0,vars:0,template:function(D,F){},encapsulation:2})}}return O})();const ut=new Set(Ce.KVO);function Gt(O,K){return ut.has(O)?""===K||"false"!==K&&K:K}let Te=(()=>{class O{static{this.\u0275fac=function(D){return new(D||O)}}static{this.\u0275mod=C.$C({type:O})}static{this.\u0275inj=S.G2t({})}}return O})();var ke=ge(1951),z=ge(5869);function Y(O,K){const v={browserColorScheme:"light",fontFamily:"var(--cue-font-family)",fontSize:`var(--cue-font-${O}-size)`,dataFontSize:`var(--cue-font-${O}-size)`,headerFontSize:`var(--cue-font-${O}-size)`,backgroundColor:"transparent",foregroundColor:"blue",textColor:"var(--cue-text-primary)",borderColor:"transparent",rowHeight:`var(--cue-table-${O}-row-height)`,headerHeight:`var(--cue-table-${O}-header-height)`,headerColumnResizeHandleColor:"var(--cue-table-secondary-text-color)",headerColumnResizeHandleWidth:1,columnBorder:!1,wrapperBorder:!0,headerRowBorder:!1,rowBorder:{style:"solid",width:1,color:"var(--cue-table-border-color)"},headerBackgroundColor:"transparent",headerTextColor:"var(--cue-table-header-foreground-color)",menuBackgroundColor:"var(--cue-menu-background-color)",menuBorder:"1px solid var(--cue-border-color)",menuTextColor:"var(--cue-menu-foreground-color)",borderRadius:"var(--cue-menu-border-radius)",inputBackgroundColor:"var(--cue-menu-item-background-color)",inputFocusBackgroundColor:"var(--cue-menu-item-focus-background-color)",inputIconColor:"var(--cue-menu-foreground-color)",pickerButtonFocusBackgroundColor:"var(--cue-menu-item-focus-background-color)",pickerListBackgroundColor:"var(--cue-menu-background-color)",selectCellBackgroundColor:"var(--cue-menu-background-color)",pinnedRowBackgroundColor:"var(--cue-table-selected-color)",pinnedRowTextColor:"var(--cue-table-selected-text-color)",panelBackgroundColor:"var(--cue-menu-background-color)",tabBackgroundColor:"var(--cue-menu-background-color)",tooltipBackgroundColor:"var(--cue-menu-background-color)",tooltipTextColor:"var(--cue-menu-foreground-color)",checkboxUncheckedBorderColor:"var(--cue-border-color)",checkboxCheckedBorderColor:"var(--cue-border-color)",checkboxIndeterminateBorderColor:"var(--cue-border-color)",rowHoverColor:"var(--cue-table-row-hover-bg)"};return K&&(v.selectedRowBackgroundColor="var(--cue-table-selected-color)"),Ce.r$M.withParams(v).withPart(Se)}const Se=(0,Ce.JuG)({type:"image",mask:!0,icons:{filter:{svg:z.filter}}});var we=ge(9615),Ct=ge(5970),ht=ge(5381),Wt=ge(2245),Be=ge(1696),Le=ge(3319),Pe=ge(2444);const x=(O,K,v)=>({startIndex:O,endIndex:K,totalItems:v});function E(O,K){if(1&O){const v=C.RV6();C.j41(0,"cue-flexcontainer",3)(1,"cue-typography",4),C.EFF(2),C.nI1(3,"transloco"),C.k0s(),C.j41(4,"cue-select",5),C.mxI("valueChange",function(F){S.eBV(v);const A=C.XpG();return C.DH7(A.pageSize,F)||(A.pageSize=F),S.Njj(F)}),C.k0s()(),C.nrm(5,"span",6)}if(2&O){const v=C.XpG();C.R7$(),C.Y8G("noWrap",!0),C.R7$(),C.JRh(C.bMT(3,5,"components.paginator.itemsPerPage")),C.R7$(2),C.R50("value",v.pageSize),C.Y8G("options",v.pageSizeOptions())("underline",!1)}}function B(O,K){if(1&O){const v=C.RV6();C.j41(0,"cue-button",7),C.bIt("click",function(){S.eBV(v);const F=C.XpG();return S.Njj(F.first())}),C.nrm(1,"cue-button-icon",8),C.k0s(),C.j41(2,"cue-button",7),C.bIt("click",function(){S.eBV(v);const F=C.XpG();return S.Njj(F.back())}),C.nrm(3,"cue-button-icon",9),C.k0s()}}function U(O,K){if(1&O){const v=C.RV6();C.j41(0,"cue-button",7),C.bIt("click",function(){S.eBV(v);const F=C.XpG();return S.Njj(F.next())}),C.nrm(1,"cue-button-icon",10),C.k0s(),C.j41(2,"cue-button",7),C.bIt("click",function(){S.eBV(v);const F=C.XpG();return S.Njj(F.last())}),C.nrm(3,"cue-button-icon",11),C.k0s()}}let Q=(()=>{class O{pageSizeOptions=(0,y.hFB)([5,10,25,100]);size=(0,y.hFB)(111);pageSize=(0,y.geq)(10);menuPosition=(0,y.hFB)("topright");autoAdjust=(0,y.hFB)(!0);currentPage=(0,y.CGW)();_startIndex=(0,S.vPA)(0);_endIndex=(0,S.vPA)(0);anythingToPaginate=(0,Ee.EW)(()=>{const v=this.adjustedPageSizeOptions()[this.adjustedPageSizeOptions().length-1];return this.size()>v});startIndex=(0,Ee.EW)(()=>this._startIndex()+1);endIndex=(0,Ee.EW)(()=>Math.min(this._endIndex(),this.size()));isFirstPage=(0,Ee.EW)(()=>0===this._startIndex());isLastPage=(0,Ee.EW)(()=>this._endIndex()>=this.size());adjustedPageSizeOptions=(0,Ee.EW)(()=>{let v=this.pageSizeOptions();if(!this.autoAdjust())return v;const D=v[v.length-1],F=this.size();return F<D&&(v=v.filter(A=>A<=F),v.length||(v=[F])),v});constructor(){(0,S.QZP)(()=>{this._resetPagination()}),(0,S.QZP)(()=>{this.currentPage.emit({startIndex:this._startIndex(),endIndex:this._endIndex(),pageSize:this.pageSize()})})}setSize(v){this.pageSize.set(v),this._resetPagination()}next(){const v=this._endIndex();this._startIndex.set(v),this._endIndex.set(v+this.pageSize())}back(){const v=Math.max(0,this._startIndex()-this.pageSize());this._startIndex.set(v),this._endIndex.set(v+this.pageSize())}first(){this._startIndex.set(0),this._endIndex.set(this.pageSize())}last(){const v=Math.max(0,this.size()-(this.size()%this.pageSize()||this.pageSize()));this._startIndex.set(v),this._endIndex.set(this.size())}_resetPagination(){this._startIndex.set(0),this._endIndex.set(Math.min(this.pageSize(),this.size()))}static \u0275fac=function(D){return new(D||O)};static \u0275cmp=C.VBU({type:O,selectors:[["cue-paginator"]],inputs:{pageSizeOptions:[1,"pageSizeOptions"],size:[1,"size"],pageSize:[1,"pageSize"],menuPosition:[1,"menuPosition"],autoAdjust:[1,"autoAdjust"]},outputs:{pageSize:"pageSizeChange",currentPage:"currentPage"},decls:8,vars:11,consts:[["direction","row","justify","end","align","center",1,"paginator",2,"width","calc(100% - 4px)","padding","0 2px"],["size","s"],["direction","row","gap","s"],["direction","row","gap","s","align","center"],["size","s",3,"noWrap"],["size","xs","menuPosition","topright",3,"valueChange","value","options","underline"],[2,"flex","1"],["size","xs","variant","tertiary",3,"click"],["icon","paginator-first"],["icon","paginator-back"],["icon","paginator-next"],["icon","paginator-last"]],template:function(D,F){1&D&&(C.j41(0,"cue-flexcontainer",0),C.nVh(1,E,6,7),C.j41(2,"cue-typography",1),C.EFF(3),C.nI1(4,"transloco"),C.k0s(),C.j41(5,"cue-flexcontainer",2),C.nVh(6,B,4,0),C.nVh(7,U,4,0),C.k0s()()),2&D&&(C.R7$(),C.vxM(!F.autoAdjust()||F.anythingToPaginate()?1:-1),C.R7$(2),C.JRh(C.i5U(4,4,"components.paginator.currentDisplay",C.sMw(7,x,F.startIndex(),F.endIndex(),F.size()))),C.R7$(3),C.vxM(F.isFirstPage()?-1:6),C.R7$(),C.vxM(F.isLastPage()?-1:7))},dependencies:[ht.n,Wt.o,Be.$,Le.a,Pe.l,_t.Kj],styles:[".paginator[_ngcontent-%COMP%]{color:var(--cue-paginator-text-color);padding-top:3px;padding-bottom:3px}"],changeDetection:0})}return O})();function de(O,K){if(1&O){const v=C.RV6();C.j41(0,"ag-grid-angular",4),C.bIt("gridReady",function(F){S.eBV(v);const A=C.XpG();return S.Njj(A.onGridReady(F))})("selectionChanged",function(F){S.eBV(v);const A=C.XpG();return S.Njj(A.onSelectionChanged(F))})("cellValueChanged",function(F){S.eBV(v);const A=C.XpG();return S.Njj(A.onCellValueChanged(F))})("filterChanged",function(){S.eBV(v);const F=C.XpG();return S.Njj(F.onFilterChanged())})("modelUpdated",function(){S.eBV(v);const F=C.XpG();return S.Njj(F.onModelUpdated())}),C.k0s()}if(2&O){const v=C.XpG();C.Aen(v.style()),C.HbH("ag-theme-custom ag-theme-custom-"+v.size()),C.Y8G("rowData",v.rowData())("columnDefs",v.columnDefs())("gridOptions",v.gridOptionsInternal())("pagination",!0)("paginationPageSize",v.paginationPageSize())("suppressPaginationPanel",!0)("rowSelection",v.rowSelection())("enableCellTextSelection",v.enableCellTextSelection())("ensureDomOrder",!0)}}function ie(O,K){if(1&O&&(C.j41(0,"div",5)(1,"div",6),C.nrm(2,"div",7),C.j41(3,"span"),C.EFF(4,"Loading grid..."),C.k0s()()()),2&O){const v=C.XpG();C.Aen(v.style())}}function j(O,K){if(1&O){const v=C.RV6();C.nrm(0,"div",8),C.j41(1,"cue-paginator",9),C.mxI("pageSizeChange",function(F){S.eBV(v);const A=C.XpG();return C.DH7(A.paginationPageSize,F)||(A.paginationPageSize=F),S.Njj(F)}),C.bIt("currentPage",function(F){S.eBV(v);const A=C.XpG();return S.Njj(A.onPageChange(F))}),C.k0s()}if(2&O){const v=C.XpG();C.R7$(),C.Y8G("size",v.totalRowCount()),C.R50("pageSize",v.paginationPageSize)}}Ce.syG.registerModules([Ce.JKr]);let pe=(()=>{class O{rowData=(0,y.hFB)([]);columnDefs=(0,y.hFB)([]);gridOptions=(0,y.hFB)({});size=(0,y.hFB)("m");rowSelection=(0,y.hFB)(void 0);height=(0,y.hFB)(null);paginationPageSize=(0,y.geq)(10);showPaginator=(0,y.hFB)(!0);enableCellTextSelection=(0,y.hFB)(!0);noRowsText=(0,y.hFB)("No rows to display");overlaySettings=(0,y.hFB)(new ke.K);overlayActions=(0,y.hFB)([]);selectedRows=(0,y.CGW)();hoveredCell=(0,y.CGW)();cellValueChanged=(0,y.CGW)();visibleRows=(0,y.CGW)();gridApiReady=(0,y.CGW)();_filteredRowCount=(0,S.vPA)(0);totalRowCount=(0,Ee.EW)(()=>this._filteredRowCount()||this.rowData().length);clickableRows=(0,Ee.EW)(()=>"singleRow"===this.rowSelection()?.mode);bgColor=(0,S.vPA)("transparent");_stylesLoaded=(0,S.vPA)(!1);gridApi;_hostEl=(0,S.WQX)(C.aKT);constructor(){this.setAgGridCssProperties(),(0,S.QZP)(()=>{const v=this.noRowsText(),D=this.rowData();this.gridApi&&(this.gridApi.setGridOption("overlayNoRowsTemplate",v),0===D.length?(this.gridApi.hideOverlay(),setTimeout(()=>{this.gridApi.showNoRowsOverlay()},0)):this.gridApi.hideOverlay())}),(0,S.QZP)(()=>{const v=this._localeText();this.gridApi&&v&&Object.keys(v).length>0&&(this.gridApi.setGridOption("localeText",v),this.gridApi.refreshHeader(),this.gridApi.getColumns()?.forEach(D=>{this.gridApi.destroyFilter(D)}))}),(0,S.QZP)(()=>{this.size(),this.setAgGridCssProperties()}),(0,S.QZP)(()=>{this.columnDefs(),this.gridApi&&setTimeout(()=>{this.gridApi&&this.gridApi.refreshCells({force:!0})},0)}),this._onScroll=()=>{this.overlayVisible.set(!1),this.currentCellData.set(null)},window.addEventListener("scroll",this._onScroll,!0),this._onHideCellOverlay=()=>{this.overlayVisible.set(!1),this.currentCellData.set(null)},window.addEventListener("cue-hide-cell-overlay",this._onHideCellOverlay),this._visibilityObserver=new IntersectionObserver(v=>{0===v[0]?.intersectionRatio&&(this.overlayVisible.set(!1),this.currentCellData.set(null))}),this._visibilityObserver.observe(this._hostEl.nativeElement)}_onScroll;_onHideCellOverlay;_visibilityObserver;onGridReady(v){this.gridApi=v.api,this.gridApiReady.emit(v.api);const D=this._localeText();D&&Object.keys(D).length>0&&this.gridApi.setGridOption("localeText",D),this._updateFilteredRowCount(),v.api.addEventListener("filterChanged",()=>{this._updateFilteredRowCount()}),this.initializeGridLayout()}setAgGridCssProperties(){const v=this.size(),D=this._hostEl.nativeElement,A={xs:{rowHeight:"32px",headerHeight:"36px",fontSize:"12px"},s:{rowHeight:"36px",headerHeight:"42px",fontSize:"13px"},m:{rowHeight:"42px",headerHeight:"48px",fontSize:"14px"},l:{rowHeight:"48px",headerHeight:"54px",fontSize:"16px"},xl:{rowHeight:"54px",headerHeight:"60px",fontSize:"18px"}}[v];D.style.setProperty("--ag-row-height",A.rowHeight),D.style.setProperty("--ag-header-height",A.headerHeight),D.style.setProperty("--ag-font-size",A.fontSize),this._stylesLoaded.set(!0)}initializeGridLayout(){this.gridApi&&requestAnimationFrame(()=>{this.gridApi&&(this.gridApi.refreshCells({force:!0}),this.gridApi.sizeColumnsToFit(),this.gridApi.dispatchEvent({type:"gridSizeChanged"}))})}onSelectionChanged(v){const D=v.api.getSelectedRows();this.selectedRows.emit(D),this.overlayVisible.set(!1)}onCellValueChanged(v){if(this.cellValueChanged.emit(v),this.gridApi){const D=this.gridApi.getSelectedRows(),F=v.node;D.some(re=>re===F.data)&&this.selectedRows.emit(D)}}onFilterChanged(){this._emitVisibleRows()}onModelUpdated(){this._emitVisibleRows()}_emitVisibleRows(){if(this.gridApi){const v=[];this.gridApi.forEachNodeAfterFilter(D=>{v.push(D.data)}),this.visibleRows.emit(v)}}onPageChange(v){if(this.gridApi){const D=Math.floor(v.startIndex/v.pageSize);this.gridApi.paginationGoToPage(D)}}_transloco=(0,S.WQX)(_t.JO);_localeText=(0,q.ot)(this._transloco.selectTranslateObject("components.agGrid.localeText"),{initialValue:{}});gridOptionsInternal=(0,Ee.EW)(()=>{const v=this.size(),D=this.clickableRows(),F=this.noRowsText(),A=this.enableCellTextSelection(),re=this.gridOptions();return{theme:Y(v,D),overlayNoRowsTemplate:F,enableCellTextSelection:A,...D?{getRowStyle:()=>({cursor:"pointer"})}:{},processDataFromClipboard:X=>X.data,processCellFromClipboard:X=>X.value,...re}});ngOnDestroy(){this._onScroll&&window.removeEventListener("scroll",this._onScroll,!0),this._onHideCellOverlay&&window.removeEventListener("cue-hide-cell-overlay",this._onHideCellOverlay),this._visibilityObserver&&this._visibilityObserver.disconnect()}style=(0,Ee.EW)(()=>({height:this.height()??`var(--cue-table-${this.size()}-height)`}));_updateFilteredRowCount(){if(this.gridApi){const v=this.gridApi.getDisplayedRowCount();this._filteredRowCount.set(v)}}copyToClipboard(){this.gridApi&&this.gridApi.copySelectedRowsToClipboard()}copySelectedRangeToClipboard(){this.gridApi&&this.gridApi.copySelectedRangeToClipboard()}selectAll(){this.gridApi&&this.gridApi.selectAll()}deselectAll(){this.gridApi&&this.gridApi.deselectAll()}overlayVisible=(0,S.vPA)(!1);overlayPosition=(0,S.vPA)(null);currentCellData=(0,S.vPA)(null);onGridMouseOver(v){const D=v.target,F=this.overlaySettings().mode;"none"!==F&&("cell"===F?this.handleCellHover(D):"row"===F&&this.handleRowHover(D))}onGridMouseOut(v){const D=v.target,F=this.overlaySettings().mode,A=v.relatedTarget;if("none"===F)return;const re=document.querySelector(".overlay-container");if(re&&A&&re.contains(A))return;const Z=v.currentTarget,X=!D.closest(".ag-row")&&!D.closest(".ag-cell"),fe=A&&Z.contains(A)&&!A.closest(".ag-row")&&!A.closest(".ag-cell")&&!A.closest(".cue-paginator");if(X||fe)return this.overlayVisible.set(!1),void this.currentCellData.set(null);"cell"===F?D.closest(".ag-cell")||(this.overlayVisible.set(!1),this.currentCellData.set(null)):"row"===F&&(D.closest(".ag-row")||(this.overlayVisible.set(!1),this.currentCellData.set(null)))}handleCellHover(v){this.overlayVisible.set(!1),this.currentCellData.set(null);const D=v.closest(".ag-cell");if(D&&this.gridApi){const F=D.getBoundingClientRect(),A=D.closest(".ag-row");if(A){const re=parseInt(A.getAttribute("row-index")||"0",10),Z=D.getAttribute("col-id");if(null!==Z){const X=this.gridApi.getDisplayedRowAtIndex(re),fe=this.gridApi.getColumn(Z);if(X&&fe){const be={rowData:X.data,colDef:fe.getColDef(),value:X.data[Z],rowIndex:re,columnIndex:fe.getInstanceId()||0,cellRect:F};this.currentCellData.set(be),this.overlayPosition.set({x:F.left,y:F.top,width:F.width,height:F.height}),this.hoveredCell.emit(be),this.overlayVisible.set(!0)}}}}}handleRowHover(v){this.overlayVisible.set(!1),this.currentCellData.set(null);const D=v.closest(".ag-row");if(D&&this.gridApi){const F=parseInt(D.getAttribute("row-index")||"0",10),A=this.gridApi.getDisplayedRowAtIndex(F);if(A){const re=D.getBoundingClientRect(),Z=D.querySelector(".ag-cell:last-child"),X=Z?Z.getBoundingClientRect():re,fe=this.columnDefs()[0]?.field||"",be=this.gridApi.getColumn(fe),Qe={rowData:A.data,colDef:be?.getColDef()||{},value:A.data[fe],rowIndex:F,columnIndex:0,cellRect:X};this.currentCellData.set(Qe),this.overlayPosition.set({x:X.left,y:X.top,width:X.width,height:X.height}),this.overlayVisible.set(!0)}}}handleOverlayAction(v){const D=this.currentCellData();D&&(v(D),this.overlayVisible.set(!1))}onOverlayVisibilityChange(v){this.overlayVisible.set(v)}onContainerResize(){this.gridApi&&this.gridApi.sizeColumnsToFit()}static \u0275fac=function(D){return new(D||O)};static \u0275cmp=C.VBU({type:O,selectors:[["cue-ag-grid"]],inputs:{rowData:[1,"rowData"],columnDefs:[1,"columnDefs"],gridOptions:[1,"gridOptions"],size:[1,"size"],rowSelection:[1,"rowSelection"],height:[1,"height"],paginationPageSize:[1,"paginationPageSize"],showPaginator:[1,"showPaginator"],enableCellTextSelection:[1,"enableCellTextSelection"],noRowsText:[1,"noRowsText"],overlaySettings:[1,"overlaySettings"],overlayActions:[1,"overlayActions"]},outputs:{paginationPageSize:"paginationPageSizeChange",selectedRows:"selectedRows",hoveredCell:"hoveredCell",cellValueChanged:"cellValueChanged",visibleRows:"visibleRows",gridApiReady:"gridApiReady"},decls:5,vars:11,consts:[["cueResized","",1,"grid-container",3,"mouseover","mouseout","cueBgColor","resized"],[3,"class","style","rowData","columnDefs","gridOptions","pagination","paginationPageSize","suppressPaginationPanel","rowSelection","enableCellTextSelection","ensureDomOrder"],[1,"grid-loading-placeholder",3,"style"],[3,"visibilityChange","settings","visible","menuItems","positionConfig","data","bgColor","containerEl"],[3,"gridReady","selectionChanged","cellValueChanged","filterChanged","modelUpdated","rowData","columnDefs","gridOptions","pagination","paginationPageSize","suppressPaginationPanel","rowSelection","enableCellTextSelection","ensureDomOrder"],[1,"grid-loading-placeholder"],[1,"loading-content"],[1,"loading-spinner"],[2,"height","20px"],[1,"cue-paginator",3,"pageSizeChange","currentPage","size","pageSize"]],template:function(D,F){1&D&&(C.j41(0,"div",0),C.bIt("mouseover",function(re){return F.onGridMouseOver(re)})("mouseout",function(re){return F.onGridMouseOut(re)})("cueBgColor",function(re){return F.bgColor.set(re)})("resized",function(){return F.onContainerResize()}),C.nVh(1,de,1,13,"ag-grid-angular",1)(2,ie,5,2,"div",2),C.j41(3,"cue-cell-overlay",3),C.bIt("visibilityChange",function(re){return F.onOverlayVisibilityChange(re)}),C.k0s(),C.nVh(4,j,2,2),C.k0s()),2&D&&(C.AVh("styles-loading",!F._stylesLoaded()),C.R7$(),C.vxM(F._stylesLoaded()?1:2),C.R7$(2),C.Y8G("settings",F.overlaySettings())("visible",F.overlayVisible())("menuItems",F.overlayActions())("positionConfig",F.overlayPosition())("data",F.currentCellData())("bgColor",F.bgColor())("containerEl",F._hostEl.nativeElement),C.R7$(),C.vxM(F.rowData().length&&F.showPaginator()?4:-1))},dependencies:[Te,It,Q,ke.X,we.k,Ct.C],styles:[".cell-overlay-panel[_ngcontent-%COMP%]{z-index:1}.cell-overlay-panel[_ngcontent-%COMP%] .overlay-container[_ngcontent-%COMP%]{height:100%;width:100%}.grid-container[_ngcontent-%COMP%]{position:relative;height:100%;width:100%;display:flex;flex-direction:column;z-index:1;min-height:0}.grid-container.styles-loading[_ngcontent-%COMP%]{opacity:.9}.grid-container[_ngcontent-%COMP%]:not(.styles-loading){opacity:1}.grid-loading-placeholder[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;min-height:200px;background:transparent}.grid-loading-placeholder[_ngcontent-%COMP%] .loading-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:12px;color:var(--cue-color-text-secondary, #666)}.grid-loading-placeholder[_ngcontent-%COMP%] .loading-content[_ngcontent-%COMP%] .loading-spinner[_ngcontent-%COMP%]{width:24px;height:24px;border:2px solid var(--cue-color-border, #e0e0e0);border-top:2px solid var(--cue-color-primary, #007bff);border-radius:50%;animation:_ngcontent-%COMP%_spin 1s linear infinite}.grid-loading-placeholder[_ngcontent-%COMP%] .loading-content[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:14px;font-family:var(--cue-font-family, sans-serif)}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}} .ag-theme-custom{height:100%;width:100%;display:flex;flex-direction:column;flex:1 1 auto;min-height:0;--ag-row-height: var(--cue-table-m-row-height, 42px);--ag-header-height: var(--cue-table-m-header-height, 48px);--ag-font-size: var(--cue-font-m-size, 14px);--ag-font-family: var(--cue-font-family, sans-serif)} .ag-theme-custom.ag-theme-custom-xs{--ag-row-height: var(--cue-table-xs-row-height, 32px);--ag-header-height: var(--cue-table-xs-header-height, 36px);--ag-font-size: var(--cue-font-xs-size, 12px)} .ag-theme-custom.ag-theme-custom-s{--ag-row-height: var(--cue-table-s-row-height, 36px);--ag-header-height: var(--cue-table-s-header-height, 42px);--ag-font-size: var(--cue-font-s-size, 13px)} .ag-theme-custom.ag-theme-custom-m{--ag-row-height: var(--cue-table-m-row-height, 42px);--ag-header-height: var(--cue-table-m-header-height, 48px);--ag-font-size: var(--cue-font-m-size, 14px)} .ag-theme-custom.ag-theme-custom-l{--ag-row-height: var(--cue-table-l-row-height, 48px);--ag-header-height: var(--cue-table-l-header-height, 54px);--ag-font-size: var(--cue-font-l-size, 16px)} .ag-theme-custom.ag-theme-custom-xl{--ag-row-height: var(--cue-table-xl-row-height, 54px);--ag-header-height: var(--cue-table-xl-header-height, 60px);--ag-font-size: var(--cue-font-xl-size, 18px)} .ag-theme-custom .ag-root-wrapper{display:flex;flex-direction:column;flex:1 1 auto;min-height:0} .ag-theme-custom .ag-root-wrapper-body{display:flex;flex-direction:column;flex:1 1 auto;min-height:0} .ag-theme-custom .ag-root{display:flex;flex-direction:column;flex:1 1 auto;min-height:0} .ag-theme-custom .ag-body{flex:1 1 auto;min-height:0} .ag-theme-custom .ag-body-viewport{flex:1 1 auto;min-height:0;overflow-y:auto} .ag-theme-custom .ag-body-viewport-wrapper{flex:1 1 auto;min-height:0} .ag-theme-custom .ag-body-horizontal-scroll{flex-shrink:0} .ag-theme-custom .ag-header{position:sticky;top:0;z-index:2;background:inherit;flex-shrink:0} .ag-theme-custom .ag-floating-top{flex-shrink:0} .ag-theme-custom .ag-floating-bottom{flex-shrink:0} .ag-theme-custom .ag-status-bar{flex-shrink:0} .ag-theme-custom .ag-paging-panel{flex-shrink:0} .ag-row .ag-cell{display:flex;justify-content:flex-start;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} .ag-cell-wrapper{display:flex;align-items:center;justify-content:inherit;flex:1;min-width:0;width:100%} .ag-cell-value{display:flex;align-items:center;justify-content:inherit;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-user-select:text;user-select:text} .ag-cell.ag-cell-range-selected .ag-cell-value, .ag-cell.ag-cell-focus .ag-cell-value{white-space:normal;word-wrap:break-word;overflow-wrap:break-word} .ag-picker-field-wrapper, .ag-list-item{color:var(--cue-menu-foreground-color)!important} .ag-row.ag-row-selected .ag-cell, .ag-row.ag-row-selected .ag-cell .ag-cell-value{color:var(--cue-table-selected-text-color)!important} .ag-row:hover .ag-cell, .ag-row:hover .ag-cell .ag-cell-value{color:var(--cue-table-highlight-text-color)!important} .ag-row.ag-row-selected:hover .ag-cell, .ag-row.ag-row-selected:hover .ag-cell .ag-cell-value{color:var(--cue-table-selected-text-color)!important} .ag-cell:focus, .ag-cell.ag-cell-focus{border:none!important;outline:none!important} .ag-cell.ag-cell-range-selected{border:none!important;background-color:transparent!important} .ag-cell.ag-cell-range-single-cell{border:none!important;background-color:transparent!important} .header-align-left .ag-header-cell-label{justify-content:flex-start} .header-align-center .ag-header-cell-label{justify-content:center} .header-align-right .ag-header-cell-label{justify-content:flex-end} .cue-paginator{position:sticky;bottom:0;z-index:2;background:inherit;flex-shrink:0;margin-top:auto}"],changeDetection:0})}return O})()},1951(So,ei,ge){"use strict";ge.d(ei,{K:()=>ut,X:()=>Gt});var y=ge(7705),S=ge(5802),Ee=ge(2271),C=ge(6939),q=ge(63),_t=ge(6279),Ce=ge(356),Je=ge(6117),rt=ge(29),ti=ge(3319),te=ge(1696),$=ge(5547);const ot=(Te,ke)=>ke.label;function Fe(Te,ke){if(1&Te&&$.nrm(0,"cue-svg-icon",10),2&Te){const z=$.XpG().$implicit;$.Y8G("name",z.icon)}}function ve(Te,ke){if(1&Te){const z=$.RV6();$.j41(0,"cue-menu-item",9),$.bIt("click",function(Se){const we=S.eBV(z).$implicit,Ct=$.XpG(3);return S.Njj(Ct.handleClick(Se,we))}),$.nVh(1,Fe,1,1,"cue-svg-icon",10),$.EFF(2),$.k0s()}if(2&Te){const z=ke.$implicit;$.R7$(),$.vxM(z.icon?1:-1),$.R7$(),$.SpI("",z.label," ")}}function Rt(Te,ke){if(1&Te){const z=$.RV6();$.j41(0,"cue-menu",5,0)(2,"cue-button",6,1),$.bIt("click",function(){S.eBV(z);const Se=$.XpG(2);return S.Njj(Se.onMenuButtonClick())}),$.nrm(4,"cue-button-icon",7),$.k0s(),$.j41(5,"cue-menu-wrap",8),$.bIt("click",function(Se){S.eBV(z);const we=$.XpG(2);return S.Njj(we.onMenuItemContainerClick(Se))}),$.Z7z(6,ve,3,2,"cue-menu-item",null,ot),$.k0s()()}if(2&Te){const z=$.XpG(2);$.R7$(2),$.Y8G("variant",z.settings().buttonVariant)("size",z.settings().buttonSize),$.R7$(2),$.Y8G("icon",z.settings().buttonIcon),$.R7$(2),$.Dyx(z.menuItems())}}function It(Te,ke){if(1&Te){const z=$.RV6();$.j41(0,"div",3),$.bIt("mouseleave",function(){S.eBV(z);const Se=$.XpG();return S.Njj(Se.onMouseLeave())})("wheel",function(Se){S.eBV(z);const we=$.XpG();return S.Njj(we.onWheel(Se))})("scroll",function(Se){S.eBV(z);const we=$.XpG();return S.Njj(we.onScroll(Se))}),$.j41(1,"div",4),$.nVh(2,Rt,8,3,"cue-menu",5),$.k0s()()}if(2&Te){const z=$.XpG();$.Aen(z.containerStyles()),$.R7$(2),$.vxM(z.visible()?2:-1)}}class ut{mode="none";buttonIcon="more-vert";buttonVariant="accent";buttonSize="xs"}let Gt=(()=>{class Te{portal;overlay=(0,S.WQX)(q.hJ);overlayRef=null;visible=(0,y.hFB)(!1);data=(0,y.hFB)(null);settings=(0,y.hFB)(new ut);menuItems=(0,y.hFB)([]);positionConfig=(0,y.hFB)(null);bgColor=(0,y.hFB)("transparent");containerEl=(0,y.hFB)(null);visibilityChange=(0,y.CGW)();_globalMouseTracker=null;_isMenuOpen=!1;containerStyles=(0,Ee.EW)(()=>`\n pointer-events: none; \n background: linear-gradient(to left, ${this.bgColor()} 20px, transparent 100%);\n height: 100%;\n width: 100%;\n `);constructor(){(0,S.QZP)(()=>{const z=this.positionConfig();this.visible()&&z?(this.attachOverlay(z),this.startGlobalMouseTracking(z)):(this.detachOverlay(),this.stopGlobalMouseTracking())})}ngOnDestroy(){this.stopGlobalMouseTracking(),this.detachOverlay()}startGlobalMouseTracking(z){this.stopGlobalMouseTracking();let Y=0;this._globalMouseTracker=we=>{const Ct=Date.now();if(Ct-Y<50)return;Y=Ct;const ht=we.clientX,Wt=we.clientY;!(ht>=z.x-10&&ht<=z.x+z.width+10&&Wt>=z.y-10&&Wt<=z.y+z.height+10)&&!this._isMenuOpen&&setTimeout(()=>{this.visibilityChange.emit(!1)},100)},this._globalMouseTracker&&document.addEventListener("mousemove",this._globalMouseTracker,{passive:!0})}stopGlobalMouseTracking(){this._globalMouseTracker&&(document.removeEventListener("mousemove",this._globalMouseTracker),this._globalMouseTracker=null)}attachOverlay(z){const Y=this.adjustForPaginator(z);if(!this.overlayRef){const we=this.overlay.position().flexibleConnectedTo({x:Y.x,y:Y.y,width:Y.width,height:Y.height}).withPositions([{originX:"start",originY:"top",overlayX:"start",overlayY:"top"}]).withPush(!1);this.overlayRef=this.overlay.create({positionStrategy:we,width:Y.width,height:Y.height,hasBackdrop:!1,panelClass:["cell-overlay-panel"],scrollStrategy:this.overlay.scrollStrategies.noop()})}const Se=this.overlay.position().flexibleConnectedTo({x:Y.x,y:Y.y,width:Y.width,height:Y.height}).withPositions([{originX:"start",originY:"top",overlayX:"start",overlayY:"top"}]).withPush(!1);this.overlayRef.updatePositionStrategy(Se),this.overlayRef.updateSize({width:Y.width,height:Y.height}),this.overlayRef.hasAttached()||(this.overlayRef.attach(this.portal),setTimeout(()=>{const we=this.overlayRef?.overlayElement;we&&(we.style.pointerEvents="none",we.style.setProperty("pointer-events","none","important"))},0))}detachOverlay(){this.overlayRef&&this.overlayRef.hasAttached()&&this.overlayRef.detach()}adjustForPaginator(z){let Y={...z};const Se=this.containerEl()??document.documentElement,we=Se.querySelector(".ag-header");if(we){const ht=we.getBoundingClientRect();if(Y.y<ht.bottom){const Be=Math.max(0,Y.y+Y.height-ht.bottom),Le=Math.max(Y.y,ht.bottom);if(Be<10)return{...Y,height:0};Y={...Y,y:Le,height:Be}}}const Ct=Se.querySelector(".cue-paginator");if(Ct){const ht=Ct.getBoundingClientRect();if(Y.y+Y.height>ht.top){const Be=Math.max(0,ht.top-Y.y);if(Be<10)return{...Y,height:0};Y={...Y,height:Be}}}return Y}handleClick(z,Y){z.stopPropagation(),this._isMenuOpen=!1,Y.action(this.data()),this.detachOverlay(),this.stopGlobalMouseTracking(),this.visibilityChange.emit(!1)}onMouseLeave(){this._isMenuOpen||(this.stopGlobalMouseTracking(),this.visibilityChange.emit(!1))}onWheel(z){return!0}onScroll(z){return!0}onMenuButtonClick(){this._isMenuOpen=!0,setTimeout(()=>{const z=Y=>{const Se=Y.target;!Se.closest("cue-menu-wrap")&&!Se.closest("cue-button")&&(this._isMenuOpen=!1,document.removeEventListener("click",z))};document.addEventListener("click",z,{capture:!0})},0)}onMenuItemContainerClick(z){this._isMenuOpen=!1}static \u0275fac=function(Y){return new(Y||Te)};static \u0275cmp=$.VBU({type:Te,selectors:[["cue-cell-overlay"]],viewQuery:function(Y,Se){if(1&Y&&$.GBs(C.bV,5),2&Y){let we;$.mGM(we=$.lsd())&&(Se.portal=we.first)}},inputs:{visible:[1,"visible"],data:[1,"data"],settings:[1,"settings"],menuItems:[1,"menuItems"],positionConfig:[1,"positionConfig"],bgColor:[1,"bgColor"],containerEl:[1,"containerEl"]},outputs:{visibilityChange:"visibilityChange"},decls:1,vars:0,consts:[["menu",""],["trigger",""],["cdkPortal",""],[1,"overlay-container",3,"mouseleave","wheel","scroll"],[1,"overlay-content"],["positioning","bottomleft"],["trigger","",3,"click","variant","size"],[3,"icon"],["menu","",3,"click"],[3,"click"],["before","",3,"name"]],template:function(Y,Se){1&Y&&$.DNE(0,It,3,3,"ng-template",2)},dependencies:[C.jc,C.bV,q.z_,Je.W,rt.A,te.$,ti.a,Ce.M,_t.D],styles:["[_nghost-%COMP%] .cell-overlay-panel{pointer-events:none!important}.overlay-container[_ngcontent-%COMP%]{pointer-events:auto;display:flex;align-items:center;justify-content:flex-end;padding:0 8px;box-sizing:border-box;height:100%;width:100%}.overlay-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;pointer-events:auto}"],changeDetection:0})}return Te})()},9615(So,ei,ge){"use strict";ge.d(ei,{k:()=>C});var y=ge(7705),S=ge(5802),Ee=ge(5547);let C=(()=>{class q{darkModeSignal=(0,y.hFB)(void 0);cueBgColor=(0,y.CGW)();mutationObserver=null;cleanupEffect=null;el=(0,S.WQX)(Ee.aKT);renderer=(0,S.WQX)(Ee.sFG);ngOnInit(){if(this.setBgColor(),this.darkModeSignal()){const Ce=(0,S.QZP)(()=>{this.setBgColor()});this.cleanupEffect=()=>Ce.destroy()}this.mutationObserver=new MutationObserver(Ce=>{for(const Je of Ce)"attributes"===Je.type&&"class"===Je.attributeName&&this.setBgColor()}),this.mutationObserver.observe(document.body,{attributes:!0,attributeFilter:["class"]})}ngOnDestroy(){this.cleanupEffect&&this.cleanupEffect(),this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null)}setBgColor(){const Ce=this.getClosestParentBackgroundColor(this.el.nativeElement);this.renderer.setStyle(this.el.nativeElement,"background-color",Ce||"transparent"),this.cueBgColor.emit(Ce||"transparent")}getClosestParentBackgroundColor(Ce){let Je=Ce.parentElement;for(;Je;){const rt=window.getComputedStyle(Je).backgroundColor;if(rt&&"rgba(0, 0, 0, 0)"!==rt&&"transparent"!==rt)return rt;Je=Je.parentElement}return null}static \u0275fac=function(Je){return new(Je||q)};static \u0275dir=Ee.FsC({type:q,selectors:[["","cueBgColor",""]],inputs:{darkModeSignal:[1,"darkModeSignal"]},outputs:{cueBgColor:"cueBgColor"}})}return q})()},7284(So,ei,ge){var y,Ee;y=function C(){"use strict";var q=function(){return typeof self<"u"?self:typeof window<"u"?window:typeof q<"u"?q:{}}();var Ce=!q.document&&!!q.postMessage,Je=q.IS_PAPA_WORKER||!1,rt={},ti=0,te={parse:function ot(x,E){var B=(E=E||{}).dynamicTyping||!1;if(Pe(B)&&(E.dynamicTypingFunction=B,B={}),E.dynamicTyping=B,E.transform=!!Pe(E.transform)&&E.transform,E.worker&&te.WORKERS_SUPPORTED){var U=function Se(){if(!te.WORKERS_SUPPORTED)return!1;var x=function _t(){var x=q.URL||q.webkitURL||null,E=C.toString();return te.BLOB_URL||(te.BLOB_URL=x.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",E,")();"],{type:"text/javascript"})))}(),E=new q.Worker(x);return E.onmessage=we,E.id=ti++,rt[E.id]=E,E}();return U.userStep=E.step,U.userChunk=E.chunk,U.userComplete=E.complete,U.userError=E.error,E.step=Pe(E.step),E.chunk=Pe(E.chunk),E.complete=Pe(E.complete),E.error=Pe(E.error),delete E.worker,void U.postMessage({input:x,config:E,workerId:U.id})}var Q=null;return x===te.NODE_STREAM_INPUT&&typeof PAPA_BROWSER_CONTEXT>"u"?(Q=new Te(E)).getStream():("string"==typeof x?(x=function de(ie){return 65279===ie.charCodeAt(0)?ie.slice(1):ie}(x),Q=E.download?new Rt(E):new ut(E)):!0===x.readable&&Pe(x.read)&&Pe(x.on)?Q=new Gt(E):(q.File&&x instanceof File||x instanceof Object)&&(Q=new It(E)),Q.stream(x))},unparse:function Fe(x,E){var B=!1,U=!0,Q=",",de="\r\n",ie='"',j=ie+ie,pe=!1,O=null,K=!1;!function D(){if("object"==typeof E){if("string"==typeof E.delimiter&&!te.BAD_DELIMITERS.filter(function(Z){return-1!==E.delimiter.indexOf(Z)}).length&&(Q=E.delimiter),("boolean"==typeof E.quotes||"function"==typeof E.quotes||Array.isArray(E.quotes))&&(B=E.quotes),("boolean"==typeof E.skipEmptyLines||"string"==typeof E.skipEmptyLines)&&(pe=E.skipEmptyLines),"string"==typeof E.newline&&(de=E.newline),"string"==typeof E.quoteChar&&(ie=E.quoteChar),"boolean"==typeof E.header&&(U=E.header),Array.isArray(E.columns)){if(0===E.columns.length)throw new Error("Option columns is empty");O=E.columns}void 0!==E.escapeChar&&(j=E.escapeChar+ie),E.escapeFormulae instanceof RegExp?K=E.escapeFormulae:"boolean"==typeof E.escapeFormulae&&E.escapeFormulae&&(K=/^[=+\-@\t\r].*$/)}}();var v=new RegExp(z(ie),"g");if("string"==typeof x&&(x=JSON.parse(x)),Array.isArray(x)){if(!x.length||Array.isArray(x[0]))return F(null,x,pe);if("object"==typeof x[0])return F(O||Object.keys(x[0]),x,pe)}else if("object"==typeof x)return"string"==typeof x.data&&(x.data=JSON.parse(x.data)),Array.isArray(x.data)&&(x.fields||(x.fields=x.meta&&x.meta.fields||O),x.fields||(x.fields=Array.isArray(x.data[0])?x.fields:"object"==typeof x.data[0]?Object.keys(x.data[0]):[]),!Array.isArray(x.data[0])&&"object"!=typeof x.data[0]&&(x.data=[x.data])),F(x.fields||[],x.data||[],pe);throw new Error("Unable to serialize unrecognized input");function F(Z,X,fe){var be="";"string"==typeof Z&&(Z=JSON.parse(Z)),"string"==typeof X&&(X=JSON.parse(X));var Qe=Array.isArray(Z)&&Z.length>0,Xe=!Array.isArray(X[0]);if(Qe&&U){for(var xt=0;xt<Z.length;xt++)xt>0&&(be+=Q),be+=A(Z[xt],xt);X.length>0&&(be+=de)}for(var De=0;De<X.length;De++){var Ut=Qe?Z.length:X[De].length,vt=!1,se=Qe?0===Object.keys(X[De]).length:0===X[De].length;if(fe&&!Qe&&(vt="greedy"===fe?""===X[De].join("").trim():1===X[De].length&&0===X[De][0].length),"greedy"===fe&&Qe){for(var oe=[],me=0;me<Ut;me++)oe.push(X[De][Xe?Z[me]:me]);vt=""===oe.join("").trim()}if(!vt){for(var J=0;J<Ut;J++)J>0&&!se&&(be+=Q),be+=A(X[De][Qe&&Xe?Z[J]:J],J);De<X.length-1&&(!fe||Ut>0&&!se)&&(be+=de)}}return be}function A(Z,X){if(typeof Z>"u"||null===Z)return"";if(Z.constructor===Date)return JSON.stringify(Z).slice(1,25);var fe=!1;K&&"string"==typeof Z&&K.test(Z)&&(Z="'"+Z,fe=!0);var be=Z.toString().replace(v,j);return(fe=fe||!0===B||"function"==typeof B&&B(Z,X)||Array.isArray(B)&&B[X]||function re(Z,X){for(var fe=0;fe<X.length;fe++)if(Z.indexOf(X[fe])>-1)return!0;return!1}(be,te.BAD_DELIMITERS)||be.indexOf(Q)>-1||" "===be.charAt(0)||" "===be.charAt(be.length-1))?ie+be+ie:be}},RECORD_SEP:"\x1e",UNIT_SEP:"\x1f",BYTE_ORDER_MARK:"\ufeff"};if(te.BAD_DELIMITERS=["\r","\n",'"',te.BYTE_ORDER_MARK],te.WORKERS_SUPPORTED=!Ce&&!!q.Worker,te.NODE_STREAM_INPUT=1,te.LocalChunkSize=10485760,te.RemoteChunkSize=5242880,te.DefaultDelimiter=",",te.Parser=Y,te.ParserHandle=ke,te.NetworkStreamer=Rt,te.FileStreamer=It,te.StringStreamer=ut,te.ReadableStreamStreamer=Gt,typeof PAPA_BROWSER_CONTEXT>"u"&&(te.DuplexStreamStreamer=Te),q.jQuery){var $=q.jQuery;$.fn.parse=function(x){var E=x.config||{},B=[];return this.each(function(ie){if("INPUT"!==$(this).prop("tagName").toUpperCase()||"file"!==$(this).attr("type").toLowerCase()||!q.FileReader||!this.files||0===this.files.length)return!0;for(var pe=0;pe<this.files.length;pe++)B.push({file:this.files[pe],inputElem:this,instanceConfig:$.extend({},E)})}),U(),this;function U(){if(0!==B.length){var ie=B[0];if(Pe(x.before)){var j=x.before(ie.file,ie.inputElem);if("object"==typeof j){if("abort"===j.action)return void function Q(ie,j,pe,O){Pe(x.error)&&x.error({name:ie},j,pe,O)}("AbortError",ie.file,ie.inputElem,j.reason);if("skip"===j.action)return void de();"object"==typeof j.config&&(ie.instanceConfig=$.extend(ie.instanceConfig,j.config))}else if("skip"===j)return void de()}var pe=ie.instanceConfig.complete;ie.instanceConfig.complete=function(O){Pe(pe)&&pe(O,ie.file,ie.inputElem),de()},te.parse(ie.file,ie.instanceConfig)}else Pe(x.complete)&&x.complete()}function de(){B.splice(0,1),U()}}}function ve(x){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function E(B){var U=Be(B);U.chunkSize=parseInt(U.chunkSize),!B.step&&!B.chunk&&(U.chunkSize=null),this._handle=new ke(U),this._handle.streamer=this,this._config=U}.call(this,x),this.parseChunk=function(B,U){const Q=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&Q>0){let K=this._config.newline;K||(K=this._handle.guessLineEndings(B,this._config.quoteChar||'"')),B=[...B.split(K).slice(Q)].join(K)}if(this.isFirstChunk&&Pe(this._config.beforeFirstChunk)){var de=this._config.beforeFirstChunk(B);void 0!==de&&(B=de)}this.isFirstChunk=!1,this._halted=!1;var ie=this._partialLine+B;this._partialLine="";var j=this._handle.parse(ie,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var pe=j.meta.cursor;this._finished||(this._partialLine=ie.substring(pe-this._baseIndex),this._baseIndex=pe),j&&j.data&&(this._rowCount+=j.data.length);var O=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(Je)q.postMessage({results:j,workerId:te.WORKER_ID,finished:O});else if(Pe(this._config.chunk)&&!U){if(this._config.chunk(j,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);j=void 0,this._completeResults=void 0}return!this._config.step&&!this._config.chunk&&(this._completeResults.data=this._completeResults.data.concat(j.data),this._completeResults.errors=this._completeResults.errors.concat(j.errors),this._completeResults.meta=j.meta),!this._completed&&O&&Pe(this._config.complete)&&(!j||!j.meta.aborted)&&(this._config.complete(this._completeResults,this._input),this._completed=!0),!O&&(!j||!j.meta.paused)&&this._nextChunk(),j}this._halted=!0},this._sendError=function(B){Pe(this._config.error)?this._config.error(B):Je&&this._config.error&&q.postMessage({workerId:te.WORKER_ID,error:B,finished:!1})}}function Rt(x){var E;(x=x||{}).chunkSize||(x.chunkSize=te.RemoteChunkSize),ve.call(this,x),this._nextChunk=Ce?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(U){this._input=U,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(E=new XMLHttpRequest,this._config.withCredentials&&(E.withCredentials=this._config.withCredentials),Ce||(E.onload=Le(this._chunkLoaded,this),E.onerror=Le(this._chunkError,this)),E.open(this._config.downloadRequestBody?"POST":"GET",this._input,!Ce),this._config.downloadRequestHeaders){var U=this._config.downloadRequestHeaders;for(var Q in U)E.setRequestHeader(Q,U[Q])}this._config.chunkSize&&E.setRequestHeader("Range","bytes="+this._start+"-"+(this._start+this._config.chunkSize-1));try{E.send(this._config.downloadRequestBody)}catch(ie){this._chunkError(ie.message)}Ce&&0===E.status&&this._chunkError()}},this._chunkLoaded=function(){if(4===E.readyState){if(E.status<200||E.status>=400)return void this._chunkError();this._start+=this._config.chunkSize?this._config.chunkSize:E.responseText.length,this._finished=!this._config.chunkSize||this._start>=function B(U){var Q=U.getResponseHeader("Content-Range");return null===Q?-1:parseInt(Q.substring(Q.lastIndexOf("/")+1))}(E),this.parseChunk(E.responseText)}},this._chunkError=function(U){this._sendError(new Error(E.statusText||U))}}function It(x){(x=x||{}).chunkSize||(x.chunkSize=te.LocalChunkSize),ve.call(this,x);var E,B,U=typeof FileReader<"u";this.stream=function(Q){this._input=Q,B=Q.slice||Q.webkitSlice||Q.mozSlice,U?((E=new FileReader).onload=Le(this._chunkLoaded,this),E.onerror=Le(this._chunkError,this)):E=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){!this._finished&&(!this._config.preview||this._rowCount<this._config.preview)&&this._readChunk()},this._readChunk=function(){var Q=this._input;if(this._config.chunkSize){var de=Math.min(this._start+this._config.chunkSize,this._input.size);Q=B.call(Q,this._start,de)}var ie=E.readAsText(Q,this._config.encoding);U||this._chunkLoaded({target:{result:ie}})},this._chunkLoaded=function(Q){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(Q.target.result)},this._chunkError=function(){this._sendError(E.error)}}function ut(x){var E;ve.call(this,x=x||{}),this.stream=function(B){return E=B,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var U,B=this._config.chunkSize;return B?(U=E.substring(0,B),E=E.substring(B)):(U=E,E=""),this._finished=!E,this.parseChunk(U)}}}function Gt(x){ve.call(this,x=x||{});var E=[],B=!0,U=!1;this.pause=function(){ve.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){ve.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(Q){this._input=Q,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){U&&1===E.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),E.length?this.parseChunk(E.shift()):B=!0},this._streamData=Le(function(Q){try{E.push("string"==typeof Q?Q:Q.toString(this._config.encoding)),B&&(B=!1,this._checkIsFinished(),this.parseChunk(E.shift()))}catch(de){this._streamError(de)}},this),this._streamError=Le(function(Q){this._streamCleanUp(),this._sendError(Q)},this),this._streamEnd=Le(function(){this._streamCleanUp(),U=!0,this._streamData("")},this),this._streamCleanUp=Le(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function Te(x){var E=ge(6266).Duplex,B=Be(x),U=!0,Q=!1,de=[],ie=null;this._onCsvData=function(j){!ie.push(j.data)&&!this._handle.paused()&&this._handle.pause()},this._onCsvComplete=function(){ie.push(null)},B.step=Le(this._onCsvData,this),B.complete=Le(this._onCsvComplete,this),ve.call(this,B),this._nextChunk=function(){Q&&1===de.length&&(this._finished=!0),de.length?de.shift()():U=!0},this._addToParseQueue=function(j,pe){de.push(Le(function(){if(this.parseChunk("string"==typeof j?j:j.toString(B.encoding)),Pe(pe))return pe()},this)),U&&(U=!1,this._nextChunk())},this._onRead=function(){this._handle.paused()&&this._handle.resume()},this._onWrite=function(j,pe,O){this._addToParseQueue(j,O)},this._onWriteComplete=function(){Q=!0,this._addToParseQueue("")},this.getStream=function(){return ie},(ie=new E({readableObjectMode:!0,decodeStrings:!1,read:Le(this._onRead,this),write:Le(this._onWrite,this)})).once("finish",Le(this._onWriteComplete,this))}function ke(x){var pe,O,D,E=Math.pow(2,53),B=-E,U=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,Q=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,de=this,ie=0,j=0,K=!1,v=!1,F=[],A={data:[],errors:[],meta:{}};if(Pe(x.step)){var re=x.step;x.step=function(se){if(A=se,be())fe();else{if(fe(),0===A.data.length)return;ie+=se.data.length,x.preview&&ie>x.preview?O.abort():(A.data=A.data[0],re(A,de))}}}function Z(se){return"greedy"===x.skipEmptyLines?""===se.join("").trim():1===se.length&&0===se[0].length}function fe(){return A&&D&&(vt("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+te.DefaultDelimiter+"'"),D=!1),x.skipEmptyLines&&(A.data=A.data.filter(function(se){return!Z(se)})),be()&&function Qe(){if(A)if(Array.isArray(A.data[0])){for(var oe=0;be()&&oe<A.data.length;oe++)A.data[oe].forEach(se);A.data.splice(0,1)}else A.data.forEach(se);function se(me,Oe){Pe(x.transformHeader)&&(me=x.transformHeader(me,Oe)),F.push(me)}}(),function De(){if(!A||!x.header&&!x.dynamicTyping&&!x.transform)return A;function se(me,Oe){var ye,J=x.header?{}:[];for(ye=0;ye<me.length;ye++){var ce=ye,_e=me[ye];x.header&&(ce=ye>=F.length?"__parsed_extra":F[ye]),x.transform&&(_e=x.transform(_e,ce)),_e=xt(ce,_e),"__parsed_extra"===ce?(J[ce]=J[ce]||[],J[ce].push(_e)):J[ce]=_e}return x.header&&(ye>F.length?vt("FieldMismatch","TooManyFields","Too many fields: expected "+F.length+" fields but parsed "+ye,j+Oe):ye<F.length&&vt("FieldMismatch","TooFewFields","Too few fields: expected "+F.length+" fields but parsed "+ye,j+Oe)),J}var oe=1;return!A.data.length||Array.isArray(A.data[0])?(A.data=A.data.map(se),oe=A.data.length):A.data=se(A.data,0),x.header&&A.meta&&(A.meta.fields=F),j+=oe,A}()}function be(){return x.header&&0===F.length}function xt(se,oe){return function Xe(se){return x.dynamicTypingFunction&&void 0===x.dynamicTyping[se]&&(x.dynamicTyping[se]=x.dynamicTypingFunction(se)),!0===(x.dynamicTyping[se]||x.dynamicTyping)}(se)?"true"===oe||"TRUE"===oe||"false"!==oe&&"FALSE"!==oe&&(function X(se){if(U.test(se)){var oe=parseFloat(se);if(oe>B&&oe<E)return!0}return!1}(oe)?parseFloat(oe):Q.test(oe)?new Date(oe):""===oe?null:oe):oe}function vt(se,oe,me,Oe){var J={type:se,code:oe,message:me};void 0!==Oe&&(J.row=Oe),A.errors.push(J)}this.parse=function(se,oe,me){if(x.newline||(x.newline=this.guessLineEndings(se,x.quoteChar||'"')),D=!1,x.delimiter)Pe(x.delimiter)&&(x.delimiter=x.delimiter(se),A.meta.delimiter=x.delimiter);else{var J=function Ut(se,oe,me,Oe,J){var ye,ce,_e,Et;J=J||[",","\t","|",";",te.RECORD_SEP,te.UNIT_SEP];for(var at=0;at<J.length;at++){var Ft=J[at],Vt=0,wt=0,et=0;_e=void 0;for(var gt=new Y({comments:Oe,delimiter:Ft,newline:oe,preview:10}).parse(se),Ze=0;Ze<gt.data.length;Ze++)if(me&&Z(gt.data[Ze]))et++;else{var tt=gt.data[Ze].length;wt+=tt,typeof _e>"u"?_e=tt:tt>0&&(Vt+=Math.abs(tt-_e),_e=tt)}gt.data.length>0&&(wt/=gt.data.length-et),(typeof ce>"u"||Vt<=ce)&&(typeof Et>"u"||wt>Et)&&wt>1.99&&(ce=Vt,ye=Ft,Et=wt)}return x.delimiter=ye,{successful:!!ye,bestDelimiter:ye}}(se,x.newline,x.skipEmptyLines,x.comments,x.delimitersToGuess);J.successful?x.delimiter=J.bestDelimiter:(D=!0,x.delimiter=te.DefaultDelimiter),A.meta.delimiter=x.delimiter}var ye=Be(x);return x.preview&&x.header&&ye.preview++,pe=se,O=new Y(ye),A=O.parse(pe,oe,me),fe(),K?{meta:{paused:!0}}:A||{meta:{paused:!1}}},this.paused=function(){return K},this.pause=function(){K=!0,O.abort(),pe=Pe(x.chunk)?"":pe.substring(O.getCharIndex())},this.resume=function(){de.streamer._halted?(K=!1,de.streamer.parseChunk(pe,!0)):setTimeout(de.resume,3)},this.aborted=function(){return v},this.abort=function(){v=!0,O.abort(),A.meta.aborted=!0,Pe(x.complete)&&x.complete(A),pe=""},this.guessLineEndings=function(se,oe){se=se.substring(0,1048576);var me=new RegExp(z(oe)+"([^]*?)"+z(oe),"gm"),Oe=(se=se.replace(me,"")).split("\r"),J=se.split("\n");if(1===Oe.length||J.length>1&&J[0].length<Oe[0].length)return"\n";for(var ce=0,_e=0;_e<Oe.length;_e++)"\n"===Oe[_e][0]&&ce++;return ce>=Oe.length/2?"\r\n":"\r"}}function z(x){return x.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Y(x){var j,E=(x=x||{}).delimiter,B=x.newline,U=x.comments,Q=x.step,de=x.preview,ie=x.fastMode,pe=null,O=!1,K=j=null==x.quoteChar?'"':x.quoteChar;if(void 0!==x.escapeChar&&(K=x.escapeChar),("string"!=typeof E||te.BAD_DELIMITERS.indexOf(E)>-1)&&(E=","),U===E)throw new Error("Comment character same as delimiter");!0===U?U="#":("string"!=typeof U||te.BAD_DELIMITERS.indexOf(U)>-1)&&(U=!1),"\n"!==B&&"\r"!==B&&"\r\n"!==B&&(B="\n");var v=0,D=!1;this.parse=function(F,A,re){if("string"!=typeof F)throw new Error("Input must be a string");var Z=F.length,X=E.length,fe=B.length,be=U.length,Qe=Pe(Q);v=0;var Xe=[],xt=[],De=[],Ut=0;if(!F)return et();if(ie||!1!==ie&&-1===F.indexOf(j)){for(var vt=F.split(B),se=0;se<vt.length;se++){if(v+=(De=vt[se]).length,se!==vt.length-1)v+=B.length;else if(re)return et();if(!U||De.substring(0,be)!==U){if(Qe){if(Xe=[],at(De.split(E)),gt(),D)return et()}else at(De.split(E));if(de&&se>=de)return Xe=Xe.slice(0,de),et(!0)}}return et()}for(var oe=F.indexOf(E,v),me=F.indexOf(B,v),Oe=new RegExp(z(K)+z(j),"g"),J=F.indexOf(j,v);;)if(F[v]!==j)if(U&&0===De.length&&F.substring(v,v+be)===U){if(-1===me)return et();me=F.indexOf(B,v=me+fe),oe=F.indexOf(E,v)}else if(-1!==oe&&(oe<me||-1===me))De.push(F.substring(v,oe)),oe=F.indexOf(E,v=oe+X);else{if(-1===me)break;if(De.push(F.substring(v,me)),wt(me+fe),Qe&&(gt(),D))return et();if(de&&Xe.length>=de)return et(!0)}else for(J=v,v++;;){if(-1===(J=F.indexOf(j,J+1)))return re||xt.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:Xe.length,index:v}),Vt();if(J===Z-1)return Vt(F.substring(v,J).replace(Oe,j));if(j!==K||F[J+1]!==K){if(j===K||0===J||F[J-1]!==K){-1!==oe&&oe<J+1&&(oe=F.indexOf(E,J+1)),-1!==me&&me<J+1&&(me=F.indexOf(B,J+1));var _e=Ft(-1===me?oe:Math.min(oe,me));if(F.substr(J+1+_e,X)===E){De.push(F.substring(v,J).replace(Oe,j)),v=J+1+_e+X,F[J+1+_e+X]!==j&&(J=F.indexOf(j,v)),oe=F.indexOf(E,v),me=F.indexOf(B,v);break}var Et=Ft(me);if(F.substring(J+1+Et,J+1+Et+fe)===B){if(De.push(F.substring(v,J).replace(Oe,j)),wt(J+1+Et+fe),oe=F.indexOf(E,v),J=F.indexOf(j,v),Qe&&(gt(),D))return et();if(de&&Xe.length>=de)return et(!0);break}xt.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:Xe.length,index:v}),J++}}else J++}return Vt();function at(Ze){Xe.push(Ze),Ut=v}function Ft(Ze){var tt=0;if(-1!==Ze){var Pt=F.substring(J+1,Ze);Pt&&""===Pt.trim()&&(tt=Pt.length)}return tt}function Vt(Ze){return re||(typeof Ze>"u"&&(Ze=F.substring(v)),De.push(Ze),v=Z,at(De),Qe&&gt()),et()}function wt(Ze){v=Ze,at(De),De=[],me=F.indexOf(B,v)}function et(Ze){if(x.header&&!A&&Xe.length&&!O){const tt=Xe[0],Pt=Object.create(null),Ue=new Set(tt);let pt=!1;for(let ii=0;ii<tt.length;ii++){let $e=tt[ii];if(Pe(x.transformHeader)&&($e=x.transformHeader($e,ii)),Pt[$e]){let oi,yo=Pt[$e];do{oi=`${$e}_${yo}`,yo++}while(Ue.has(oi));Ue.add(oi),tt[ii]=oi,Pt[$e]++,pt=!0,null===pe&&(pe={}),pe[oi]=$e}else Pt[$e]=1,tt[ii]=$e;Ue.add($e)}pt&&console.warn("Duplicate headers found and renamed."),O=!0}return{data:Xe,errors:xt,meta:{delimiter:E,linebreak:B,aborted:D,truncated:!!Ze,cursor:Ut+(A||0),renamedHeaders:pe}}}function gt(){Q(et()),Xe=[],xt=[]}},this.abort=function(){D=!0},this.getCharIndex=function(){return v}}function we(x){var E=x.data,B=rt[E.workerId],U=!1;if(E.error)B.userError(E.error,E.file);else if(E.results&&E.results.data){var de={abort:function(){U=!0,Ct(E.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:ht,resume:ht};if(Pe(B.userStep)){for(var ie=0;ie<E.results.data.length&&(B.userStep({data:E.results.data[ie],errors:E.results.errors,meta:E.results.meta},de),!U);ie++);delete E.results}else Pe(B.userChunk)&&(B.userChunk(E.results,de,E.file),delete E.results)}E.finished&&!U&&Ct(E.workerId,E.results)}function Ct(x,E){var B=rt[x];Pe(B.userComplete)&&B.userComplete(E),B.terminate(),delete rt[x]}function ht(){throw new Error("Not implemented.")}function Be(x){if("object"!=typeof x||null===x)return x;var E=Array.isArray(x)?[]:{};for(var B in x)E[B]=Be(x[B]);return E}function Le(x,E){return function(){x.apply(E,arguments)}}function Pe(x){return"function"==typeof x}return Je&&(q.onmessage=function Wt(x){var E=x.data;if(typeof te.WORKER_ID>"u"&&E&&(te.WORKER_ID=E.workerId),"string"==typeof E.input)q.postMessage({workerId:te.WORKER_ID,results:te.parse(E.input,E.config),finished:!0});else if(q.File&&E.input instanceof File||E.input instanceof Object){var B=te.parse(E.input,E.config);B&&q.postMessage({workerId:te.WORKER_ID,results:B,finished:!0})}}),(Rt.prototype=Object.create(ve.prototype)).constructor=Rt,(It.prototype=Object.create(ve.prototype)).constructor=It,(ut.prototype=Object.create(ut.prototype)).constructor=ut,(Gt.prototype=Object.create(ve.prototype)).constructor=Gt,typeof PAPA_BROWSER_CONTEXT>"u"&&((Te.prototype=Object.create(ve.prototype)).constructor=Te),te},void 0!==(Ee=y.apply(ei,[]))&&(So.exports=Ee)},6266(){},3913(So,ei,ge){"use strict";ge.d(ei,{Cf3:()=>ay,Dvw:()=>ty,JKr:()=>Lx,JuG:()=>p0,KVO:()=>Pc,MwW:()=>pt,Y6t:()=>Lh,pow:()=>Ud,r$M:()=>I0,syG:()=>Na,zsR:()=>Ih});var y=ge(467),S=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 o=t?this.allAsyncListeners:this.allSyncListeners;let s=o.get(e);return!s&&i&&(s=new Set,o.set(e,s)),s}noRegisteredListenersExist(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){const o=this.getListeners(e,i,!1);o&&(o.delete(t),0===o.size&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.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{frameworkOverrides:o}=this,s=a=>{const l=o?()=>o.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},n=this.getListeners(i,t,!1);if((n?.size??0)>0){const a=new Set(n);for(const l of a)n?.has(l)&&s(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)s(()=>l(i,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}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=[];for(const t of e)t()}};function Ee(e){return null==e||""===e?null:e}function C(e){return null!=e&&""!==e}function q(e){return!C(e)}function _t(e){return null!=e&&"function"==typeof e.toString?e.toString():null}function Ce(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)}function Je(e,t,i=!1){const o=null==e,s=null==t;if(e?.toNumber&&(e=e.toNumber()),t?.toNumber&&(t=t.toNumber()),o&&s)return 0;if(o)return-1;if(s)return 1;function n(r,a){return r>a?1:r<a?-1:0}if("string"!=typeof e||!i)return n(e,t);try{return e.localeCompare(t)}catch{return n(e,t)}}var rt=/[&<>"']/g,ti={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function te(e){return e?.toString().toString()??null}function $(e){return te(e)?.replace(rt,t=>ti[t])??null}function ot(e){return e.eRootDiv.getRootNode()}function Fe(e){return ot(e).activeElement}function ve(e){const{gos:t,eRootDiv:i}=e;let o=null;const s=t.get("getDocument");return s&&C(s)?o=s():i&&(o=i.ownerDocument),o&&C(o)?o:document}function Rt(e){const t=Fe(e);return null===t||t===ve(e).body}function It(e){return ve(e).defaultView||window}function ut(e){let t=null,i=null;try{t=ve(e).fullscreenElement}catch{}finally{t||(t=ot(e));i=t.querySelector("body")||(t instanceof ShadowRoot?t:t instanceof Document?t?.documentElement:t)}return i}function ke(e,t,i){null==i||"string"==typeof i&&""==i?Y(e,t):z(e,t,i)}function z(e,t,i){e.setAttribute(Se(t),i.toString())}function Y(e,t){e.removeAttribute(Se(t))}function Se(e){return`aria-${e}`}function we(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Be(e,t){ke(e,"label",t)}function Le(e,t){ke(e,"labelledby",t)}function x(e,t){ke(e,"live",t)}function U(e,t){ke(e,"invalid",t)}function ie(e,t){ke(e,"hidden",t)}function pe(e,t){z(e,"expanded",t)}function A(e,t){z(e,"rowindex",t)}function X(e,t){z(e,"colindex",t)}function Xe(e,t){ke(e,"selected",t)}function vt(e,t){ke(e,"owns",t)}function oe(e,t){return void 0===t?e("ariaIndeterminate","indeterminate"):!0===t?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var J="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function ye(e){return!!(e&&e.matches("input, select, button, textarea")&&e.matches(J))&&$e(e)}function ce(e,t,i={}){const{skipAriaHidden:o}=i;e.classList.toggle("ag-hidden",!t),o||ie(e,!t)}function Et(e,t){const i="disabled",o=t?n=>n.setAttribute(i,""):n=>n.removeAttribute(i);o(e);const s=e.querySelectorAll("input")??[];for(const n of s)o(n)}function at(e,t,i){let o=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,"number"==typeof i){if(++o>i)break}else if(e===i)break}return!1}function Ft(e){const{height:t,width:i,borderTopWidth:o,borderRightWidth:s,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),m=Number.parseFloat;return{height:m(t||"0"),width:m(i||"0"),borderTopWidth:m(o||"0"),borderRightWidth:m(s||"0"),borderBottomWidth:m(n||"0"),borderLeftWidth:m(r||"0"),paddingTop:m(a||"0"),paddingRight:m(l||"0"),paddingBottom:m(d||"0"),paddingLeft:m(c||"0"),marginTop:m(u||"0"),marginRight:m(h||"0"),marginBottom:m(g||"0"),marginLeft:m(p||"0"),boxSizing:f}}function Vt(e){const t=Ft(e);return"border-box"===t.boxSizing?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function wt(e){const t=Ft(e);return"border-box"===t.boxSizing?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function et(e){const{height:t,marginBottom:i,marginTop:o}=Ft(e);return Math.floor(t+i+o)}function gt(e){const{width:t,marginLeft:i,marginRight:o}=Ft(e);return Math.floor(t+i+o)}function Ze(e){const t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:o,borderRightWidth:s,borderBottomWidth:n}=Ft(e);return{top:t.top+(i||0),left:t.left+(o||0),right:t.right+(s||0),bottom:t.bottom+(n||0)}}function tt(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i)),i}function Pt(e,t,i){i&&(t*=-1),e.scrollLeft=t}function Ue(e){for(;e?.firstChild;)e.firstChild.remove()}function pt(e){e?.parentNode&&e.remove()}function ii(e){return!!e.offsetParent}function $e(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!ii(e)||"visible"!==window.getComputedStyle(e).visibility)}function oi(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function yo(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 Sa(e,t){for(let i=0;i<t.length;i++){const o=t[i],s=e.children[i];s!==o&&e.insertBefore(o,s)}}function Wu(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Ro(e,t){if(t)for(const i of Object.keys(t)){const o=t[i];if(!i?.length||null==o)continue;const s=Wu(i),n=o.toString(),r=n.replace(/\s*!important/g,"");e.style.setProperty(s,r,r.length!=n.length?"important":void 0)}}function xo(e){return()=>{const t=e();return!t||un(t)||ya(t)}}function un(e){return e.clientWidth<e.scrollWidth}function ya(e){return e.clientHeight<e.scrollHeight}function rs(e,t){"flex"===t?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):$t(e,t)}function $t(e,t){t=hn(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Eo(e,t){t=hn(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function hn(e){return"number"==typeof e?`${e}px`:e}function gn(e){return e instanceof Node||e instanceof HTMLElement}function Dt(e,t,i){null==i||""===i?e.removeAttribute(t):e.setAttribute(t,i.toString())}function pi(e,t,i){const s=It(e).ResizeObserver,n=s?new s(i):null;return n?.observe(t),()=>n?.disconnect()}function si(e,t){const i=It(e);i.requestAnimationFrame?i.requestAnimationFrame(t):i.webkitRequestAnimationFrame?i.webkitRequestAnimationFrame(t):i.setTimeout(t,0)}var pn,Ra="data-ref";function xa(){return pn??(pn=document.createTextNode(" ")),pn.cloneNode()}function Fo(e){const{attrs:t,children:i,cls:o,ref:s,role:n,tag:r}=e,a=document.createElement(r);if(o&&(a.className=o),s&&a.setAttribute(Ra,s),n&&a.setAttribute("role",n),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(i)if("string"==typeof i)a.textContent=i;else{let l=!0;for(const d of i)d&&("string"==typeof d?(a.appendChild(document.createTextNode(d)),l=!1):"function"==typeof d?a.appendChild(d()):(l&&(a.appendChild(xa()),l=!1),a.append(Fo(d)),a.appendChild(xa())))}return a}var Uu=["touchstart","touchend","touchmove","touchcancel","scroll"],$u=["wheel"],fn={},Ea=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return i=>{if("boolean"==typeof fn[i])return fn[i];const o=document.createElement(e[i]||"div");return fn[i="on"+i]=i in o}})();function ju(e,t){return!(!t||!e)&&function qu(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():function Ku(e){const t=[];let i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}(t)}(t).indexOf(e)>=0}function Fa(e,t,i){if(0===i)return!1;const o=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(o,s)<=i}var Po=(e,t)=>{const i=e.identifier;for(let o=0,s=t.length;o<s;++o){const n=t[o];if(n.identifier===i)return n}return null};function Do(e,t){return e.gos.isElementInThisInstance(t.target)}var as=(e,...t)=>{for(const i of t){const[o,s,n,r]=i;o.addEventListener(s,n,r),e.push(i)}},mn=e=>{if(e){for(const[t,i,o,s]of e)t.removeEventListener(i,o,s);e.length=0}},fi=e=>{e.cancelable&&e.preventDefault()};function Zu(e,t){return t}function Pa(e){return e?.getLocaleTextFunc()??Zu}var jt=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 S),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 o of Object.keys(t)){const s=t[o];s&&i.push(this._setupListener(e,o,s))}return i}_setupListener(e,t,i){if(this.destroyed)return()=>null;let o;if(function ih(e){return void 0!==e.__addEventListener}(e))e.__addEventListener(t,i),o=()=>(e.__removeEventListener(t,i),null);else{const s=function oh(e){return"global"===e.eventServiceType}(e);e instanceof HTMLElement?function Yu(e,t,i){const o=(e=>{const t=Uu.includes(e),i=$u.includes(e);return!!t||!i&&void 0})(t);let s;null!=o&&(s={passive:o}),e.addEventListener(t,i,s)}(e,t,i):s?e.addListener(t,i):e.addEventListener(t,i),o=s?()=>(e.removeListener(t,i),null):()=>(e.removeEventListener(t,i),null)}return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}setupPropertyListener(e,t){const{gos:i}=this;i.addPropertyEventListener(e,t);const o=()=>(i.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const i=e.join("-")+this.propertyListenerId++,o=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=s.changeSet.id}t({type:"propertyChanged",changeSet:s.changeSet,source:s.source})};for(const s of e)this.setupPropertyListener(s,o)}getLocaleTextFunc(){return Pa(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)}},M=class extends jt{},Da={};function Cn(e,t){Da[t]||(e(),Da[t]=!0)}var sh={pending:!1,funcs:[]},nh={pending:!1,funcs:[]};function vn(e,t="setTimeout",i){const o="raf"===t?nh:sh;if(o.funcs.push(e),o.pending)return;o.pending=!0;const s=()=>{const n=o.funcs.slice();o.funcs.length=0,o.pending=!1;for(const r of n)r()};"raf"===t?si(i,s):window.setTimeout(s,0)}function it(e,t,i){let o;return function(...s){const n=this;window.clearTimeout(o),o=window.setTimeout(function(){e.isAlive()&&t.apply(n,s)},i)}}function Ma(e,t){let i=0;return function(...o){const n=Date.now();n-i<t||(i=n,e.apply(this,o))}}var Ta=new Set(["__proto__","constructor","prototype"]);function ft(e,t,i=!0,o=!1){C(t)&&function ah(e,t){if(null!=e){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).filter(o=>!Ta.has(o)))t(i,e[i])}}(t,(s,n)=>{let r=e[s];r!==n&&(o&&null==r&&null!=n&&"object"==typeof n&&n.constructor===Object&&(r={},e[s]=r),ka(n)&&ka(r)&&!Array.isArray(r)?ft(r,n,i,o):(i||void 0!==n)&&(e[s]=n))})}function ka(e){return"object"==typeof e&&null!==e}var lh=(()=>{let e=class gi{static applyGlobalGridOptions(i){if(!gi.gridOptions)return{...i};let o={};return ft(o,gi.gridOptions,!0,!0),"deep"===gi.mergeStrategy?ft(o,i,!0,!0):o={...o,...i},gi.gridOptions.context&&(o.context=gi.gridOptions.context),i.context&&("deep"===gi.mergeStrategy&&o.context&&ft(i.context,o.context,!0,!0),o.context=i.context),o}static applyGlobalGridOption(i,o){if("deep"===gi.mergeStrategy){const s=function Aa(e){return Mo.gridOptions?.[e]}(i);if(s&&"object"==typeof s&&"object"==typeof o)return gi.applyGlobalGridOptions({[i]:o})[i]}return o}};return e.gridOptions=void 0,e.mergeStrategy="shallow",e})(),Mo=lh;var Ia={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:"\t",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,rowDragInsertDelay:500,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,enableFilterHandlers:!1},La="https://www.ag-grid.com";function mi(e,t,...i){e.get("debug")&&console.log("AG Grid: "+t,...i)}function Ki(e,...t){Cn(()=>console.warn("AG Grid: "+e,...t),e+t?.join(""))}function qi(e,...t){Cn(()=>console.error("AG Grid: "+e,...t),e+t?.join(""))}var ds,Oa=new Set,ls={},ki={},Ba=!1,Ha=!1;function To(e,t,i=!1){i||(Ba=!0),function ch(e){ds||(ds=e.version);const t=o=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${o} Please update all modules to the same version.`;e.version?function dh(e){const[t,i]=e.version.split(".")||[],[o,s]=ds.split(".")||[];return t===o&&i===s}(e)||qi(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${ds}.`)):qi(t(`'${e.moduleName}' is incompatible.`));const i=e.validate?.();i&&!i.isValid&&qi(`${i.message}`)}(e);const o=e.rowModels??["all"];let s;Oa.add(e),void 0!==t?(Ha=!0,void 0===ki[t]&&(ki[t]={}),s=ki[t]):s=ls;for(const n of o)void 0===s[n]&&(s[n]={}),s[n][e.moduleName]=e;if(e.dependsOn)for(const n of e.dependsOn)To(n,t,i)}function wn(e,t,i){const o=s=>!!ls[s]?.[e]||!!ki[t]?.[s]?.[e];return o(i)||o("all")}function bn(){return Ha}var Na=class{static register(e){To(e,void 0)}static registerModules(e){for(const t of e)To(t,void 0)}},G="34.3.1",Wa="_version_",Ua=null,Yi=`${La}/javascript-data-grid`;function $a(e,t,i){return Ua?.(e,t)??[bh(e,t,i)]}function cs(e,t,i,o,s){e(`${o?"warning":"error"} #${t}`,...$a(t,i,s))}function vh(e){let t=e;return e instanceof Error?t=e.toString():"object"==typeof e&&(t=function Ch(e){if(!e)return String(e);const t={};for(const i of Object.keys(e))"object"!=typeof e[i]&&"function"!=typeof e[i]&&(t[i]=e[i]);return JSON.stringify(t)}(e)),t}function us(e){return void 0===e?"undefined":null===e?"null":e}function Sn(e,t){return`${e}?${t.toString()}`}function ja(e,t){const i=new URLSearchParams;if(i.append(Wa,G),t)for(const n of Object.keys(t))i.append(n,vh(t[n]));const o=`${Yi}/errors/${e}`,s=Sn(o,i);return s.length<=2e3?s:function wh(e,t,i){const o=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let s=Sn(e,t);for(const[n,r]of o){if(n===Wa)continue;const a=s.length-i;if(a<=0)break;const l="...",d=a+l.length,c=r.length-d>100?r.slice(0,r.length-d)+l:r.slice(0,100)+l;t.set(n,c),s=Sn(e,t)}return s}(o,i,2e3)}var bh=(e,t,i)=>{const s=`${i?i+" \n":""}Visit ${ja(e,t)}`;return`${s}${i?"":" \n Alternatively register the ValidationModule to see the full message in the console."}`};function I(...e){cs(Ki,e[0],e[1],!0)}function Me(...e){cs(qi,e[0],e[1],!1)}function ko(e,t,i){cs(qi,e,t,!1,i)}function Kt(...e){return function Ka(e,t){const i=t[0];return`error #${i} `+$a(i,t[1],e).join(" ")}(void 0,e)}function qa(e,t){return e.get("rowModelType")===t}function je(e,t){return qa(e,"clientSide")}function Qi(e,t){return qa(e,"serverSide")}function nt(e,t){return e.get("domLayout")===t}function Ai(e){return void 0!==ps(e)}function Ya(e){return"function"==typeof e.get("getRowHeight")}function Ci(e,t,i=!1,o){const{gos:s,environment:n}=e;if(null==o&&(o=n.getDefaultRowHeight()),Ya(s)){if(i)return{height:o,estimated:!0};const l={node:t,data:t.data},d=s.getCallback("getRowHeight")(l);if(yn(d))return 0===d&&I(23),{height:Math.max(1,d),estimated:!1}}if(t.detail&&s.get("masterDetail"))return function yh(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return yn(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}(s);const r=s.get("rowHeight");return{height:r&&yn(r)?r:o,estimated:!1}}function Ii(e){const{environment:t,gos:i}=e,o=i.get("rowHeight");if(!o||q(o))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return-1!==s?s:(I(24),t.getDefaultRowHeight())}function yn(e){return!isNaN(e)&&"number"==typeof e&&isFinite(e)}function Qa(e,t,i){const o=t[e.getDomDataKey()];return o?o[i]:void 0}function Li(e,t,i,o){const s=e.getDomDataKey();let n=t[s];q(n)&&(n={},t[s]=n),n[i]=o}function Xi(e){return!e.get("ensureDomOrder")&&e.get("animateRows")}function Xa(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||nt(e,"print"))}function qt(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function Rn(e){const t=e.get("groupAggFiltering");return"function"==typeof t?e.getCallback("groupAggFiltering"):!0===t?()=>!0:void 0}function Za(e){return e.get("grandTotalRow")}function Ja(e,t){return!t&&"groupRows"===e.get("groupDisplayType")}function el(e,t,i){return!!t.group&&!t.footer&&Ja(e,i)}function Zi(e){const t=e.getCallback("getRowId");return void 0===t?t:i=>{let o=t(i);return"string"!=typeof o&&(Cn(()=>I(25,{id:o}),"getRowIdString"),o=String(o)),o}}function Ji(e){return e?.checkboxes??!0}function hs(e){return"multiRow"===e?.mode&&(e.headerCheckbox??!0)}function gs(e){if("object"==typeof e)return e.checkboxLocation??"selectionColumn"}function xn(e){return e?.hideDisabledCheckboxes??!1}function ni(e){const t=e.get("cellSelection");return void 0!==t?!!t:e.get("enableRangeSelection")}function tl(e){const t=e.get("rowSelection")??"single";if("string"==typeof t){const i=e.get("suppressRowClickSelection"),o=e.get("suppressRowDeselection");return(!i||!o)&&(i?"enableDeselection":!o||"enableSelection")}return("singleRow"===t.mode||"multiRow"===t.mode)&&(t.enableClickSelection??!1)}function En(e){const t=e.get("rowSelection");return"string"==typeof t?e.get("isRowSelectable"):t?.isRowSelectable}function ps(e){const t="beanName"in e&&"gos"===e.beanName?e.get("rowSelection"):e.rowSelection;if("string"==typeof t)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 Ao(e){return"multiRow"===ps(e)}function fs(e){const t=e.get("rowSelection");if("string"==typeof t){const i=e.get("groupSelectsChildren"),o=e.get("groupSelectsFiltered");return i&&o?"filteredDescendants":i?"descendants":"self"}return"multiRow"===t?.mode?t.groupSelects:void 0}function il(e,t=!0){const i=e.get("rowSelection");return"object"!=typeof i?t?"all":void 0:"multiRow"===i.mode?i.selectAll:"all"}function Io(e){const t=fs(e);return"descendants"===t||"filteredDescendants"===t}function ol(e){const t=e.get("rowSelection");return"object"==typeof t&&t.masterSelects||"self"}function Mt(e){return"legacy"===e.get("columnMenu")}function Ih(e,t,i){"object"!=typeof e&&(e={});const o={...e};for(const s of i){const n=t[s];typeof n<"u"&&(o[s]=n)}return o}function Lh(e,t){if(!e)return;const i={};let o=!1;for(const r of Object.keys(e))i[r]=e[r],o=!0;if(!o)return;t.dispatchEvent({type:"gridOptionsChanged",options:i});const n={type:"componentStateChanged",...i};t.dispatchEvent(n)}function ee(e,t){return e.addCommon(t)}function sl({gos:e},t){return 2===t.button||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var Oh={resizable:!0,sortable:!0},Bh=0;function nl(){return Bh++}function vi(e){return e instanceof wi}var wi=class extends M{constructor(e,t,i,o){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=o,this.isColumn=!0,this.instanceId=nl(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new S,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=$(i)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:i,colFlex:o}}=this;t?.initCol(this);const s=e.hide;this.visible=void 0!==s?!s:!e.initialHide,i?.initCol(this),o?.initCol(this)}setColDef(e,t,i){const o=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),o&&(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(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:i}}=this,o=e.get("suppressFieldDotNotation");this.fieldContainsDots=C(t)&&t.includes(".")&&!o,this.tooltipFieldContainsDots=C(i)&&i.includes(".")&&!o}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)}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:i=>{const o=e.recreateColDef(this.colDef);this.setColDef(o,o,i.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const i=e.width,o=e.initialWidth;return t=null!=i?i:null!=o?o: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(e,t)??t;this.colEventSvc.addEventListener(e,i)}removeEventListener(e,t){const i=this.frameworkEventListenerService?.unwrap(e,t)??t;this.colEventSvc.removeEventListener(e,i)}createColumnFunctionCallbackParams(e){return ee(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({rowNode:e,column:this})??!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]??Oh[e]}isColumnFunc(e,t){return"boolean"==typeof t?t:"function"==typeof t&&t(this.createColumnFunctionCallbackParams(e))}createColumnEvent(e,t){return ee(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"asc"===this.sort}isSortDescending(){return"desc"===this.sort}isSortNone(){return q(this.sort)}isSorting(){return C(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 I(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"left"===this.pinned||"right"===this.pinned}isPinnedLeft(){return"left"===this.pinned}isPinnedRight(){return"right"===this.pinned}getPinned(){return this.pinned}setVisible(e,t){const i=!0===e;this.visible!==i&&(this.visible=i,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e?.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!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 ee(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(q(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.colSpan(t);return Math.max(i,1)}getRowSpan(e){if(q(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,null!=this.flex&&"flex"!==t&&"gridInitializing"!==t&&(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!0===this.colDef.enablePivot}isAllowValue(){return!0===this.colDef.enableValue}isAllowRowGroup(){return!0===this.colDef.enableRowGroup}dispatchColEvent(e,t,i){const o=this.createColumnEvent(e,t);i&&ft(o,i),this.colEventSvc.dispatchEvent(o)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function lt(e){return e instanceof Lo}var Lo=class extends M{constructor(e,t,i,o){super(),this.colGroupDef=e,this.groupId=t,this.padding=i,this.level=o,this.isColumn=!1,this.expandable=!1,this.instanceId=nl(),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())}isPadding(){return this.padding}setExpanded(e){this.expanded=void 0!==e&&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}forEachLeafColumn(e){if(this.children)for(const t of this.children)vi(t)?e(t):lt(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)vi(t)?e.push(t):lt(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);for(const t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(const t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,i=!1;const o=this.findChildrenRemovingPadding();for(let n=0,r=o.length;n<r;n++){const a=o[n];if(!a.isVisible())continue;const l=a.getColumnGroupShow();"open"===l?(e=!0,i=!0):"closed"===l?(t=!0,i=!0):(e=!0,t=!0)}const s=e&&t&&i;this.expandable!==s&&(this.expandable=s,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=i=>{for(const o of i)lt(o)&&o.isPadding()?t(o.children):e.push(o)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},Hh={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function Fn(e,t,i){const o={},s=e.gos;return Object.assign(o,s.get("defaultColGroupDef")),Object.assign(o,t),s.validateColDef(o,i),o}var Gh=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=_t(e);let i=0;for(;;){let o=e??t;if(o?0!==i&&(o+="_"+i):o=i,!this.existingKeys[o]){const s=String(o);return e&&i>0&&I(273,{providedId:e,usedId:s}),this.existingKeys[s]=!0,s}i++}}};function Ae(e){if(e?.length)return e[e.length-1]}function bi(e,t,i){if(e===t)return!0;if(!e||!t)return null==e&&null==t;const o=e.length;if(o!==t.length)return!1;for(let s=0;s<o;s++)if(e[s]!==t[s]&&!i?.(e[s],t[s]))return!1;return!0}function Oo(e,t){if(e)for(const i of e)t(i)}function Lt(e,t){const i=e.indexOf(t);i>=0&&e.splice(i,1)}function rl(e,t,i){for(let o=0;o<t.length;o++)Lt(e,t[o]);for(let o=t.length-1;o>=0;o--)e.splice(i,0,t[o])}Object.freeze([]);var Si="ag-Grid-AutoColumn",Pn="ag-Grid-SelectionColumn",Dn="ag-Grid-RowNumbersColumn";function al(e){const t=[],i=o=>{for(let s=0;s<o.length;s++){const n=o[s];vi(n)?t.push(n):lt(n)&&i(n.getChildren())}};return i(e),t}function ri(e){return e.reduce((t,i)=>t+i.getActualWidth(),0)}function ms(e,t,i){const o={};if(!t)return;Yt(null,t,n=>{o[n.getInstanceId()]=n}),i&&Yt(null,i,n=>{o[n.getInstanceId()]=null});const s=Object.values(o).filter(n=>null!=n);e.context.destroyBeans(s)}function Mn(e){return e.getId().startsWith(Si)}function ai(e){return("string"==typeof e?e:"getColId"in e?e.getColId():e.colId)?.startsWith(Pn)??!1}function li(e){return("string"==typeof e?e:"getColId"in e?e.getColId():e.colId)?.startsWith(Dn)??!1}function Vh(e){return ai(e)||li(e)}function Cs(e){let t=[];return e instanceof Array?t=e:"string"==typeof e&&(t=e.split(",")),t}function eo(e){return"optionsUpdated"===e?"gridOptionsChanged":e}function Bo(e,t){const i=e===t,o=e.getColDef()===t,s=e.getColId()==t;return i||o||s}var ll=(e,t)=>{lt(e)&&e.setupExpandable(),e.originalParent=t};function cl(e,t,i,o,s,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];d[c]=l&&gl(u)?l.createProvidedColumnGroup(o,u,i,s,n,r,a):Uh(e,o,u,s,n,a)}return d}function Uh(e,t,i,o,s,n){const r=function $h(e,t){if(t)for(let i=0;i<t.length;i++){const o=t[i].getUserProvidedColDef();if(o)if(null==e.colId){if(null==e.field){if(o===e)return{idx:i,column:t[i]}}else if(o.field===e.field)return{idx:i,column:t[i]}}else if(t[i].getId()===e.colId)return{idx:i,column:t[i]}}}(i,o);r&&o?.splice(r.idx,1);let a=r?.column;if(a){const l=vs(e,i,a.getColId());a.setColDef(l,i,n),function hl(e,t,i,o){ul(e,t,i.hide,i.sort,i.sortIndex,i.pinned,i.flex,o);const s=t.getFlex();if(!(null!=s&&s>0))if(null!=i.width)t.setActualWidth(i.width,o);else{const n=t.getActualWidth();t.setActualWidth(n,o)}}(e,a,l,n)}else{const l=s.getUniqueKey(i.colId,i.field),d=vs(e,i,l);a=new wi(d,i,l,t),e.context.createBean(a)}return e.dataTypeSvc?.addColumnListeners(a),a}function ul(e,t,i,o,s,n,r,a){const{sortSvc:l,pinnedCols:d,colFlex:c}=e;void 0!==i&&t.setVisible(!i,a),l&&(l.updateColSort(t,o,a),void 0!==s&&l.setColSortIndex(t,s)),void 0!==n&&d?.setColPinned(t,n),void 0!==r&&c?.setColFlex(t,r)}function vs(e,t,i,o){const{gos:s,dataTypeSvc:n}=e,r={};ft(r,s.get("defaultColDef"),!1,!0);const l=function jh(e,t,i,o){const s=e.dataTypeSvc?.updateColDefAndGetColumnType(t,i,o),n=i.type??s??t.type;return t.type=n,n?Cs(n):void 0}(e,r,t,i);l&&function Kh(e,t,i){if(!t.length)return;const o=Object.assign({},Hh),s=e.gos.get("columnTypes")||{};for(const n of Object.keys(s)){const r=s[n];n in o?I(34,{key:n}):(r.type&&I(35),o[n]=r)}for(const n of t){const r=o[n.trim()];r?ft(i,r,!1,!0):I(36,{t:n})}}(e,l,r);const d=r.cellDataType;ft(r,t,!1,!0),void 0!==d&&(r.cellDataType=d);const c=s.get("autoGroupColumnDef"),u=qt(s);return t.rowGroup&&c&&u&&ft(r,{sort:c.sort,initialSort:c.initialSort},!1,!0),n&&(n.postProcess(r),n.validateColDef(r)),s.validateColDef(r,i,o),r}function gl(e){return void 0!==e.children}function Yt(e,t,i){if(t)for(let o=0;o<t.length;o++){const s=t[o];lt(s)&&Yt(s,s.getChildren(),i),i(s,e)}}function pl(e,t){const i=[],o=[],s=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;"right"===a?s.push(r):"left"===a||!0===a?i.push(r):o.push(r)}),t.get("enableRtl")?[...s,...o,...i]:[...i,...o,...s]}function fl(e,t){let i=!0;return Yt(null,t,o=>{if(!lt(o))return;const s=o;if(!s.getColGroupDef()?.marryChildren)return;const a=[];for(const h of s.getLeafColumns()){const g=e.indexOf(h);a.push(g)}Math.max.apply(Math,a)-Math.min.apply(Math,a)>s.getLeafColumns().length-1&&(i=!1)}),i}function ml(e,t){if(!e||0==e.length)return;const i=t(e[0]);for(let o=1;o<e.length;o++)if(i!==t(e[o]))return;return i}function Cl(e,t,i){if(!t.length)return;const o=1===t.length?t[0]:null,s=ml(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:o,source:i})}function to(e,t,i,o,s=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:1===t.length?t[0]:null,flexColumns:s,finished:i,source:o})}function Nt(e,t,i){const{colModel:o,rowGroupColsSvc:s,pivotColsSvc:n,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:d,pivotResultCols:c,environment:u,valueColsSvc:h,eventSvc:g,gos:p}=e,f=o.getColDefCols()??[],m=a?.getColumns();if(!f.length&&!m?.length)return!1;if(t?.state&&!t.state.forEach)return I(32),!1;const w=(k,L,H,ae,ue)=>{if(!k)return;const le=((e,t)=>(i,o)=>{const s={value1:void 0,value2:void 0};let n=!1;return e&&(void 0!==e[i]&&(s.value1=e[i],n=!0),C(o)&&void 0!==e[o]&&(s.value2=e[o],n=!0)),!n&&t&&(void 0!==t[i]&&(s.value1=t[i]),C(o)&&void 0!==t[o]&&(s.value2=t[o])),s})(L,t.defaultState),he=le("flex").value1;if(ul(e,k,le("hide").value1,le("sort").value1,le("sortIndex").value1,le("pinned").value1,he,i),null==he){const Ie=le("width").value1;if(null!=Ie){const Ve=k.getColDef().minWidth??u.getDefaultColumnMinWidth();null!=Ve&&Ie>=Ve&&k.setActualWidth(Ie,i)}}ue||!k.isPrimary()||(h?.syncColumnWithState(k,i,le),s?.syncColumnWithState(k,i,le,H),n?.syncColumnWithState(k,i,le,ae))},b=(k,L,H)=>{const ae=wl(e,i),ue=L.slice(),le={},he={},Ie=[],Ve=[],ct=[];let yt=0;const Gx=s?.columns.slice()??[],Vx=n?.columns.slice()??[];for(const mt of k){const ss=mt.colId;if(ss.startsWith(Si)){Ie.push(mt),ct.push(mt);continue}if(ai(ss)){Ve.push(mt),ct.push(mt);continue}const bo=H(ss);bo?(w(bo,mt,le,he,!1),Lt(ue,bo)):(ct.push(mt),yt+=1)}const Vu=mt=>w(mt,null,le,he,!1);ue.forEach(Vu),s?.sortColumns(Sl.bind(s,le,Gx)),n?.sortColumns(Sl.bind(n,he,Vx)),o.refreshCols(!1,i);const Nu=(mt,ss,ba=[])=>{for(const bo of ss){const zu=mt(bo.colId);Lt(ba,zu),w(zu,bo,null,null,!0)}ba.forEach(Vu)};return Nu(mt=>r?.getColumn(mt)??null,Ie,r?.getColumns()?.slice()),Nu(mt=>a?.getColumn(mt)??null,Ve,a?.getColumns()?.slice()),function Qh(e,t,i){if(!e.applyOrder||!e.state)return;const o=[];for(const s of e.state)null!=s.colId&&o.push(s.colId);!function Xh(e,t,i,o){if(null==e)return;let s=[];const n={};for(const a of t){if(n[a])continue;const l=e.map[a];l&&(s.push(l),n[a]=!0)}let r=0;for(const a of e.list){const l=a.getColId();null==n[l]&&(l.startsWith(Si)?s.splice(r++,0,a):s.push(a))}s=pl(s,o),fl(s,i.getColTree())?e.list=s:I(39)}(t.cols,o,t,i)}(t,o,p),d.refresh(i),g.dispatchEvent({type:"columnEverythingChanged",source:i}),ae(),{unmatchedAndAutoStates:ct,unmatchedCount:yt}};l?.start();let{unmatchedAndAutoStates:R,unmatchedCount:T}=b(t.state||[],f,k=>o.getColDefCol(k));return(R.length>0||C(t.defaultState))&&(T=b(R,c?.getPivotResultCols()?.list??[],L=>c?.getPivotResultCol(L)??null).unmatchedCount),l?.finish(),0===T}function wl(e,t){const{rowGroupColsSvc:i,pivotColsSvc:o,valueColsSvc:s,colModel:n,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:i?.columns.slice()??[],pivotColumns:o?.columns.slice()??[],valueColumns:s?.columns.slice()??[]},d=ws(e),c={};for(const u of d)c[u.colId]=u;return()=>{const u=(L,H,ae,ue)=>{if(bi(H.map(ue),ae.map(ue)))return;const Ve=new Set(H);for(const yt of ae)Ve.delete(yt)||Ve.add(yt);const ct=[...Ve];a.dispatchEvent({type:L,columns:ct,column:1===ct.length?ct[0]:null,source:t})},h=L=>{const H=[];return n.forAllCols(ae=>{const ue=c[ae.getColId()];ue&&L(ue,ae)&&H.push(ae)}),H},g=L=>L.getColId();u("columnRowGroupChanged",l.rowGroupColumns,i?.columns??[],g),u("columnPivotChanged",l.pivotColumns,o?.columns??[],g);const f=h((L,H)=>{const ae=null!=L.aggFunc,ue=ae!=H.isValueActive(),le=ae&&L.aggFunc!=H.getAggFunc();return ue||le});f.length>0&&function vl(e,t,i,o){e.dispatchEvent({type:t,columns:i,column:i&&1==i.length?i[0]:null,source:o})}(a,"columnValueChanged",f,t),to(a,h((L,H)=>L.width!=H.getActualWidth()),!0,t),Cl(a,h((L,H)=>L.pinned!=H.getPinned()),t),function qh(e,t,i){if(!t.length)return;const o=1===t.length?t[0]:null,s=ml(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:o,source:i})}(a,h((L,H)=>L.hide==H.isVisible()),t);const T=h((L,H)=>L.sort!=H.getSort()||L.sortIndex!=H.getSortIndex());T.length>0&&r?.dispatchSortChangedEvents(t,T);const k=ws(e);!function Zh(e,t,i,o,s){const n={};for(const c of t)n[c.colId]=c;const r={};for(const c of e)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?.[u];if(h&&h.colId!==c.colId){const g=o.getCol(h.colId);g&&d.push(g)}}),d.length&&s.dispatchEvent({type:"columnMoved",columns:d,column:1===d.length?d[0]:null,finished:!0,source:i})}(d,k,t,n,a)}}function ws(e){const{colModel:t,rowGroupColsSvc:i,pivotColsSvc:o}=e;if(q(t.getColDefCols())||!t.isAlive())return[];const n=i?.columns,r=o?.columns,a=[];t.forAllCols(c=>(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=null!=c.getSort()?c.getSort():null,f=null!=c.getSortIndex()?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})})(c));const d=new Map(t.getCols().map((c,u)=>[c.getColId(),u]));return a.sort((c,u)=>(d.has(c.colId)?d.get(c.colId):-1)-(d.has(u.colId)?d.get(u.colId):-1)),a}function bl(e){const t=(p,f)=>p??f??null,i=e.getColDef(),o=t(i.sort,i.initialSort),s=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);null==d&&!c&&(d=null,c=null);let u=t(i.pivotIndex,i.initialPivotIndex),h=t(i.pivot,i.initialPivot);null==u&&!h&&(u=null,h=null);const g=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:o,sortIndex:s,hide:n,pinned:r,width:a,flex:l,rowGroup:c,rowGroupIndex:d,pivot:h,pivotIndex:u,aggFunc:g}}var Sl=(e,t,i,o)=>{const s=e[i.getId()],n=e[o.getId()],r=null!=s,a=null!=n;if(r&&a)return s-n;if(r)return-1;if(a)return 1;const l=t.indexOf(i),d=t.indexOf(o),c=l>=0;return c&&d>=0?l-d:c?-1:1},yl=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let i;return i="number"!=typeof t?0:t+1,this.existingIds[e]=i,i}};function Ho(e,t,i){return i&&e.addDestroyFunc(()=>t.destroyBean(i)),i??e}var V=null;function Rl(e){return"function"==typeof e?.getGui}var xl=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){if(e){if(e.indexOf(" ")>=0){const o=(e||"").split(" ");if(o.length>1){for(const s of o)this.toggleCss(s,t);return}}this.cssClassStates[e]!==t&&e.length&&(this.getGui()?.classList.toggle(e,t),this.cssClassStates[e]=t)}}},eg=0,Go=class extends jt{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=eg++,this.cssManager=new xl(()=>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;for(const t of this.css??[])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(Ra):null}applyElementsToComponent(e,t,i,o=null){if(void 0===t&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===V)this[t]=o??e;else{const n=i?.[t];if(!this.suppressDataRefValidation&&!n)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${s}`)}}}createChildComponentsFromTags(e,t){const i=[];for(const o of e.childNodes??[])i.push(o);for(const o of i){if(!(o instanceof HTMLElement))continue;const s=this.createComponentFromElement(o,n=>{const r=n.getGui();if(r)for(const a of o.attributes??[])r.setAttribute(a.name,a.value)},t);if(s){if(s.addItems&&o.children.length){this.createChildComponentsFromTags(o,t);const n=Array.prototype.slice.call(o.children);s.addItems(n)}this.swapComponentForNode(s,e,o)}else o.childNodes&&this.createChildComponentsFromTags(o,t)}}createComponentFromElement(e,t,i){const o=e.nodeName,s=this.getDataRefAttribute(e),n=0===o.indexOf("AG-"),r=n?this.componentSelectors.get(o):null;let a=null;if(r)a=new r.component(i&&s?i[s]:void 0),a.setParentComponent(this),this.createBean(a,null,t);else if(n)throw new Error(`selector: ${o}`);return this.applyElementsToComponent(e,s,i,a),a}swapComponentForNode(e,t,i){const o=e.getGui();t.replaceChild(o,i),t.insertBefore(document.createComment(i.nodeName),o),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(const i of e)i.setAttribute("tabindex",t.toString())}setTemplate(e,t,i){let o;o="string"==typeof e||null==e?oi(e):Fo(e),this.setTemplateFromElement(o,t,i)}setTemplateFromElement(e,t,i,o=!1){if(this.eGui=e,this.suppressDataRefValidation=o,t)for(let s=0;s<t.length;s++){const n=t[s];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 null==e?null:(i||(i=this.eGui),gn(e)?{element:e,parent:i}:{element:e.getGui(),parent:i})}prependChild(e,t){const{element:i,parent:o}=this.getContainerAndElement(e,t)||{};!i||!o||o.insertAdjacentElement("afterbegin",i)}appendChild(e,t){const{element:i,parent:o}=this.getContainerAndElement(e,t)||{};!i||!o||o.appendChild(i)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:i}=t;!function _e(e,t,i={}){const{skipAriaHidden:o}=i;e.classList.toggle("ag-invisible",!t),o||ie(e,!t)}(this.eGui,e,{skipAriaHidden:i})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:i}=t;ce(this.eGui,e,{skipAriaHidden:i}),this.dispatchLocalEvent({type:"displayChanged",visible:this.displayed})}}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))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}},Re=class extends Go{};function El(e){return"object"==typeof e&&!!e.component}var Ne=class ns{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 ns(i=>{let o=t.length;const s=new Array(o);t.forEach((n,r)=>{n.then(a=>{s[r]=a,o--,0===o&&i(s)})})}):ns.resolve()}static resolve(t=null){return new ns(i=>i(t))}then(t){return new ns(i=>{1===this.status?i(t(this.resolution)):this.waiters.push(o=>i(t(o)))})}onDone(t){this.status=1,this.resolution=t;for(const i of this.waiters)i(t)}onReject(t){}};function Fl(e,t,i,o){const{name:s}=i;let n,r,a,l,d,c;if(t){const u=t,h=u[s+"Selector"],g=h?h(o):null,p=f=>{"string"==typeof f?n=f:null!=f&&!0!==f&&(e.isFrameworkComponent(f)?a=f:r=f)};g?(p(g.component),l=g.params,d=g.popup,c=g.popupPosition):p(u[s])}return{compName:n,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:d,popupPositionFromSelector:c}}var sg={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},ng={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},rg={name:"headerComponent",optionalMethods:["refresh"]},ag={name:"innerHeaderComponent"},lg={name:"innerHeaderGroupComponent"},dg={name:"headerGroupComponent"},ug={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},gg={name:"loadingCellRenderer",cellRenderer:!0},pg={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},fg={name:"loadingOverlayComponent",optionalMethods:["refresh"]},mg={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},Cg={name:"tooltipComponent"},Tn={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},vg={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},wg={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},bg={name:"loadingCellRenderer",cellRenderer:!0},Sg={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},yg={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function Pl(e,t,i){return e.getCompDetails(t,ug,void 0,i)}function Dl(e,t,i){return e.getCompDetails(t,gg,"agSkeletonCellRenderer",i,!0)}function Ml(e,t,i){return e.getCompDetails(t,pg,"agCellEditor",i,!0)}function Tl(e,t){return Fl(e,t,Tn)}function kn(e,t,i){return e.mergeParams(t,Tn,i)}function Vo(e){const t=e;return null!=t?.getFrameworkComponentInstance?t.getFrameworkComponentInstance():e}function Gg(e){return"object"==typeof e&&!!e.getComp}var In,Ln,On,Bn,Hn,Gn,Vn,P_LEFT="ArrowLeft",P_UP="ArrowUp",P_RIGHT="ArrowRight",P_DOWN="ArrowDown",An=class extends Go{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e?.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}};function yi(){return void 0===In&&(In=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),In}function kl(){return void 0===Ln&&(Ln=/(firefox)/i.test(navigator.userAgent)),Ln}function Al(){return void 0===On&&(On=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),On}function Oi(){return void 0===Bn&&(Bn=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),Bn}function Nn(e){if(!e)return null;const t=e.tabIndex,i=e.getAttribute("tabIndex");return-1!==t||null!==i&&(""!==i||kl())?t.toString():null}function Il(){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;0===i&&0===t.clientWidth&&(i=null),t.parentNode&&t.remove(),null!=i&&(Gn=i,Hn=0===i)}function Ll(){return null==Hn&&Il(),Hn}var zg=new RegExp("[T ]"),_g=new RegExp("^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}\\D?)?");function Qt(e,t){return e.toString().padStart(t,"0")}function Tt(e,t=!0,i="T"){if(!e)return null;let o=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>Qt(s,2)).join("-");return t&&(o+=i+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>Qt(s,2)).join(":")),o}function bs(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),Qt(e.getDate(),2),Qt(e.getHours(),2),`:${Qt(e.getMinutes(),2)}`,`:${Qt(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,Qt(e.getDate(),2)].map(String):null}var _n=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"},Ol=["January","February","March","April","May","June","July","August","September","October","November","December"],Wn=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Un(e,t){if(null==t)return Tt(e,!1);const i=Qt(e.getFullYear(),4),o={YYYY:()=>i.slice(i.length-4,i.length),YY:()=>i.slice(i.length-2,i.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>Ol[e.getMonth()],MMM:()=>Ol[e.getMonth()].slice(0,3),MM:()=>Qt(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${_n(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${_n(e.getDate())}`,DD:()=>Qt(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>Wn[e.getDay()],ddd:()=>Wn[e.getDay()].slice(0,3),dd:()=>Wn[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${_n(e.getDay())}`,d:()=>`${e.getDay()}`},s=new RegExp(Object.keys(o).join("|"),"g");return t.replace(s,n=>n in o?o[n]():n)}function Ss(e,t=!1){return!!bt(e,t)}function bt(e,t=!1,i){if(!e||!i&&!_g.test(e))return null;const[o,s]=e.split(zg);if(!o)return null;const n=o.split("-").map(g=>Number.parseInt(g,10));if(3!==n.filter(g=>!isNaN(g)).length)return null;const[r,a,l]=n,d=new Date(r,a-1,l);if(d.getFullYear()!==r||d.getMonth()!==a-1||d.getDate()!==l||!s&&t)return null;if(!s||"00:00:00"===s)return d;const[c,u,h]=s.split(":").map(g=>Number.parseInt(g,10));if(c>=0&&c<24)d.setHours(c);else if(t)return null;if(u>=0&&u<60)d.setMinutes(u);else if(t)return null;if(h>=0&&h<60)d.setSeconds(h);else if(t)return null;return d}function $n(e){const{inputValue:t,allSuggestions:i,hideIrrelevant:o,filterByPercentageOfBestMatch:s}=e;let n=(i??[]).map((l,d)=>({value:l,relevance:Ug(t,l),idx:d}));if(n.sort((l,d)=>l.relevance-d.relevance),o&&(n=n.filter(l=>l.relevance<Math.max(l.value.length,t.length))),n.length>0&&s&&s>0){const d=n[0].relevance*s;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 Ug(e,t){e.length<t.length&&([e,t]=[t,e]);let i=[],o=[];const s=e.length,n=t.length;for(let a=0;a<=n;a++)i[a]=a;let r=0;for(let a=1;a<=s;a++){o[0]=a;for(let l=1;l<=n;l++){const d=e[a-1],c=t[l-1];d.toLocaleLowerCase()===c.toLocaleLowerCase()?(++r,d===c&&++r,a>1&&l>1&&e[a-2].toLocaleLowerCase()===t[l-2].toLocaleLowerCase()&&(++r,e[a-2]===t[l-2]&&++r),a<s/2-10&&++r,o[l]=i[l-1]):o[l]=1+Math.min(o[l-1],i[l],i[l-1])}[i,o]=[o,i]}return i[n]/(r+1)}function Bl(e){return!(e.altKey||e.ctrlKey||e.metaKey)&&1===e.key?.length}var jn=!1,ys=0;function Rs(e){const i="keydown"===e.type;i&&(e.ctrlKey||e.metaKey||e.altKey)||jn!==i&&(jn=i)}function io(e,t,i=!1){let s=J;t&&(s+=", "+t),i&&(s+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(e.querySelectorAll("[tabindex], input, select, button, textarea, [href]")).filter(l=>$e(l)),r=Array.prototype.slice.apply(e.querySelectorAll(s));return r.length?(d=r,n.filter(c=>-1===d.indexOf(c))):n;var d}function Bi(e,t=!1,i=!1,o=!1){const s=io(e,o?".ag-tab-guard":null,i),n=t?Ae(s):s[0];return!!n&&(n.focus({preventScroll:!0}),!0)}function Hi(e,t,i,o){const s=io(t,i?':not([tabindex="-1"])':null),n=Fe(e);let r;r=i?s.findIndex(l=>l.contains(n)):s.indexOf(n);const a=r+(o?-1:1);return a<0||a>=s.length?null:s[a]}function Hl(e,t=5){let i=0;for(;e&&null===Nn(e)&&++i<=t;)e=e.parentElement;return null===Nn(e)?null:e}var zl,Xl,ro,ao,Qg=class extends Go{constructor(e,t,i){super(t,i),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(".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)}")}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:i,labelAlignment:o,disabled:s}=this.config;null!=s&&this.setDisabled(s),null!=e&&this.setLabelSeparator(e),null!=t&&this.setLabel(t),null!=i&&this.setLabelWidth(i),this.setLabelAlignment(o||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;Ue(t),"string"==typeof e?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),""===e?(ce(t,!1),we(t,"presentation")):(ce(t,!0),we(t,null))}setLabelSeparator(e){return this.labelSeparator===e||(this.labelSeparator=e,null!=this.label&&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.label=e,this.refreshLabel()),this}setLabelAlignment(e){const i=this.getGui().classList;return i.toggle("ag-label-align-left","left"===e),i.toggle("ag-label-align-right","right"===e),i.toggle("ag-label-align-top","top"===e),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return null==this.label||rs(this.eLabel,e),this}setDisabled(e){e=!!e;const t=this.getGui();return Et(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},Gl=class extends Qg{constructor(e,t,i,o){super(e,t,i),this.className=o}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:i}=this.config;null!=e&&this.setWidth(e),null!=t&&this.setValue(t),null!=i&&this.onValueChange(i),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),i=this.getLabel();null==i||""==i||null!==function Wt(e){return e.getAttribute("aria-label")}(e)?Le(e,""):Le(e,t??"")}setAriaLabel(e){return Be(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 $t(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e||(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"})),this}},Gi=class extends Gl{constructor(e,t,i="text",o="input"){super(e,e?.template??function Xg(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"}]}]}}(o),[],t),this.inputType=i,this.displayFieldTag=o,this.eLabel=V,this.eWrapper=V,this.eInput=V}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:i,className:o}=this;e.classList.add(`${o}-label`),t.classList.add(`${o}-input-wrapper`),i.classList.add(`${o}-input`),this.addCss("ag-input-field"),i.id=i.id||`ag-${this.getCompId()}-input`;const{inputName:s,inputWidth:n}=this.config;null!=s&&this.setInputName(s),null!=n&&this.setInputWidth(n),this.addInputListeners(),this.activateTabIndex([i])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){"input"===this.displayFieldTag&&(this.inputType=e,Dt(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return rs(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){return this.eInput.maxLength=e,this}setInputPlaceholder(e){return Dt(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Be(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Et(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){return Dt(this.eInput,"autocomplete",!0===e?null:"string"==typeof e?e:"off"),this}},xs=class extends Gi{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;"boolean"==typeof e&&this.setReadOnly(e),"boolean"==typeof t&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return void 0===this.selected||!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){return this.getInputElement().name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected="boolean"==typeof e?e:void 0;const i=this.eInput;i.checked=e,i.indeterminate=void 0===e,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,i){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:i});const o=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:o.id,name:o.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",!0===e),t.toggle("ag-indeterminate",null==e)}},Kn={selector:"AG-CHECKBOX",component:xs},Zg=class extends xs{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)}},Vi=class extends Gi{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=C(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`);this.addManagedListeners(this.eInput,{keydown:i=>{Bl(i)&&i.key&&!e.test(i.key)&&i.preventDefault()},paste:i=>{i.clipboardData?.getData("text")?.split("").some(s=>!e.test(s))&&i.preventDefault()}})}},Es={selector:"AG-INPUT-TEXT-FIELD",component:Vi},ip={selector:"AG-INPUT-TEXT-AREA",component:class extends Gi{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}}},qn=class extends Vi{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const n=Number.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:o,step:s}=this.config;"number"==typeof t&&this.setPrecision(t),"number"==typeof i&&this.setMin(i),"number"==typeof o&&this.setMax(o),"number"==typeof s&&this.setStep(s)}onWheel(e){Fe(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return""===e?"":(null!=this.precision&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const i=this.precision;if(null==i)return e;if(t){const s=Number.parseFloat(e).toFixed(i);return Number.parseFloat(s).toString()}const o=String(e).split(".");if(o.length>1){if(o[1].length<=i)return e;if(i>0)return`${o[0]}.${o[1].slice(0,i)}`}return o[0]}setMin(e){return this.min===e||(this.min=e,Dt(this.eInput,"min",e)),this}setMax(e){return this.max===e||(this.max=e,Dt(this.eInput,"max",e)),this}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e||(this.step=e,Dt(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(C(i)){let o=this.isScientificNotation(i);if(o&&this.eInput.validity.valid)return e(i);if(o||(o=(i=this.adjustPrecision(i))!=this.normalizeValue(i)),o)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"string"==typeof e&&e.includes("e")}},op={selector:"AG-INPUT-NUMBER-FIELD",component:qn},Vl={selector:"AG-INPUT-DATE-FIELD",component:class extends Vi{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=yi();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){Fe(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?Tt(e??null,!!this.includeTime)??void 0:e;return this.min===t||(this.min=t,Dt(this.eInput,"min",t)),this}setMax(e){const t=e instanceof Date?Tt(e??null,!!this.includeTime)??void 0:e;return this.max===t||(this.max=t,Dt(this.eInput,"max",t)),this}setStep(e){return this.step===e||(this.step=e,Dt(this.eInput,"step",e)),this}setIncludeTime(e){return this.includeTime===e||(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1)),this}getDate(){if(this.eInput.validity.valid)return bt(this.getValue())??void 0}setDate(e,t){this.setValue(Tt(e??null,this.includeTime),t)}}},lp=class extends Go{constructor(e,t,i){super(((e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",ref:"eText",children:t}]}))(e,t)),this.label=t,this.value=i,this.eText=V}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle("ag-active-item",e),Xe(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const i=this.getGui();(function v(e,t){z(e,"posinset",t)})(i,e),function K(e,t){z(e,"setsize",t)}(i,t)}createTooltip(){const t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,{getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>un(this.eText)},this));t&&(this.tooltipFeature=t)}addEventListeners(){const e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},dp=class extends Go{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}")}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case"Enter":if(this.highlightedItem){const i=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(i)}else this.setValue(this.getValue());break;case P_DOWN:case P_UP:e.preventDefault(),this.navigate(t);break;case"PageDown":case"PageUp":case"Home":case"End":e.preventDefault(),this.navigateToPage(t)}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:i}=e,o=i??t;return this.options.push({value:t,text:o}),this.renderOption(t,o),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();Ue(this.getGui()),this.listItems=[],this.refreshAriaRole()}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(null==e)return this.reset(t),this;const i=this.options.findIndex(o=>o.value===e);if(-1!==i){const o=this.options[i];this.value=o.value,this.displayValue=o.text,this.highlightItem(this.listItems[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);-1!==e&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!$e(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const i=this.getGui(),{scrollTop:o,clientHeight:s}=i,{offsetTop:n,offsetHeight:r}=t;(n+r>o+s||n<o)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){this.highlightedItem?.tooltipFeature?.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){this.highlightedItem?.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const i=new lp(this.cssIdentifier,t,e);i.setParentComponent(this);const o=this.createManagedBean(i);this.listItems.push(o),this.getGui().appendChild(o.getGui())}navigate(e){const t=e===P_DOWN;let i;const{listItems:o,highlightedItem:s}=this;if(s){let r=o.indexOf(s)+(t?1:-1);r=Math.min(Math.max(r,0),o.length-1),i=o[r]}else i=t?o[0]:Ae(o);this.highlightItem(i)}navigateToPage(e){const{listItems:t,highlightedItem:i}=this;if(!i||0===t.length)return;const o=t.indexOf(i),s=this.options.length-1,n=t[0].getHeight(),r=Math.floor(this.getGui().clientHeight/n);let a=-1;"Home"===e?a=0:"End"===e?a=s:"PageDown"===e?a=Math.min(o+r,s):"PageUp"===e&&(a=Math.max(o-r,0)),-1!==a&&this.highlightItem(t[a])}refreshAriaRole(){we(this.getGui(),0===this.options.length?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((i,o)=>{i.setIndex(o+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},up={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"}}]}]},hp=class extends Gl{constructor(e){if(super(e,e?.template||up,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=V,this.eWrapper=V,this.eDisplayField=V,this.eIcon=V,this.registerCSS(".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;&:where(.ag-picker-has-focus),&:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:disabled{opacity:.5}}"),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:i,variableWidth:o,minPickerWidth:s,maxPickerWidth:n}=e;null!=t&&(this.pickerGap=t),this.variableWidth=!!o,null!=i&&this.setPickerMaxHeight(i),null!=s&&this.setPickerMinWidth(s),null!=n&&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:o}=this.config;if(i){const s=this.beans.iconSvc.createIconNoSpan(i);s&&this.eIcon.appendChild(s)}null!=o&&this.setInputWidth(o)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),pe(e,!1),this.ariaRole&&we(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}this.skipClick?this.skipClick=!1:this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case P_UP:case P_DOWN:case"Enter":case" ":e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case"Escape":this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker())}}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:o,modalPicker:s=!0},maxPickerHeight:n,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:d,eWrapper:c}=this,u={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const f=Rt(d);this.beforeHidePicker(),f&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(i,o),anchorToElement:c};e.style.position="absolute";const h=d.popupSvc,g=h.addPopup(u);l?(r&&(e.style.minWidth=r),e.style.width=hn(gt(c)),a&&(e.style.maxWidth=a)):rs(e,a??gt(c));const p=n??`${Vt(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:o},eWrapper:s,pickerComponent:n}=this,r=o.get("enableRtl")?"right":"left";i.positionPopupByComponent({type:t,eventSource:s,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;pe(this.getAriaElement(),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&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return rs(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return"number"==typeof e&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},Yn=class extends hp{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(".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)}}.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-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)}")}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:xo(()=>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;null!=e&&this.addOptions(e),null!=t&&this.setValue(t,!0),i&&null==t&&(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 dp("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),i=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",i),function Ut(e,t){(function De(e,t){ke(e,"controls",t)})(e,t.id),Le(t,e.id)}(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:o=>{o?.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}beforeHidePicker(){this.listComponent?.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){const{key:t}=e;switch("Tab"===t&&this.hidePicker(),t){case"Enter":case P_UP:case P_DOWN:case"PageUp":case"PageDown":case"Home":case"End":e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case"Escape":super.onKeyDown(e);break;case" ":this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e)}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return 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:o,config:{placeholder:s},eDisplayField:n,tooltipFeature:r}=this;if(this.value===e||!o)return this;if(i||o.setValue(e,!0),o.getValue()===this.getValue())return this;let l=o.getDisplayValue();return null==l&&s&&(l=s),n.textContent=l,r?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},pp={selector:"AG-SELECT",component:Yn},Qn="object"!=typeof window||!window?.document?.fonts?.forEach,oo=(e,t,i,o,s,n)=>{if(Qn)return;o&&(e=`@layer ${CSS.escape(o)} { ${e} }`);let r=so.map.get(t);if(r||(r=[],so.map.set(t,r)),r.some(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:s};let d;for(const c of r){if(c.priority>s)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)},Nl=(e,t,i,o)=>{oo(':where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-external,.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(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}&:where(button){color:inherit}}:where(.ag-root-wrapper,ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.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-chart,.ag-dnd-ghost,.ag-external,.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}: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-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select: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}}',e,"shared",t,0,i),o?.forEach((s,n)=>s.forEach(r=>oo(r,e,n,t,0,i)))},so=(zl="object"==typeof window?window:{}).agStyleInjectionState??(zl.agStyleInjectionState={map:new WeakMap,grids:new Set}),xe=e=>new _l(e),Ri="$default",wp=0,_l=class{constructor({feature:e,params:t,modeParams:i={},css:o,cssImports:s}){this.feature=e,this.css=o,this.cssImports=s,this.modeParams={[Ri]:{...i[Ri]??{},...t??{}},...i}}use(e,t,i){let o=this._inject;if(null==o){let{css:s}=this;if(s){const n=`ag-theme-${this.feature??"part"}-${++wp}`;"function"==typeof s&&(s=s()),s=`:where(.${n}) {\n${s}\n}\n`;for(const r of this.cssImports??[])s=`@import url(${JSON.stringify(r)});\n${s}`;o={css:s,class:n}}else o=!1;this._inject=o}return o&&e&&oo(o.css,e,o.class,t,1,i),!!o&&o.class}},Wl=e=>`--ag-${(e=>e.replace(/[A-Z]/g,t=>`-${t}`).toLowerCase())(e)}`,Xt=e=>`var(${Wl(e)})`,kt=e=>({ref:"accentColor",mix:e}),Ke=e=>({ref:"foregroundColor",mix:e}),He=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),ze={ref:"backgroundColor"},At={ref:"foregroundColor"},We={ref:"accentColor"},Ni={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:Ke(.15),chromeBackgroundColor:He(.02),browserColorScheme:"light"},xp={...Ni,textColor:At,accentColor:"#2196f3",invalidColor:"#e02525",fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],subtleTextColor:{ref:"textColor",mix:.5},borderWidth:1,borderRadius:4,spacing:8,fontSize:14,focusShadow:{spread:3,color:kt(.5)},focusErrorShadow:{spread:3,color:{ref:"invalidColor",onto:"backgroundColor",mix:.5}},popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},dragAndDropImageBackgroundColor:ze,dragAndDropImageBorder:!0,dragAndDropImageNotAllowedBorder:{color:{ref:"invalidColor",onto:"dragAndDropImageBackgroundColor",mix:.5}},dragAndDropImageShadow:{ref:"popupShadow"},iconSize:16,iconColor:"inherit",toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:We,toggleButtonOffBackgroundColor:He(.3),toggleButtonSwitchBackgroundColor:ze,toggleButtonSwitchInset:2,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipErrorBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.1},tooltipTextColor:{ref:"textColor"},tooltipErrorTextColor:{ref:"invalidColor"},tooltipBorder:!0,tooltipErrorBorder:{color:{ref:"invalidColor",onto:"backgroundColor",mix:.25}}},Ep=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],Fp=(()=>{const t=new Map;return i=>{const o=i;return t.has(o)||t.set(o,(e=>(e=e.toLowerCase(),Ep.find(t=>e.endsWith(t.toLowerCase()))??"length"))(i)),t.get(o)}})(),Fs=e=>"object"==typeof e&&e?.ref?Xt(e.ref):"string"==typeof e?e:"number"==typeof e&&String(e),Ps=e=>{if("string"==typeof e)return e;if(e&&"ref"in e){const t=Xt(e.ref);return null==e.mix?t:`color-mix(in srgb, ${e.onto?Xt(e.onto):"transparent"}, ${t} ${(e=>Math.max(0,Math.min(100,e)))(100*e.mix)}%)`}return!1},no=e=>"string"==typeof e?e:"number"==typeof e?`${e}px`:e&&"calc"in e?`calc(${e.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,i=>"-"===i[0]?i:" "+Xt(i)+" ")})`:!(!e||!("ref"in e))&&Xt(e.ref),Zn=(e,t)=>"string"==typeof e?e:!0===e?Zn({},t):!1===e?"columnBorder"===t?Zn({color:"transparent"},t):"none":e&&"ref"in e?Xt(e.ref):Ul(e.style??"solid")+" "+no(e.width??{ref:"borderWidth"})+" "+Ps(e.color??{ref:"borderColor"}),Ul=Fs,Jn=e=>"string"==typeof e?e.includes(",")?e:$l(e):e&&"googleFont"in e?Jn(e.googleFont):e&&"ref"in e?Xt(e.ref):!!Array.isArray(e)&&e.map(t=>("object"==typeof t&&"googleFont"in t&&(t=t.googleFont),$l(t))).join(", "),$l=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),jl=Fs,er=e=>"string"==typeof e?e:e&&"url"in e?`url(${JSON.stringify(e.url)})`:e&&"svg"in e?er({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):!(!e||!("ref"in e))&&Xt(e.ref),kp={color:Ps,colorScheme:Fs,length:no,scale:Fs,border:Zn,borderStyle:Ul,shadow:e=>"string"==typeof e?e:!1===e?"none":e&&"ref"in e?Xt(e.ref):[no(e.offsetX??0),no(e.offsetY??0),no(e.radius??0),no(e.spread??0),Ps(e.color??{ref:"foregroundColor"})].join(" "),image:er,fontFamily:Jn,fontWeight:jl,duration:(e,t,i)=>"string"==typeof e?e:"number"==typeof e?(e>=10&&i.warn(104,{value:e,param:t}),`${e}s`):!(!e||!("ref"in e))&&Xt(e.ref)},Ap=(e,t,i)=>{const o=Fp(e);return kp[o](t,e,i)},tr=class _u{constructor(t,i=[]){this.themeLogger=t,this.parts=i}withPart(t){return"function"==typeof t&&(t=t()),t instanceof _l?new _u(this.themeLogger,[...this.parts,t]):(this.themeLogger.preInitErr(259,"Invalid part",{part:t}),this)}withoutPart(t){return this.withPart(xe({feature:t}))}withParams(t,i=Ri){return this.withPart(xe({modeParams:{[i]:t}}))}_startUse({styleContainer:t,cssLayer:i,nonce:o,loadThemeGoogleFonts:s,moduleCss:n}){if(Qn)return;Op(),Nl(t,i,o,n);const r=Lp(this);if(r.length>0)for(const a of r)s&&Bp(a,o);for(const a of this.parts)a.use(t,i,o)}_getCssClass(){return this._cssClassCache??(this._cssClassCache=Kl(this.parts).map(t=>t.use(void 0,void 0,void 0)).filter(Boolean).join(" "))}_getModeParams(){let t=this._paramsCache;if(!t){const i={[Ri]:{...xp}};for(const o of Kl(this.parts))for(const s of Object.keys(o.modeParams)){const n=o.modeParams[s];if(n){const r=i[s]??(i[s]={}),a=new Set;for(const l of Object.keys(n)){const d=n[l];void 0!==d&&(r[l]=d,a.add(l))}if(s===Ri)for(const l of Object.keys(i)){const d=i[l];if(l!==Ri)for(const c of a)delete d[c]}}}this._paramsCache=t=i}return t}_getPerInstanceCss(t){const i="##SELECTOR##";let o=this._paramsCssCache;if(!o){let s="",n="";const r=this._getModeParams();for(const l of Object.keys(r)){const d=r[l];if(l!==Ri){const u=`:where([data-ag-theme-mode="${"object"==typeof CSS?CSS.escape(l):l}"]) & {\n`;s+=u,n+=u}for(const c of Object.keys(d).sort()){const u=d[c],h=Ap(c,u,this.themeLogger);if(!1===h)this.themeLogger.error(107,{key:c,value:u});else{const g=Wl(c),p=g.replace("--ag-","--ag-inherited-");s+=`\t${g}: var(${p}, ${h});\n`,n+=`\t${p}: var(${g});\n`}}l!==Ri&&(s+="}\n",n+="}\n")}let a=`${i} {\n${s}}\n`;a+=`:has(> ${i}):not(${i}) {\n${n}}\n`,this._paramsCssCache=o=a}return o.replaceAll(i,`:where(.${t})`)}},Kl=e=>{const t=new Map;for(const o of e)t.set(o.feature,o);const i=[];for(const o of e)(!o.feature||t.get(o.feature)===o)&&i.push(o);return i},Lp=e=>{const t=new Set,i=n=>{if(Array.isArray(n))n.forEach(i);else{const r=n?.googleFont;"string"==typeof r&&t.add(r)}};return Object.values(e._getModeParams()).flatMap(n=>Object.values(n)).forEach(i),Array.from(t).sort()},ql=!1,Op=()=>{if(!ql){ql=!0;for(const e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},Bp=function(){var e=(0,y.A)(function*(t,i){const o=`@import url('https://${Hp}/css2?family=${encodeURIComponent(t)}:wght@100;200;300;400;500;600;700;800;900&display=swap');\n`;oo(o,document.head,`googleFont:${t}`,void 0,0,i)});return function(i,o){return e.apply(this,arguments)}}(),Hp="fonts.googleapis.com",Gp=1,Vp=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=Gp++,e?.beanClasses&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){this.id=e.id,this.beans.context=this,this.destroyCallback=e.destroyCallback;for(const t of Object.keys(e.providedBeanInstances))this.beans[t]=e.providedBeanInstances[t];for(const t of e.beanClasses){const i=new t;i.beanName?this.beans[i.beanName]=i:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(i)}for(const t of e.derivedBeans??[]){const{beanName:i,bean:o}=t(this);this.beans[i]=o,this.createdBeans.push(o)}e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){return this.initBeans([e],t),e}initBeans(e,t){const i=this.beans;for(const o of e)o.preWireBeans?.(i),o.wireBeans?.(i);for(const o of e)o.preConstruct?.();t&&e.forEach(t);for(const o of e)o.postConstruct?.()}getBeans(){return this.beans}getBean(e){return this.beans[e]}getId(){return this.id}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=[],this.destroyCallback?.()}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}},Np=0,zp=class extends jt{constructor(){super(...arguments),this.beanName="environment",this.paramsClass="ag-theme-params-"+ ++Np,this.globalCSS=[]}wireBeans(e){this.eRootDiv=e.eRootDiv}postConstruct(){const{gos:e,eRootDiv:t}=this;e.setInstanceDomData(t),this.eStyleContainer=e.get("themeStyleContainer")??(t.getRootNode()===document?document.head:t),this.cssLayer=e.get("themeCssLayer"),this.styleNonce=e.get("styleNonce"),this.addManagedPropertyListener("theme",()=>this.handleThemeChange()),this.handleThemeChange(),this.initVariables(),this.addDestroyFunc(()=>(()=>{if(so.grids.delete(this),0===so.grids.size){so.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}})()),this.mutationObserver=new MutationObserver(()=>{this.fireStylesChangedEvent("themeChanged")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}applyThemeClasses(e,t=[]){const{theme:i}=this;let o;o=i?`${this.paramsClass} ${i._getCssClass()}`:this.applyLegacyThemeClasses();for(const s of Array.from(e.classList))s.startsWith("ag-theme-")&&e.classList.remove(s);if(o){const s=e.className;e.className=`${s}${s?" ":""}${o}${t?.length?" "+t.join(" "):""}`}}applyLegacyThemeClasses(){let e="";this.mutationObserver.disconnect();let t=this.eRootDiv;for(;t;){let i=!1;for(const o of Array.from(t.classList))o.startsWith("ag-theme-")&&(i=!0,e=e?`${e} ${o}`:o);i&&this.mutationObserver.observe(t,{attributes:!0,attributeFilter:["class"]}),t=t.parentElement}return e}addGlobalCSS(e,t){this.theme?oo(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}handleThemeChange(){const{gos:e,theme:t}=this,i=e.get("theme");let o;if("legacy"===i)o=void 0;else{const s=i??this.getDefaultTheme();s instanceof tr?o=s:this.themeError(s)}o!==t&&this.handleNewTheme(o),this.postProcessThemeChange(o,i)}handleNewTheme(e){const{gos:t,eRootDiv:i,globalCSS:o}=this,s=this.getAdditionalCss();if(e){(()=>{so.grids.add(this)})(),Nl(this.eStyleContainer,this.cssLayer,this.styleNonce,s);for(const[r,a]of o)oo(r,this.eStyleContainer,a,this.cssLayer,0,this.styleNonce);o.length=0}this.theme=e,e?._startUse({loadThemeGoogleFonts:t.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce,moduleCss:s});let n=this.eParamsStyle;if(!n){n=this.eParamsStyle=Fo({tag:"style"});const r=t.get("styleNonce");r&&n.setAttribute("nonce",r),i.appendChild(n)}Qn||(n.textContent=e?._getPerInstanceCss(this.paramsClass)||""),this.applyThemeClasses(i),this.fireStylesChangedEvent("themeChanged")}},_p=class extends jt{constructor(){super(...arguments),this.beanName="registry"}registerDynamicBeans(e){if(e){this.dynamicBeans??(this.dynamicBeans={});for(const t of Object.keys(e))this.dynamicBeans[t]=e[t]}}createDynamicBean(e,t,...i){if(!this.dynamicBeans)throw new Error(this.getDynamicError(e,!0));const o=this.dynamicBeans[e];if(null!=o)return new o(...i);if(t)throw new Error(this.getDynamicError(e,!1))}},Wp=class extends jt{constructor(){super(...arguments),this.beanName="eventSvc",this.eventServiceType="global",this.globalSvc=new S}addListener(e,t,i){this.globalSvc.addEventListener(e,t,i)}removeListener(e,t,i){this.globalSvc.removeEventListener(e,t,i)}addGlobalListener(e,t=!1){this.globalSvc.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalSvc.removeGlobalListener(e,t)}dispatchEvent(e){this.globalSvc.dispatchEvent(this.gos.addCommon(e))}dispatchEventOnce(e){this.globalSvc.dispatchEventOnce(this.gos.addCommon(e))}},Yl=class extends jt{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const i="title",o=this.ctrl.getGui();o&&(null==e||""==e&&!t?o.removeAttribute(i):o.setAttribute(i,e))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){if(null==this.tooltipManager){const e=this.beans.registry.createDynamicBean("tooltipStateManager",!0,this.ctrl,()=>this.tooltip);e&&(this.tooltipManager=this.createBean(e,this.beans.context))}}attemptToShowTooltip(){this.tooltipManager?.prepareToShowTooltip()}attemptToHideTooltip(){this.tooltipManager?.hideTooltip()}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(e){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(e?"":null,e),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},Ds=!1,jp=class extends jt{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}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();0===this.tooltipTrigger&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),1===this.tooltipTrigger&&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"show"===e?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&&"hover"!==e?1:0}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!Oi()&&(Ds?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},100):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&2===this.state&&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(),o=this.tooltipComp?.getGui();this.isInteractingWithTooltip||i.contains(t)||this.interactionEnabled&&o?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(0!=this.state||Ds)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()-Xl<1e3}setToDoNothing(e){!e&&2===this.state&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.clearEventHandlers(),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(!C(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip())return void this.setToDoNothing();const i=this.gos.addCommon({location:t.getLocation?.()??"UNKNOWN",value:e,hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()});this.state=2,this.tooltipInstanceCount++;const o=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(i,o)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),Xl=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(2!==this.state||this.tooltipInstanceCount!==e)return void this.destroyBean(t);const o=t.getGui();this.tooltipComp=t,o.classList.contains("ag-tooltip")||o.classList.add("ag-tooltip-custom"),0===this.tooltipTrigger&&o.classList.add("ag-tooltip-animate"),this.interactionEnabled&&o.classList.add("ag-tooltip-interactive");const s=this.getLocaleTextFunc(),n=this.popupSvc?.addPopup({eChild:o,ariaLabel:s("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),1===this.tooltipTrigger){const r=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:r}),this.setEventHandlers(r)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(o,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(ve(this.beans),{keydown:r=>{o.contains(r?.target)||this.onKeyDown()}}),1===this.tooltipTrigger&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(o,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:o,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=Fe(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;window.setTimeout(()=>{e(),this.destroyBean(t)},0===this.tooltipTrigger?1e3:0),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){for(const e of[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener])e&&e();this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){Ds=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},100)}unlockService(){Ds=!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()}},Ms=0,Yp=class extends jt{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}getPopupParent(){return this.gos.get("popupParent")||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:i,nudgeY:o,skipObserver:s}=e;this.positionPopup({ePopup:t,nudgeX:i,nudgeY:o,keepWithinBounds:!0,skipObserver:s,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e,e.type,e.ePopup,null,e.mouseEvent)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:i,nudgeY:o,keepWithinBounds:s,eventSource:n,alignSide:r="left",position:a="over",type:l}=e,d=n.getBoundingClientRect(),c=this.getParentRect();this.setAlignedTo(n,t),this.positionPopup({ePopup:t,nudgeX:i,nudgeY:o,keepWithinBounds:s,updatePosition:()=>{let g,h=d.left-c.left;return"right"===r&&(h-=t.offsetWidth-d.width),"over"===a?(g=d.top-c.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),g="under"===this.shouldRenderUnderOrAbove(t,d,c,e.nudgeY||0)?d.top-c.top+d.height:d.top-t.offsetHeight-2*(o||0)-c.top),{x:h,y:g}},postProcessCallback:()=>this.callPostProcessPopup(e,l,t,n,null)})}shouldRenderUnderOrAbove(e,t,i,o){const s=i.bottom-t.bottom,n=t.top-i.top,r=e.offsetHeight+o;return s>r?"under":n>r||n>s?"above":"under"}setAlignedStyles(e,t){const i=this.getPopupIndex(e);if(-1===i)return;const o=this.popupList[i],{alignedToElement:s}=o;if(!s)return;const n=["right","left","over","above","under"];for(const r of n)s.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`);t&&(s.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const i=this.getPopupIndex(t);-1!==i&&(this.popupList[i].alignedToElement=e)}positionPopup(e){const{ePopup:t,keepWithinBounds:i,nudgeX:o,nudgeY:s,skipObserver:n,updatePosition:r}=e,a={width:0,height:0},l=(d=!1)=>{let{x:c,y:u}=r();d&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,o&&(c+=o),s&&(u+=s),i&&(c=this.keepXYWithinBounds(t,c,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${c}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!n){const d=pi(this.beans,t,()=>l(!0));setTimeout(()=>d(),200)}}getParentRect(){const e=ve(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:"static"===getComputedStyle(t).position&&(t=t.offsetParent),Ze(t)}keepXYWithinBounds(e,t,i){const o=0===i,s=o?"clientHeight":"clientWidth",n=o?"top":"left",r=o?"height":"width",a=o?"scrollTop":"scrollLeft",l=ve(this.beans),d=l.documentElement,c=this.getPopupParent(),u=e.getBoundingClientRect(),h=c.getBoundingClientRect(),g=l.documentElement.getBoundingClientRect(),p=c===l.body,f=Math.ceil(u[r]);let w=p?(o?et:gt)(d)+d[a]:c[s];p&&(w-=Math.abs(g[n]-h[n]));const b=w-f;return Math.min(Math.max(t,0),Math.max(b,0))}addPopup(e){const{eChild:t,ariaLabel:i,ariaOwns:o,alwaysOnTop:s,positionCallback:n,anchorToElement:r}=e,a=this.getPopupIndex(t);if(-1!==a)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(t);const l=this.createPopupWrapper(t,!!s,i,o),d=this.addEventListenersToPopup({...e,wrapperEl:l});return n&&n(),this.addPopupToPopupList(t,l,d,r),{hideFunc:d}}initialisePopupPosition(e){const i=this.getPopupParent().getBoundingClientRect();C(e.style.top)||(e.style.top=-1*i.top+"px"),C(e.style.left)||(e.style.left=-1*i.left+"px")}createPopupWrapper(e,t,i,o){const s=this.getPopupParent(),{environment:n,gos:r}=this.beans,a=Fo({tag:"div"});return n.applyThemeClasses(a),a.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||we(e,"dialog"),i?Be(e,i):o&&(e.id||(e.id=`popup-component-${Ms}`),vt(o,e.id)),a.appendChild(e),s.appendChild(a),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),a}addEventListenersToPopup(e){const t=this.beans,i=ve(t),{wrapperEl:o,eChild:s,closedCallback:n,afterGuiAttached:r,closeOnEsc:a,modal:l,ariaOwns:d}=e;let c=!1;const u=f=>{o.contains(Fe(t))&&"Escape"===f.key&&!this.isStopPropagation(f)&&p({keyboardEvent:f})},h=f=>p({mouseEvent:f}),g=f=>p({touchEvent:f}),p=(f={})=>{const{mouseEvent:m,touchEvent:w,keyboardEvent:b,forceHide:R}=f;!R&&(this.isEventFromCurrentPopup({mouseEvent:m,touchEvent:w},s)||c)||(c=!0,o.remove(),i.removeEventListener("keydown",u),i.removeEventListener("mousedown",h),i.removeEventListener("touchstart",g),i.removeEventListener("contextmenu",h),this.eventSvc.removeListener("dragStarted",h),n&&n(m||w||b),this.removePopupFromPopupList(s,d))};return r&&r({hidePopup:p}),window.setTimeout(()=>{a&&i.addEventListener("keydown",u),l&&(i.addEventListener("mousedown",h),this.eventSvc.addListener("dragStarted",h),i.addEventListener("touchstart",g),i.addEventListener("contextmenu",h))},0),p}addPopupToPopupList(e,t,i,o){this.popupList.push({element:e,wrapper:t,hideFunc:i,instanceId:Ms,isAnchored:!!o}),o&&this.setPopupPositionRelatedToElement(e,o),Ms+=1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const i=this.getPopupIndex(e);if(-1===i)return;const o=this.popupList[i];if(o.stopAnchoringPromise&&o.stopAnchoringPromise.then(n=>n&&n()),o.stopAnchoringPromise=void 0,o.isAnchored=!1,!t)return;const s=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:o.hideFunc});return o.stopAnchoringPromise=s,o.isAnchored=!0,s}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&vt(t,null),this.popupList=this.popupList.filter(i=>i.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),i=t.getBoundingClientRect(),{element:o,ePopup:s}=e,n=o.getBoundingClientRect(),r=u=>Number.parseInt(u.substring(0,u.length-1),10),a=(u,h)=>{const g=i[u]-n[u],p=r(s.style[u]);return{initialDiff:g,lastDiff:g,initial:p,last:p,direction:h}},l=a("top",0),d=a("left",1),c=this.beans.frameworkOverrides;return new Ne(u=>{c.wrapIncoming(()=>{(function tg(e,t){return new Ne(i=>{i(window.setInterval(e,t))})})(()=>{const h=t.getBoundingClientRect(),g=o.getBoundingClientRect();if(0==g.top&&0==g.left&&0==g.height&&0==g.width)return void e.hidePopup();const f=(m,w)=>{const b=r(s.style[w]);m.last!==b&&(m.initial=b,m.last=b);const R=h[w]-g[w];if(R!=m.lastDiff){const T=this.keepXYWithinBounds(s,m.initial+m.initialDiff-R,m.direction);s.style[w]=`${T}px`,m.last=T}m.lastDiff=R};f(l,"top"),f(d,"left")},200).then(h=>{u(()=>{null!=h&&window.clearInterval(h)})})},"popupPositioning")})}isEventFromCurrentPopup(e,t){const{mouseEvent:i,touchEvent:o}=e,s=i||o;if(!s)return!1;const n=this.getPopupIndex(t);if(-1===n)return!1;for(let r=n;r<this.popupList.length;r++)if(ju(this.popupList[r].element,s))return!0;return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){const t=ve(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||null===e.parentElement)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const i=this.getWrapper(e);i&&(i.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(i))}bringPopupToFront(e){const t=this.getPopupParent(),i=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),o=i.length,s=this.getWrapper(e);if(!s||o<=1||!t.contains(e))return;const n=[],r=[];for(const h of i)h!==s&&(h.classList.contains("ag-always-on-top")?r.push(h):n.push(h));const a=[],l=r.length,u=s.classList.contains("ag-always-on-top")||!l?[...n,...r,s]:[...n,s,...r];for(let h=0;h<=o;h++){const g=u[h];if(i[h]===u[h]||g===s)continue;const p=g.querySelectorAll("div");for(const f of p)0!==f.scrollTop&&a.push([f,f.scrollTop]);0===h?t.insertAdjacentElement("afterbegin",g):u[h-1].insertAdjacentElement("afterend",g)}for(;a.length;){const h=a.pop();h[0].scrollTop=h[1]}}},Zl=(e,t)=>{if(null!=t&&e?.setPointerCapture)try{return e.setPointerCapture(t),e.hasPointerCapture(t)}catch{}return!1},Jl=e=>{const{eElement:t,onLost:i}=e;t&&i&&(t.removeEventListener("lostpointercapture",i),e.onLost=null)},di=e=>{if(ao){if(ao.has(e))return!1}else ao=new WeakSet;return ao.add(e),!0},ef=class extends jt{constructor(){super(...arguments),this.beanName="dragSvc",this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){return this.drag?.start.target??null}isPointer(){return!!ro?.has(ot(this.beans))}hasPointerCapture(){const e=this.drag?.pointerCapture;return!(!e||!this.beans.eRootDiv.hasPointerCapture?.(e.pointerId))}destroy(){this.drag&&this.cancelDrag();const e=this.dragSources;for(const t of e)ed(t);e.length=0,super.destroy()}removeDragSource(e){const t=this.dragSources;for(let i=0,o=t.length;i<o;++i){const s=t[i];if(s.params===e){t.splice(i,1),ed(s);break}}}addDragSource(e){if(!this.isAlive())return;const{eElement:t,includeTouch:i}=e,o=[];let s;if(i){const d=t.style;d&&(s=d.touchAction,d.touchAction="none")}this.dragSources.push({handlers:o,params:e,oldTouchAction:s}),as(o,[t,"pointerdown",d=>this.onPointerDown(e,d),{passive:!1}],[t,"mousedown",d=>this.onMouseDown(e,d)]);const l=this.gos.get("suppressTouch");i&&!l&&as(o,[t,"touchstart",c=>this.onTouchStart(e,c),{passive:!1}])}cancelDrag(e){const t=this.drag;e??(e=t?.eElement),e&&this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),t?.params.onDragCancel?.(),this.destroyDrag()}shouldPreventMouseEvent(e){const t=e.type;return("mousemove"===t||"pointermove"===t)&&e.cancelable&&Do(this.beans,e)&&!ye(or(e))}initDrag(e,...t){this.drag=e;const i=this.beans,o=a=>this.onScroll(a),n=ot(i),r=ve(i);as(e.handlers,[n,"contextmenu",fi],[n,"keydown",a=>this.onKeyDown(a)],[r,"scroll",o,{capture:!0}],[r.defaultView||window,"scroll",o],...t)}destroyDrag(){this.dragging=!1;const e=this.drag;if(e){const t=e.rootEl;ro?.get(t)===e&&ro?.delete(t),this.drag=null,(e=>{if(!e)return;Jl(e);const{eElement:t,pointerId:i}=e;if(t){try{t.releasePointerCapture(i)}catch{}e.eElement=null}})(e.pointerCapture),mn(e.handlers)}}onPointerDown(e,t){if(this.isPointer())return;const i=this.beans;if(ao?.has(t))return;const o=t.pointerType;if("touch"===o&&(i.gos.get("suppressTouch")||!e.includeTouch||(e.stopPropagationForTouch&&t.stopPropagation(),ye(or(t))))||!t.isPrimary||"mouse"===o&&0!==t.button)return;this.destroyDrag();const s=ot(i),n=e.eElement,r=t.pointerId,a=new ir(s,e,t,r);ro??(ro=new WeakMap),ro.set(s,a),this.initDrag(a,[s,"pointerup",u=>{u.pointerId===r&&this.onMouseOrPointerUp(u)}],[s,"pointercancel",u=>{u.pointerId===r&&di(u)&&this.cancelDrag()}],[s,"pointermove",u=>{u.pointerId===r&&this.onMouseOrPointerMove(u)},{passive:!1}],[s,"touchmove",fi,{passive:!1}],[n,"mousemove",fi,{passive:!1}]),0===e.dragStartPixels?this.onMouseOrPointerMove(t):di(t)}onTouchStart(e,t){if(this.gos.get("suppressTouch")||!e.includeTouch||!di(t)||ye(or(t)))return;if(e.stopPropagationForTouch&&t.stopPropagation(),this.isPointer())return void fi(t);this.destroyDrag();const o=this.beans,s=ot(o),n=new ir(s,e,t.touches[0]),a=d=>this.onTouchUp(d),l=t.target??e.eElement;this.initDrag(n,[ot(o),"touchmove",fi,{passive:!1}],[l,"touchmove",d=>this.onTouchMove(d),{passive:!0}],[l,"touchend",a,{passive:!0}],[l,"touchcancel",a,{passive:!0}]),0===e.dragStartPixels&&this.onMove(n.start)}onMouseDown(e,t){if(0!==t.button||ao?.has(t)||this.isPointer())return;const i=this.beans;this.destroyDrag();const o=new ir(ot(i),e,t),r=ot(i);this.initDrag(o,[r,"mousemove",a=>this.onMouseOrPointerMove(a)],[r,"mouseup",a=>this.onMouseOrPointerUp(a)]),0===e.dragStartPixels?this.onMouseOrPointerMove(t):di(t)}onScroll(e){if(!di(e))return;const t=this.drag,i=t?.lastDrag;i&&this.dragging&&t.params?.onDragging(i)}onMouseOrPointerMove(e){di(e)&&(yi()&&ve(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&fi(e),this.onMove(e))}onTouchMove(e){const t=this.drag;if(!t||!di(e))return;const i=Po(t.start,e.touches);i&&(e.preventDefault(),this.onMove(i))}onMove(e){const t=this.drag;if(!t)return;t.lastDrag=e;const i=t.params;if(!this.dragging){const o=t.start;if(Fa(e,o,i.dragStartPixels??4)||(this.dragging=!0,i.capturePointer&&(t.pointerCapture=((e,t)=>{if(typeof PointerEvent>"u"||!(t instanceof PointerEvent))return null;const i=t.pointerId;if(!Zl(e,i))return null;const o={eElement:e,pointerId:i,onLost(s){((e,t)=>{Jl(e);const{eElement:i,pointerId:o}=e;i&&t.pointerId===o&&Zl(i,o)})(o,s)}};return e.addEventListener("lostpointercapture",o.onLost),o})(this.beans.eRootDiv,e)),this.eventSvc.dispatchEvent({type:"dragStarted",target:i.eElement}),i.onDragStart(o),this.drag!==t)||(i.onDragging(o),this.drag!==t))return}i.onDragging(e)}onTouchUp(e){const t=this.drag;t&&di(e)&&this.onUp(Po(t.start,e.changedTouches))}onMouseOrPointerUp(e){di(e)&&this.onUp(e)}onUp(e){const t=this.drag;t&&(e||(e=t.lastDrag),e&&this.dragging&&(this.dragging=!1,t.params.onDragStop(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t.params.eElement})),this.destroyDrag())}onKeyDown(e){"Escape"===e.key&&this.cancelDrag()}},ed=e=>{mn(e.handlers);const t=e.oldTouchAction;if(null!=t){const i=e.params.eElement.style;i&&(i.touchAction=t)}},ir=class{constructor(e,t,i,o=null){this.rootEl=e,this.params=t,this.start=i,this.pointerId=o,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=t.eElement}},or=e=>{const t=e.target;return t instanceof Element?t:null},tf=class extends jt{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.dragSource=null,this.dragImageParent=null,this.dragImageCompPromise=null,this.dragImageComp=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.dropTargets=[],this.lastDropTarget=null}addDragSource(e,t=!1){const i={capturePointer:!0,dragSource:e,eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:o=>this.onDragStart(e,o),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push(i),this.beans.dragSvc.addDragSource(i)}setDragImageCompIcon(e,t=!1){const i=this.dragImageComp;i&&(t||this.dragImageLastIcon!==e)&&(this.dragImageLastIcon=e,i.setIcon(e,t))}removeDragSource(e){const{dragSourceAndParamsList:t,beans:i}=this,o=t.find(s=>s.dragSource===e);o&&(i.dragSvc?.removeDragSource(o),Lt(t,o))}destroy(){const{dragSourceAndParamsList:e,dropTargets:t,beans:i}=this,o=i.dragSvc;for(const s of e)o?.removeDragSource(s);e.length=0,t.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){const e=this.lastMouseEvent;e&&this.onDragging(e,!0)}onDragStart(e,t){this.lastMouseEvent=t,this.dragSource=e,this.dragItem=e.getDragItem();const i=e.eElement.getBoundingClientRect();this.dragInitialSourcePointerOffsetX=t.clientX-i.left,this.dragInitialSourcePointerOffsetY=t.clientY-i.top,e.onDragStarted?.(),this.createAndUpdateDragImageComp(e)}onDragStop(e){const{dragSource:t,lastDropTarget:i}=this;if(t?.onDragStopped?.(),i){const o=this.dropTargetEvent(i,e,!1);i.onDragStop?.(o)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:e,lastDropTarget:t,lastMouseEvent:i}=this;if(e?.onDragCancelled?.(),t&&i){const o=this.dropTargetEvent(t,i,!1);t.onDragCancel?.(o)}this.clearDragAndDropProperties()}onDragging(e,t=!1){this.positionDragImageComp(e);const i=this.findCurrentDropTarget(e),{lastDropTarget:o,dragSource:s,dragItem:n}=this;let r=!1;if(i!==o){if(r=!0,o){const a=this.dropTargetEvent(o,e,t);o.onDragLeave?.(a)}if(null===o||i?null===o&&i&&this.handleEnter(s,n):this.handleExit(s,n),i){const a=this.dropTargetEvent(i,e,t);i.onDragEnter?.(a)}this.lastDropTarget=i}else if(i){const a=this.dropTargetEvent(i,e,t);i.onDragging?.(a),a?.changed&&(r=!0)}this.lastMouseEvent=e,r&&this.updateDragImageComp()}clearDragAndDropProperties(){this.removeDragImageComp(this.dragImageComp),this.dragImageCompPromise=null,this.dragImageParent=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.lastDropTarget=null,this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.dragSource=null}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 o=!1;const s=(a,l)=>{for(const d of l){const{width:c,height:u,left:h,right:g,top:p,bottom:f}=d.getBoundingClientRect();if(0===c||0===u)return!1;if(!(a.clientX>=h&&a.clientX<g&&a.clientY>=p&&a.clientY<f))return!1}return!0};for(const a of i)if(s(e,a)){o=!0;break}const{eElement:n,type:r}=this.dragSource;return!(t.targetContainsSource&&!t.getContainer().contains(n))&&o&&t.isInterestedIn(r,n)}findCurrentDropTarget(e){const t=this.dropTargets.filter(n=>this.isMouseOnDropTarget(e,n)),i=t.length;if(0===i)return null;if(1===i)return t[0];const s=ot(this.beans).elementsFromPoint(e.clientX,e.clientY);for(const n of s)for(const r of t)if(-1!==this.getAllContainersFromDropTarget(r).flatMap(l=>l).indexOf(n))return r;return null}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.find(t=>t.external&&t.getContainer()===e)||null}dropTargetEvent(e,t,i){const{dragSource:o,dragItem:s,lastDraggingEvent:n,lastMouseEvent:r,dragInitialSourcePointerOffsetX:a,dragInitialSourcePointerOffsetY:l}=this,d=e.getContainer(),c=d.getBoundingClientRect(),{clientX:u,clientY:h}=t,g=u-(r?.clientX||0),p=h-(r?.clientY||0),f=this.createEvent({event:t,x:u-c.left,y:h-c.top,vDirection:p>0?"down":p<0?"up":null,hDirection:g<0?"left":g>0?"right":null,initialSourcePointerOffsetX:a,initialSourcePointerOffsetY:l,dragSource:o,fromNudge:i,dragItem:s,dropZoneTarget:d,dropTarget:n?.dropTarget??null,changed:!!n?.changed});return this.lastDraggingEvent=f,f}positionDragImageComp(e){const t=this.dragImageComp?.getGui();t&&function Xu(e,t,i){const s=e.getBoundingClientRect().height,n=function Gt(e){return ut(e)?.clientWidth??(window.innerWidth||-1)}(i)-2,r=function Te(e){return ut(e)?.clientHeight??(window.innerHeight||-1)}(i)-2;if(!e.offsetParent)return;const l=Ze(e.offsetParent),{clientY:d,clientX:c}=t;let u=d-l.top-s/2,h=c-l.left-10;const g=ve(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`}(t,e,this.beans)}removeDragImageComp(e){this.dragImageComp===e&&(this.dragImageComp=null),e&&(e.getGui()?.remove(),this.destroyBean(e))}createAndUpdateDragImageComp(e){const t=this.createDragImageComp(e)??null;this.dragImageCompPromise=t,t?.then(i=>{if(t!==this.dragImageCompPromise||!this.lastMouseEvent||!this.isAlive())return void this.destroyBean(i);this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;const o=this.dragImageComp;o!==i&&(this.dragImageComp=i,this.removeDragImageComp(o)),i&&(this.appendDragImageComp(i),this.updateDragImageComp())})}appendDragImageComp(e){const t=e.getGui(),i=t.style;i.position="absolute",i.zIndex="9999",this.beans.dragSvc?.hasPointerCapture()&&(i.pointerEvents="none"),this.gos.setInstanceDomData(t),this.beans.environment.applyThemeClasses(t),i.top="20px",i.left="20px";const o=ut(this.beans);this.dragImageParent=o,o?o.appendChild(t):this.warnNoBody()}updateDragImageComp(){const{dragImageComp:e,dragSource:t,lastDropTarget:i,lastDraggingEvent:o,dragImageLastLabel:s}=this;if(!e)return;this.setDragImageCompIcon(i?.getIconName?.(o)??null);let n=t?.dragItemName;"function"==typeof n&&(n=n(o)),n||(n=""),s!==n&&(this.dragImageLastLabel=n,e.setLabel(n))}};function td(e,t){return e+"_"+t}function qe(e){return e instanceof No}var No=class extends M{constructor(e,t,i,o){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=i,this.pinned=o,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.colIdSanitised=$(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return td(this.groupId,this.partId)}isEmptyGroup(){return 0===this.displayedChildren.length}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!(!e||0===e.length)&&e.every(t=>t.isMoving())}checkLeft(){for(const e of this.displayedChildren)qe(e)&&e.checkLeft();if(this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=Ae(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;for(const t of this.displayedChildren??[])e+=t.getActualWidth();return e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;for(const t of this.displayedChildren)t.isResizable()&&(e=!0);return e}getMinWidth(){let e=0;for(const t of this.displayedChildren)e+=t.getMinWidth();return 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){for(const t of this.displayedChildren??[])vi(t)?e.push(t):qe(t)&&t.addDisplayedLeafColumns(e)}addLeafColumns(e){for(const t of this.children??[])vi(t)?e.push(t):qe(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?.isPadding()?1+e.getPaddingLevel():0}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e?.isPadding();)e=e.getParent();if(!e||!e.getProvidedColumnGroup().isExpandable())return this.displayedChildren=this.children,void this.dispatchLocalEvent({type:"displayedChildrenChanged"});for(const i of this.children??[])if(!qe(i)||i.displayedChildren?.length)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)}this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},sr="row-group-",nf=0,xi=class{constructor(e){this.master=!1,this.detail=void 0,this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this._leafs=void 0,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=nf++,this.alreadyRendered=!1,this.hovered=!1,this.__selected=!1,this.beans=e}get allLeafChildren(){const e=this._leafs;return void 0===e?this.beans.groupStage?.loadLeafs?.(this)??null:e}set allLeafChildren(e){this._leafs=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const{valueCache:i,eventSvc:o}=this.beans,s=this.data;this.data=e,i?.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,s,t);if(this.__localEventService?.dispatchEvent(n),this.sibling){this.sibling.data=e;const a=this.sibling.createDataChangedEvent(e,s,t);this.sibling.__localEventService?.dispatchEvent(a)}o.dispatchEvent({type:"rowNodeDataChanged",node:this});const r=this.pinnedSibling;r&&(r.data=e,r.__localEventService?.dispatchEvent(r.createDataChangedEvent(e,s,t)),o.dispatchEvent({type:"rowNodeDataChanged",node:r}))}updateDataOnDetailNode(){const e=this.detailNode;e&&(e.data=this.data)}createDataChangedEvent(e,t,i){return{type:"dataChanged",node:this,oldData:t,newData:e,update:i}}getRowIndexString(){return null==this.rowIndex?(Me(13),null):"top"===this.rowPinned?"t-"+this.rowIndex:"bottom"===this.rowPinned?"b-"+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){const{selectionSvc:i}=this.beans,o=i?.createDaemonNode?.(this),s=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),i&&(i.updateRowSelectable(this),i.syncInRowNode(this,o));const n=this.createDataChangedEvent(e,s,!1);this.__localEventService?.dispatchEvent(n)}setId(e){const t=Zi(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(sr)&&Me(14,{groupPrefix:sr})}else this.id=void 0;else this.id=e}setRowTop(e){if(this.oldRowTop=this.rowTop,this.rowTop===e)return;this.rowTop=e,this.dispatchRowEvent("topChanged");const t=null!==e;this.displayed!==t&&(this.displayed=t,this.dispatchRowEvent("displayedChanged"))}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:o,valueSvc:s,gos:n,editSvc:r}=this.beans,a="string"!=typeof e?e:o.getCol(e)??o.getColDefCol(e);if(!a)return!1;const l=s.getValueForDisplay(a,this,void 0,void 0,"api").value;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}if(r&&!r.committing){const c=r.setDataValue({rowNode:this,column:a},t,i);if(null!=c)return c}const d=s.setValue(this,a,t,i);return this.dispatchCellChangedEvent(a,t,l),d&&this.pinnedSibling?.dispatchCellChangedEvent(a,t,l),d}updateHasChildren(){let e=this.group&&!this.footer||!!this.childrenAfterGroup?.length;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return null==this.__hasChildren&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,i){const o={type:"cellChanged",node:this,column:e,newValue:t,oldValue:i};this.__localEventService?.dispatchEvent(o)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){if(this.footer)return this.sibling.isSelected();const e=this.rowPinned&&this.pinnedSibling;return e?e.isSelected():this.__selected}depthFirstSearch(e){const t=this.childrenAfterGroup;if(t)for(let i=0,o=t.length;i<o;++i)t[i].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 S)).addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){this.beans.validation?.checkRowEvents(e);const i=this.__localEventService??(this.__localEventService=new S);this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,i);const o=this.frameworkEventListenerService?.wrap(e,t)??t;i.addEventListener(e,o)}removeEventListener(e,t){const i=this.frameworkEventListenerService?.unwrap(e,t)??t;this.removeLocalListener(e,i)}removeLocalListener(e,t){const i=this.__localEventService;i&&(i.removeEventListener(e,t),i.noRegisteredListenersExist()&&(this.__localEventService=null))}isFullWidthCell(){if(I(61),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return!!e&&e({rowNode:this})}getRoute(){if(-1===this.level)return[];if(null==this.key)return;const e=[];let t=this;for(;null!=t?.key;)e.push(t.key),t=t.parent;return e.reverse()}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"))}getFirstChild(){const e=this.childStore;return e?e.getFirstNode():this.childrenAfterSort?.[0]??null}};function rf(e,t,i){return ee(t,{type:i,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var af=new Set(["__autoHeights","__checkAutoHeightsDebounced","__localEventService","__objectId","_leafs","childStore","oldRowTop","sticky","treeNodeFlags","treeParent"]),id=e=>{for(;e?.length;){const t=e[0];if(t.data)return t;e=t.childrenAfterGroup}},od={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},df=new Set(Object.values(od));function Ei(e,t){const i=e.filterUi;if(!i)return null;if(i.created)return i.promise;if(t)return null;const o=i.create(i.refreshed),s=i;return s.created=!0,s.promise=o,o}function sd(e,t,i,o,s,n){e?.refresh?.({...t,model:i,state:o,source:s,additionalEventAttributes:n})}function nd(e,t,i){const o=e();o?.created&&o.promise.then(s=>{const n=t();sd(s,o.filterParams,n,i()??{model:n},"ui")})}function rd(e,t,i,o,s,n,r){let a,d,l=!1;switch(e){case"apply":{const c=o();d=c?.model??null,r&&(d=r(d)),a={state:c?.state,model:d},l=!0;break}case"clear":a={model:null};break;case"reset":a={model:null},l=!0,d=null;break;case"cancel":a={model:i()}}s(a),l?n(d):nd(t,i,o)}function st(e,t){return e[t]??null}function Ye(e){return Fo(e)}var ad=class extends Re{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super(function uf(e){return{tag:"div",cls:e}}(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){const i=this.buttons;if(this.buttons=e,i===e)return;const o=this.getGui();let s;Ue(o),this.destroyListeners();const n=document.createDocumentFragment(),r=this.className,a=({type:d,label:c})=>{const u=w=>{this.dispatchLocalEvent({type:d,event:w})};["apply","clear","reset","cancel"].includes(d)||I(75);const h="apply"===d,p=Ye({tag:"button",attrs:{type:h&&t?"submit":"button"},ref:`${d}FilterButton`,cls:`ag-button ag-standard-button ${r}-button${h?" "+r+"-apply-button":""}`,children:c});this.activateTabIndex([p]),h&&(s=p);const f=w=>{"Enter"===w.key&&(w.preventDefault(),u(w))},m=this.listeners;p.addEventListener("click",u),m.push(()=>p.removeEventListener("click",u)),p.addEventListener("keydown",f),m.push(()=>p.removeEventListener("keydown",f)),n.append(p)};for(const d of e)a(d);this.eApply=s;const l=this.validationTooltipFeature;s&&!l?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!s&&l&&(this.validationTooltipFeature=this.destroyBean(l)),o.append(n)}getApplyButton(){return this.eApply}updateValidity(e,t=null){const i=this.eApply;i&&(Et(i,!1===e),this.validationMessage=t??null,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(const e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},hf={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",filterSummaryInactive:"is (All)",filterSummaryContains:"contains",filterSummaryNotContains:"does not contain",filterSummaryTextEquals:"equals",filterSummaryTextNotEqual:"does not equal",filterSummaryStartsWith:"begins with",filterSummaryEndsWith:"ends with",filterSummaryBlank:"is blank",filterSummaryNotBlank:"is not blank",filterSummaryEquals:"=",filterSummaryNotEqual:"!=",filterSummaryGreaterThan:">",filterSummaryGreaterThanOrEqual:">=",filterSummaryLessThan:"<",filterSummaryLessThanOrEqual:"<=",filterSummaryInRange:"between",filterSummaryInRangeValues:e=>`(${e[0]}, ${e[1]})`,filterSummaryTextQuote:e=>`"${e[0]}"`};function Fi(e,t,i){return function Ju(e,t,i,o){const s=t[i];return e.getLocaleTextFunc()(i,"function"==typeof s?s(o):s,o)}(e,hf,t,i)}function ar(e,t){const{debounceMs:i}=e;return Ts(e)?(null!=i&&I(71),0):i??t}function Ts(e){return(e.buttons?.indexOf("apply")??-1)>=0}var gf=class extends Re{constructor(e,t,i,o,s,n){super(),this.column=e,this.wrapper=t,this.eventParent=i,this.updateModel=o,this.isGlobalButtons=s,this.enableGlobalButtonCheck=n,this.hidePopup=null,this.applyActive=!1}postConstruct(){const{comp:e,params:t}=this.wrapper,i=t,o=i.useForm;this.setTemplate({tag:o?"form":"div",cls:"ag-filter-wrapper"}),o&&this.addManagedElementListeners(this.getGui(),{submit:n=>{n?.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=i,this.resetButtonsPanel(i),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:n,params:r})=>{n===this.column&&this.resetButtonsPanel(r,this.params)},filterStateChanged:({column:n,state:r})=>{n===this.column&&this.eButtons?.updateValidity(!1!==r.valid)},filterAction:({column:n,action:r,event:a})=>{n===this.column&&this.afterAction(r,a)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:n})=>{if(n!==this.isGlobalButtons){this.isGlobalButtons=n;const r=this.params;this.resetButtonsPanel(r,r,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,i){const{buttons:o,readOnly:s}=t??{},{buttons:n,readOnly:r,useForm:a}=e;if(!i&&s===r&&Ce(o,n))return;let d=this.eButtons;if(n&&n.length>0&&!e.readOnly&&!this.isGlobalButtons){const c=n.map(u=>({type:u,label:Fi(this,`${u}Filter`)}));if(this.applyActive=Ts(this.params),!d){d=this.createBean(new ad),this.appendChild(d.getGui());const u=this.column,h=g=>({event:p})=>{this.updateModel(u,g,{fromButtons:!0}),this.afterAction(g,p)};d?.addManagedListeners(d,{apply:h("apply"),clear:h("clear"),reset:h("reset"),cancel:h("cancel")}),this.eButtons=d}d.updateButtons(c,a)}else this.applyActive=!1,d&&(pt(d.getGui()),this.eButtons=this.destroyBean(d))}close(e){const t=this.hidePopup;if(!t)return;const i=e,o=i?.key;let s;("Enter"===o||" "===o)&&(s={keyboardEvent:i}),t(s),this.hidePopup=null}afterAction(e,t){const{params:i,applyActive:o}=this,s=i?.closeOnApply;switch(e){case"apply":t?.preventDefault(),s&&o&&this.close(t);break;case"reset":s&&o&&this.close();break;case"cancel":s&&this.close(t)}}handleKeyDown(e){!e.defaultPrevented&&"Enter"===e.key&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},pf={tag:"div",cls:"ag-filter"},ff=class extends Re{constructor(e,t,i){super(pf),this.column=e,this.source=t,this.enableGlobalButtonCheck=i,this.wrapper=null}postConstruct(){this.beans.colFilter?.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return null!=this.wrapper}getFilter(){return this.wrapper?.then(e=>e.comp)??null}afterInit(){return this.wrapper?.then(()=>{})??Ne.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.wrapper?.then(t=>{this.comp?.afterGuiAttached(e),t?.comp?.afterGuiAttached?.(e)})}afterGuiDetached(){this.wrapper?.then(e=>{e?.comp?.afterGuiDetached?.()})}createFilter(e){const{column:t,source:i,beans:{colFilter:o}}=this,s=o.getFilterUiForDisplay(t)??null;this.wrapper=s,s?.then(n=>{if(!n)return;const{isHandler:r,comp:a}=n;let l;if(r){const d=!!this.enableGlobalButtonCheck,c=this.createBean(new gf(t,n,o,o.updateModel.bind(o),d&&o.isGlobalButtons,d));this.comp=c,l=c.getGui()}else l=a.getGui(),C(l)||I(69,{guiFromFilter:l});this.appendChild(l),e?this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:i,eGui:this.getGui()}):a.afterGuiAttached?.(this.afterGuiAttachedParams)})}onFilterDestroyed(e){const{source:t,column:i}=e;("api"===t||"paramsUpdated"===t)&&i.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(Ue(this.getGui()),this.comp=this.destroyBean(this.comp),this.createFilter())}destroy(){this.beans.colFilter?.activeFilterComps.delete(this),this.eventSvc.dispatchEvent({type:"filterClosed",column:this.column}),this.wrapper=null,this.comp=this.destroyBean(this.comp),this.afterGuiAttachedParams=void 0,super.destroy()}},ld={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},dd=["january","february","march","april","may","june","july","august","september","october","november","december"];function mf(e,t){return null==e?-1:null==t?1:Number.parseFloat(e)-Number.parseFloat(t)}function cd(e){return e instanceof Date&&!isNaN(e.getTime())}var lr={number:()=>{},boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>!1===t,numberOfInputs:0}]}),date:()=>({isValidDate:cd}),dateString:({dataTypeDefinition:e})=>({comparator:(t,i)=>{const o=e.dateParser(i);return null==i||o<t?-1:o>t?1:0},isValidDate:t=>"string"==typeof t&&cd(e.dateParser(t))}),dateTime:e=>lr.date(e),dateTimeString:e=>lr.dateString(e),object:()=>{},text:()=>{}},dr={number:()=>({comparator:mf}),boolean:({t:e})=>({valueFormatter:t=>C(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:i=>{const o=e(i);return C(o)?o:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(i,o)=>{if("NaN"===i)return t("invalidDate","Invalid Date");if(1===o&&null!=i){const s=dd[Number(i)-1];return t(s,ld[s])}return i??t("blanks","(Blanks)")},treeListPathGetter:i=>bs(i,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:i})=>({valueFormatter:o=>{const s=e(o);return C(s)?s:i("blanks","(Blanks)")},treeList:!0,treeListPathGetter:o=>bs(t.dateParser(o??void 0),!1),treeListFormatter:(o,s)=>{if(1===s&&null!=o){const n=dd[Number(o)-1];return i(n,ld[n])}return o??i("blanks","(Blanks)")}}),dateTime:e=>{const t=dr.date(e);return t.treeListPathGetter=bs,t},dateTimeString(e){const t=e.dataTypeDefinition.dateParser,i=dr.dateString(e);return i.treeListPathGetter=o=>bs(t(o??void 0)),i},object:({formatValue:e,t})=>({valueFormatter:i=>{const o=e(i);return C(o)?o:t("blanks","(Blanks)")}}),text:()=>{}},vf={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},wf={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"},ud="ag-resizer-wrapper",Pi=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),Sf={tag:"div",cls:ud,children:[Pi("eTopLeft","topLeft"),Pi("eTop","top"),Pi("eTopRight","topRight"),Pi("eRight","right"),Pi("eBottomRight","bottomRight"),Pi("eBottom","bottom"),Pi("eBottomLeft","bottomLeft"),Pi("eLeft","left")]},yf=class extends M{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(e){const{clientHeight:t,clientWidth:i}=this.offsetParent,o=i/2-this.getWidth()/2,s=t/2-this.getHeight()/2;this.offsetElement(o,s,e)}initialisePosition(e){if(this.positioned)return;const{centered:t,forcePopupParentAsOffsetParent:i,minWidth:o,width:s,minHeight:n,height:r,x:a,y:l}=this.config;this.offsetParent||this.setOffsetParent();let d=0,c=0;const u=$e(this.element);if(u){const h=this.findBoundaryElement(),g=window.getComputedStyle(h);if(null!=g.minWidth){const p=h.offsetWidth-this.element.offsetWidth;c=Number.parseInt(g.minWidth,10)-p}if(null!=g.minHeight){const p=h.offsetHeight-this.element.offsetHeight;d=Number.parseInt(g.minHeight,10)-p}}if(this.minHeight=n||d,this.minWidth=o||c,s&&this.setWidth(s),r&&this.setHeight(r),(!s||!r)&&this.refreshSize(),t)this.center(e);else if(a||l)this.offsetElement(a,l,e);else if(u&&i){let h=this.boundaryEl,g=!0;if(h||(h=this.findBoundaryElement(),g=!1),h){const p=Number.parseFloat(h.style.top),f=Number.parseFloat(h.style.left);g?this.offsetElement(isNaN(f)?0:f,isNaN(p)?0:p,e):this.setPosition(f,p)}}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(),"boolean"==typeof e){if(!1===e)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(t=>{const o=!!e[t],s=this.getResizerElement(t),n={dragStartPixels:0,eElement:s,onDragStart:r=>this.onResizeStart(r,t),onDragging:this.onResize.bind(this),onDragStop:r=>this.onResizeEnd(r,t)};(o||!this.isAlive()&&!o)&&(o?(this.dragSvc?.addDragSource(n),this.resizeListeners.push(n),s.style.pointerEvents="all"):s.style.pointerEvents="none",this.resizable[t]=o)})}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;-1!==t&&(this.element.style.width=`${t}px`),-1!==e&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,i=this.element;let o=!1;if("string"==typeof e&&e.includes("%"))Eo(i,e),e=et(i),o=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const s=this.getAvailableHeight();s&&e>s&&(e=s)}this.getHeight()!==e&&(o?(i.style.maxHeight="unset",i.style.minHeight="unset"):t?Eo(i,e):(i.style.height=`${e}px`,i.style.flex="0 0 auto",this.lastSize.height="number"==typeof e?e:Number.parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:i}=this.offsetParent;if(!i)return null;const o=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),n=e?this.position.y:o.top,r=e?0:s.top;let a=0;if(t){const d=this.element.parentElement;if(d){const{bottom:c}=d.getBoundingClientRect();a=c-o.bottom}}return i+r-n-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:i}=this.config;let o=!1;if("string"==typeof e&&e.includes("%"))$t(t,e),e=gt(t),o=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:s}=this.offsetParent,n=i?this.position.x:this.element.getBoundingClientRect().left;s&&e+n>s&&(e=s-n)}this.getWidth()!==e&&(o?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?$t(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width="number"==typeof e?e:Number.parseFloat(e)))}offsetElement(e=0,t=0,i){const{forcePopupParentAsOffsetParent:o}=this.config,s=o?this.boundaryEl:this.element;s&&(this.popupSvc?.positionPopup({ePopup:s,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t}),postProcessCallback:i}),this.setPosition(Number.parseFloat(s.style.left),Number.parseFloat(s.style.top)))}constrainSizeToAvailableHeight(e){this.config.forcePopupParentAsOffsetParent&&(e&&this.popupSvc?(this.resizeObserverSubscriber?.(),this.resizeObserverSubscriber=pi(this.beans,this.popupSvc?.getPopupParent(),()=>{const i=this.getAvailableHeight();this.element.style.setProperty("max-height",`${i}px`)})):(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:o,anywhereWithin:s,topBuffer:n}=e,r=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y;return{movementX:this.shouldSkipX(t,!!i,!!s,r)?0:r,movementY:this.shouldSkipY(t,!!o,n,a)?0:a}}shouldSkipX(e,t,i,o){const s=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:s.left;let l=a<=0&&n.left>=e.clientX||n.right<=e.clientX&&n.right<=r.right;return!!l||(l=t?o<0&&e.clientX>a+n.left||o>0&&e.clientX<a+n.left:i?o<0&&e.clientX>r.right||o>0&&e.clientX<a+n.left:o<0&&e.clientX>r.right||o>0&&e.clientX<r.right,l)}shouldSkipY(e,t,i=0,o){const s=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:s.top;let l=a<=0&&n.top>=e.clientY||n.bottom<=e.clientY&&n.bottom<=r.bottom;return!!l||(l=t?o<0&&e.clientY>a+n.top+i||o>0&&e.clientY<a+n.top:o<0&&e.clientY>r.bottom||o>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(Ye(Sf)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0,this.element.querySelector(`.${ud}`)?.remove(),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:o}=this.config;!i&&!o&&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 o=0;o<e.length;o++){const s=e[o],n=!!s.style.flex&&"0 0 auto"!==s.style.flex;if(s===this.element)continue;let r=this.minHeight||0,a=this.minWidth||0;if(n){const l=window.getComputedStyle(s);l.minHeight&&(r=Number.parseInt(l.minHeight,10)),l.minWidth&&(a=Number.parseInt(l.minWidth,10))}else r=s.offsetHeight,a=s.offsetWidth;t+=r,i+=a}return{height:t,width:i}}applySizeToSiblings(e){let t=null;const i=this.getSiblings();if(i){for(let o=0;o<i.length;o++){const s=i[o];s!==t&&(e?s.style.height=`${s.offsetHeight}px`:s.style.width=`${s.offsetWidth}px`,s.style.flex="0 0 auto",s===this.element&&(t=i[o+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:o,isRight:s,isBottom:n,isLeft:r}=this.currentResizer,a=s||r,l=n||o,{movementX:d,movementY:c}=this.calculateMouseMovement({e,isLeft:r,isTop:o}),u=this.position.x,h=this.position.y;let g=0,p=0;if(a&&d){const f=r?-1:1,m=this.getWidth(),w=m+d*f;let b=!1;r&&(g=m-w,(u+g<=0||w<=this.minWidth)&&(b=!0,g=0)),b||this.setWidth(w)}if(l&&c){const f=o?-1:1,m=this.getHeight(),w=m+c*f;let b=!1;o?(p=m-w,(h+p<=0||w<=this.minHeight)&&(b=!0,p=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&m<w&&this.getMinSizeOfSiblings().height+w>this.element.parentElement.offsetHeight&&(b=!0),b||this.setHeight(w)}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 o;this.config.calculateTopBuffer&&(o=this.config.calculateTopBuffer());const{movementX:s,movementY:n}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:o});this.offsetElement(t+s,i+n),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.offsetParent=this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.popupSvc.getPopupParent():this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if("static"!==window.getComputedStyle(e).position)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()}},hd="__ag_Grid_Stop_Propagation";function zi(e){e[hd]=!0}function ci(e){return!0===e[hd]}var lo=class extends M{constructor(e,t={}){super(),this.eFocusable=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:i=>{if(i.defaultPrevented)return;const o=Hi(this.beans,this.eFocusable,!1,i.shiftKey);o&&(o.focus(),i.preventDefault())},...t}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:i}}=this;e.classList.add("ag-focus-managed"),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||ci(t))return;const{callbacks:i}=this;i.shouldStopEventPropagation(t)?zi(t):"Tab"===t.key?i.onTabKeyDown(t):i.handleKeyDown&&i.handleKeyDown(t)}})}},xf=class extends Re{constructor(e,t){super(),this.filterNameKey=e,this.cssIdentifier=t,this.applyActive=!1,this.debouncePending=!1,this.defaultDebounceMs=0}postConstruct(){const e={tag:"div",cls:`ag-filter-body-wrapper ag-${this.cssIdentifier}-body-wrapper`,children:[this.createBodyTemplate()]};this.setTemplate(e,this.getAgComponents()),this.createManagedBean(new lo(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new yf(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(e){}init(e){const t=e;this.setParams(t),this.setModelIntoUi(t.state.model,!0).then(()=>this.updateUiVisibility())}refresh(e){const t=e,i=this.params;this.params=t,"colDef"===t.source&&this.updateParams(t,i);const s=t.state,n=this.state;return this.state=s,(s.model!==n.model||s.state!==n.state)&&this.setModelIntoUi(s.model),!0}setParams(e){this.params=e,this.state=e.state,this.commonUpdateParams(e)}updateParams(e,t){this.commonUpdateParams(e,t)}commonUpdateParams(e,t){this.applyActive=Ts(e),this.setupApplyDebounced()}doesFilterPass(e){I(283);const{getHandler:t,model:i,column:o}=this.params;return t().doesFilterPass({...e,model:i,handlerParams:this.beans.colFilter.getHandlerParams(o)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return I(284),null!=this.params.model}setupApplyDebounced(){const e=ar(this.params,this.defaultDebounceMs),t=it(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return I(285),this.params.model}setModel(e){I(286);const{beans:t,params:i}=this;return t.colFilter.setModelForColumnLegacy(i.column,e)}applyModel(e="api"){return this.doApplyModel()}canApply(e){return!0}doApplyModel(e){const{params:t,state:i}=this,o=!this.areModelsEqual(t.model,i.model);return o&&t.onAction("apply",e),o}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();const i=this.getModelFromUi(),o={model:i,state:this.getState(),valid:this.canApply(i)};this.state=o;const s=this.params;s.onStateChange(o),s.onUiChange(this.getUiChangeEventParams()),this.gos.get("enableFilterHandlers")||this.eventSvc.dispatchEvent({type:"filterModified",column:s.column,filterInstance:this}),e??(e=this.applyActive?void 0:"debounce"),"immediately"===e?this.doApplyModel({afterFloatingFilter:t,afterDataChange:!1}):"debounce"===e&&this.applyDebounced()}getState(){}getUiChangeEventParams(){}afterGuiAttached(e){this.lastContainerType=e?.container,this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:i}=this;if(!t)return;const o="floatingFilter"===e||"columnFilter"===e;o?(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(o)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(e){return Fi(this,e)}getPositionableElement(){return this.getGui()}areModelsEqual(e,t){return e===t||null==e&&null==t||null!=e&&null!=t&&this.areNonNullModelsEqual(e,t)}};function gd(e){return!!e.operator}var zt={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},cr=class extends M{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:"autoHeight"===e,normal:"normal"===e,print:"print"===e};this.view.updateLayoutClasses(t.autoHeight?zt.AUTO_HEIGHT:t.print?zt.PRINT:zt.NORMAL,t)}},Di="Viewport",pd="fakeVScrollComp",ur=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],Ff=class extends M{constructor(e){super(),this.clearRetryListenerFncs=[],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.isScrollActive=!1,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=it(this,()=>this.lastScrollSource[1]=null,150),this.resetLastVScrollDebounced=it(this,()=>this.lastScrollSource[0]=null,150)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),this.clearRetryListenerFncs=[],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),bodyHeightChanged: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,Di)});for(const e of ur){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?it(this,this.onVScroll.bind(this,Di),100):this.onVScroll.bind(this,Di),o=t?it(this,this.onVScroll.bind(this,pd),100):this.onVScroll.bind(this,pd);this.addManagedElementListeners(this.eBodyViewport,{scroll:i}),this.registerScrollPartner(e,o)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){null!=this.centerRowsCtrl&&(void 0===e&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...ur,Di])this.lastScrollSource[1]!==t&&Pt(this.getViewportForSource(t),e,this.enableRtl)}getViewportForSource(e){return e===Di?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return null==this.lastScrollSource[t]?(0===t?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 o=tt(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(o),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(t=e===Di?this.eBodyViewport.scrollTop:this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0))return;const{animationFrameSvc:i}=this;i?.setScrollTop(t),this.nextScrollTop=t,e===Di?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))}isScrolling(){return this.isScrollActive}fireScrollEvent(e){const t={type:"bodyScroll",direction:1===e?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.isScrollActive=!0,this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.isScrollActive=!1,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},150)}shouldBlockScrollUpdate(e,t,i=!1){return!(i&&!Oi())&&(0===e?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t))}shouldBlockVerticalScroll(e){const t=Vt(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(){const e=this.scrollLeft;let t=!1;for(const i of ur)if(this.getViewportForSource(i).scrollLeft!==e){t=!0;break}t&&this.onHScroll(Di)}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 o=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(e=this.enableRtl?e>0?0:o:Math.min(Math.max(e,0),o)),Pt(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:o}=this;return{top:o,bottom:o+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,o=i.getRowCount();let s=-1;for(let n=0;n<o;n++){const r=i.getRow(n);if("function"==typeof e){if(r&&e(r)){s=n;break}}else if(e===r||e===r.data){s=n;break}}s>=0&&this.ensureIndexVisible(s,t)}ensureIndexVisible(e,t,i=0){if(nt(this.gos,"print"))return;const{rowModel:o}=this.beans,s=o.getRowCount();if("number"!=typeof e||e<0||e>=s)return void I(88,{index:e});this.clearRetryListeners();const{frameworkOverrides:n,pageBounds:r,rowContainerHeight:a,rowRenderer:l}=this.beans;n.wrapIncoming(()=>{const d=this.ctrlsSvc.getGridBodyCtrl(),c=o.getRow(e);let u,h,g=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:p,stickyBottomHeight:f}=d,m=c.rowTop,w=c.rowHeight,b=r.getPixelOffset(),R=c.rowTop-b,T=R+c.rowHeight,k=this.getVScrollPosition(),L=a.divStretchOffset,H=k.top+L,ae=k.bottom+L,ue=ae-H,le=a.getScrollPositionForPixel(R),he=a.getScrollPositionForPixel(T-ue),Ie=Math.min((le+he)/2,R);let yt=null;"top"===t?yt=le-p:"bottom"===t?yt=he+f:"middle"===t?yt=Ie:H+p>R?yt=le-p:ae-f<T&&(yt=he-le>ue?le-p:he+f),null!==yt&&(this.setVerticalScrollPosition(yt),l.redraw({afterScroll:!0})),u=m!==c.rowTop||w!==c.rowHeight,h=p!==d.stickyTopHeight||f!==d.stickyBottomHeight,g++}while((u||h)&&g<10);if(this.animationFrameSvc?.flushAllFrames(),i<10&&(c?.stub||!this.beans.rowAutoHeight?.areRowsMeasured())){const p=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{const f=this.getVScrollPosition().top;p!==f&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=o.getRowCount())&&this.ensureIndexVisible(e,t,i+1)}})}})}clearRetryListeners(){for(const e of this.clearRetryListenerFncs)e();this.clearRetryListenerFncs=[]}ensureColumnVisible(e,t="auto"){const{colModel:i,frameworkOverrides:o}=this.beans,s=i.getCol(e);if(!s||s.isPinned()||!this.visibleCols.isColDisplayed(s))return;const n=this.getPositionedHorizontalScroll(s,t);o.wrapIncoming(()=>{null!==n&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:i,columnAfterEnd:o}=this.isColumnOutsideViewport(e),s=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),n=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl;let a=(r?i:o)||s,l=r?o:i;"auto"!==t&&(a="start"===t,l="end"===t);const d="middle"===t;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:o,colRight:s}=this.getColumnBounds(e),n=this.enableRtl;return{columnBeforeStart:n?t>s:i<s,columnAfterEnd:n?i<o:t>o}}getColumnBounds(e){const t=this.enableRtl,i=this.visibleCols.bodyWidth,o=e.getActualWidth(),s=e.getLeft(),n=t?-1:1,r=t?i-s:s;return{colLeft:r,colMiddle:r+o/2*n,colRight:r+o*n}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft();return{start:t,end:e+t,width:e}}},gr=class extends M{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=nt(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:i}=this.beans,o=t.bodyWidth,s=t.getColsLeftWidth(),n=t.getDisplayedColumnsRightWidth();let r;e?r=o+s+n:(r=o,this.addSpacer&&0===(this.gos.get("enableRtl")?s:n)&&i.verticalScrollShowing&&(r+=i.getScrollbarWidth())),this.callback(r)}},Pf=class extends M{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,o=()=>{si(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(o),i.registerBodyViewportResizeListener(o)}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 t=Vt(this.gridBodyCtrl.eBodyViewport);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){if(!this.isAlive())return;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 ks(e,t,i,o){const s=t.getColDef().cellRendererParams?.suppressMouseEventHandling;return md(e,t,i,o,s)}function md(e,t,i,o,s){return!!s&&s(ee(e,{column:t,node:i,event:o}))}function Cd(e,t,i){let o=t;for(;o;){const s=Qa(e,o,i);if(s)return s;o=o.parentElement}return null}var As="cellCtrl";function pr(e,t){return Cd(e,t,As)}var Is="renderedRow";function Mf(e,t){return Cd(e,t,Is)}function fr(e,t,i,o,s){const n=o?o.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const r=ee(e,{event:t,editing:s,column:o,node:i,data:i.data,colDef:o.getColDef()});return!(!n||!n(r))}var Gf=class extends M{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){const t=["dblclick","contextmenu","mouseover","mouseout","click",Ea("touchstart")?"touchstart":"mousedown"];for(const i of t){const o=this.processMouseEvent.bind(this,i);this.addManagedElementListeners(this.element,{[i]:o})}}processMouseEvent(e,t){if(!Do(this.beans,t)||ci(t))return;const{cellCtrl:i,rowCtrl:o}=this.getControlsForEventTarget(t.target);"contextmenu"===e?(i?.column&&i.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,o,i)):(i&&i.onMouseEvent(e,t),o&&o.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:pr(t,e),rowCtrl:Mf(t,e)}}processKeyboardEvent(e,t){const{cellCtrl:i,rowCtrl:o}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(i?this.processCellKeyboardEvent(i,e,t):o?.isFullWidth()&&this.processFullWidthRowKeyboardEvent(o,e,t))}processCellKeyboardEvent(e,t,i){const o=this.editSvc?.isEditing(e,{withOpenEditor:!0})??!1;!fr(this.gos,i,e.rowNode,e.column,o)&&"keydown"===t&&(!o&&this.beans.navigation?.handlePageScrollingKey(i)||e.onKeyDown(i),this.doGridOperations(i,o),Bl(i)&&e.processCharacter(i)),"keydown"===t&&this.eventSvc.dispatchEvent(e.createEvent(i,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,i){const{rowNode:o}=e,{focusSvc:s,navigation:n}=this.beans,a=s.getFocusedCell()?.column;if(!fr(this.gos,i,o,a,!1)&&"keydown"===t)switch(i.key){case"Home":case"End":case"PageUp":case"PageDown":n?.handlePageScrollingKey(i,!0);break;case P_LEFT:case P_RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case P_UP:case P_DOWN:e.onKeyboardNavigate(i);break;case"Tab":e.onTabKeyDown(i)}"keydown"===t&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",i))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!Do(this.beans,e))return;const i=function Hf(e){const{keyCode:t}=e;let i;switch(t){case 65:i="KeyA";break;case 67:i="KeyC";break;case 86:i="KeyV";break;case 68:i="KeyD";break;case 90:i="KeyZ";break;case 89:i="KeyY";break;default:i=e.code}return i}(e),{clipboardSvc:o,undoRedo:s}=this.beans;return"KeyA"===i?this.onCtrlAndA(e):"KeyC"===i?this.onCtrlAndC(o,e):"KeyD"===i?this.onCtrlAndD(o,e):"KeyV"===i?this.onCtrlAndV(o,e):"KeyX"===i?this.onCtrlAndX(o,e):"KeyY"===i?this.onCtrlAndY(s):"KeyZ"===i?this.onCtrlAndZ(s,e):void 0}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:i,selectionSvc:o},gos:s}=this;i&&ni(s)&&!function Mh(e){const t=e.get("rowSelection");return"string"!=typeof t&&"multiRow"===t?.mode&&(t.ctrlASelectsRows??!1)}(s)&&t.isRowsToRender()?function Tf(e){const{pinnedRowModel:t,rowModel:i}=e,[o,s]=[t?.isEmpty("top")??!0,t?.isEmpty("bottom")??!0],n=o?null:"top";let r,a;s?(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})}(this.beans):o&&o.selectAllRowNodes({source:"keyboardSelectAll",selectAll:il(s)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:i}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(i,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:i}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(i,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:i}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(i,{withOpenEditor:!0})||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")}},vd=class extends M{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=null!=t?`${t}px`:"";this.eContainer.style.height=i,this.eViewport&&(this.eViewport.style.height=i)}},Ls=e=>e.topRowCtrls,Os=e=>e.getStickyTopRowCtrls(),Bs=e=>e.getStickyBottomRowCtrls(),Hs=e=>e.bottomRowCtrls,Gs=e=>e.allRowCtrls,mr=e=>e.getCtrls("top"),Cr=e=>e.getCtrls("center"),vr=e=>e.getCtrls("bottom"),Vf={center:{type:"center",name:"center-cols",getRowCtrls:Gs,getSpannedRowCtrls:Cr},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:Gs,getSpannedRowCtrls:Cr},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:Gs,getSpannedRowCtrls:Cr},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:Gs},topCenter:{type:"center",name:"floating-top",getRowCtrls:Ls,getSpannedRowCtrls:mr},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:Ls,getSpannedRowCtrls:mr},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:Ls,getSpannedRowCtrls:mr},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:Ls},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:Os},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:Os},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:Os},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:Os},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:Bs},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:Bs},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:Bs},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:Bs},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:Hs,getSpannedRowCtrls:vr},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:Hs,getSpannedRowCtrls:vr},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:Hs,getSpannedRowCtrls:vr},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:Hs}};function wd(e){return`ag-${zo(e).name}-viewport`}function Vs(e){const t=zo(e);return t.container??`ag-${t.name}-container`}function Nf(e){return`ag-${zo(e).name}-spanned-cells-container`}function zo(e){return Vf[e]}var Uf=["center","left","right","fullWidth"],$f=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],jf=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],Kf=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],bd=["stickyTopCenter","stickyTopLeft","stickyTopRight"],Sd=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],qf=[...bd,"stickyTopFullWidth",...Sd,"stickyBottomFullWidth"],Yf=["topCenter","topLeft","topRight","bottomCenter","bottomLeft","bottomRight","center","left","right",...bd,...Sd],Qf=class extends M{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=zo(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new Pf(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,o){this.comp=e,this.eContainer=t,this.eSpannedContainer=i,this.eViewport=o,this.createManagedBean(new Gf(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:s,rangeSvc:n}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(jf,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(Kf,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(Uf,()=>this.createManagedBean(new vd(this.eContainer,"center"===this.name?o:void 0))),n&&this.forContainers(Yf,()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer))),this.forContainers($f,()=>this.createManagedBean(new gr(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,i=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i,displayedColumnsWidthChanged:i,displayedRowsChanged:o=>this.onDisplayedRowsChanged(o.afterScroll)}),i(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const o=this.options.getSpannedRowCtrls(e);o&&this.comp.setSpannedRowCtrls(o,!1)}})}listenOnDomOrder(){if(qf.indexOf(this.name)>=0)return void this.comp.setDomOrder(!0);const t=()=>{const i=this.gos.get("ensureDomOrder"),o=nt(this.gos,"print");this.comp.setDomOrder(i||o)};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 wt(this.eViewport)}getCenterViewportScrollLeft(){return tt(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=pi(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return ii(this.eViewport)}getViewportScrollLeft(){return tt(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||un(this.eViewport)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){Pt(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(null!=this.options.pinnedType)||!!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||0===t.length)return void this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});const i=nt(this.gos,"print"),s=this.gos.get("embedFullWidthRows")||i,n=t.filter(r=>{const a=r.isFullWidth();return this.options.fullWidth?!s&&a:s||!a});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},yd="ag-force-vertical-scroll",Jf=class extends M{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,o,s,n,r){this.comp=e,this.eGridBody=t,this.eBodyViewport=i,this.eTop=o,this.eBottom=s,this.eStickyTop=n,this.eStickyBottom=r,this.eCenterColsViewport=i.querySelector(`.${wd("center")}`),this.eFullWidthContainer=i.querySelector(`.${Vs("fullWidth")}`),this.eStickyTopFullWidthContainer=n.querySelector(`.${Vs("stickyTopFullWidth")}`),this.eStickyBottomFullWidthContainer=r.querySelector(`.${Vs("stickyBottomFullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",a=>this.setCellTextSelection(a.currentValue)),this.createManagedBean(new cr(this.comp)),this.scrollFeature=this.createManagedBean(new Ff(i)),this.beans.rowDragSvc?.setupRowDrag(i,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([o,i,s,n,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(o),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this),i=this.toggleRowResizeStyles.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,pinnedRowsChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t,rowResizeStarted:i,rowResizeEnded:i}),this.addManagedPropertyListener("treeData",t)}toggleRowResizeStyles(e){this.eBodyViewport.classList.toggle("ag-prevent-animation","rowResizeStarted"===e.type)}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 s=`calc(100% + ${(t&&e.getScrollbarWidth()||0)+(Ll()?16:0)}px)`;si(this.beans,()=>this.comp.setBodyViewportWidth(s)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t}=this;let i=this.gos.get("treeData");if(!i){const o=t.isPivotMode();i=(e?e.columns.length:0)>=(o?2:1)}this.comp.setGridRootRole(i?"treegrid":"grid")}addFocusListeners(e){for(const t of e)this.addManagedElementListeners(t,{focusin:i=>{const{target:o}=i,s=at(o,"ag-root",t);t.classList.toggle("ag-has-focus",!s)},focusout:i=>{const{target:o,relatedTarget:s}=i,n=t.contains(s),r=at(s,"ag-root",t);at(o,"ag-root",t)||(!n||r)&&t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss("ag-column-moving",e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss("ag-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;this.comp.setRowCount(-1===i?-1:e+i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){this.comp.setPinnedTopBottomOverflowY(e?"scroll":"hidden")}isVerticalScrollShowing(){const e=this.gos.get("alwaysShowVerticalScroll"),t=e?yd:null,i=nt(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||i&&ya(this.eBodyViewport)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let i=t.sizesMeasured;const o=()=>{const s=i&&Xi(this.gos)&&!e.stretching;this.comp.setRowAnimationCssOnBodyViewport(s?"ag-row-animation":"ag-row-no-animation",s)};o(),this.addManagedEventListeners({heightScaleChanged:o}),this.addManagedPropertyListener("animateRows",o),this.addManagedEventListeners({gridStylesChanged:()=>{!i&&t.sizesMeasured&&(i=!0,o())}})}addBodyViewportListener(){const{eBodyViewport:e,eStickyTop:t,eStickyBottom:i,eTop:o,eBottom:s,beans:{popupSvc:n,touchSvc:r}}=this,a=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:a}),r?.mockBodyContextMenu(this,a),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,n)});const l=this.onStickyWheel.bind(this);for(const c of[t,i,o,s])this.addManagedElementListeners(c,{wheel:l});const d=this.onHorizontalWheel.bind(this);for(const c of["left","right","topLeft","topRight","bottomLeft","bottomRight"])this.addManagedElementListeners(this.ctrlsSvc.get(c).eContainer,{wheel:d});this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:i,shiftKey:o}=e;(o||Math.abs(t)>Math.abs(i))&&Do(this.beans,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onHorizontalWheel(e){const{deltaX:t,deltaY:i,shiftKey:o}=e;(o||Math.abs(t)>Math.abs(i))&&this.scrollGridBodyToMatchEvent(e)}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:o}=e||t;(o===this.eBodyViewport||o===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,beans:{environment:t}}=this,i=e?.getPinnedTopTotalHeight(),o=e?.getPinnedBottomTotalHeight(),r=t.getPinnedRowBorderWidth()-t.getRowBorderWidth(),a=i?r+i:0,l=o?r+o:0;this.comp.setTopHeight(a),this.comp.setBottomHeight(l),this.comp.setTopInvisible(a<=0),this.comp.setBottomInvisible(l<=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){const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}else this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%")}setStickyTopOffsetTop(){const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),i=this.pinnedRowModel?.getPinnedTopTotalHeight()??0;let o=0;t>0&&(o+=t),i>0&&(o+=i),o>0&&(o+=1),this.comp.setStickyTopTop(`${o}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:i}=this,o=e?.getPinnedBottomTotalHeight()??0,n=t.horizontalScrollShowing&&t.getScrollbarWidth()||0;i.setStickyBottomBottom(`${o+n}px`)}};function Rd(e,t){const i=nt(e.gos,"normal");let s,n;null!=t.clientX||null!=t.clientY?(s=t.clientX,n=t.clientY):(s=t.x,n=t.y);const{pageFirstPixel:r}=e.pageBounds.getCurrentPagePixelRange();if(n+=r,i){const a=e.ctrlsSvc.getScrollFeature(),l=a.getVScrollPosition();s+=a.getHScrollPosition().left,n+=l.top}return{x:s,y:n}}var xd=class extends Re{constructor(e,t){super(),this.direction=t,this.eViewport=V,this.eContainer=V,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",Al()||Oi())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.invisibleScrollbar=Ll(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.toggleCss("ag-scrollbar-active",!0),i=()=>this.toggleCss("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:i,touchend:i})}onScrollVisibilityChanged(){void 0===this.invisibleScrollbar&&this.initialiseInvisibleScrollbar(),si(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.toggleCss("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.toggleCss("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;!function rh(e,t,i,o=100){const s=Date.now();let n=null,r=!1;const a=()=>{null!=n&&(window.clearInterval(n),n=null)};e.addDestroyFunc(a);const l=()=>{const d=Date.now()-s>o;(t()||d)&&(i(),r=!0,a())};l(),r||(n=window.setInterval(l,10))}(this,()=>$e(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},tm={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"}]},om={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:class extends xd{constructor(){super(tm,"horizontal"),this.eLeftSpacer=V,this.eRightSpacer=V,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 gr(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(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,o=this.scrollVisibleSvc.getScrollbarWidth();i&&(t+=o),$t(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=o);let s=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(s+=o),$t(this.eLeftSpacer,s),this.eLeftSpacer.classList.toggle("ag-scroller-corner",s<=o)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,i=this.gos.get("suppressHorizontalScroll"),o=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,n=i?0:0===o&&t?16:o,r=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),Eo(this.getGui(),n),Eo(this.eViewport,n),Eo(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 tt(this.eViewport,this.enableRtl)}setScrollPosition(e){$e(this.eViewport)||this.attemptSettingScrollPosition(e),Pt(this.eViewport,e,this.enableRtl)}}},sm={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"}]}]},rm={selector:"AG-FAKE-VERTICAL-SCROLL",component:class extends xd{constructor(){super(sm,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new vd(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,o=t&&e.getScrollbarWidth()||0,s=0===o&&i?16:o;this.toggleCss("ag-scrollbar-invisible",i),$t(this.getGui(),s),$t(this.eViewport,s),$t(this.eContainer,s),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const i=e.getGridBodyCtrl().eBodyViewport,o=this.getScrollPosition(),s=i.scrollTop;o!=s&&this.setScrollPosition(s,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!$e(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}}};function Ed(e,t,i,o){return q(e)?[]:function Pd(e,t,i,o,s){if(q(e))return[];let n;if("function"==typeof e){const r=function dm(e,t,i,o){return ee(t,{colDef:e,column:i,columnGroup:o})}(t,i,o,s);n=e(r)}else n=e;return"string"==typeof n?[n]:Array.isArray(n)?[...n]:[]}(e.headerClass,e,t,i,o)}function Fd(e,t,i){e.toggleCss("ag-column-first",i.isColAtEdge(t,"first")),e.toggleCss("ag-column-last",i.isColAtEdge(t,"last"))}function _i(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.isExclusive()}function Ns(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.isExclusive()}function co(e,t,i=!1){const o=e.ctrlsSvc.get("gridCtrl");return!(i||!o.focusNextInnerContainer(t))||((i||!t&&!o.isDetailGrid())&&o.forceFocusOutOfContainer(t),!1)}function Zt(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function wr(e){const t=[],i=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const o of i){if(!o)continue;const s=o.getGroupRowCount()||0;for(let n=0;n<s;n++){const r=o.getGroupRowCtrlAtIndex(n),a=t[n];if(r){const l=hm(e,r);(null==a||l>a)&&(t[n]=l)}}}return t}function hm(e,t){let o=e.colModel.isPivotMode()?function pm(e){return e.gos.get("pivotGroupHeaderHeight")??Md(e)}(e):Md(e);const s=t.getHeaderCellCtrls();for(const n of s){const{column:r}=n,a=r.getAutoHeaderHeight();null!=a&&a>o&&r.isAutoHeaderHeight()&&(o=a)}return o}function br(e){let i=e.colModel.isPivotMode()?function gm(e){return e.gos.get("pivotHeaderHeight")??_o(e)}(e):_o(e);return e.colModel.forAllCols(o=>{const s=o.getAutoHeaderHeight();null!=s&&s>i&&o.isAutoHeaderHeight()&&(i=s)}),i}function _o(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function Dd(e){return e.gos.get("floatingFiltersHeight")??_o(e)}function Md(e){return e.gos.get("groupHeaderHeight")??_o(e)}var mm=class extends M{setComp(e,t,i){this.comp=e,this.eGui=t;const{beans:o}=this,{headerNavigation:s,touchSvc:n,ctrlsSvc:r}=o;s&&this.createManagedBean(new lo(i,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,o),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,o)}),this.onPivotModeChanged(o),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({headerRowsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>si(this.beans,()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const i=wr(e).reduce((n,r)=>n+r,0),o=br(e);e.filterManager?.hasFloatingFilters()&&(t+=Dd(e)),t+=i,t+=o,this.headerHeight!==t&&(this.headerHeight=t,this.comp.setHeightAndMinHeight(`${t+1}px`),this.eventSvc.dispatchEvent({type:"headerHeightChanged"}))}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const i=e.visibleCols.allCols.some(o=>o.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",i)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),i=e.shiftKey,o=i!==t?"LEFT":"RIGHT",{beans:s}=this,{headerNavigation:n,focusSvc:r}=s;(n.navigateHorizontally(o,!0,e)||!i&&r.focusOverlay(!1)||co(s,i,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:i}=this.beans;switch(e.key){case P_LEFT:t="LEFT";case P_RIGHT:C(t)||(t="RIGHT"),i.navigateHorizontally(t,!1,e)&&e.preventDefault();break;case P_UP:t="UP";case P_DOWN:C(t)||(t="DOWN"),i.navigateVertically(t,e)&&e.preventDefault();break;default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:i,beans:o}=this;!t&&i.contains(Fe(o))||i.contains(t)||(o.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,i){const{menuSvc:o,ctrlsSvc:s}=this.beans;if(!e&&!i||!o?.isHeaderContextMenuEnabled())return;const{target:n}=e??t;(n===this.eGui||n===s.getHeaderRowContainerCtrl()?.eViewport)&&o.showHeaderContextMenu(void 0,e,i)}},Sr=class extends Re{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},Cm={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"}]},vm=class extends Sr{constructor(e){super(Cm,e),this.eResize=V,this.eHeaderCompWrapper=V,this.headerCompVersion=0}postConstruct(){const e=this.getGui(),t=()=>{const o=this.ctrl.getSelectAllGui();o&&(this.eResize.insertAdjacentElement("afterend",o),this.addDestroyFunc(()=>o.remove()))};this.ctrl.setComp({setWidth:o=>e.style.width=o,toggleCss:(o,s)=>this.toggleCss(o,s),setUserStyles:o=>Ro(e,o),setAriaSort:o=>o?function be(e,t){z(e,"sort",t)}(e,o):function Qe(e){Y(e,"sort")}(e),setUserCompDetails:o=>this.setUserCompDetails(o),getUserCompInstance:()=>this.headerComp,refreshSelectAllGui:t,removeSelectAllGui:()=>this.ctrl.getSelectAllGui()?.remove()},this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0),t()}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.headerCompGui?.remove(),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){e==this.headerCompVersion&&this.isAlive()?(this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())):this.destroyBean(t)}},wm={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"}]},bm=class extends Sr{constructor(e){super(wm,e),this.eResize=V,this.eHeaderCompWrapper=V}postConstruct(){const e=this.getGui();this.ctrl.setComp({toggleCss:(o,s)=>this.toggleCss(o,s),setUserStyles:o=>Ro(e,o),setHeaderWrapperHidden:o=>{o?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:o=>{null!=o?this.eHeaderCompWrapper.style.setProperty("max-height",`${o}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",null!=o)},setResizableDisplayed:o=>ce(this.eResize,o),setWidth:o=>e.style.width=o,setAriaExpanded:o=>((o,s)=>null!=s?e.setAttribute(o,s):e.removeAttribute(o))("aria-expanded",o),setUserCompDetails:o=>this.setUserCompDetails(o),getUserCompInstance:()=>this.headerGroupComp},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())return void t();const i=this.getGui(),o=e.getGui();this.eHeaderCompWrapper.appendChild(o),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(i)}},Sm={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"}}]}]},ym=class extends Sr{constructor(e){super(Sm,e),this.eFloatingFilterBody=V,this.eButtonWrapper=V,this.eButtonShowMainFilter=V}postConstruct(){const e=this.getGui();this.ctrl.setComp({toggleCss:(i,o)=>this.toggleCss(i,o),setUserStyles:i=>Ro(e,i),addOrRemoveBodyCssClass:(i,o)=>this.eFloatingFilterBody.classList.toggle(i,o),setButtonWrapperDisplayed:i=>ce(this.eButtonWrapper,i),setCompDetails:i=>this.setCompDetails(i),getFloatingFilterComp:()=>this.compPromise,setWidth:i=>e.style.width=i,setMenuIcon:i=>this.eButtonShowMainFilter.appendChild(i)},e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e)return this.destroyFloatingFilterComp(),void(this.compPromise=null);this.compPromise=e.newAgStackInstance(),this.compPromise.then(t=>this.afterCompCreated(t))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.floatingFilterComp.getGui().remove(),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(e){if(e){if(!this.isAlive())return void this.destroyBean(e);this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()}}},Rm=class extends Re{constructor(e){super({tag:"div",cls:e.headerRowClass,role:"row"}),this.ctrl=e,this.headerComps={}}postConstruct(){this.getGui().setAttribute("tabindex",String(this.gos.get("tabIndex"))),A(this.getGui(),this.ctrl.getAriaRowIndex()),this.ctrl.setComp({setHeight:i=>this.getGui().style.height=i,setTop:i=>this.getGui().style.top=i,setHeaderCtrls:(i,o)=>this.setHeaderCtrls(i,o),setWidth:i=>this.getGui().style.width=i,setRowIndex:i=>A(this.getGui(),i)},void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;const i=this.headerComps;this.headerComps={};for(const o of e){const s=o.instanceId;let n=i[s];delete i[s],null==n&&(n=this.createHeaderComp(o),this.getGui().appendChild(n.getGui())),this.headerComps[s]=n}if(Object.values(i).forEach(o=>{o.getGui().remove(),this.destroyBean(o)}),t){const o=Object.values(this.headerComps);o.sort((n,r)=>n.getCtrl().column.getLeft()-r.getCtrl().column.getLeft());const s=o.map(n=>n.getGui());Sa(this.getGui(),s)}}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new bm(e);break;case"filter":t=new ym(e);break;default:t=new vm(e)}return this.createBean(t),t.setParentComponent(this),t}},yr=class extends M{constructor(e,t,i,o){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=o,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?Ae(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"),o=C(this.columnOrGroup.getOldLeft());t?.isActive()&&o&&!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:o}=this.beans;if(!nt(i,"print")||"left"===e.getPinned())return t;const n=o.getColsLeftWidth();return"right"===e.getPinned()?n+o.bodyWidth+t:n+t}setLeft(e){if(C(e)&&(this.eCell.style.left=`${e}px`),qe(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&function fe(e,t){z(e,"colspan",t)}(this.ariaEl,t.length)}}},xm=0,Td="headerCtrl",Rr=class extends M{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.reAttemptToFocus=!1,this.instanceId=e.getUniqueId()+"-"+xm++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,i,o,s){t.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(e,t,i,o,s),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus(this.lastFocusEvent??void 0))}shouldStopEventPropagation(e){const{headerRowIndex:t,column:i}=this.beans.focusSvc.focusedHeader,o=i.getDefinition(),s=o?.suppressHeaderKeyboardEvent;return!!C(s)&&!!s(ee(this.gos,{colDef:o,column:i,headerRowIndex:t,event:e}))}getWrapperHasFocus(){return Fe(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;i="function"==typeof t?t(this.getHeaderClassParams()):t,i&&this.comp.setUserStyles(i)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:i,compBean:o}=e,{beans:s}=this,n=u=>{if(!this.isAlive()||!o.isAlive())return;const{paddingTop:h,paddingBottom:g,borderBottomWidth:p,borderTopWidth:f}=Ft(this.eGui),b=t.offsetHeight+(h+g+p+f);!(u<5)||ve(s)?.contains(t)&&0!=b?this.setColHeaderHeight(this.column,b):vn(()=>n(u+1),"raf",s)};let a,r=!1;const l=()=>{const u=this.column.isAutoHeaderHeight();u&&!r&&d(),!u&&r&&c()},d=()=>{r=!0,this.comp.toggleCss("ag-header-cell-auto-height",!0),n(0),a=pi(this.beans,t,()=>n(0))},c=()=>{r=!1,a&&a(),this.comp.toggleCss("ag-header-cell-auto-height",!1),a=void 0};l(),o.addDestroyFunc(()=>c()),o.addManagedListeners(this.column,{widthChanged:()=>r&&n(0)}),o.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>n(0))}}),i&&i(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:i,eGui:o}=this;!e||!t||!o||(Fd(e,t,i.visibleCols),X(o,i.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=_i(this.beans);this.eGui&&Dt(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=Fe(this.beans),i=e.key===P_LEFT||e.key===P_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 s=e.key===P_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(s)}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 o=e.key===P_LEFT!==t.get("enableRtl");const s=i.getPinned(),n=t.get("enableRtl");return s&&n!==("right"===s)&&(o=!o),(o?-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"PageDown":case"PageUp":case"Home":case"End":t&&e.preventDefault()}}addDomData(e){const t=Td,{eGui:i,gos:o}=this;Li(o,i,t,this),e.addDestroyFunc(()=>Li(o,i,t,null))}focus(e){if(!this.isAlive())return!1;const{eGui:t}=this;return t?(t.focus(),this.lastFocusEvent=e||null):this.reAttemptToFocus=!0,!0}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 o=e??t,{menuSvc:s,gos:n}=this.beans;n.get("preventDefaultOnContextMenu")&&o.preventDefault(),s?.isHeaderContextMenuEnabled(i)&&s.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;i.dispatchEvent(e.isColumn?{type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}:{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}},Em=class extends Rr{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(e,t,i,o,s){this.comp=e;const{rowCtrl:n,column:r,beans:a}=this,{colResize:l,context:d,colHover:c,rangeSvc:u}=a,h=Ho(this,d,s);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:o,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)):ce(i,!1),c?.createHoverFeature(h,[r],t),u?.createRangeHighlightFeature(h,r,e),h.createManagedBean(new yr(r,t,a)),h.createManagedBean(new lo(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;return ee(t.gos,{colDef:e.colDef,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 function xg(e,t,i){return e.getCompDetails(t,rg,"agColumnHeader",i)}(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:i,gos:o}=this.beans;return ee(o,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!i&&(!this.openFilterEnabled||Mt(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)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}})}setupSelectAll(e){const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature?.setComp(this),e.addManagedPropertyListener("rowSelection",()=>{const i=t.createSelectAllFeature(this.column);i&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(i),this.selectAllFeature?.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!i&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e)," "===e.key&&this.selectAllFeature?.onSpaceKeyDown(e),"Enter"===e.key&&this.onEnterKeyDown(e),e.key===P_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();kd(i)&&i.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),function qg(){return jn}()&&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 i=Ed(this.column.getColDef(),this.gos,this.column,null),o=this.userHeaderClasses;this.userHeaderClasses=new Set(i);for(const s of i)o.has(s)?o.delete(s):this.comp.toggleCss(s,!0);for(const s of o)this.comp.toggleCss(s,!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();for(const e of Object.values(this.refreshFunctions))e()}refreshHeaderComp(){const e=this.lookupUserCompDetails();e&&(null!=this.comp.getUserCompInstance()&&this.userCompDetails.componentClass==e.componentClass&&this.attemptHeaderCompRefresh(e.params)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e))}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!(!t||!t.refresh)&&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.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp?.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.toggleCss("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.toggleCss("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.toggleCss("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),i=1===e;this.comp.toggleCss("ag-header-highlight-before",0===e),this.comp.toggleCss("ag-header-highlight-after",i)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:i,beans:o}=this,s=wr(this.beans),n=0===s.reduce((h,g)=>h+g,0);if(i.toggleCss("ag-header-parent-hidden",n),!t.isSpanHeaderHeight())return e.style.removeProperty("top"),e.style.removeProperty("height"),i.toggleCss("ag-header-span-height",!1),void i.toggleCss("ag-header-span-total",!1);const{numberOfParents:r,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();i.toggleCss("ag-header-span-height",r>0);const l=br(o);if(0===r)return i.toggleCss("ag-header-span-total",!1),e.style.setProperty("top","0px"),void e.style.setProperty("height",`${l}px`);i.toggleCss("ag-header-span-total",a);const d=(this.column.getFirstRealParent()?.getLevel()??-1)+1,c=s.length-d;let u=0;for(let h=0;h<c;h++)u+=s[s.length-1-h];e.style.setProperty("top",-u+"px"),e.style.setProperty("height",`${l+u}px`)}refreshAriaSort(){if(this.sortable){const e=this.getLocaleTextFunc(),t=this.beans.sortSvc?.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(function Ct(e){let t;return t="asc"===e?"ascending":"desc"===e?"descending":"mixed"===e?"other":"none",t}(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&&!Mt(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){null!=t?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){if(!this.eGui.contains(Fe(this.beans)))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((t,i)=>"filter"===t?-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=s=>this.handleMouseOverChange("mouseenter"===s.type);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},contextmenu:s=>this.handleContextMenuMouseEvent(s,void 0,this.column)})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.toggleCss("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return kd(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function kd(e){return"function"==typeof e?.getAnchorElementForMenu&&"function"==typeof e.onMenuKeyboardShortcut}var Fm=0,xr=class extends M{constructor(e,t,i){super(),this.rowIndex=e,this.pinned=t,this.type=i,this.instanceId=Fm++,this.comp=null,this.allCtrls=[];let o="ag-header-row-column";"group"===i?o="ag-header-row-group":"filter"===i&&(o="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${o}`}setRowIndex(e){this.rowIndex=e,this.comp?.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=nt(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return!!this.comp&&this.allCtrls.every(e=>null!=e.eGui)}setComp(e,t,i=!0){this.comp=e,t=Ho(this,this.beans.context,t),i&&(this.setRowIndex(this.rowIndex),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:o=>this.onVirtualColumnsChanged(o.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",i),e.addManagedPropertyListener("ensureDomOrder",o=>this.isEnsureDomOrder=o.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=nt(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleCols:e}=this.beans;return this.isPrintLayout?null!=this.pinned?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){if(!this.comp)return;const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let e=0;const t=wr(this.beans);for(let s=0;s<t.length;s++){if(s===this.rowIndex&&"group"===this.type)return{topOffset:e,rowHeight:t[s]};e+=t[s]}const i=br(this.beans);return"column"===this.type?{topOffset:e,rowHeight:i}:(e+=i,{topOffset:e,rowHeight:Dd(this.beans)})}onVirtualColumnsChanged(e=!1){if(!this.comp)return;const t=this.getUpdatedHeaderCtrls();this.comp.setHeaderCtrls(t,this.isEnsureDomOrder||this.isPrintLayout,e)}getUpdatedHeaderCtrls(){const e=this.ctrlsById;this.ctrlsById=new Map;const t=this.getColumnsInViewport();for(const o of t)this.recycleAndCreateHeaderCtrls(o,this.ctrlsById,e);const i=o=>{const{focusSvc:s,visibleCols:n}=this.beans;return!!s.isHeaderWrapperFocused(o)&&n.isVisible(o.column)};if(e)for(const[o,s]of e)i(s)?this.ctrlsById.set(o,s):this.destroyBean(s);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,i){if(e.isEmptyGroup())return;const o=e.getUniqueId();let s;if(i&&(s=i.get(o),i.delete(o)),s&&s.column!=e&&(this.destroyBean(s),s=void 0),null==s)switch(this.type){case"filter":s=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break;case"group":s=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:s=this.createBean(new Em(e,this))}t.set(o,s)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];const e=[];for(const t of["left",null,"right"])e.push(...this.getComponentsToRender(t));return e}getComponentsToRender(e=this.pinned){return"group"===this.type?this.beans.colViewport.getHeadersToRender(e,this.rowIndex):this.beans.colViewport.getColumnHeadersToRender(e)}focusHeader(e,t){const i=this.allCtrls.find(s=>s.column==e);return!!i&&i.focus(t)}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},Pm=class extends M{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:o,colModel:s,colMoves:n}=this.beans;this.setupCenterWidth(),i?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(n,this.eViewport);const r=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:r,advancedFilterEnabledChanged:r}),o.register(`${"string"==typeof this.pinned?this.pinned:"center"}Header`,this),s.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,filterManager:i,visibleCols:o}=this.beans;let s=0;const n=t.getFocusHeaderToUseAfterRefresh(),d=this.getAllCtrls();(()=>{const u=o.headerGroupRowCount;s=u,e||(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls));const h=this.groupsRowCtrls.length;if(h!==u){if(h>u){for(let g=u;g<h;g++)this.destroyBean(this.groupsRowCtrls[g]);return void(this.groupsRowCtrls.length=u)}for(let g=h;g<u;g++){const p=this.createBean(new xr(g,this.pinned,"group"));this.groupsRowCtrls.push(p)}}})(),(()=>{const u=s++;this.hidden?this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl):null!=this.columnsRowCtrl&&e?this.columnsRowCtrl.rowIndex!==u&&this.columnsRowCtrl.setRowIndex(u):(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new xr(u,this.pinned,"column")))})(),(()=>{this.includeFloatingFilter=!!i?.hasFloatingFilters()&&!this.hidden;const u=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter)return void u();e||u();const h=s++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==h&&this.filtersRowCtrl.setRowIndex(h):this.filtersRowCtrl=this.createBean(new xr(h,this.pinned,"filter"))})();const c=this.getAllCtrls();this.comp.setCtrls(c),this.restoreFocusOnHeader(t,n),d.length!==c.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){const t=i=>i?.getHeaderCellCtrls().find(o=>o.column===e);if(vi(e))return t(this.columnsRowCtrl);if(0!==this.groupsRowCtrls.length)for(let i=0;i<this.groupsRowCtrls.length;i++){const o=t(this.groupsRowCtrls[i]);if(o)return o}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,i){const s=this.getAllCtrls()[e];return!!s&&s.focusHeader(t,i)}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,scroll:!1})}setupCenterWidth(){null==this.pinned&&this.createManagedBean(new gr(e=>this.comp.setCenterWidth(`${e}px`),!0))}};function Ad(e,t,i){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",i))}function Id(e){const{enterpriseMenuFactory:t,filterMenuFactory:i,gos:o}=e;return t&&Mt(o)?t:i}var zs=class extends An{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.errorMessages=null}},Ld=class extends Re{constructor(){super()}},Mm={tag:"span",cls:"ag-overlay-loading-center"},km={tag:"span",cls:"ag-overlay-no-rows-center"};function Ot(e,t,i){let o=null;"smallDown"===e?I(262):"smallLeft"===e?I(263):"smallRight"===e&&I(264);const s=i?.getColDef().icons;if(s&&(o=s[e]),t.gos&&!o){const n=t.gos.get("icons");n&&(o=n[e])}if(o){let n;if("function"==typeof o)n=o();else{if("string"!=typeof o)return void I(38,{iconName:e});n=o}return"string"==typeof n?oi(n):gn(n)?n:void I(133,{iconName:e})}{const n=t.registry.getIcon(e);return n||t.validation?.validateIcon(e),Ye({tag:"span",cls:`ag-icon ag-icon-${n??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var Om={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"}]}]},Gm={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},Od=class{constructor(e,t){this.beans=e,this.floating=t,this.all=new Set,this.visible=new Set,this.order=[],this.queued=new Set}size(){return this.visible.size}add(e){const{all:t,visible:i,order:o}=this;t.has(e)||(t.add(e),i.add(e),o.push(e),this.sort())}delete(e){this.all.delete(e),this.visible.delete(e),this.queued.delete(e.id),Lt(this.order,e)}has(e){return this.visible.has(e)}forEach(e){this.order.forEach(e)}getByIndex(e){return this.order[e]}getById(e){for(const t of this.visible)if(t.id==e)return t}clear(){const{all:e,visible:t,order:i,queued:o}=this;e.clear(),o.clear(),t.clear(),i.length=0}sort(){const{sortSvc:e,rowNodeSorter:t,gos:i}=this.beans,o=e?.getSortOptions()??[],s=function _m(e){const t=e.findIndex(zm);if(t>-1)return e.splice(t,1)?.[0]}(this.order);if(this.order.sort((r,a)=>(r.pinnedSibling?.rowIndex??0)-(a.pinnedSibling?.rowIndex??0)),this.order=t?.doFullSort(this.order,o)??this.order,!s)return;const n=Za(i);"bottom"===n||"pinnedBottom"===n?this.order.push(s):this.order.unshift(s)}hide(e){const{all:t,visible:i}=this;t.forEach(o=>e(o)?i.delete(o):i.add(o)),this.order=Array.from(i),this.sort()}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function Bd(e){if(-1===e.level)return!0;const t=e.parent;return!!t?.childrenAfterSort?.some(i=>i==e)&&Bd(t)}function Er(e,t){const{gos:i,rowModel:o,filterManager:s}=e;return Qi(i)?!o.getRowNode(t.id):s?.isAnyFilterPresent()?!Bd(t):!!i.get("pivotMode")&&!t.group}function zm(e){return!!e.pinnedSibling&&function Nm(e){return!!e.footer&&-1===e.level}(e.pinnedSibling)}var Hd=class extends M{postConstruct(){const{gos:e,beans:t}=this;this.top=new Od(t,"top"),this.bottom=new Od(t,"bottom");const i=s=>Er(t,s.pinnedSibling),o=()=>{const s=e.get("isRowPinned");s&&e.get("enableRowPinning")&&t.rowModel.forEachNode(n=>this.pinRow(n,s(n)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:s})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow(),this.forContainers(r=>r.hide(i));const n=this.refreshRowPositions();(!s||n)&&this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(Um),this.refreshRowPositions()},rowNodeDataChanged:({node:s})=>{(e.get("isRowPinnable")?.(s)??1)||this.pinRow(s,null)},firstDataRendered:o}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(s=>s.hide(i)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:s})=>{this._grandTotalPinned="pinnedBottom"===s?"bottom":"pinnedTop"===s?"top":null}),this.addManagedPropertyListener("isRowPinned",o)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{const i=[];t.forEach(o=>i.push(o)),i.forEach(o=>this.pinRow(o,null)),t.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,i){if(e.footer&&e.level>-1)return;if(e.footer&&-1===e.level)return this._grandTotalPinned=t,void function jm({gos:e,rowModel:t}){je(e)&&t.refreshModel({step:"map"})}(this.beans);const o=e.rowPinned??e.pinnedSibling?.rowPinned;if(null!=o&&null!=t&&t!=o){const a=e.rowPinned?e.pinnedSibling:e;return this.pinRow(e.rowPinned?e:e.pinnedSibling,null,i),void this.pinRow(a,t,i)}const n=i&&function $m(e,t,i){const{rowSpanSvc:o}=e,s=(i&&o?.isCellSpanning(i,t))??!1;if(i&&s)return o?.getCellSpan(i,t)?.spannedNodes}(this.beans,e,i);if(n)n.forEach(r=>this.pinRow(r,t));else if(null==t){const r=e.rowPinned?e:e.pinnedSibling,a=this.findPinnedRowNode(r);if(!a)return;a.delete(r);const l=r.pinnedSibling;Fr(r),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(l)}else{const r=Gd(this.beans,e,t),a=this.getContainer(t);a.add(r),Er(this.beans,e)&&a.hide(l=>Er(this.beans,l.pinnedSibling)),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(e)}}isManual(){return!0}isEmpty(e){return 0===this.getContainer(e).size()}isRowsToRender(e){return!this.isEmpty(e)}ensureRowHeightsValid(){let e=!1,t=0;const i=o=>{if(o.rowHeightEstimated){const s=Ci(this.beans,o);o.setRowTop(t),o.setRowHeight(s.height),t+=s.height,e=!0}};return this.bottom.forEach(i),t=0,this.top.forEach(i),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return Vd(this.top)}getPinnedBottomTotalHeight(){return Vd(this.bottom)}getPinnedTopRowCount(){return this.top.size()}getPinnedBottomRowCount(){return this.bottom.size()}getPinnedTopRow(e){return this.top.getByIndex(e)}getPinnedBottomRow(e){return this.bottom.getByIndex(e)}getPinnedRowById(e,t){return this.getContainer(t).getById(e)}forEachPinnedRow(e,t){this.getContainer(e).forEach(t)}getPinnedState(){const e=t=>{const i=[];return this.forEachPinnedRow(t,o=>i.push(o.pinnedSibling.id)),i};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,i)=>{for(const o of e[i]){const s=this.beans.rowModel.getRowNode(o);s?this.pinRow(s,i):t.queue(o)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{const i=new Set;e.forEachQueued(o=>{const s=this.beans.rowModel.getRowNode(o);s&&i.add(s)});for(const o of i)e.unqueue(o.id),this.pinRow(o,t)})}pinGrandTotalRow(){const{gos:e,beans:t,_grandTotalPinned:i}=this,o=t.rowModel;if(!je(e))return;const s=o.rootNode?.sibling;if(!s)return;const n=s.pinnedSibling,r=n&&this.findPinnedRowNode(n);if(i){if(r&&r.floating!==i&&(r.delete(n),Fr(n)),!r||r.floating!==i){const a=Gd(t,s,i);this.getContainer(i).add(a)}}else{if(!r)return;r.delete(n),Fr(n)}}onGridStylesChanges(e){e.rowHeightChanged&&this.forContainers(t=>t.forEach(i=>i.setRowHeight(i.rowHeight,!0)))}getContainer(e){return"top"===e?this.top:this.bottom}findPinnedRowNode(e){return this.top.has(e)?this.top:this.bottom.has(e)?this.bottom:void 0}refreshRowPositions(e){const t=o=>function Wm(e,t){let i=0,o=!1;return t.forEach((s,n)=>{if(o||(o=s.rowTop!==i),s.setRowTop(i),s.rowHeightEstimated||null==s.rowHeight){const r=Ci(e,s).height;o||(o=s.rowHeight!==r),s.setRowHeight(r)}s.setRowIndex(n),i+=s.rowHeight}),o}(this.beans,o);if(e)return t(this.getContainer(e));let i=!1;return this.forContainers(o=>{const s=t(o);i||(i=s)}),i}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e?.dispatchRowEvent("rowPinned")}};function Gd(e,t,i){if(t.pinnedSibling)return t.pinnedSibling;const o=((e,t)=>{const i=new xi(t);for(const o of Object.keys(e))af.has(o)||(i[o]=e[o]);return i.oldRowTop=null,i})(t,e);return o.setRowTop(null),o.setRowIndex(null),o.rowPinned=i,o.id=`${"top"===i?"t-":"b-"}${i}-${t.id}`,o.pinnedSibling=t,t.pinnedSibling=o,o}function Fr(e){if(!e.pinnedSibling)return;e.rowPinned=null,e.setRowTop(null),e.setRowIndex(null);const t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function Um(e){const t=new Set;e.forEach(i=>{i.group&&t.add(i)}),t.forEach(i=>e.delete(i))}function Vd(e){const t=e.size();if(0===t)return 0;const i=e.getByIndex(t-1);return void 0===i?0:i.rowTop+i.rowHeight}var Nd=class extends M{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){const e=this.gos;this.setPinnedRowData(e.get("pinnedTopRowData"),"top"),this.setPinnedRowData(e.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",t=>this.setPinnedRowData(t.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",t=>this.setPinnedRowData(t.currentValue,"bottom")),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this)})}reset(){}isEmpty(e){return 0===this.getCache(e).order.length}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}onGridStylesChanges(e){if(e.rowHeightChanged){const t=i=>{i.setRowHeight(i.rowHeight,!0)};Uo(this.pinnedBottomRows,t),Uo(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0;const i=o=>{if(o.rowHeightEstimated){const s=Ci(this.beans,o);o.setRowTop(t),o.setRowHeight(s.height),t+=s.height,e=!0}};return Uo(this.pinnedBottomRows,i),t=0,Uo(this.pinnedTopRows,i),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){const i=this.getCache(t);if(void 0===e)return i.order.length=0,void(i.cache={});const o=Zi(this.gos),s="top"===t?"t-":"b-",n=new Set(i.order),r=[],a=new Set;let l=0,d=-1;for(const c of e){const u=o?.({data:c,level:0,rowPinned:t})??s+this.nextId++;if(a.has(u)){I(96,{id:u,data:c});continue}d++,a.add(u),r.push(u);const h=Wo(i,u);if(void 0!==h)h.data!==c&&h.updateData(c),l+=this.setRowTopAndRowIndex(h,l,d),n.delete(u);else{const g=new xi(this.beans);g.id=u,g.data=c,g.rowPinned=t,l+=this.setRowTopAndRowIndex(g,l,d),i.cache[u]=g,i.order.push(u)}}for(const c of n)Wo(i,c)?.clearRowTopAndRowIndex(),delete i.cache[c];i.order=r}setRowTopAndRowIndex(e,t,i){return e.setRowTop(t),e.setRowHeight(Ci(this.beans,e).height),e.setRowIndex(i),e.rowHeight}getPinnedTopTotalHeight(){return zd(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return zd(this.pinnedBottomRows)}getPinnedTopRowCount(){return Dr(this.pinnedTopRows)}getPinnedBottomRowCount(){return Dr(this.pinnedBottomRows)}getPinnedTopRow(e){return Pr(this.pinnedTopRows,e)}getPinnedBottomRow(e){return Pr(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return Wo(this.getCache(t),e)}forEachPinnedRow(e,t){return Uo(this.getCache(e),t)}getCache(e){return"top"===e?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function zd(e){const t=Dr(e);if(0===t)return 0;const i=Pr(e,t-1);return void 0===i?0:i.rowTop+i.rowHeight}function Wo(e,t){return e.cache[t]}function Pr(e,t){return Wo(e,e.order[t])}function Uo(e,t){e.order.forEach((i,o)=>{const s=Wo(e,i);s&&t(s,o)})}function Dr(e){return e.order.length}function $o(e){return!(!e.rowPinned||!e.pinnedSibling)}function Bt(e,t,i,o){const s="top"===t;if(!i)return Bt(e,t,s?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),o);if(!o){const l=s?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return Bt(e,t,i,s?e.getPinnedTopRow(l-1):e.getPinnedBottomRow(l-1))}let n=!1,r=!1;const a=[];return e.forEachPinnedRow(t,l=>l!==i||n?n&&l===o?(r=!0,void a.push(l)):void(n&&!r&&a.push(l)):(n=!0,void a.push(l))),a}var Ym={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},Qm=class extends Re{constructor(){super(Ym,[Kn]),this.eCheckbox=V}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:i}=this,o=t.isSelected(),s=oe(e,o),[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(o,!0),i.setInputAriaLabel(`${a} (${s})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:zi,click:o=>{zi(o),this.beans.selectionSvc?.handleSelectionEvent(o,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:o,previousValue:s})=>{("object"==typeof o?xn(o):void 0)!==("object"==typeof s?xn(s):void 0)&&this.onSelectableChanged()}),En(this.gos)||"function"==typeof this.getIsVisible()){const o=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:o}),this.addManagedListeners(this.rowNode,{dataChanged:o,cellChanged:o}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:i,gos:o}=this,s=t.selectable,n=this.getIsVisible();let r;if("function"==typeof n){const u=i?.callbackParams;if(e){const h=e.createColumnFunctionCallbackParams(t);r=n({...u,...h})}else r=n({...u,node:t,data:t.data})}else r=n??!1;const a=s&&!r||!s&&r,l=s||r,d=o.get("rowSelection"),c=d&&"string"!=typeof d?!xn(d):!!e?.getColDef().showDisabledCheckboxes;this.setVisible(l&&(!a||c)),this.setDisplayed(l&&(!a||c)),l&&this.eCheckbox.setDisabled(a),i?.removeHidden&&this.setDisplayed(l)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&"string"!=typeof t?Ji(t):this.column?.getColDef()?.checkboxSelection}},Xm=class{constructor(e,t){this.rowModel=e,this.pinnedRowModel=t,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(0===this.cachedRange.length){const e=this.getRoot(),t=this.getEnd();if(null==e||null==t)return this.cachedRange;this.cachedRange=this.getNodesInRange(e,t)??[]}return this.cachedRange}isInRange(e){return null!==this.rootId&&this.getRange().some(t=>t.id===e.id)}getRoot(e){return this.rootId?this.getRowNode(this.rootId):e?(this.setRoot(e),e):void 0}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(e){let t;const{rowModel:i,pinnedRowModel:o}=this;return t??(t=i.getRowNode(e)),o?.isManual()&&(t??(t=o.getPinnedRowById(e,"top")),t??(t=o.getPinnedRowById(e,"bottom"))),t}truncate(e){const t=this.getRange();if(0===t.length)return{keep:[],discard:[]};const i=t[0].id===this.rootId,o=t.findIndex(s=>s.id===e.id);if(o>-1){const s=t.slice(0,o),n=t.slice(o+1);return this.setEndRange(e),i?{keep:s,discard:n}:{keep:n,discard:s}}return{keep:t,discard:[]}}extend(e,t=!1){const i=this.getRoot();if(null==i){const s=this.getRange().slice();return t&&e.depthFirstSearch(n=>!n.group&&s.push(n)),s.push(e),this.setRoot(e),{keep:s,discard:[]}}const o=this.getNodesInRange(i,e);if(!o)return this.setRoot(e),{keep:[e],discard:[]};if(o.find(s=>s.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const s=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:s}}}getNodesInRange(e,t){const{pinnedRowModel:i,rowModel:o}=this;if(!i?.isManual())return o.getNodesInRangeForSelection(e,t);if("top"===e.rowPinned&&!t.rowPinned)return Bt(i,"top",e,void 0).concat(o.getNodesInRangeForSelection(o.getRow(0),t)??[]);if("bottom"===e.rowPinned&&!t.rowPinned){const s=Bt(i,"bottom",void 0,e),n=o.getRowCount(),r=o.getRow(n-1);return(o.getNodesInRangeForSelection(t,r)??[]).concat(s)}if(!e.rowPinned&&!t.rowPinned)return o.getNodesInRangeForSelection(e,t);if("top"===e.rowPinned&&"top"===t.rowPinned)return Bt(i,"top",e,t);if("bottom"===e.rowPinned&&"top"===t.rowPinned){const s=Bt(i,"top",t,void 0),n=Bt(i,"bottom",void 0,e),r=o.getRow(0),a=o.getRow(o.getRowCount()-1);return s.concat(o.getNodesInRangeForSelection(r,a)??[]).concat(n)}if(!e.rowPinned&&"top"===t.rowPinned)return Bt(i,"top",t,void 0).concat(o.getNodesInRangeForSelection(o.getRow(0),e)??[]);if("top"===e.rowPinned&&"bottom"===t.rowPinned){const s=Bt(i,"top",e,void 0),n=Bt(i,"bottom",void 0,t),r=o.getRow(0),a=o.getRow(o.getRowCount()-1);return s.concat(o.getNodesInRangeForSelection(r,a)??[]).concat(n)}if("bottom"===e.rowPinned&&"bottom"===t.rowPinned)return Bt(i,"bottom",e,t);if(!e.rowPinned&&"bottom"===t.rowPinned){const s=Bt(i,"bottom",void 0,t),n=o.getRow(o.getRowCount());return(o.getNodesInRangeForSelection(e,n)??[]).concat(s)}return null}},Zm=class extends M{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(Fe(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new xs);this.cbSelectAll=t,t.addCss("ag-header-select-all"),we(t.getGui(),"presentation"),this.showOrHideSelectAll();const i=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:i,paginationChanged:i,modelUpdated:i}),this.addManagedPropertyListener("rowSelection",({currentValue:o,previousValue:s})=>{const n=r=>"string"!=typeof r&&r&&"singleRow"!==r.mode?r.selectAll:void 0;n(o)!==n(s)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll("uiColumnMoved"===e.source)}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)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,i=this.cbSelectAll,o=t.getSelectAllState(e);i.setValue(o);const s=t.hasNodesToSelect(e);i.setDisabled(!s),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:i,cbSelectAll:o,cbSelectAllVisible:s}=this,r=oe(t,o.getValue()),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");i.setAriaDescriptionProperty("selectAll",s?`${a} (${r})`:null),o.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||i.announceAriaDescription()}checkSelectionType(e){return!!Ao(this.gos)||(I(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:i}=this.beans;return!(!je(t)&&!Qi(t)&&(I(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";"currentPage"===t?i="uiSelectAllCurrentPage":"filtered"===t&&(i="uiSelectAllFiltered");const o={source:i,selectAll:t},s=this.beans.selectionSvc;e?s.selectAllRowNodes(o):s.deselectAllRowNodes(o)}isCheckboxSelection(){const{column:e,gos:t,beans:i}=this,n="object"==typeof t.get("rowSelection")?"headerCheckbox":"headerCheckboxSelection";return _d(i,e)&&this.checkRightRowModelType(n)&&this.checkSelectionType(n)}getSelectAllMode(){const e=il(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:i}=this.column.getColDef();return t?"currentPage":i?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}};function _d({gos:e,selectionColSvc:t},i){const o=e.get("rowSelection"),s=i.getColDef(),{headerCheckboxSelection:n}=s;let r=!1;if("object"==typeof o){const l=ai(i),d=Mn(i);("autoGroupColumn"===gs(o)&&d||l&&t?.isSelectionColumnEnabled())&&(r=hs(o))}else r="function"==typeof n?n(ee(e,{column:i,colDef:s})):!!n;return r}var _s,Jm=class extends M{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new Xm(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const i=En(e);i!==this.isRowSelectable&&(this.isRowSelectable=i,this.updateSelectable())}),this.isRowSelectable=En(e),this.addManagedEventListeners({cellValueChanged:i=>this.updateRowSelectable(i.node),rowNodeDataChanged:i=>this.updateRowSelectable(i.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new Qm}createSelectAllFeature(e){if(_d(this.beans,e))return new Zm(e)}isMultiSelect(){return Ao(this.gos)}onRowCtrlSelected(e,t,i){const o=!!e.rowNode.isSelected();e.forEachGui(i,s=>{s.rowComp.toggleCss("ag-row-selected",o);const n=s.element;Xe(n,o),n.contains(Fe(this.beans))&&t(s)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected(),i=this.beans.editSvc?.isEditing({rowNode:e});if(!e.selectable||i)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&&!$o(e)||!Ai(this.gos)}updateRowSelectable(e,t){const i=e.rowPinned&&e.pinnedSibling?e.pinnedSibling.selectable: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(Io(this.gos)){const s=this.calculateSelectedFromChildren(e);return void this.setNodesSelected({nodes:[e],newValue:s??!1,source:"selectableChanged"})}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 o=0;o<e.childrenAfterGroup.length;o++){const s=e.childrenAfterGroup[o];let n=s.isSelected();if(!s.selectable){const r=this.calculateSelectedFromChildren(s);if(null===r)continue;n=r}switch(n){case!0:t=!0;break;case!1:i=!0;break;default:return}}return t&&i?void 0:!!t||!i&&(e.selectable?e.__selected:null)}selectRowNode(e,t,i,o="api"){if(!e.selectable&&t||e.__selected===t)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const r=e.sibling;r&&r.footer&&r.__localEventService&&r.dispatchRowEvent("rowSelected");const a=e.pinnedSibling;return a?.rowPinned&&a.__localEventService&&a.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...rf(e,this.gos,"rowSelected"),event:i||null,source:o}),!0}isCellCheckboxSelection(e,t){const i=this.gos.get("rowSelection");if(i&&"string"!=typeof i){const o=ai(e)&&Ji(i);return e.isColumnFunc(t,o)}return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,i,o){const{gos:s,selectionCtx:n}=this,r=e.isSelected(),a=Io(s),l=function Fh(e){const t=tl(e);return!0===t||"enableSelection"===t}(s),d=function Ph(e){const t=tl(e);return!0===t||"enableDeselection"===t}(s),c=this.isMultiSelect(),u="rowClicked"===o;if(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}}return{select:[],deselect:n.extend(e,a).keep,reset:!1}}return null}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())}}if(i){if(u){const h=!r;return h&&!l||!h&&!d?null:(n.setRoot(e),{node:e,newValue:h,clearSelection:!1})}return n.setRoot(e),{node:e,newValue:!r,clearSelection:!c}}{n.setRoot(e);const h=function Dh(e){const t=e.get("rowSelection");return"string"==typeof t?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}(s),p=u&&(!h||!l);if("filteredDescendants"===fs(s)&&void 0===r&&je(s))return{node:e,newValue:!1,checkFilteredNodes:!0,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,keepDescendants:e.group&&a}}return{node:e,newValue:!r,clearSelection:!c||p}}}},eC=class extends M{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:t,eTopGuard:i,eBottomGuard:o,focusTrapActive:s,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=o,this.providedFocusInnerElement=a,this.eFocusableElement=p,this.focusTrapActive=!!s,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 lo(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();for(const e of[this.eTopGuard,this.eBottomGuard])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()}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)return void this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);if(this.skipTabGuardFocus)return void(this.skipTabGuardFocus=!1);if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():0===io(this.eFocusableElement,".ag-tab-guard").length))return void this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);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 i=io(ve(this.beans).body,null,!0),o=i.indexOf(e?this.eTopGuard:this.eBottomGuard);if(-1===o)return;let s,n;e?(s=0,n=o):(s=o+1,n=i.length);const r=i.slice(s,n),a=this.gos.get("tabIndex");r.sort((l,d)=>{const c=Number.parseInt(l.getAttribute("tabindex")||"0"),u=Number.parseInt(d.getAttribute("tabindex")||"0");return u===a?1:c===a?-1:0===c?1:0===u?-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)return void this.providedOnTabKeyDown(e);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=io(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)}getNextFocusableElement(e){return Hi(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}},tC=class extends M{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:o}=this,s=[t,i],n={setTabIndex:m=>{for(const w of s)null!=m?w.setAttribute("tabindex",m):w.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 eC({comp:n,focusTrapActive:r,eTopGuard:t,eBottomGuard:i,eFocusableElement:o,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=ve(this.beans).createElement("div");return t.classList.add("ag-tab-guard","top"===e?"ag-tab-guard-top":"ag-tab-guard-bottom"),we(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];Ue(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,i){gn(t)||(t=t.getGui());const{eBottomGuard:o}=this;o?o.insertAdjacentElement("beforebegin",t):e(t,i)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;pt(e),pt(t),super.destroy()}},Wd=class extends Re{initialiseTabGuard(e){this.tabGuardFeature=this.createManagedBean(new tC(this)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},Wi=class{constructor(e,t=!1){this.eElement=e,this.preventClick=t,this.startListener=null,this.handlers=[],this.eventSvc=void 0,this.touchStart=null,this.lastTapTime=null,this.longPressTimer=0,this.moved=!1}addEventListener(e,t){let i=this.eventSvc;if(!i){if(null===i)return;this.eventSvc=i=new S;const o=this.onTouchStart.bind(this);this.startListener=o,this.eElement.addEventListener("touchstart",o,{passive:!0})}i.addEventListener(e,t)}removeEventListener(e,t){this.eventSvc?.removeEventListener(e,t)}onTouchStart(e){if(this.touchStart||!(e=>{if(_s){if(_s.has(e))return!1}else _s=new WeakSet;return _s.add(e),!0})(e))return;const t=e.touches[0];this.touchStart=t;const i=this.handlers;if(!i.length){const o=this.eElement,s=o.ownerDocument,n=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this),a=this.onTouchCancel.bind(this),l={passive:!0},d={passive:!1};as(i,[o,"touchmove",n,l],[s,"touchcancel",a,l],[s,"touchend",r,d],[s,"contextmenu",fi,d])}this.clearLongPress(),this.longPressTimer=window.setTimeout(()=>{this.longPressTimer=0,this.touchStart===t&&!this.moved&&(this.moved=!0,this.eventSvc?.dispatchEvent({type:"longTap",touchStart:t,touchEvent:e}))},550)}onTouchMove(e){const{moved:t,touchStart:i}=this;if(!t&&i){const o=Po(i,e.touches);o&&!Fa(o,i,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){const t=this.touchStart;!t||!Po(t,e.changedTouches)||(this.moved||(this.eventSvc?.dispatchEvent({type:"tap",touchStart:t}),this.checkDoubleTap(t)),this.preventClick&&fi(e),this.cancel())}onTouchCancel(e){const t=this.touchStart;!t||!Po(t,e.changedTouches)||(this.lastTapTime=null,this.cancel())}checkDoubleTap(e){let t=Date.now();const i=this.lastTapTime;i&&t-i>500&&(this.eventSvc?.dispatchEvent({type:"doubleTap",touchStart:e}),t=null),this.lastTapTime=t}cancel(){this.clearLongPress(),mn(this.handlers),this.touchStart=null}clearLongPress(){window.clearTimeout(this.longPressTimer),this.longPressTimer=0,this.moved=!1}destroy(){const e=this.startListener;e&&(this.startListener=null,this.eElement.removeEventListener("touchstart",e)),this.cancel(),this.eElement=null,this.eventSvc=null}},rC=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.includes("x"),this.scrollVertically=e.scrollAxis.includes("y"),this.scrollByTick=null!=e.scrollByTick?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)}get scrolling(){return null!==this.tickingInterval}check(e,t=!1){const i=t||this.shouldSkipVerticalScroll();if(i&&this.shouldSkipHorizontalScroll())return;const o=this.scrollContainer.getBoundingClientRect(),s=this.scrollByTick;this.tickLeft=e.clientX<o.left+s,this.tickRight=e.clientX>o.right-s,this.tickUp=e.clientY<o.top+s&&!i,this.tickDown=e.clientY>o.bottom-s&&!i,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){null===this.tickingInterval&&(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)}},Ud=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${La}/${this.frameworkName}-data-grid`,function mh(e){Yi=e}(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?"/"+e:"")}};function aC(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var $d=Object.fromEntries(["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","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"].map((e,t)=>[e,t]));function dC(e,t){return((e.beanName?$d[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER)-((t.beanName?$d[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER)}function cC(e,t){return"gridDestroySvc"===e?.beanName?-1:"gridDestroySvc"===t?.beanName?1:0}var uC={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},hC={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},gC={tag:"div",cls:"ag-header-viewport",role:"rowgroup",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"presentation"}]},Tr=class extends Re{constructor(e){super(),this.eCenterContainer=V,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 o=this.getGui();o.style.width=i,o.style.maxWidth=i,o.style.minWidth=i}};this.createManagedBean(new Pm(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){this.setTemplate("left"==this.pinned?uC:"right"==this.pinned?hC:gC),this.eRowContainer=this.eCenterContainer!==V?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),e.getGui().remove()}setCtrls(e){const t=this.headerRowComps;let i;this.headerRowComps={},this.rowCompsList=[];const o=s=>{const n=s.getGui();n.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(n),i&&yo(this.eRowContainer,n,i),i=n};for(const s of e){const n=s.instanceId,r=t[n];delete t[n];const a=r||this.createBean(new Rm(s));this.headerRowComps[n]=a,this.rowCompsList.push(a),o(a)}for(const s of Object.values(t))this.destroyRowComp(s)}},pC={tag:"div",cls:"ag-header",role:"presentation"},mC={selector:"AG-HEADER-ROOT",component:class extends Re{constructor(){super(pC)}postConstruct(){const e={toggleCss:(o,s)=>this.toggleCss(o,s),setHeightAndMinHeight:o=>{this.getGui().style.height=o,this.getGui().style.minHeight=o}};this.createManagedBean(new mm).setComp(e,this.getGui(),this.getFocusableElement());const i=o=>{this.createManagedBean(o),this.appendChild(o)};i(new Tr("left")),i(new Tr(null)),i(new Tr("right"))}}},CC=class extends Re{constructor(e,t,i,o,s){super(),this.cellCtrl=t,this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.gos=e.gos,this.column=t.column,this.rowNode=t.rowNode,this.eRow=o;const n=Ye({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.column.colIdSanitised}});let r;this.eCell=n,t.isCellSpanning()?(r=Ye({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),r.appendChild(n),this.setTemplateFromElement(r)):this.setTemplateFromElement(n),this.cellCssManager=new xl(()=>n),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1),t.setComp({toggleCss:(l,d)=>this.cellCssManager.toggleCss(l,d),setUserStyles:l=>Ro(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(),refreshEditStyles:(l,d)=>this.refreshEditStyles(l,d)},n,r,this.eCellWrapper,i,s,void 0)}getParentOfValue(){return this.eCellValue??this.eCellWrapper??this.eCell}setRenderDetails(e,t,i){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=null==this.firstRender;const s=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(i||s)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t)),this.rowDraggingComp?.refreshVisibility()}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,o=i&&null==this.eCellWrapper;o&&(this.eCellWrapper=Ye({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));const s=!i&&null!=this.eCellWrapper;s&&(pt(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssManager.toggleCss("ag-cell-value",!i);const n=!e&&i,r=n&&null==this.eCellValue;if(r){const d=this.cellCtrl.getCellValueClass();this.eCellValue=Ye({tag:"span",cls:d,role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue)}const a=!n&&null!=this.eCellValue;a&&(pt(this.eCellValue),this.eCellValue=void 0);const l=o||s||r||a;return l&&this.removeControls(),!e&&t&&this.addControls(),l}addControls(){const{cellCtrl:e,eCellWrapper:t,eCellValue:i,includeRowDrag:o,includeDndSource:s,includeSelection:n}=this,r=a=>{a&&t.insertBefore(a.getGui(),i)};o&&null==this.rowDraggingComp&&(this.rowDraggingComp=e.createRowDragComp(),r(this.rowDraggingComp)),s&&null==this.dndSourceComp&&(this.dndSourceComp=e.createDndSource(),r(this.dndSourceComp)),n&&null==this.checkboxSelectionComp&&(this.checkboxSelectionComp=e.createSelectionCheckbox(),r(this.checkboxSelectionComp))}createCellEditorInstance(e,t,i){const o=this.editorVersion,s=e.newAgStackInstance(),{params:n}=e;s.then(a=>this.afterCellEditorCreated(o,a,n,t,i)),q(this.cellEditor)&&n.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();Ue(t);const i=te(e);null!=i&&(t.textContent=i)}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),pt(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){const{context:e}=this.beans;(this.cellEditorPopupWrapper?.getGui().contains(Fe(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),pt(this.cellEditorGui),this.cellCtrl.disableEditorTooltipFeature(),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(null==this.cellRenderer?.refresh||this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return!0===t||void 0===t}createCellRendererInstance(e){const t=this.rendererVersion,i=n=>r=>{if(this.rendererVersion!==t||!this.isAlive())return;const l=n.newAgStackInstance(),d=this.afterCellRendererCreated.bind(this,t,n.componentClass);l?.then(d)},{animationFrameSvc:o}=this.beans;let s;if(s=o?.active&&this.firstRender?(n,r=!1)=>{o.createTask(i(n),this.rowNode.rowIndex,"p2",n.componentFromFramework,r)}:n=>i(n)(),e.params?.deferRender&&!this.cellCtrl.rowNode.group){const{loadingComp:n,onReady:r}=this.cellCtrl.getDeferLoadingCellRenderer();n&&(s(n),r.then(()=>s(e,!0)))}else s(e)}afterCellRendererCreated(e,t,i){if(!this.isAlive()||e!==this.rendererVersion)return void this.beans.context.destroyBean(i);this.cellRenderer=i,this.cellRendererClass=t;const s=i.getGui();if(this.cellRendererGui=s,null!=s){const n=this.getParentOfValue();Ue(n),n.appendChild(s)}}afterCellEditorCreated(e,t,i,o,s){const n=e!==this.editorVersion,{context:r}=this.beans;if(n)return void r.destroyBean(t);if(t.isCancelBeforeStart?.())return r.destroyBean(t),void this.cellCtrl.stopEditing(!0);if(!t.getGui)return I(97,{colId:this.column.getId()}),void r.destroyBean(t);this.cellEditor=t,this.cellEditorGui=t.getGui();const l=o||t.isPopup?.();l?this.addPopupCellEditor(i,s):this.addInCellEditor(),this.refreshEditStyles(!0,l),t.afterGuiAttached?.(),this.cellCtrl.enableEditorTooltipFeature(t),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){const{cellCssManager:i}=this;i.toggleCss("ag-cell-inline-editing",e&&!t),i.toggleCss("ag-cell-popup-editing",e&&!!t),i.toggleCss("ag-cell-not-inline-editing",!e||!!t)}addInCellEditor(){const{eCell:e}=this;e.contains(Fe(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),Ue(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){const{gos:i,context:o,popupSvc:s,editSvc:n}=this.beans;"fullRow"===i.get("editType")&&I(98);const r=this.cellEditorPopupWrapper=o.createBean(n.createPopupEditorWrapper(e)),{cellEditor:a,cellEditorGui:l,eCell:d,rowNode:c,column:u,cellCtrl:h}=this,g=r.getGui();l&&g.appendChild(l);const p=i.get("stopEditingWhenCellsLoseFocus"),f=t??a.getPopupPosition?.()??"over",m=i.get("enableRtl"),b=s.positionPopupByComponent.bind(s,{ePopup:g,column:u,rowNode:c,type:"popupCellEditor",eventSource:d,position:f,alignSide:m?"right":"left",keepWithinBounds:!0}),R=s.addPopup({modal:p,eChild:g,closeOnEsc:!0,closedCallback:()=>{h.onPopupEditorClosed()},anchorToElement:d,positionCallback:b,ariaOwns:d});R&&(this.hideEditorPopup=R.hideFunc)}detach(){this.getGui().remove()}destroy(){this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},vC=class extends Re{constructor(e,t,i){super(),this.cellComps=new Map,this.beans=t,this.rowCtrl=e;const o=Ye({tag:"div",role:"row",attrs:{"comp-id":`${this.getCompId()}`}});this.setInitialStyle(o,i),this.setTemplateFromElement(o);const s=o.style;this.domOrder=this.rowCtrl.getDomOrder(),e.setComp({setDomOrder:r=>this.domOrder=r,setCellCtrls:r=>this.setCellCtrls(r),showFullWidth:r=>this.showFullWidth(r),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,getFullWidthCellRendererParams:()=>this.fullWidthCellRendererParams,toggleCss:(r,a)=>this.toggleCss(r,a),setUserStyles:r=>Ro(o,r),setTop:r=>s.top=r,setTransform:r=>s.transform=r,setRowIndex:r=>o.setAttribute("row-index",r),setRowId:r=>o.setAttribute("row-id",r),setRowBusinessKey:r=>o.setAttribute("row-business-key",r),refreshFullWidth:r=>{const a=r();return this.fullWidthCellRendererParams=a,this.fullWidthCellRenderer?.refresh?.(a)??!1}},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 o=this.rowCtrl.getInitialRowTop(t);o&&e.style.setProperty("top",o)}}showFullWidth(e){e.newAgStackInstance().then(o=>{if(this.isAlive()){const s=o.getGui();this.getGui().appendChild(s),this.rowCtrl.setupDetailRowAutoHeight(s),this.setFullWidthRowComp(o,e.params)}else this.beans.context.destroyBean(o)})}setCellCtrls(e){const t=new Map(this.cellComps);for(const i of e){const o=i.instanceId;this.cellComps.has(o)?t.delete(o):this.newCellComp(i)}this.destroyCells(t),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;const t=[];for(const i of e){const o=this.cellComps.get(i.instanceId);o&&t.push(o.getGui())}Sa(this.getGui(),t)}newCellComp(e){const t=this.beans.editSvc?.isEditing(e,{withOpenEditor:!0})??!1,i=new CC(this.beans,e,this.rowCtrl.printLayout,this.getGui(),t);this.cellComps.set(e.instanceId,i),this.getGui().appendChild(i.getGui())}destroy(){super.destroy(),this.destroyCells(this.cellComps)}setFullWidthRowComp(e,t){this.fullWidthCellRenderer=e,this.fullWidthCellRendererParams=t,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer),this.fullWidthCellRendererParams=void 0})}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)}}},SC={selector:"AG-ROW-CONTAINER",component:class extends Re{constructor(e){super(),this.eViewport=V,this.eContainer=V,this.eSpannedContainer=V,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=e?.name,this.options=zo(this.name)}postConstruct(){this.setTemplate(function wC(e,t,i){const o=!!i.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls,s={tag:"div",ref:"eContainer",cls:Vs(e),role:"rowgroup"};if("center"===t.type||o){const n={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${Nf(e)}`,role:"presentation"};return s.role="presentation",{tag:"div",ref:"eViewport",cls:`ag-viewport ${wd(e)}`,role:"rowgroup",children:[s,o?n:null]}}return s}(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 o=`translateY(${i})`;this.eContainer.style.transform=o,this.eSpannedContainer&&(this.eSpannedContainer.style.transform=o)}};this.createManagedBean(new Qf(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:o}=this,s=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 vC(l,i,o.type)}r[d]=u,a.push([u,!c])}this.removeOldRows(Object.values(n)),this.addRowNodes(a,s)}addRowNodes(e,t){const{domOrder:i}=this;for(const[o,s]of e){const n=o.getGui();i?this.ensureDomOrder(n,t):s&&t.appendChild(n)}}removeOldRows(e){for(const t of e)t.getGui().remove(),t.destroy()}ensureDomOrder(e,t){yo(t,e,this.lastPlacedElement),this.lastPlacedElement=e}}};function jo(e,t){return t.map(i=>{const o=`e${i[0].toUpperCase()+i.substring(1)}RowContainer`;return e[o]={name:i},{tag:"ag-row-container",ref:o,attrs:{name:i}}})}var xC={selector:"AG-GRID-BODY",component:class extends Re{constructor(){super(...arguments),this.eGridRoot=V,this.eBodyViewport=V,this.eStickyTop=V,this.eStickyBottom=V,this.eTop=V,this.eBottom=V,this.eBody=V}postConstruct(){const{overlays:e,rangeSvc:t}=this.beans,i=e?.getOverlayWrapperSelector(),{paramsMap:o,elementParams:s}=function yC(e){const t={};return{paramsMap:t,elementParams:{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:jo(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:jo(t,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:jo(t,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:jo(t,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:jo(t,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},e?{tag:"ag-overlay-wrapper"}:null]}}}(!!i);this.setTemplate(s,[...i?[i]:[],om,rm,mC,SC],o);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=>function Z(e,t){z(e,"colcount",t)}(this.getGui(),a),setRowCount:a=>function F(e,t){z(e,"rowcount",t)}(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","0px"===a)},setStickyBottomBottom:a=>this.eStickyBottom.style.bottom=a,setStickyBottomWidth:a=>this.eStickyBottom.style.width=a,setColumnMovingCss:(a,l)=>this.toggleCss(a,l),updateLayoutClasses:(a,l)=>{const d=[this.eBodyViewport.classList,this.eBody.classList];for(const c of d)c.toggle(zt.AUTO_HEIGHT,l.autoHeight),c.toggle(zt.NORMAL,l.normal),c.toggle(zt.PRINT,l.print);this.toggleCss(zt.AUTO_HEIGHT,l.autoHeight),this.toggleCss(zt.NORMAL,l.normal),this.toggleCss(zt.PRINT,l.print)},setAlwaysVerticalScrollClass:(a,l)=>this.eBodyViewport.classList.toggle(yd,l),registerBodyViewportResizeListener:a=>{const l=pi(this.beans,this.eBodyViewport,a);this.addDestroyFunc(()=>l())},setPinnedTopBottomOverflowY:a=>this.eTop.style.overflowY=this.eBottom.style.overflowY=a,setCellSelectableCss:(a,l)=>{for(const d of[this.eTop,this.eBodyViewport,this.eBottom])d.classList.toggle(a,l)},setBodyViewportWidth:a=>this.eBodyViewport.style.width=a,setGridRootRole:a=>we(this.eGridRoot,a)};this.ctrl=this.createManagedBean(new Jf),this.ctrl.setComp(r,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(t&&ni(this.gos)||Ao(this.gos))&&function D(e,t){z(e,"multiselectable",t)}(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){const i=this.eBodyViewport.classList;i.toggle("ag-row-animation",t),i.toggle("ag-row-no-animation",!t)}}},EC=class extends M{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.getId());const{dragAndDrop:o,ctrlsSvc:s}=this.beans;o?.registerGridDropTarget(()=>this.eGui,this),this.createManagedBean(new cr(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const n=pi(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),s.register("gridCtrl",this)}isDetailGrid(){return Hl(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){const{view:t}=this;t.setCursor(!1===e?null:1===e?"ew-resize":"ns-resize")}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:i,nextIndex:o}=this.getNextFocusableIndex(t,e);if(o<0||o>=t.length)return!1;if(0===o){if(i>0){const{visibleCols:s,focusSvc:n}=this.beans,a=Ae(s.allCols);if(n.focusGridView({column:a,backwards:!0}))return!0}return!1}return this.focusContainer(t[o],e)}focusInnerElement(e){if(this.gos.getCallback("focusGridInnerElement")?.({fromBottom:!!e}))return!0;const i=this.getFocusableContainers(),{focusSvc:o,visibleCols:s}=this.beans,n=s.allCols;if(e){if(i.length>1)return this.focusContainer(Ae(i),e);const r=Ae(n);if(o.focusGridView({column:r,backwards:e}))return!0}if(0===this.gos.get("headerHeight")||_i(this.beans)){if(o.focusGridView({column:n[0],backwards:e}))return!0;for(let r=1;r<i.length;r++)if(Bi(i[r].getGui(),e))return!0;return!1}return o.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:o}=this.getNextFocusableIndex(t,e);if(-1===o||i<0||i>=t.length)return;const s=t[i];s.setAllowFocus?.(!0),setTimeout(()=>{s.setAllowFocus?.(!1)})}isFocusable(){const e=this.beans;return!Ns(e)||!_i(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const i=Fe(this.beans),o=e.findIndex(n=>n.getGui().contains(i));return{indexWithFocus:o,nextIndex:o+(t?-1:1)}}focusContainer(e,t){e.setAllowFocus?.(!0);const i=Bi(e.getGui(),t,!1,!0);return e.setAllowFocus?.(!1),i}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},FC=class extends Wd{constructor(e){super(),this.gridBody=V,this.sideBar=V,this.pagination=V,this.rootWrapperBody=V,this.eGridDiv=e}postConstruct(){const e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:n=>this.addCss(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 EC),i=t.getOptionalSelectors(),o=this.createTemplate(i),s=[xC,...Object.values(i).filter(n=>!!n)];this.setTemplate(o,s),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(()=>{e.remove(),mi(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){const i=this.rootWrapperBody.classList,{AUTO_HEIGHT:o,NORMAL:s,PRINT:n}=zt,{autoHeight:r,normal:a,print:l}=t;i.toggle(o,r),i.toggle(s,a),i.toggle(n,l),this.toggleCss(o,r),this.toggleCss(s,a),this.toggleCss(n,l)}createTemplate(e){return{tag:"div",cls:"ag-root-wrapper",role:"presentation",children:[e.gridHeaderDropZonesSelector?{tag:"ag-grid-header-drop-zones"}:null,{tag:"div",ref:"rootWrapperBody",cls:"ag-root-wrapper-body",role:"presentation",children:[{tag:"ag-grid-body",ref:"gridBody"},e.sideBarSelector?{tag:"ag-side-bar",ref:"sideBar"}:null]},e.statusBarSelector?{tag:"ag-status-bar"}:null,e.paginationSelector?{tag:"ag-pagination",ref:"pagination"}:null,e.watermarkSelector?{tag:"ag-watermark"}:null]}}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){e||!this.pagination?.isDisplayed()?super.forceFocusOutOfContainer(e):this.pagination.forceFocusOutOfContainer(e)}getFocusableContainers(){const e=[this.gridBody];for(const t of[this.sideBar,this.pagination])t&&e.push(t);return e.filter(t=>$e(t.getGui()))}},ne=(e,t)=>{for(const i of Object.keys(t))t[i]=e;return t},jd={dispatchEvent:"CommunityCore",...ne("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...ne("GridState",{getState:0,setState:0}),...ne("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...ne("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...ne("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...ne("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...ne("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...ne("ValueCache",{expireValueCache:0}),...ne("CellApi",{getCellValue:0}),...ne("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...ne("Sort",{onSortChanged:0}),...ne("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...ne("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...ne("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...ne("HighlightChanges",{flashCells:0}),...ne("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...ne("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}),...ne("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...ne("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...ne("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...ne("ColumnResize",{setColumnWidths:0}),...ne("ColumnHover",{isColumnHovered:0}),...ne("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...ne("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...ne("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...ne("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...ne("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...ne("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...ne("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...ne("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...ne("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0}),...ne("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...ne("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0,onRowHeightChanged:0,resetRowHeights:0}),...ne("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...ne("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...ne("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...ne("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...ne("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...ne("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...ne("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...ne("ContextMenu",{showContextMenu:0}),...ne("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...ne("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...ne("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...ne("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...ne("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}),...ne("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...ne("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...ne("StatusBar",{getStatusPanel:0}),...ne("AiToolkit",{getStructuredSchema:0})},kr={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},PC=(e,t)=>e.eventSvc.dispatchEvent(t),Kd=class{};function Yd(e,t){e.gos.updateGridOptions({options:t})}Reflect.defineProperty(Kd,"name",{value:"GridApi"});var LC={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},WC={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},UC=class extends Re{constructor(e,t,i,o,s,n=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=i,this.customGui=o,this.dragStartPixels=s,this.alwaysVisible=n,this.dragSource=null}isCustomGui(){return null!=this.customGui}postConstruct(){const{beans:e,customGui:t}=this;t?this.setDragElement(t,this.dragStartPixels):(this.setTemplate(WC),this.getGui().appendChild(Ot("rowDrag",e,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){const{beans:e,gos:t,rowNode:i}=this,o=this.refreshVisibility.bind(this);this.addManagedPropertyListener("suppressRowDrag",o),this.addManagedListeners(i,{dataChanged:o,cellChanged:o}),this.addManagedListeners(e.eventSvc,t.get("rowDragManaged")?{sortChanged:o,filterChanged:o,columnRowGroupChanged:o,newColumnsLoaded:o}:{newColumnsLoaded:o})}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}refreshVisibility(){if(this.alwaysVisible)return;const e={skipAriaHidden:!0};if(this.isNeverDisplayed())return void this.setDisplayed(!1,e);const t=this.column;let i="function"==typeof t?.getColDef().rowDrag,o=!t||this.isCustomGui()||t.isRowDrag(this.rowNode);o&&this.rowNode.footer&&this.gos.get("rowDragManaged")&&(o=!1,i=!0),this.setDisplayed(i||o,e),this.setVisible(o,e)}isNeverDisplayed(){const{gos:e,beans:t}=this;return!!(e.get("suppressRowDrag")||e.get("rowDragManaged")&&t.rowDragSvc.rowDragFeature?.shouldPreventRowMove()&&!t.dragAndDrop?.hasExternalDropZones())}getSelectedNodes(){const e=this.rowNode;if(!this.gos.get("rowDragMultiRow"))return[e];const i=this.beans.selectionSvc?.getSelectedNodes()??[];return-1!==i.indexOf(e)?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){if(this.dragSource&&this.removeDragSource(),this.gos.get("rowDragManaged")&&this.rowNode.footer)return;const t=this.getGui();this.gos.get("enableCellTextSelection")&&(this.removeMouseDownListener(),this.mouseDownListener=this.addManagedElementListeners(t,{mousedown:o=>{o?.preventDefault()}})[0]);const i=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:o=>{const s=o?.dragItem||this.getDragItem(),n=(o?.dropTarget?.rows.length??s.rowNodes?.length)||1,r=this.getRowDragText(this.column);return r?r(s,n):1===n?this.cellValueFn():`${n} ${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)}},Ws=class{constructor(){this.reordered=!1,this.removals=new Set,this.updates=new Set,this.adds=new Set}};function Qd(e,t){return e.column===t.column&&e.rowPinned===t.rowPinned&&e.rowIndex===t.rowIndex}function ui(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 uo(e,t){const i=e.spannedRowRenderer?.getCellByPosition(t);if(i)return i;const o=e.rowRenderer.getRowByPosition(t);return o?o.getCellCtrl(t.column):null}function Us(e,t,i=!1){const{rowIndex:o,rowPinned:s}=t,{pageBounds:n,pinnedRowModel:r,rowModel:a}=e;return 0===o?"top"===s?null:"bottom"===s&&a.isRowsToRender()?{rowIndex:n.getLastRow(),rowPinned:null}:r?.isRowsToRender("top")?{rowIndex:r.getPinnedTopRowCount()-1,rowPinned:"top"}:null:i?Zd(e,s?void 0:a.getRow(o),!0)??{rowIndex:o-1,rowPinned:s}:{rowIndex:o-1,rowPinned:s}}function Xd(e,t,i=!1){const{rowIndex:o,rowPinned:s}=t,{pageBounds:n,pinnedRowModel:r,rowModel:a}=e;return function XC(e,t){const{rowPinned:i,rowIndex:o}=t,{pinnedRowModel:s,pageBounds:n}=e;return"top"===i?(s?.getPinnedTopRowCount()??0)-1<=o:"bottom"===i?(s?.getPinnedBottomRowCount()??0)-1<=o:n.getLastRow()<=o}(e,t)?"bottom"===s?null:"top"===s&&a.isRowsToRender()?{rowIndex:n.getFirstRow(),rowPinned:null}:r?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null:i?Zd(e,s?void 0:a.getRow(o))??{rowIndex:o+1,rowPinned:s}:{rowIndex:o+1,rowPinned:s}}function Zd(e,t,i=!1){const{gos:o,rowRenderer:s}=e;if(!t?.sticky||!Xa(o))return;const n=s.getStickyTopRowCtrls(),r=s.getStickyBottomRowCtrls(),a=!r.some(u=>u.rowNode.rowIndex===t.rowIndex),l=a?n:r,d=(i?-1:1)*(a?-1:1);let c;for(let u=0;u<l.length;u++)if(l[u].rowNode.rowIndex===t.rowIndex){c=l[u+d];break}return c?{rowIndex:c.rowNode.rowIndex,rowPinned:null}:void 0}var Ko=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:o}=e;if(o)for(let s=0;s<o.length;++s)this.depthFirstSearchChangedPath(o[s],t);t(i)}depthFirstSearchEverything(e,t,i){const o=e.childrenAfterGroup;if(o)for(let s=0,n=o.length;s<n;++s){const r=o[s];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];)this.mapToItems[t.id]={rowNode:t,children:null},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]={});for(const o of t)this.nodeIdsToColumns[i.id][o.getId()]=!0;i=i.parent}}linkPathItems(e,t){let i=e;for(let o=0;o<t;o++){const s=this.mapToItems[i.id],n=this.mapToItems[i.parent.id];n.children||(n.children=[]),n.children.push(s),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(s=>i[s.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const i=this.nodeIdsToColumns[e.id];return t.filter(s=>!i[s.getId()])}},ZC=class{constructor(e,t){this.beans=e,this.groupThrottled=!1,this.scrollChanged=!1,this.scrollChanging=!1,this.oldVScroll=null,this.groupTimer=null,this.groupTarget=null,this.onGroupThrottle=()=>{this.groupTimer=null,this.groupThrottled=!0,this.beans.dragAndDrop?.nudge()};const i=()=>t.scrollFeature.getVScrollPosition().top;this.autoScroll=new rC({scrollContainer:t.eBodyViewport,scrollAxis:"y",getVerticalPosition:i,setVerticalPosition:o=>t.scrollFeature.setVerticalScrollPosition(o),onScrollCallback:()=>{const o=i();if(this.oldVScroll!==o)return this.oldVScroll=o,void(this.scrollChanging=!0);const s=this.scrollChanging;this.scrollChanged=s,this.scrollChanging=!1,s&&(this.beans.dragAndDrop?.nudge(),this.scrollChanged=!1)}})}updateGroup(e,t){this.groupTarget&&this.groupTarget!==e&&this.clearGroup(),e&&(t&&this.groupThrottled&&!e.expanded&&e.childrenAfterSort?.length&&e.isExpandable()&&e.setExpanded(!0,void 0,!0),e.expanded&&e.childrenAfterSort?.length&&(this.groupThrottled=!0,this.groupTarget=e))}startGroup(e){this.groupTarget=e,null===this.groupTimer&&(this.groupTimer=window.setTimeout(this.onGroupThrottle,this.beans.gos.get("rowDragInsertDelay")))}clearGroup(){this.groupThrottled=!1,this.groupTarget=null;const e=this.groupTimer;null!==e&&(this.groupTimer=null,window.clearTimeout(e))}clear(){this.clearGroup(),this.autoScroll.ensureCleared(),this.oldVScroll=null,this.scrollChanged=!1,this.scrollChanging=!1}},JC=class extends M{constructor(e){super(),this.eContainer=e,this.lastDraggingEvent=null,this.nudger=null}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,t=>{this.nudger=new ZC(e,t.gridBodyCtrl)})}destroy(){super.destroy(),this.nudger?.clear(),this.nudger=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(e){return 2===e}getIconName(e){return!1===e?.dropTarget?.allowed||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 i=this.beans.selectionSvc?.getSelectedNodes();if(i&&i.indexOf(t)>=0)return i.slice().sort(iv)}return[t]}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){const{lastDraggingEvent:i,beans:o}=this;if(t){const r=this.getRowNodes(e);e.dragItem.rowNodes=r,tc(r,!0)}this.lastDraggingEvent=e;const s=e.fromNudge,n=this.makeRowsDrop(i,e,s,!1);o.rowDropHighlightSvc?.fromDrag(e),t&&this.dispatchGridEvent("rowDragEnter",e),this.dispatchGridEvent("rowDragMove",e),n?.rowDragManaged&&n.moved&&n.allowed&&n.sameGrid&&!n.suppressMoveWhenRowDragging&&(!s&&!this.nudger?.autoScroll.scrolling||this.nudger?.scrollChanged)&&this.dropRows(n),this.nudger?.autoScroll.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,i,o){const{beans:s,gos:n}=this,r=this.newRowsDrop(t,o),a=s.rowModel;if(t.dropTarget=r,t.changed=!1,!r)return null;let{sameGrid:l,rootNode:d,source:c,target:u,rows:h}=r;u??(u=a.getRow(a.getRowCount()-1)??null);const g=!!this.beans.groupStage?.treeData&&l;let p=null;if(u?.footer){const R=$s(a,-1,u)??$s(a,1,u);p=u.sibling??d,u=R??null}u?.detail&&(u=u.parent),r.moved&&(r.moved=c!==u);let f=.5;if(u&&(f=l&&r.moved&&(p||!g)?c.rowIndex>u.rowIndex?-.5:.5:(r.y-u.rowTop-u.rowHeight/2)/u.rowHeight||0),!g&&l&&u&&r.moved&&je(n)){const R=ov(a,r);R&&(f=c.rowIndex>R.rowIndex?-.5:.5,u=R,r.moved&&(r.moved=c!==u))}const m=this.nudger;m?.updateGroup(u,i),g&&!p&&m&&(!u||f>=.5&&u.rowIndex===s.pageBounds.getLastRow()?p=d:r.moved&&this.targetShouldBeParent(u,f,h)&&(m.groupThrottled&&(p=u),!i&&(!p||u&&!u.expanded&&u.childrenAfterSort?.length)&&m.startGroup(u)),p??(p=u?.parent??d));let w=!1;if(p){if(p===u&&p!==d){const R=p.expanded?$s(a,1,u):null;R?.parent===p?(u=R,f=-.5):w=!0}if(u&&!w){let R=u;for(;R&&R!==d&&R!==p;)u=R,R=R.parent}}r.target=u,r.newParent=p,r.moved&&(r.moved=c!==u);const b=f<0?"above":"below";return r.position=r.moved?w?"inside":b:"none",this.validateRowsDrop(r,g,b,o),t.changed||(t.changed=tv(e?.dropTarget,r)),r}newRowsDrop(e,t){const{beans:i,gos:o}=this,s=i.rowModel.rootNode,n=!!je(o)&&o.get("rowDragManaged"),r=o.get("suppressMoveWhenRowDragging"),a=this.isFromThisGrid(e);let{rowNode:l,rowNodes:d}=e.dragItem;if(d||(d=l?[l]:[]),l||(l=d[0]),!l||!s)return null;const c=this.beans.dragAndDrop.isDropZoneWithinThisGrid(e);let u=!0;n&&(!d.length||this.shouldPreventRowMove()||(r||!a)&&!c)&&(u=!1);const h=Rd(i,e).y,g=this.getOverNode(h);return{api:i.gridApi,context:i.gridOptions.context,draggingEvent:e,rowDragManaged:n,suppressMoveWhenRowDragging:r,sameGrid:a,withinGrid:c,rootNode:s,moved:l!==g,y:h,overNode:g,overIndex:g?.rowIndex??-1,position:"none",source:l,target:g??null,newParent:null,rows:d,allowed:u,highlight:!t&&n&&r&&(c||!a)}}validateRowsDrop(e,t,i,o){const{rowDragManaged:s,suppressMoveWhenRowDragging:n}=e;t||(e.newParent=null),n&&!e.moved&&(e.allowed=!1);const r=(!s||e.allowed)&&this.gos.get("isRowValidDropPosition");if(r){t&&e.newParent&&Jd(e.rows,e.newParent)&&(e.newParent=null);const a=r(e);if(a){if("object"==typeof a){void 0!==a.rows&&(e.rows=a.rows??[]),t&&void 0!==a.newParent&&(e.newParent=a.newParent),void 0!==a.target&&(e.target=a.target),a.position&&(e.position=a.position),void 0!==a.allowed?e.allowed=a.allowed:s||(e.allowed=!0);const l=e.draggingEvent;a.changed&&l&&(l.changed=!0),!o&&void 0!==a.highlight&&(e.highlight=a.highlight)}}else e.allowed=!1}s&&(e.rows=this.filterRows(e)),t&&e.newParent&&Jd(e.rows,e.newParent)&&(e.newParent=null),n&&(!e.rows.length||"none"===e.position)&&(e.allowed=!1),(!e.allowed||!e.newParent)&&"inside"===e.position&&(e.position=i)}targetShouldBeParent(e,t,i){if(t<-.25)return!1;if(t<.25)return!0;let n,r=e.rowIndex+1;const a=this.beans.rowModel;do{n=a.getRow(r++)}while(n?.footer);const l=e.childrenAfterGroup;if(n&&n.parent===e&&l?.length){const d=new Set(i);for(const c of l)if(null!==c.rowIndex&&!d.has(c))return!0}return!1}addRowDropZone(e){if(!e.getContainer())return void I(55);const t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer()))return void I(56);const o={isInterestedIn:s=>2===s,getIconName:()=>"move",external:!0,...e.fromGrid?e:{getContainer:e.getContainer,onDragEnter:e.onDragEnter&&(s=>e.onDragEnter(this.rowDragEvent("rowDragEnter",s))),onDragLeave:e.onDragLeave&&(s=>e.onDragLeave(this.rowDragEvent("rowDragLeave",s))),onDragging:e.onDragging&&(s=>e.onDragging(this.rowDragEvent("rowDragMove",s))),onDragStop:e.onDragStop&&(s=>e.onDragStop(this.rowDragEvent("rowDragEnd",s))),onDragCancel:e.onDragCancel&&(s=>e.onDragCancel(this.rowDragEvent("rowDragCancel",s)))}};t.addDropTarget(o),this.addDestroyFunc(()=>t.removeDropTarget(o))}getRowDropZone(e){return{getContainer:this.getContainer.bind(this),onDragEnter:i=>{this.onDragEnter(i),e?.onDragEnter?.(this.rowDragEvent("rowDragEnter",i))},onDragLeave:i=>{this.onDragLeave(i),e?.onDragLeave?.(this.rowDragEvent("rowDragLeave",i))},onDragging:i=>{this.onDragging(i),e?.onDragging?.(this.rowDragEvent("rowDragMove",i))},onDragStop:i=>{this.onDragStop(i),e?.onDragStop?.(this.rowDragEvent("rowDragEnd",i))},onDragCancel:i=>{this.onDragCancel(i),e?.onDragCancel?.(this.rowDragEvent("rowDragCancel",i))},fromGrid:!0}}getOverNode(e){const{pageBounds:t,rowModel:i}=this.beans,s=e>t.getCurrentPagePixelRange().pageLastPixel?-1:i.getRowIndexAtPixel(e);return s>=0?i.getRow(s):void 0}rowDragEvent(e,t){const i=this.beans,{dragItem:o,dropTarget:s,event:n,vDirection:r}=t,a=s?.rootNode===i.rowModel.rootNode,l=a?s.y:Rd(i,t).y,d=a?s.overNode:this.getOverNode(l);return{api:i.gridApi,context:i.gridOptions.context,type:e,event:n,node:o.rowNode,nodes:o.rowNodes,overIndex:a?s.overIndex:d?.rowIndex??-1,overNode:d,y:l,vDirection:r,rowsDrop:s}}dispatchGridEvent(e,t){const i=this.rowDragEvent(e,t);this.eventSvc.dispatchEvent(i)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e)}onDragStop(e){const t=this.makeRowsDrop(this.lastDraggingEvent,e,!1,!0);this.dispatchGridEvent("rowDragEnd",e),t?.allowed&&t.rowDragManaged&&(t.suppressMoveWhenRowDragging||!t.sameGrid||this.nudger?.autoScroll.scrolling)&&this.dropRows(t),this.stopDragging(e)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e)}stopDragging(e){this.nudger?.clear(),this.beans.rowDropHighlightSvc?.fromDrag(null),tc(e.dragItem.rowNodes,!1)}dropRows(e){return e.sameGrid?this.csrmMoveRows(e):this.csrmAddRows(e)}csrmAddRows({position:e,target:t,rows:i}){const o=Zi(this.gos),s=this.beans.rowModel,n=i.filter(({data:a,rowPinned:l})=>!s.getRowNode(o?.({data:a,level:0,rowPinned:l})??a.id)).map(({data:a})=>a);if(0===n.length)return!1;const r=t?ec(t)+("above"===e?0:1):void 0;return s.updateRowData({add:n,addIndex:r}),!0}filterRows({newParent:e,rows:t}){let i;for(let o=0,s=t.length;o<s;++o){let n=!0;const r=t[o];(!r||r.footer||null===r.rowTop&&r!==this.beans.rowModel.getRowNode(r.id)||e&&r.parent!==e&&ev(r,e)||!Ar(r))&&(n=!1),n?i?.push(r):i??(i=t.slice(0,o))}return i??t}csrmMoveRows({position:e,target:t,rows:i,newParent:o,rootNode:s}){let n=!1;const r=new Set;for(const h of i){o&&h.parent!==o&&(h.treeParent=o,n=!0);const g=Ar(h);g&&r.add(g)}if(!n&&0===r.size)return!1;const a=this.beans.focusSvc,l=a.getFocusedCell(),d=l&&uo(this.beans,l);if(r.size&&this.reorderLeafChildren(r,...this.getMoveRowsBounds(r,t,"above"===e))&&(n=!0),!n)return!1;const c=this.beans.rowModel,u=new Ws;return u.reordered=!0,c.refreshModel({step:"group",keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedPath:new Ko(!1,s),changedRowNodes:u}),d?d.focusCell():a.clearFocusedCell(),!0}getMoveRowsBounds(e,t,i){const o=this.beans.rowModel.rootNode?._leafs?.length??0;let s=t?ec(t):-1;s<0||s>=o?s=o:i||++s;let n=s,r=Math.min(s,o-1);for(const a of e){const l=a.sourceRowIndex;l<n&&(n=l),l>r&&(r=l)}return[n,s,r]}reorderLeafChildren(e,t,i,o){let s=!1;const n=this.beans.rowModel.rootNode?._leafs;if(!e.size||!n)return!1;let r=t;for(let l=t;l<i;++l){const d=n[l];e.has(d)||(d.sourceRowIndex!==r&&(d.sourceRowIndex=r,n[r]=d,s=!0),++r)}let a=o;for(let l=o;l>=i;--l){const d=n[l];e.has(d)||(d.sourceRowIndex!==a&&(d.sourceRowIndex=a,n[a]=d,s=!0),--a)}for(const l of e)l.sourceRowIndex!==r&&(l.sourceRowIndex=r,n[r]=l,s=!0),++r;return s}},$s=(e,t,i)=>{if(i){const o=e.getRowCount();let s=i.rowIndex+t;for(;s>=0&&s<o;){const n=e.getRow(s);if(!n||!n.footer&&!n.detail)return n;s+=t}}},ev=(e,t)=>{let i=t;for(;i;){if(i===e)return!0;i=i.parent}return!1},Jd=(e,t)=>{for(let i=0,o=e.length;i<o;++i)if(e[i].parent!==t)return!1;return!0},ec=e=>{const t=Ar(e);return void 0!==t?t.sourceRowIndex:-1},Ar=e=>e.data?e:id(e.childrenAfterGroup),tv=(e,t)=>!(e===t||e&&e.sameGrid===t.sameGrid&&e.allowed===t.allowed&&e.position===t.position&&e.target===t.target&&e.source===t.source&&e.newParent===t.newParent&&bi(e.rows,t.rows)),iv=({rowIndex:e},{rowIndex:t})=>null!==e&&null!==t?e-t:0,tc=(e,t)=>{for(let i=0,o=e?.length||0;i<o;++i){const s=e[i];s.dragging!==t&&(s.dragging=t,s.dispatchRowEvent("draggingChanged"))}},ov=(e,t)=>{let i=null,o=t.target;if(o&&t.rows.indexOf(o)<0)return null;const s=t.source;if(!o||!s)return null;let n=o.rowIndex-s.rowIndex;const r=n<0?-1:1;n=t.suppressMoveWhenRowDragging?Math.abs(n):1;const a=new Set(t.rows);do{const l=$s(e,r,o);if(!l)break;a.has(l)||(i=l,--n),o=l}while(n>0);return i},ic={moduleName:"Drag",version:G,beans:[class extends ef{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}}]},rv={moduleName:"DragAndDrop",version:G,dynamicBeans:{dndSourceComp:class extends Re{constructor(e,t,i){super(LC),this.rowNode=e,this.column=t,this.eCell=i}postConstruct(){this.getGui().appendChild(Ot("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:o,gos:s}=this,n=i.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(o,0,0),n)n(ee(s,{rowNode:t,dragEvent:e}));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)}}},icons:{rowDrag:"grip"}},oc={moduleName:"SharedDragAndDrop",version:G,beans:[class extends tf{createEvent(e){return ee(this.gos,e)}createDragImageComp(e){const{gos:t,beans:i}=this;return function Rg(e,t){return e.getCompDetailsFromGridOptions(ng,"agDragAndDropImage",t,!0)}(i.userCompFactory,ee(t,{dragSource:e}))?.newAgStackInstance()}handleEnter(e,t){e?.onGridEnter?.(t)}handleExit(e,t){e?.onGridExit?.(t)}warnNoBody(){I(54)}isDropZoneWithinThisGrid(e){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(e.dropZoneTarget)}registerGridDropTarget(e,t){const i={getContainer:e,isInterestedIn:o=>1===o||0===o,getIconName:()=>"notAllowed"};this.addDropTarget(i),t.addDestroyFunc(()=>this.removeDropTarget(i))}}],dependsOn:[ic],userComponents:{agDragAndDropImage:class extends Re{constructor(){super(),this.dragSource=null,this.eIcon=V,this.eLabel=V,this.eGhost=V,this.registerCSS(".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}.ag-dnd-ghost-not-allowed{border:var(--ag-drag-and-drop-image-not-allowed-border)}")}postConstruct(){const e=t=>function Im(e,t,i){const o=Ot(e,t,i);if(o){const{className:n}=o;if("string"==typeof n&&n.includes("ag-icon")||"object"==typeof n&&n["ag-icon"])return o}const s=Ye({tag:"span"});return s.appendChild(o),s}(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(Om),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eGhost:i,eIcon:o,dragSource:s,dropIconMap:n,gos:r}=this;Ue(o);let a=null;e||(e=s?.getDefaultIconName?s.getDefaultIconName():"notAllowed"),a=n[e],i.classList.toggle("ag-dnd-ghost-not-allowed","notAllowed"===e),o.classList.toggle("ag-shake-left-to-right",t),(a!==n.hide||!r.get("suppressDragLeaveHidesColumns"))&&a&&o.appendChild(a)}setLabel(e){this.eLabel.textContent=e}}},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},av={moduleName:"RowDrag",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="rowDropHighlightSvc",this.uiLevel=0,this.dragging=!1,this.row=null,this.position="none"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this)})}onModelUpdated(){const e=this.row,t=this.dragging;e&&null!==e?.rowIndex&&"none"!==this.position?this.set(e,this.position):this.clear(),this.dragging=t}destroy(){this.clear(),super.destroy()}clear(){const e=this.row;this.dragging=!1,e&&(this.uiLevel=0,this.position="none",this.row=null,e.dispatchRowEvent("rowHighlightChanged"))}set(e,t){const i=e!==this.row,o=e.uiLevel,s=t!==this.position,n=o!==this.uiLevel;this.dragging=!1,(i||s||n)&&(i&&this.clear(),this.uiLevel=o,this.position=t,this.row=e,e.dispatchRowEvent("rowHighlightChanged"))}fromDrag(e){const t=e?.dropTarget;if(t){const{highlight:i,target:o,position:s}=t;if(i&&o&&"none"!==s)return this.set(o,s),void(this.dragging=!0)}this.dragging&&this.clear()}},class extends M{constructor(){super(...arguments),this.beanName="rowDragSvc"}setupRowDrag(e,t){const i=t.createManagedBean(new JC(e)),o=this.beans.dragAndDrop;o.addDropTarget(i),t.addDestroyFunc(()=>o.removeDropTarget(i)),this.rowDragFeature=i}createRowDragComp(e,t,i,o,s,n){return new UC(e,t,i,o,s,n)}createRowDragCompForRow(e,t){if(ni(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,o,s,n){const r=this.gos;return!r.get("rowDragManaged")||je(r)&&!r.get("pagination")?this.createRowDragComp(i,e,t,o,s,n):void 0}}],apiFunctions:{addRowDropZone:function BC(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)},removeRowDropZone:function HC(e,t){const i=e.dragAndDrop?.findExternalZone(t.getContainer());i&&e.dragAndDrop?.removeDropTarget(i)},getRowDropZoneParams:function GC(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)},getRowDropPositionIndicator:function VC(e){const t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}},setRowDropPositionIndicator:function NC(e,t){const i=e.rowDropHighlightSvc;if(!i)return;const o=t?.row;let s=t?.dropIndicatorPosition;"above"!==s&&"below"!==s&&"inside"!==s&&(s="none");const n=o?.rowIndex;null==n||"none"===s?i.clear():i.set(o,s)}},dependsOn:[oc]},lv={moduleName:"HorizontalResize",version:G,beans:[class extends M{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&&!0===t.shiftKey;e.onResizeStart(i)}setResizeIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(1),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)}}],dependsOn:[ic]},gv=class extends M{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;if(t)for(const i of t)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:o}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&i?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&o?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function sc(e){const{isFromHeader:t,fromLeft:i,xPosition:o,fromEnter:s,fakeEvent:n,pinned:r,gos:a,colModel:l,colMoves:d,visibleCols:c}=e;let{allMovingColumns:u}=e;t&&(u=function fv(e){const t=[...e];for(const i of e){let o=null,s=i.getParent();for(;null!=s&&1===s.getDisplayedLeafColumns().length;)o=s,s=s.getParent();if(null!=o){const r=o.getColGroupDef()?.marryChildren?o.getProvidedColumnGroup().getLeafColumns():o.getLeafColumns();for(const a of r)t.includes(a)||t.push(a)}}return t}(u));const h=u.slice();!function pv(e,t){!t||t.length<=1||t.filter(o=>e.indexOf(o)<0).length>0||t.sort((o,s)=>e.indexOf(o)-e.indexOf(s))}(l.getCols(),h);const g=function bv(e){const{movingCols:t,draggingRight:i,xPosition:o,pinned:s,gos:n,colModel:r,visibleCols:a}=e;if(n.get("suppressMovableColumns")||t.some(R=>R.getColDef().suppressMovable))return[];const d=function wv(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}(a,s),c=r.getCols(),u=d.filter(R=>t.includes(R)),h=d.filter(R=>!t.includes(R)),g=c.filter(R=>!t.includes(R));let m,p=0,f=o;if(i){let R=0;for(const T of u)R+=T.getActualWidth();f-=R}if(f>0){for(let R=0;R<h.length&&(f-=h[R].getActualWidth(),!(f<0));R++)p++;i&&p++}p>0?m=g.indexOf(h[p-1])+1:(m=g.indexOf(h[0]),-1===m&&(m=0));const w=[m],b=(R,T)=>R-T;if(i){let R=m+1;const T=c.length-1;for(;R<=T;)w.push(R),R++;w.sort(b)}else{let R=m;const T=c.length-1;let k=c[R];for(;R<=T&&d.indexOf(k)<0;)R++,w.push(R),k=c[R];R=m-1;const L=0;for(;R>=L;)w.push(R),R--;w.sort(b).reverse()}return w}({movingCols:h,draggingRight:i,xPosition:o,pinned:r,gos:a,colModel:l,visibleCols:c}),p=function Cv(e,t){const i=t.getCols(),o=e.map(l=>i.indexOf(l)).sort((l,d)=>l-d),s=o[0];return Ae(o)-s!==o.length-1?null:s}(h,l);if(0===g.length)return;const f=g[0];if(null!==p&&(t||!s)&&!n&&(!i&&f>=p||i&&f<=p))return;const w=function mv(e,t,i,o){const s=o.allCols;let n=null,r=null;for(let a=0;a<e.length;a++){const l=e[a],d=i.getProposedColumnOrder(t,l);if(!i.doesOrderPassRules(d))continue;const c=d.filter(h=>s.includes(h));if(null===r)r=c;else if(!bi(c,r))break;const u=vv(d);(null===n||u<n.fragCount)&&(n={move:l,fragCount:u})}return n}(g,h,d,c);if(!w)return;const b=w.move;return b>l.getCols().length-h.length?void 0:{columns:h,toIndex:b}}function nc(e){const{columns:t,toIndex:i}=sc(e)||{},{finished:o,colMoves:s}=e;return t&&null!=i?(s.moveColumns(t,i,"uiColumnMoved",o),o?null:{columns:t,toIndex:i}):null}function vv(e){function t(o){const s=[];let n=o.getOriginalParent();for(;null!=n;)s.push(n),n=n.getOriginalParent();return s}let i=0;for(let o=0;o<e.length-1;o++){let s=t(e[o]),n=t(e[o+1]);[s,n]=s.length>n.length?[s,n]:[n,s];for(const r of s)-1===n.indexOf(r)&&i++}return i}function Ir(e){const{pinned:t,fromKeyboard:i,gos:o,ctrlsSvc:s,useHeaderRow:n,skipScrollPadding:r}=e;let a=s.getHeaderRowContainerCtrl(t)?.eViewport,{x:l}=e;return a?(i&&(l-=a.getBoundingClientRect().left),o.get("enableRtl")&&(n&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),null==t&&!r&&(l+=s.get("center").getCenterViewportScrollLeft()),l):0}function Lr(e,t){for(const i of e)i.moving=t,i.dispatchColEvent("movingChanged","uiColumnMoved")}var Rv=class extends M{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!C(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,{dragItem:i}=t||{},o=i?.columns??[];for(const s of o){const n=s.getPinned();if(s.getColDef().lockPinned){if(n==e)return"move";continue}const r=i?.containerType;if(r===e||!e)return"move";if(e&&(!n||r!==e))return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,i=t.columns;if(0===e.dragSource.type)this.setColumnsVisible(i,!0,"uiColumnDragged");else{const s=t.visibleState,n=(i||[]).filter(r=>s[r.getId()]&&!r.isVisible());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,o=!1){const{gos:s,ctrlsSvc:n}=this.beans,r=s.get("suppressMoveWhenColumnDragging");if(o&&!r)return void this.finishColumnMoving();if(this.lastDraggingEvent=e,!e||!o&&q(e.hDirection))return;const a=Ir({x:e.x,pinned:this.pinned,gos:s,ctrlsSvc:n});t||this.checkCenterForScrolling(a),r?this.handleColumnDragWhileSuppressingMovement(e,t,i,a,o):this.handleColumnDragWhileAllowingMovement(e,t,i,a,o)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),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?.length)return;const o=e.filter(s=>!s.getColDef().lockVisible);o.length&&this.beans.colModel.setColsVisible(o,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)}updateDragItemContainerType(){const{lastDraggingEvent:e}=this;if(this.gos.get("suppressMoveWhenColumnDragging")||!e)return;const t=e.dragItem;t&&(t.containerType=this.pinned)}handleColumnDragWhileSuppressingMovement(e,t,i,o,s){const n=this.getAllMovingColumns(e,!0);if(s){const r=this.isAttemptingToPin(n);r&&this.attemptToPinColumns(n,void 0,!0);const{fromLeft:a,xPosition:l}=this.getNormalisedXPositionInfo(n,r)||{};if(null==a||null==l)return void this.finishColumnMoving();this.moveColumnsAfterHighlight({allMovingColumns:n,xPosition:l,fromEnter:t,fakeEvent:i,fromLeft:a})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(n,o)}}handleColumnDragWhileAllowingMovement(e,t,i,o,s){const n=this.getAllMovingColumns(e),r="right"===this.normaliseDirection(e.hDirection),d=nc({...this.getMoveColumnParams({allMovingColumns:n,isFromHeader:1===e.dragSource.type,xPosition:o,fromLeft:r,fromEnter:t,fakeEvent:i}),finished:s});d&&(this.lastMovedInfo=d)}getAllMovingColumns(e,t=!1){const i=e.dragSource.getDragItem();let o=null;return t?(o=i.columnsInSplit,o||(o=i.columns)):o=i.columns,o?o.filter(n=>!n.getColDef().lockPinned||n.getPinned()==this.pinned):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:i,xPosition:o,fromLeft:s,fromEnter:n,fakeEvent:r}=e,{gos:a,colModel:l,colMoves:d,visibleCols:c}=this.beans;return{allMovingColumns:t,isFromHeader:i,fromLeft:s,xPosition:o,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:a,colModel:l,colMoves:d,visibleCols:c}}highlightHoveredColumn(e,t){const{gos:i,colModel:o}=this.beans,s=i.get("enableRtl"),n=o.getCols().filter(c=>c.isVisible()&&c.getPinned()===this.pinned);let d,r=null,a=null,l=null;for(const c of n){if(a=c.getActualWidth(),r=this.getNormalisedColumnLeft(c,0,s),null!=r&&r<=t&&r+a>=t){l=c;break}r=null,a=null}if(l)-1!==e.indexOf(l)&&(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=Ae(g);break}}if(!l)return;r=this.getNormalisedColumnLeft(l,0,s),a=l.getActualWidth()}this.lastHighlightedColumn?.column!==l&&this.clearHighlighted(),null!=l&&null!=r&&null!=a&&(d=t-r<a/2!==s?0:1,ac(l,d),this.lastHighlightedColumn={column:l,position:d})}getNormalisedXPositionInfo(e,t){const{gos:i,visibleCols:o}=this.beans,s=i.get("enableRtl"),{firstMovingCol:n,column:r,position:a}=this.getColumnMoveAndTargetInfo(e,t,s);if(!n||!r||null==a)return;const l=o.allCols,d=l.indexOf(n),c=l.indexOf(r),u=0===a!==s,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];return p?{fromLeft:h,xPosition:this.getNormalisedColumnLeft(p,20,s)}:void 0}getColumnMoveAndTargetInfo(e,t,i){const o=this.lastHighlightedColumn||{},{firstMovingCol:s,lastMovingCol:n}=function xv(e){const t=e.length;let i,o;for(let s=0;s<t;s++){if(!i){const n=e[s];null!=n.getLeft()&&(i=n)}if(!o){const n=e[t-1-s];null!=n.getLeft()&&(o=n)}if(i&&o)break}return{firstMovingCol:i,lastMovingCol:o}}(e);if(!s||!n||o.column||!t)return{firstMovingCol:s,...o};const a="left"===this.getPinDirection();return{firstMovingCol:s,position:a?1:0,column:a!==i?s: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:o,ctrlsSvc:s}=this.beans,n=e.getLeft();if(null==n)return null;const r=e.getActualWidth();return Ir({x:i?n+r-t:n+t,pinned:e.getPinned(),useHeaderRow:i,skipScrollPadding:!0,gos:o,ctrlsSvc:s})}isAttemptingToPin(e){return(this.needToMoveLeft||this.needToMoveRight)&&this.failedMoveAttempts>7||e.some(o=>o.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:i,fromEnter:o,fakeEvent:s,fromLeft:n}=e,r=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:i,fromLeft:n,fromEnter:o,fakeEvent:s}),{columns:a,toIndex:l}=sc(r)||{};a&&null!=l&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(ac(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),i=t.getCenterViewportScrollLeft(),o=i+t.getCenterWidth();let s,n;this.gos.get("enableRtl")?(s=e<i+50,n=e>o-50):(n=e<i+50,s=e>o-50),this.needToMoveRight=s,this.needToMoveLeft=n,n||s?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.beans.dragAndDrop.setDragImageCompIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.setDragImageCompIcon(this.getIconName()))}moveInterval(){let e;this.intervalCount++,e=10+5*this.intervalCount,e>100&&(e=100);let t=null;const i=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=i.scrollHorizontally(-e):this.needToMoveRight&&(t=i.scrollHorizontally(e)),0!==t)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{pinnedCols:o,dragAndDrop:s,gos:n}=this.beans;if(this.failedMoveAttempts<=8||!o)return;if(s.setDragImageCompIcon("pinned"),!n.get("suppressMoveWhenColumnDragging")){const r=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(r,void 0,!0)}}}getPinDirection(){return this.needToMoveLeft||"left"===this.pinned?"left":this.needToMoveRight||"right"===this.pinned?"right":void 0}attemptToPinColumns(e,t,i=!1){const o=(e||[]).filter(r=>!r.getColDef().lockPinned);if(!o.length)return 0;i&&(t=this.getPinDirection());const{pinnedCols:s,dragAndDrop:n}=this.beans;return s?.setColsPinned(o,t,"uiColumnDragged"),i&&n.nudge(),o.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function ac(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}var Ev=class extends M{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans,i=this.pinned;e.whenReady(this,o=>{let s;const n=o.gridBodyCtrl.eBodyViewport;switch(i){case"left":s=[[n,o.left.eContainer],[o.bottomLeft.eContainer],[o.topLeft.eContainer]];break;case"right":s=[[n,o.right.eContainer],[o.bottomRight.eContainer],[o.topRight.eContainer]];break;default:s=[[n,o.center.eViewport],[o.bottomCenter.eViewport],[o.topCenter.eViewport]]}this.eSecondaryContainers=s}),this.moveColumnFeature=this.createManagedBean(new Rv(i)),this.bodyDropPivotTarget=this.createManagedBean(new gv(i)),t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return 1===e||0===e&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&0===e.dragSource.type}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()}},Tv={moduleName:"ColumnMove",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,i){const o=this.beans.colModel.getCols();o&&this.moveColumns([o[e]],t,i)}moveColumns(e,t,i,o=!0){const{colModel:s,colAnimation:n,visibleCols:r,eventSvc:a}=this.beans,l=s.getCols();if(!l)return;if(t>l.length-e.length)return void I(30,{toIndex:t});n?.start();const d=s.getColsForKeys(e);this.doesMovePassRules(d,t)&&(rl(s.getCols(),d,t),r.refresh(i),a.dispatchEvent({type:"columnMoved",columns:d,column:1===d.length?d[0]:null,toIndex:t,finished:o,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!(!fl(e,t.getColTree())||!(s=>{const n=d=>d?"left"===d||!0===d?-1:1:0,r=i.get("enableRtl");let a=r?1:-1,l=!0;for(const d of s){const c=n(d.getColDef().lockPosition);r?c>a&&(l=!1):c<a&&(l=!1),a=c}return l})(e))}getProposedColumnOrder(e,t){const o=this.beans.colModel.getCols().slice();return rl(o,e,t),o}createBodyDropTarget(e,t){return new Ev(e,t)}moveHeader(e,t,i,o,s){const{ctrlsSvc:n,gos:r,colModel:a,visibleCols:l,focusSvc:d}=this.beans,c=t.getBoundingClientRect(),u=c.left,h=qe(i),g=h?c.width:i.getActualWidth(),p="left"===e!==r.get("enableRtl"),f=Ir({x:p?u-20:u+g+20,pinned:o,fromKeyboard:!0,gos:r,ctrlsSvc:n}),m=d.focusedHeader;let w;if(nc({allMovingColumns:h?i.getLeafColumns():[i],isFromHeader:!0,fromLeft:"right"===e,xPosition:f,pinned:o,fromEnter:!1,fakeEvent:!1,gos:r,colModel:a,colMoves:this,visibleCols:l,finished:!0}),h){const b=i.getDisplayedLeafColumns();w=p?b[0]:Ae(b)}else w=i;if(n.getScrollFeature().ensureColumnVisible(w,"auto"),(!s.isAlive()||r.get("ensureDomOrder"))&&m){let b;if(h){const R=i.getGroupId(),T=i.getLeafColumns();if(!T.length)return;const k=T[0].getParent();if(!k)return;b=function Pv(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}(k,R)}else b=i;b&&d.focusHeaderPosition({headerPosition:{...m,column:b}})}}setDragSourceForHeader(e,t,i){const{gos:o,colModel:s,dragAndDrop:n,visibleCols:r}=this.beans;let a=!o.get("suppressDragLeaveHidesColumns");const l=qe(t),d=l?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>function Mv(e,t){const i=e.getProvidedColumnGroup().getLeafColumns(),o={};for(const a of i)o[a.getId()]=a.isVisible();const s=[];for(const a of t)i.indexOf(a)>=0&&(s.push(a),Lt(i,a));for(const a of i)s.push(a);const n=[],r=e.getLeafColumns();for(const a of s)-1!==r.indexOf(a)&&n.push(a);return{columns:s,columnsInSplit:n,visibleState:o,containerType:n[0]?.pinned}}(t,r.allCols):()=>function Dv(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}(t),dragItemName:i,onDragStarted:()=>{a=!o.get("suppressDragLeaveHidesColumns"),Lr(d,!0)},onDragStopped:()=>Lr(d,!1),onDragCancelled:()=>Lr(d,!1),onGridEnter:h=>{if(a){const{columns:g=[],visibleState:p}=h??{},f=l?w=>!p||p[w.getColId()]:()=>!0,m=g.filter(w=>!w.getColDef().lockVisible&&f(w));s.setColsVisible(m,!0,"uiColumnMoved")}},onGridExit:h=>{if(a){const g=h?.columns?.filter(p=>!p.getColDef().lockVisible)||[];s.setColsVisible(g,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}},class extends M{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:o}=this;if(0===i.length&&0===o.length)return e(),void t();const s=n=>{for(;n.length;){const r=n.pop();r&&r()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),s(i)},0),window.setTimeout(()=>{t(),s(o)},200)})}}],apiFunctions:{moveColumnByIndex:function uv(e,t,i){e.colMoves?.moveColumnByIndex(t,i,"api")},moveColumns:function hv(e,t,i){e.colMoves?.moveColumns(t,i,"api")}},dependsOn:[oc],css:[":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}}"]},lc={moduleName:"AutoWidth",version:G,beans:[class extends M{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 o=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||o.push(i),this.getPreferredWidthForElements(o)}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 o=this.centerRowContainerCtrl.eContainer;for(const n of e)this.cloneItemIntoDummy(n,i);o.appendChild(i);const s=i.offsetWidth;return i.remove(),s+(t??this.gos.get("autoSizePadding"))}getHeaderCellForColumn(e){let t=null;for(const i of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){const o=i.getHtmlElementForColumnHeader(e);null!=o&&(t=o)}return t}cloneItemIntoDummy(e,t){const i=e.cloneNode(!0);i.style.width="",i.style.position="static",i.style.left="";const o=document.createElement("div"),s=o.classList;["ag-header-cell","ag-header-group-cell"].some(a=>i.classList.contains(a))?(s.add("ag-header","ag-header-row"),o.style.position="static"):s.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];"ag-row-position-absolute"!=d&&s.add(d)}break}r=r.parentElement}o.appendChild(i),t.appendChild(o)}}]},Iv=class extends M{constructor(e,t,i,o){super(),this.comp=e,this.eResize=t,this.pinned=i,this.columnGroup=o}postConstruct(){if(!this.columnGroup.isResizable())return void this.comp.setResizableDisplayed(!1);const{horizontalResizeSvc:e,gos:t,colAutosize:i}=this.beans,o=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(o),!t.get("suppressAutoSize")&&i&&this.addDestroyFunc(i.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:i,resizeRatios:o,groupAfterColumns:s,groupAfterStartWidth:n,groupAfterRatios:r}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=i,this.resizeRatios=o,this.resizeTakeFromCols=s,this.resizeTakeFromStartWidth=n,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(e,t,i="uiColumnResized"){const o=this.normaliseDragChange(t);this.resizeColumnsFromLocalValues(this.resizeStartWidth+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),o=this.getColumnsToResize(),s=t(o),r={columnsToResize:o,resizeStartWidth:s,resizeRatios:i(o,s)};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){this.resizeCols&&this.resizeRatios&&this.resizeColumns({columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios},e,t,i)}resizeColumns(e,t,i,o=!0){const{columnsToResize:s,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:d}=e,c=[];c.push({columns:s,ratios:r,width:t}),a&&c.push({columns:a,ratios:d,width:l-(t-n)}),this.beans.colResize?.resizeColumnSets({resizeSets:c,finished:o,source:i}),o&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?"left"!==this.pinned&&(t*=-1):"right"===this.pinned&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},Lv=class extends M{constructor(e,t,i,o,s){super(),this.pinned=e,this.column=t,this.eResize=i,this.comp=o,this.ctrl=s}postConstruct(){const e=[];let t,i;const o=()=>{if(ce(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.addColumnAutosizeListeners(this.eResize,this.column))},s=()=>{for(const r of e)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,s(),o())};n(),this.addDestroyFunc(s),this.ctrl.setRefreshFunction("resize",n)}onResizing(e,t){const{column:i,lastResizeAmount:o,resizeStartWidth:s,beans:n}=this,r=this.normaliseResizeAmount(t),l=[{key:i,newWidth:s+r}],{pinnedCols:d,ctrlsSvc:c,colResize:u}=n;this.column.getPinned()&&(d?.leftWidth??0)+(d?.rightWidth??0)+(r-o)>wt(c.getGridBodyCtrl().eBodyViewport)-50||(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.column.resizing=e,this.comp.toggleCss("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const i="left"!==this.pinned,o="right"===this.pinned;return this.gos.get("enableRtl")?i&&(t*=-1):o&&(t*=-1),t}},Hv={moduleName:"ColumnResize",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,i,o){const s=[],{colModel:n,gos:r,visibleCols:a}=this.beans;for(const l of e){const d=n.getColDefCol(l.key)||n.getCol(l.key);if(d&&(s.push({width:l.newWidth,ratios:[1],columns:[d]}),"shift"===r.get("colResizeDefault")&&(t=!t),t)){const u=a.getColAfter(d);if(!u)continue;const h=d.getActualWidth()-l.newWidth,g=u.getActualWidth()+h;s.push({width:g,ratios:[1],columns:[u]})}}0!==s.length&&this.resizeColumnSets({resizeSets:s,finished:i,source:o})}resizeColumnSets(e){const{resizeSets:t,finished:i,source:o}=e;if(t&&!t.every(c=>function Bv(e){const{columns:t,width:i}=e;let o=0,s=0,n=!0;for(const l of t){o+=l.getMinWidth()||0;const c=l.getMaxWidth();c>0?s+=c:n=!1}return i>=o&&(!n||i<=s)}(c)))return void(i&&to(this.eventSvc,t&&t.length>0?t[0].columns:null,i,o));const n=[],r=[];for(const c of t){const{width:u,columns:h,ratios:g}=c,p={},f={};for(const b of h)r.push(b);let m=!0,w=0;for(;m;){if(w++,w>1e3){Me(31);break}m=!1;const b=[];let R=0,T=u;h.forEach((L,H)=>{f[L.getId()]?T-=p[L.getId()]:(b.push(L),R+=g[H])});const k=1/R;b.forEach((L,H)=>{let ue;H===b.length-1?ue=T:(ue=Math.round(g[H]*u*k),T-=ue);const le=L.getMinWidth(),he=L.getMaxWidth();ue<le?(ue=le,f[L.getId()]=!0,m=!0):he>0&&ue>he&&(ue=he,f[L.getId()]=!0,m=!0),p[L.getId()]=ue})}for(const b of h){const R=p[b.getId()];b.getActualWidth()!==R&&(b.setActualWidth(R,o),n.push(b))}}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(o),u.updateBodyWidths(),h.checkViewportColumns()}const d=r.concat(l);(a||i)&&to(this.eventSvc,d,i,o,l)}resizeHeader(e,t,i){if(!e.isResizable())return;const o=e.getActualWidth(),s=e.getMinWidth(),n=e.getMaxWidth(),r=Math.min(Math.max(o+t,s),n);this.setColumnWidths([{key:e,newWidth:r}],i,!0,"uiColumnResized")}createResizeFeature(e,t,i,o,s){return new Lv(e,t,i,o,s)}createGroupResizeFeature(e,t,i,o){return new Iv(e,t,i,o)}}],apiFunctions:{setColumnWidths:function Av(e,t,i=!0,o="api"){e.colResize?.setColumnWidths(t,!1,i,o)}},dependsOn:[lv,lc]},Gv=class extends M{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);for(const t of this.columnGroup.getLeafColumns())t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})}removeListenersOnChildrenColumns(){for(const e of this.removeChildListenersFuncs)e();this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.toggleCss("ag-hidden",0===e)}};function Xv(e,t){for(let i=0;i<t.length;i++){const o=e.indexOf(t[i]);o>=0&&(e[o]=e[e.length-1],e.pop())}}function Ui(e,t,i){if(e)for(let o=0;o<e.length;o++){const s=e[o];qe(s)&&Ui(t?s.getDisplayedChildren():s.getChildren(),t,i),i(s)}}function Br(e){const t=[];return Ui(e,!0,i=>{vi(i)&&t.push(i)}),t}var ew={moduleName:"ColumnGroup",version:G,dynamicBeans:{headerGroupCellCtrl:class extends Rr{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,i,o,s){const{column:n,beans:r}=this,{context:a,colNames:l,colHover:d,rangeSvc:c,colResize:u}=r;this.comp=e,s=Ho(this,a,s),this.setGui(t,s),this.displayName=l.getDisplayNameForColumnGroup(n,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(s),this.setupExpandable(s),this.setupTooltip(),this.setupAutoHeight({wrapperElement:o,compBean:s}),this.setupUserComp(),this.addHeaderMouseListeners(s),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const h=this.rowCtrl.pinned,g=n.getProvidedColumnGroup().getLeafColumns();d?.createHoverFeature(s,g,t),c?.createRangeHighlightFeature(s,n,e),s.createManagedBean(new yr(n,t,r)),s.createManagedBean(new Gv(e,n)),u?this.resizeFeature=s.createManagedBean(u.createGroupResizeFeature(e,i,h,n)):e.setResizableDisplayed(!1),s.createManagedBean(new lo(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(s,g),s.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(s),s.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,i=e.getDefinition();return ee(t.gos,{colDef:i,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,i=e.get("groupHeaderHeight");null!=i?0===i?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,o=Ae(t)===e;if(!i&&!o)return;const s=e.getHighlighted();let r=!1,a=!1;if(this.rowCtrl.getHeaderCellCtrls().find(l=>l.column.isMoving())){const l=this.beans.gos.get("enableRtl"),d=1===s,c=0===s;i&&(l?a=d:r=c),o&&(l?r=c:a=d)}this.comp.toggleCss("ag-header-highlight-before",r),this.comp.toggleCss("ag-header-highlight-after",a)}resizeHeader(e,t){const{resizeFeature:i}=this;if(!i)return;const o=i.getInitialValues(t);i.resizeColumns(o,o.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:i,enterpriseMenuFactory:o}=this.beans,s=this.column,n=s.getProvidedColumnGroup(),a=function Fg(e,t){const i=t.columnGroup.getColGroupDef();return e.getCompDetails(i,dg,"agColumnGroupHeader",t)}(t,ee(i,{displayName:this.displayName,columnGroup:s,setExpanded:l=>{e.setColumnGroupOpened(n,l,"gridInitializing")},setTooltip:(l,d)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(l,d)},showColumnMenu:(l,d)=>o?.showMenuAfterButtonClick(n,l,"columnMenu",d),showColumnMenuAfterMouseClick:(l,d)=>o?.showMenuAfterMouseEvent(n,l,"columnMenu",d),eGridHeader:this.eGui}));a&&this.comp.setUserCompDetails(a)}addHeaderMouseListeners(e){const t=s=>this.handleMouseOverChange("mouseenter"===s.type);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column.getProvidedColumnGroup()),contextmenu:s=>this.handleContextMenuMouseEvent(s,void 0,this.column.getProvidedColumnGroup())})}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.comp.setAriaExpanded(this.expandable?t?"true":"false":void 0),this.refreshHeaderStyles()}addClasses(){const{column:e}=this,t=e.getColGroupDef(),i=Ed(t,this.gos,null,e);e.isPadding()?(i.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(s=>s.isSpanHeaderHeight())&&i.push("ag-header-span-height")):(i.push("ag-header-group-cell-with-group"),t?.wrapHeaderText&&i.push("ag-header-cell-wrap-text"));for(const o of i)this.comp.toggleCss(o,!0)}setupMovingCss(e){const{column:t}=this,o=t.getProvidedColumnGroup().getLeafColumns(),s=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());for(const n of o)e.addManagedListeners(n,{movingChanged:s});s()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||this.focusThis()}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();if(this.expandable&&t&&"Enter"===e.key){const i=this.column,o=!i.isExpanded();this.beans.colGroupSvc.setColumnGroupOpened(i.getProvidedColumnGroup(),o,"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()}}},beans:[class extends M{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[];return Yt(null,this.beans.colModel.getColTree(),i=>{lt(i)&&e.push({groupId:i.getGroupId(),open:i.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const i=[];Yt(null,t,o=>{if(lt(o)){const s=o.getColGroupDef(),n={groupId:o.getGroupId(),open:s?s.openByDefault:void 0};i.push(n)}}),this.setColumnGroupState(i,e)}setColumnGroupState(e,t){const{colModel:i,colAnimation:o,visibleCols:s,eventSvc:n}=this.beans;if(!i.getColTree().length)return;o?.start();const a=[];for(const l of e){const c=l.open,u=this.getProvidedColGroup(l.groupId);u&&u.isExpanded()!==c&&(u.setExpanded(c),a.push(u))}s.refresh(t,!0),a.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:1===a.length?a[0]:void 0,columnGroups:a}),o?.finish()}setColumnGroupOpened(e,t,i){let o;o=lt(e)?e.getId():e||"",this.setColumnGroupState([{groupId:o,open:t}],i)}getProvidedColGroup(e){let t=null;return Yt(null,this.beans.colModel.getColTree(),i=>{lt(i)&&i.getId()===e&&(t=i)}),t}getGroupAtDirection(e,t){const i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),o=e.getDisplayedLeafColumns(),s="After"===t?Ae(o):o[0],n=`getCol${t}`;for(;;){const r=this.beans.visibleCols[n](s);if(!r)return null;const a=this.getColGroupAtLevel(r,i);if(a!==e)return a}}getColGroupAtLevel(e,t){let o,s,i=e.getParent();for(;o=i.getProvidedColumnGroup().getLevel(),s=i.getPaddingLevel(),!(o+s<=t);)i=i.getParent();return i}updateOpenClosedVisibility(){Ui(this.beans.visibleCols.getAllTrees(),!1,t=>{qe(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(qe(e))return e;const i=this.beans.visibleCols.getAllTrees(),o="number"==typeof t;let s=null;return Ui(i,!1,n=>{if(qe(n)){const r=n;let a;a=o?e===r.getGroupId()&&t===r.getPartId():e===r.getGroupId(),a&&(s=r)}}),s}createColumnGroups(e){const{columns:t,idCreator:i,pinned:o,oldDisplayedGroups:s,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(s),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=(qe(p)?p.getProvidedColumnGroup():p).getOriginalParent();if(null==m){for(let b=g;b<h;b++)a.push(d[b]);return}const w=this.createColumnGroup(m,i,r,o,n);for(let b=g;b<h;b++)w.addChild(d[b]);l.push(w)};for(let h=1;h<d.length;h++){const g=d[h],f=(qe(g)?g.getProvidedColumnGroup():g).getOriginalParent(),m=d[c];f!==(qe(m)?m.getProvidedColumnGroup():m).getOriginalParent()&&u(h)}c<d.length&&u(d.length)}return n||this.setupParentsIntoCols(a,null),a}createProvidedColumnGroup(e,t,i,o,s,n,r){const a=s.getUniqueKey(t.groupId||null,null),l=Fn(this.beans,t,a),d=new Lo(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=cl(this.beans,l.children,i+1,e,o,s,n,r);return d.setChildren(h),d}balanceColumnTree(e,t,i,o){const s=[];for(let n=0;n<e.length;n++){const r=e[n];if(lt(r)){const a=r,l=this.balanceColumnTree(a.getChildren(),t+1,i,o);a.setChildren(l),s.push(a)}else{let a,l;for(let d=t;d<i;d++){const c=o.getUniqueKey(null,null),u=Fn(this.beans,null,c),h=new Lo(u,c,!0,d);this.createBean(h),l&&l.setChildren([h]),l=h,a||(a=l)}if(a&&l){if(s.push(a),e.some(c=>lt(c))){l.setChildren([r]);continue}l.setChildren(e);break}s.push(r)}}return s}findDepth(e){let t=0,i=e;for(;i?.[0]&&lt(i[0]);)t++,i=i[0].getChildren();return t}findMaxDepth(e,t){let i=t;for(let o=0;o<e.length;o++){const s=e[o];if(lt(s)){const r=this.findMaxDepth(s.getChildren(),t+1);i<r&&(i=r)}}return i}balanceTreeForAutoCols(e,t){const i=[];for(const o of e){let s=o;for(let n=t-1;n>=0;n--){const r=new Lo(null,`FAKE_PATH_${o.getId()}}_${n}`,!0,n);this.createBean(r),r.setChildren([s]),s.originalParent=r,s=r}0===t&&(o.originalParent=null),i.push(s)}return i}findExistingGroup(e,t){if(null!=e.groupId)for(let o=0;o<t.length;o++){const s=t[o];if(s.getColGroupDef()&&s.getId()===e.groupId)return{idx:o,group:s}}}createColumnGroup(e,t,i,o,s){const n=e.getGroupId(),r=t.getInstanceIdForKey(n);let l=i[td(n,r)];return l&&l.getProvidedColumnGroup()!==e&&(l=null),C(l)?l.reset():(l=new No(e,n,r,o),s||this.createBean(l)),l}mapOldGroupsById(e){const t={},i=o=>{for(const s of o)if(qe(s)){const n=s;t[s.getUniqueId()]=n,i(n.getChildren())}};return e&&i(e),t}setupParentsIntoCols(e,t){for(const i of e??[])if(i.parent!==t&&(this.beans.colViewport.colsWithinViewportHash=""),i.parent=t,qe(i)){const o=i;this.setupParentsIntoCols(o.getChildren(),o)}}}],apiFunctions:{getAllDisplayedColumnGroups:function Qv(e){return e.visibleCols.getAllTrees()},getCenterDisplayedColumnGroups:function qv(e){return e.visibleCols.treeCenter},getColumnGroup:function zv(e,t,i){return e.colGroupSvc?.getColumnGroup(t,i)??null},getColumnGroupState:function Uv(e){return e.colGroupSvc?.getColumnGroupState()??[]},getDisplayNameForColumnGroup:function Wv(e,t,i){return e.colNames.getDisplayNameForColumnGroup(t,i)||""},getLeftDisplayedColumnGroups:function Kv(e){return e.visibleCols.treeLeft},getProvidedColumnGroup:function _v(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null},getRightDisplayedColumnGroups:function Yv(e){return e.visibleCols.treeRight},resetColumnGroupState:function jv(e){e.colGroupSvc?.resetColumnGroupState("api")},setColumnGroupOpened:function Nv(e,t,i){e.colGroupSvc?.setColumnGroupOpened(t,i,"api")},setColumnGroupState:function $v(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}}},tw={tag:"div",cls:"ag-skeleton-container"},ow={moduleName:"CheckboxCellRenderer",version:G,userComponents:{agCheckboxCellRenderer:class extends Re{constructor(){super(Gm,[Kn]),this.eCheckbox=V,this.registerCSS(".ag-checkbox-cell{height:100%}")}init(e){this.refresh(e);const{eCheckbox:t,beans:i}=this,o=t.getInputElement();o.setAttribute("tabindex","-1"),x(o,"polite"),this.addManagedListeners(o,{click:s=>{if(zi(s),t.isDisabled())return;const n=t.getValue();this.onCheckboxChanged(n)},dblclick:s=>{zi(s)}}),this.addManagedElementListeners(e.eGridCell,{keydown:s=>{if(" "===s.key&&!t.isDisabled()){e.eGridCell===Fe(i)&&t.toggle();const n=t.getValue();this.onCheckboxChanged(n),s.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,i=!0;const{value:o,column:s,node:n}=e;if(n.group&&s)if("boolean"==typeof o)t=o;else{const u=s.getColId();u.startsWith(Si)?t=null==o||""===o?void 0:"true"===o:n.aggData&&void 0!==n.aggData[u]||n.sourceRowIndex>=0?t=o??void 0:i=!1}else t=o??void 0;const{eCheckbox:r}=this;if(!i)return void r.setDisplayed(!1);r.setValue(t);const a=e.disabled??!s?.isCellEditable(n);r.setDisabled(a);const l=this.getLocaleTextFunc(),d=oe(l,t),c=a?d:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${d})`;r.setInputAriaLabel(c)}onCheckboxChanged(e){const{params:t}=this,{column:i,node:o,value:s}=t;this.beans?.editSvc?.setEditingCells([{column:i,colId:i.getColId(),rowIndex:o.rowIndex,rowPinned:o.rowPinned,state:"changed",oldValue:s,newValue:s}],{update:!0,forceRefreshOfEditCellsOnly:!0});const n=o.setDataValue(i,e,"renderer");this.beans.editSvc?.stopEditing({rowNode:o,column:i},{source:this.beans.editSvc?.isBatchEditing()?"ui":"api"}),n||this.updateCheckbox(t)}}}},sw={moduleName:"SkeletonCellRenderer",version:G,userComponents:{agSkeletonCellRenderer:class extends Re{constructor(){super(tw)}init(e){const t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>Le(e.eParentOfValue)),Le(e.eParentOfValue,t),e.deferRender?this.setupLoading(e):e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){const e=this.getLocaleTextFunc();this.getGui().textContent=e("loadingError","ERR");const t=e("ariaSkeletonCellLoadingFailed","Row failed to load");Be(this.getGui(),t)}setupLoading(e){const t=Ye({tag:"div",cls:"ag-skeleton-effect"}),i=e.node.rowIndex;if(null!=i){const n=75+25*(i%2==0?Math.sin(i):Math.cos(i));t.style.width=`${n}%`}this.getGui().appendChild(t);const o=this.getLocaleTextFunc(),s=e.deferRender?o("ariaDeferSkeletonCellLoading","Cell is loading"):o("ariaSkeletonCellLoading","Row data is loading");Be(this.getGui(),s)}refresh(e){return!1}}}};function Hr(e,t){if(!e)return;const i=e,o={};for(const s of Object.keys(i)){if(t&&t.indexOf(s)>=0||Ta.has(s))continue;const n=i[s];o[s]="object"==typeof n&&null!==n&&n.constructor===Object?Hr(n):n}return o}function qo(e,t,i){if(!t||!e)return;if(!i)return e[t];const o=t.split(".");let s=e;for(let n=0;n<o.length;n++){if(null==s)return;s=s[o[n]]}return s}var Dw=["dateTimeString","dateString","text","number","boolean","date"];function dc(e,t){const i={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(i.columnTypes=[...Cs(e.columnTypes),...Cs(t.columnTypes)]),i}function cc(e,t,i){return t?t.baseDataType===e.baseDataType||(I(46),!1):(I(45,{parentCellDataType:i}),!1)}function uc(e,t){if(e.valueFormatter)return i=>{if(i.node?.group){const o=(i.colDef.pivotValueColumn??i.column).getAggFunc();if(o){if("first"===o||"last"===o)return e.valueFormatter(i);if("number"===e.baseDataType&&"count"!==o){if("number"==typeof i.value)return e.valueFormatter(i);if("object"==typeof i.value){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}}else if(t.get("groupHideOpenParents")&&i.column.isRowGroupActive()&&"string"==typeof i.value&&!e.dataTypeMatcher?.(i.value))return;return e.valueFormatter(i)}}function Gr(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([i,o])=>function Tw(e,t,i,o){if(!t[i])return!1;const s=e[i];return null===s?(t[i]=!1,!1):void 0===o?!!s:s===o}(e,t,i,o))}function kw(e,t){const i=bl(e);for(const o of t)delete i[o],"rowGroup"===o?delete i.rowGroupIndex:"pivot"===o&&delete i.pivotIndex;return i}var Aw={moduleName:"DataType",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number:()=>({cellEditor:"agNumberCellEditor"}),boolean:()=>({cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:e=>!!e.colDef.editable&&" "===e.event.key}),date:({formatValue:e})=>({cellEditor:"agDateCellEditor",keyCreator:e}),dateString:({formatValue:e})=>({cellEditor:"agDateStringCellEditor",keyCreator:e}),dateTime(e){return this.date(e)},dateTimeString(e){return this.dateString(e)},object:({formatValue:e,colModel:t,colId:i})=>({cellEditorParams:{useFormatter:!0},comparator:(o,s)=>{const n=t.getColDefCol(i),r=n?.getColDef();if(!n||!r)return 0;const a=null==o?"":e({column:n,node:null,value:o}),l=null==s?"":e({column:n,node:null,value:s});return a===l?0:a>l?1:-1},keyCreator:e}),text:()=>({})}}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={},i={},o=c=>u=>{const{column:h,node:g,value:p}=u;let f=h.getColDef().valueFormatter;return f===c.groupSafeValueFormatter&&(f=c.valueFormatter),this.beans.valueSvc.formatValue(h,g,p,f)};for(const c of Object.keys(e)){const u=e[c],h={...u,groupSafeValueFormatter:uc(u,this.gos)};t[c]=h,i[c]=o(h)}const s=this.gos.get("dataTypeDefinitions")??{},n={};for(const c of Object.keys(s)){const u=s[c],h=this.processDataTypeDefinition(u,s,[c],e);h&&(t[c]=h,u.dataTypeMatcher&&(n[c]=u.dataTypeMatcher),i[c]=o(h))}const{valueParser:r,valueFormatter:a}=e.object,{valueParser:l,valueFormatter:d}=t.object;this.hasObjectValueParser=l!==r,this.hasObjectValueFormatter=d!==a,this.formatValueFuncs=i,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(n,e)}sortKeysInMatchers(e,t){const i={...e};for(const o of Dw)delete i[o],i[o]=e[o]??t[o].dataTypeMatcher;return i}processDataTypeDefinition(e,t,i,o){let s;const n=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let r=o[n];const a=t[n];if(r&&a&&(r=a),!cc(e,r,n))return;s=dc(r,e)}else{if(i.includes(n))return void I(44);const r=t[n];if(!cc(e,r,n))return;const a=this.processDataTypeDefinition(r,t,[...i,n],o);if(!a)return;s=dc(a,e)}return{...s,groupSafeValueFormatter:uc(s,this.gos)}}updateColDefAndGetColumnType(e,t,i){let{cellDataType:o}=t;const{field:s}=t;if(void 0===o&&(o=e.cellDataType),(null==o||!0===o)&&(o=!!this.canInferCellDataType(e,t)&&this.inferCellDataType(s,i)),!o)return void(e.cellDataType=!1);const n=this.dataTypeDefinitions[o];if(n)return e.cellDataType=o,n.groupSafeValueFormatter&&(e.valueFormatter=n.groupSafeValueFormatter),n.valueParser&&(e.valueParser=n.valueParser),n.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,o,n,i),n.columnTypes;I(47,{cellDataType:o})}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const i=o=>{t.add(o.key)};e.__addEventListener("columnStateUpdated",i),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",i))}canInferCellDataType(e,t){const{gos:i}=this;if(!je(i))return!1;const o={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(Gr(t,o))return!1;const s=null===t.type?e.type:t.type;if(s){const n=i.get("columnTypes")??{};if(Cs(s).some(a=>{const l=n[a.trim()];return l&&Gr(l,o)}))return!1}return!Gr(e,o)}inferCellDataType(e,t){if(!e)return;let i;const o=this.getInitialData();if(o){const n=e.includes(".")&&!this.gos.get("suppressFieldDotNotation");i=qo(o,e,n)}else this.initWaitForRowData(t);return null==i?void 0:Object.keys(this.dataTypeMatchers).find(n=>this.dataTypeMatchers[n](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?._leafs;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:o}=this.beans;t&&i&&(i.shouldQueueResizeOperations=!0);const[s]=this.addManagedEventListeners({rowDataUpdateStarted:n=>{const{firstRowData:r}=n;r&&(s?.(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&i?.processResizeOperations(),o.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const i=[];this.destroyColumnStateUpdateListeners();const o={},s={};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=kw(a,r);c.rowGroup&&null==c.rowGroupIndex&&(o[n]=c),c.pivot&&null==c.pivotIndex&&(s[n]=c),i.push(c)}}t&&i.push(...this.generateColumnStateForRowGroupAndPivotIndexes(o,s)),i.length&&Nt(this.beans,{state:i},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const i={},{rowGroupColsSvc:o,pivotColsSvc:s}=this.beans;return o?.restoreColumnOrder(i,e),s?.restoreColumnOrder(i,t),Object.values(i)}resetColDefIntoCol(e,t){const i=e.getUserProvidedColDef();if(!i)return!1;const o=vs(this.beans,i,e.getColId());return e.setColDef(o,i,t),!0}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}getDateIncludesTimeFlag(e){return"dateTime"===e||"dateTimeString"===e}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(null==t)return!0;const i=this.getDataTypeDefinition(e)?.dataTypeMatcher;return!i||i(t)}validateColDef(e){const t=i=>I(48,{property:i});if("object"===e.cellDataType){const{object:i}=this.dataTypeDefinitions;e.valueFormatter===i.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&t("Formatter"),e.editable&&e.valueParser===i.valueParser&&!this.hasObjectValueParser&&t("Parser")}}postProcess(e){const t=e.cellDataType;if(!t||"string"!=typeof t)return;const{dataTypeDefinitions:i,beans:o,formatValueFuncs:s}=this,n=i[t];n&&o.colFilter?.setColDefPropsForDataType(e,n,s[t])}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,i,o){const n=this.columnDefinitionPropsPerDataType[i.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:i,colId:o,formatValue:this.formatValueFuncs[t]});Object.assign(e,n)}getDateObjectTypeDef(e){const t=this.getLocaleTextFunc(),i=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:o=>bt(o.newValue&&String(o.newValue)),valueFormatter:o=>null==o.value?"":o.value instanceof Date&&!isNaN(o.value.getTime())?Tt(o.value,i)??"":t("invalidDate","Invalid Date"),dataTypeMatcher:o=>o instanceof Date}}getDateStringTypeDef(e){const t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:i=>bt(i)??void 0,dateFormatter:i=>Tt(i??null,t)??void 0,valueParser:i=>Ss(String(i.newValue))?i.newValue:null,valueFormatter:i=>Ss(String(i.value))?String(i.value):"",dataTypeMatcher:i=>"string"==typeof i&&Ss(i)}}getDefaultDataTypes(){const e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>""===t.newValue?.trim?.()?null:Number(t.newValue),valueFormatter:t=>null==t.value?"":"number"!=typeof t.value||isNaN(t.value)?e("invalidNumber","Invalid Number"):String(t.value),dataTypeMatcher:t=>"number"==typeof t},text:{baseDataType:"text",valueParser:t=>""===t.newValue?null:_t(t.newValue),dataTypeMatcher:t=>"string"==typeof t},boolean:{baseDataType:"boolean",valueParser:t=>null==t.newValue?t.newValue:""===t.newValue?.trim?.()?null:"true"===String(t.newValue).toLowerCase(),valueFormatter:t=>null==t.value?"":String(t.value),dataTypeMatcher:t=>"boolean"==typeof t},date:this.getDateObjectTypeDef("date"),dateString:this.getDateStringTypeDef("dateString"),dateTime:this.getDateObjectTypeDef("dateTime"),dateTimeString:{...this.getDateStringTypeDef("dateTimeString"),dataTypeMatcher:t=>"string"==typeof t&&function Wg(e){return Ss(e,!0)}(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>_t(t.value)??""}}}destroyColumnStateUpdateListeners(){for(const e of this.columnStateUpdateListenerDestroyFuncs)e();this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}}],dependsOn:[ow]},Iw={moduleName:"ColumnFlex",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="colFlex",this.columnsHidden=!1}refreshFlexedColumns(e={}){const t=e.source??"flex";null!=e.viewportWidth&&(this.flexViewportWidth=e.viewportWidth);const i=this.flexViewportWidth,{visibleCols:o,colDelayRenderSvc:s}=this.beans,n=o.centerCols;let r=-1;if(e.resizingCols){const f=new Set(e.resizingCols);for(let m=n.length-1;m>=0;m--)if(f.has(n[m])){r=m;break}}let a=!1;const l=n.map((f,m)=>{const w=f.getFlex(),b=null!=w&&w>0&&m>r;return a||(a=b),{col:f,isFlex:b,flex:Math.max(0,w??0),initialSize:f.getActualWidth(),min:f.getMinWidth(),max:f.getMaxWidth(),targetSize:0}});if(a?(s?.hideColumns("colFlex"),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(s),!i||!a)return[];let d=l.length,c=l.reduce((f,m)=>f+m.flex,0),u=i;const h=(f,m)=>{f.frozenSize=m,f.col.setActualWidth(m,t),u-=m,c-=f.flex,d-=1},g=f=>null!=f.frozenSize;for(const f of l)f.isFlex||h(f,f.initialSize);for(;d>0;){const f=Math.round(c<1?u*c:u);let m,w=0,b=0;for(const k of l){if(g(k))continue;m=k,b+=f*(k.flex/c);const H=Math.round(b-w);k.targetSize=H,w+=H}m&&(m.targetSize+=f-w);let R=0;for(const k of l){if(g(k))continue;const L=k.targetSize,H=Math.min(Math.max(L,k.min),k.max);R+=H-L,k.violationType=H===L?void 0:H<L?"max":"min",k.targetSize=H}const T=0===R?"all":R>0?"min":"max";for(const k of l)g(k)||("all"===T||k.violationType===T)&&h(k,k.targetSize)}e.skipSetLeft||o.setLeftValues(t),e.updateBodyWidths&&o.updateBodyWidths();const p=l.filter(f=>f.isFlex&&!f.violationType).map(f=>f.col);if(e.fireResizedEvent){const f=l.filter(w=>w.initialSize!==w.frozenSize).map(w=>w.col),m=l.filter(w=>w.flex).map(w=>w.col);to(this.eventSvc,f,!0,t,m)}return this.revealColumns(s),p}revealColumns(e){this.columnsHidden&&(e?.revealColumns("colFlex"),this.columnsHidden=!1)}initCol(e){const{flex:t,initialFlex:i}=e.colDef;void 0!==t?e.flex=t:void 0!==i&&(e.flex=i)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}}]},hc={moduleName:"ColumnApi",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,i,o,s=!1){const n=e.slice();t?n.sort((l,d)=>i.indexOf(l)-i.indexOf(d)):(i||s)&&n.sort((l,d)=>o.indexOf(l)-o.indexOf(d));const r=this.rowGroupColsSvc?.columns,a=this.pivotColsSvc?.columns;return this.buildColumnDefs(n,r,a)}buildColumnDefs(e,t=[],i=[]){const o=[],s={};for(const n of e){let a=!0,l=this.createDefFromColumn(n,t,i),d=n.getOriginalParent(),c=null;for(;d;){let u=null;if(d.isPadding()){d=d.getOriginalParent();continue}const h=s[d.getGroupId()];if(h){h.children.push(l),a=!1;break}if(u=this.createDefFromGroup(d),u&&(u.children=[l],s[u.groupId]=u,l=u,d=d.getOriginalParent()),null!=d&&c===d){a=!1;break}c=d}a&&o.push(l)}return o}createDefFromGroup(e){const t=Hr(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,i){const o=Hr(e.getColDef());return o.colId=e.getColId(),o.width=e.getActualWidth(),o.rowGroup=e.isRowGroupActive(),o.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,o.pivot=e.isPivotActive(),o.pivotIndex=e.isPivotActive()?i.indexOf(e):null,o.aggFunc=e.isValueActive()?e.getAggFunc():null,o.hide=!e.isVisible()||void 0,o.pinned=e.isPinned()?e.getPinned():null,o.sort=e.getSort()?e.getSort():null,o.sortIndex=null!=e.getSortIndex()?e.getSortIndex():null,o}}],apiFunctions:{getColumnDef:function nw(e,t){const i=e.colModel.getColDefCol(t);return i?i.getColDef():null},getDisplayNameForColumn:function aw(e,t,i){return e.colNames.getDisplayNameForColumn(t,i)||""},getColumn:function lw(e,t){return e.colModel.getColDefCol(t)},getColumns:function dw(e){return e.colModel.getColDefCols()},applyColumnState:function cw(e,t){return Nt(e,t,"api")},getColumnState:function uw(e){return ws(e)},resetColumnState:function hw(e){!function Yh(e,t){const{colModel:i,autoColSvc:o,selectionColSvc:s,eventSvc:n,gos:r}=e,a=i.getColDefCols();if(!a?.length)return;const d=al(i.getColDefColTree()),c=[];let u=1e3,h=1e3;const g=b=>{const R=bl(b);q(R.rowGroupIndex)&&R.rowGroup&&(R.rowGroupIndex=u++),q(R.pivotIndex)&&R.pivot&&(R.pivotIndex=h++),c.push(R)};o?.getColumns()?.forEach(g),s?.getColumns()?.forEach(g),d?.forEach(g),Nt(e,{state:c},t);const p=o?.getColumns()??[];Nt(e,{state:[...s?.getColumns()??[],...p,...a].map(b=>({colId:b.colId})),applyOrder:!0},t),n.dispatchEvent(ee(r,{type:"columnsReset",source:t}))}(e,"api")},isPinning:function gw(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()},isPinningLeft:function pw(e){return e.visibleCols.isPinningLeft()},isPinningRight:function fw(e){return e.visibleCols.isPinningRight()},getDisplayedColAfter:function mw(e,t){return e.visibleCols.getColAfter(t)},getDisplayedColBefore:function Cw(e,t){return e.visibleCols.getColBefore(t)},setColumnsVisible:function vw(e,t,i){e.colModel.setColsVisible(t,i,"api")},setColumnsPinned:function ww(e,t,i){e.pinnedCols?.setColsPinned(t,i,"api")},getAllGridColumns:function bw(e){return e.colModel.getCols()},getDisplayedLeftColumns:function Sw(e){return e.visibleCols.leftCols},getDisplayedCenterColumns:function yw(e){return e.visibleCols.centerCols},getDisplayedRightColumns:function Rw(e){return e.visibleCols.rightCols},getAllDisplayedColumns:function xw(e){return e.visibleCols.allCols},getAllDisplayedVirtualColumns:function Ew(e){return e.colViewport.getViewportColumns()},getColumnDefs:function rw(e){return e.colModel.getColumnDefs(!0)}}},Vw={moduleName:"CellRendererFunction",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){return e.cellRenderer?class i{refresh(){return!1}getGui(){return this.eGui}init(s){const n=t(s),r=typeof n;this.eGui="string"!==r&&"number"!==r&&"boolean"!==r?null!=n?n:Ye({tag:"span"}):oi("<span>"+n+"</span>")}}:null}}]},Uw={wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:ze,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},cellFontFamily:{ref:"fontFamily"},headerFontWeight:500,headerFontSize:{ref:"fontSize"},dataFontSize:{ref:"fontSize"},headerTextColor:{ref:"textColor"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:We,rangeSelectionBackgroundColor:kt(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:kt(.5),rangeHeaderHighlightColor:{ref:"foregroundColor",mix:.08,onto:"headerBackgroundColor"},rowNumbersSelectedColor:kt(.5),rowHoverColor:kt(.08),columnHoverColor:kt(.05),selectedRowBackgroundColor:kt(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},dataBackgroundColor:ze,oddRowBackgroundColor:{ref:"dataBackgroundColor"},wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,paginationPanelHeight:{ref:"rowHeight",calc:"max(rowHeight, 22px)"},dragHandleColor:Ke(.7),headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:Ke(.1),iconButtonActiveColor:We,iconButtonActiveBackgroundColor:kt(.28),iconButtonActiveIndicatorColor:We,menuBorder:{color:Ke(.2)},menuBackgroundColor:He(.03),menuTextColor:He(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"},setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:Ke(.8),dialogShadow:{ref:"popupShadow"},cellEditingBorder:{color:We},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},dialogBorder:{color:Ke(.2)},panelBackgroundColor:ze,panelTitleBarHeight:{ref:"headerHeight"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:Ke(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:Ke(.13)},selectCellBackgroundColor:Ke(.07),selectCellBorder:{color:Ke(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:ze,filterPanelApplyButtonBackgroundColor:We,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:At,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:At,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:Ke(.15),statusBarLabelColor:At,statusBarLabelFontWeight:500,statusBarValueColor:At,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedRowTextColor:{ref:"textColor"}},gc={cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"}},jw={...gc,cellBatchEditTextColor:"#f3d0b3"},qw=(()=>xe({feature:"batchEditStyle",params:gc,css:".ag-cell-batch-edit{background-color:var(--ag-cell-batch-edit-background-color);color:var(--ag-cell-batch-edit-text-color);display:inherit}.ag-row-batch-edit{background-color:var(--ag-row-batch-edit-background-color);color:var(--ag-row-batch-edit-text-color)}"}))(),Ks=":where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}",qs={buttonTextColor:"inherit",buttonFontWeight:"normal",buttonBackgroundColor:"transparent",buttonBorder:!1,buttonBorderRadius:{ref:"borderRadius"},buttonHorizontalPadding:{calc:"spacing * 2"},buttonVerticalPadding:{ref:"spacing"},buttonHoverTextColor:{ref:"buttonTextColor"},buttonHoverBackgroundColor:{ref:"buttonBackgroundColor"},buttonHoverBorder:{ref:"buttonBorder"},buttonActiveTextColor:{ref:"buttonHoverTextColor"},buttonActiveBackgroundColor:{ref:"buttonHoverBackgroundColor"},buttonActiveBorder:{ref:"buttonHoverBorder"},buttonDisabledTextColor:{ref:"inputDisabledTextColor"},buttonDisabledBackgroundColor:{ref:"inputDisabledBackgroundColor"},buttonDisabledBorder:{ref:"inputDisabledBorder"}},Xw=(()=>xe({feature:"buttonStyle",params:{...qs,buttonBackgroundColor:ze,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:We}},css:Ks}))(),Jw=(()=>xe({feature:"buttonStyle",params:{...qs,buttonBackgroundColor:ze,buttonBorder:{color:We},buttonFontWeight:600,buttonTextColor:We,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBackgroundColor:We,buttonActiveTextColor:ze},css:Ks}))(),Vr=(()=>xe({feature:"columnDropStyle",css:".ag-column-drop-vertical-empty-message{align-items:center;border:dashed var(--ag-border-width);border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}"}))(),s0={warn:(...e)=>{I(e[0],e[1])},error:(...e)=>{Me(e[0],e[1])},preInitErr:(...e)=>{ko(e[0],e[2],e[1])}},Ys=()=>(e=>new tr(e))(s0).withParams(Uw).withPart(Xw).withPart(Vr).withPart(qw),Qs=(()=>xe({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:ze,checkboxUncheckedBorderColor:He(.3),checkboxCheckedBackgroundColor:We,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:ze,checkboxIndeterminateBackgroundColor:He(.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:ze,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:'.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-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.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)}}'}))(),Nr=()=>({...Ni,...jw,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:He(.05),rowHoverColor:kt(.15),selectedRowBackgroundColor:kt(.2),menuBackgroundColor:He(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:At,findMatchColor:ze,findActiveMatchColor:ze,checkboxUncheckedBorderColor:He(.4),toggleButtonOffBackgroundColor:He(.4),rowBatchEditBackgroundColor:He(.1)}),Xs=(()=>xe({feature:"colorScheme",params:Ni,modeParams:{light:Ni,dark:Nr(),"dark-blue":{...Nr(),backgroundColor:"#1f2836"}}}))(),u0=xe({feature:"iconSet",css:".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='translate(3.934 -.054)scale(.06285)'/%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='translate(3.934 -.054)scale(.06285)'/%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\")}.ag-icon-column-arrow:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11 4a1 1 0 0 1 1 1v22a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 13a1 1 0 0 1 1-1h23.5a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 4h18v24H2zm2 2v20h14V6zM26.793 13 23 9.207l1.414-1.414L29.621 13l-5.207 5.207L23 16.793z' clip-rule='evenodd'/%3E%3C/svg%3E\")}.ag-icon-un-pin: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='currentColor' fill-rule='evenodd' d='m6.112 15.111 3.272 3.271 1.436-1.402-2.476-2.479c.81-1.25 3.168-1.12 5.156-.614l4.986-4.988-.49-.722c-.392-.622.336-1.504 1.024-2.072l.008-.007.01-.006.032-.025 1.447 1.447 1.432-1.397-2.601-2.602s-4.052 2.704-3.352 5.046l-3.158 3.108c-2.004-.388-4.69-.288-6.056 1.572-.638.87-.67 1.87-.67 1.87m.581 11.582.014.014 5.502-5.501 4.783 4.783.746-.364c1.992-1.016 2.776-3.21 2.632-5.34-.055-.805-.068-.87-.088-.97-.008-.04-.017-.085-.03-.182l3.32-3.218c1.734.292 3.198-.912 4.272-2.338q.337-.447.67-.894l-.001-.001-.007-.007-.007-.007-.007-.007-3.87-3.87 1.585-1.584-1.414-1.414-14.381 14.38-1.237 1.209-5.69 5.687 1.417 1.416zM23.21 10.206l2.65 2.651c-1.465 1.714-2.935.776-2.935.776l-4.79 4.79q.041.291.087.583c.257 1.676.513 3.35-.585 4.317a4 4 0 0 1-.272.21l-3.739-3.744z' clip-rule='evenodd'/%3E%3C/svg%3E\")}.ag-icon-pinned-top: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='currentColor' d='m16.708 10.878 8.708 8.706L24 21l-6.292-6.294V27h-2V14.706L9.416 21 8 19.584q4.348-4.344 8.691-8.69zM25 6H8v2h17z'/%3E%3C/svg%3E\")}.ag-icon-pinned-bottom: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='currentColor' d='M16.708 22.122 8 13.416 9.416 12l6.292 6.294V6h2v12.294L24 12l1.416 1.416-8.691 8.69zM7.416 28h17v-2h-17z'/%3E%3C/svg%3E\")}.ag-icon-chevron-up:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3.479 10.521a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06l-3.47-3.47-3.47 3.47a.75.75 0 0 1-1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E\")}.ag-icon-chevron-down:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.521 5.461a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 1.06-1.06l3.47 3.47 3.47-3.47a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E\")}.ag-icon-chevron-left:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.53 12.512a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 1.06l-3.47 3.47 3.47 3.47a.75.75 0 0 1 0 1.06' clip-rule='evenodd'/%3E%3C/svg%3E\")}.ag-icon-chevron-right:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.47 3.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06L8.94 8 5.47 4.53a.75.75 0 0 1 0-1.06' clip-rule='evenodd'/%3E%3C/svg%3E\")}.ag-icon-filter-add: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='currentColor' d='M19.834 8H8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.056-2.267 2.968-4.417 5.49-6.75v3.087c-1.081.974-2.245 1.968-3.232 3.005a1.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.184V6h13.834z'/%3E%3Cpath fill='currentColor' d='M26 6h2.946v2.002H26v3.313h-2.002V8.002h-2.946V6h2.946V3.04H26z'/%3E%3C/svg%3E\")}.ag-icon-edit: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='currentColor' d='M6.222 25.778h1.611l14.834-14.811-1.611-1.611-14.834 14.81zM4 28v-4.733L22.644 4.656a2.26 2.26 0 0 1 1.567-.634q.423 0 .833.167.412.166.734.478l1.589 1.6q.333.322.483.733t.15.822q0 .423-.161.839-.162.416-.472.728L8.733 28zm17.856-17.833-.8-.811 1.61 1.61z'/%3E%3C/svg%3E\")}"}),p0=e=>{const t=[];if("image"===e.type){const{icons:i,mask:o}=e;for(const s of Object.keys(i)){const n=er(i[s]);t.push(o?`.ag-icon-${s}::before { mask-image: ${n}; }`:`.ag-icon-${s}::before { background-image: ${n}; ${mc} }`)}}if("font"===e.type){const{family:i,weight:o,color:s,icons:n}=e;let r=mc;i&&(r+=` font-family: ${Jn(i)};`),o&&(r+=` font-weight: ${jl(o)};`),s&&(r+=` color: ${Ps(s)};`);for(const a of Object.keys(n))t.push(`.ag-icon-${a}::before { content: ${JSON.stringify(n[a])}; ${r} }`)}return xe({css:t.join(";\n"),cssImports:e.cssImports})},mc="background-color: unset; mask-image: unset; -webkit-mask-image: unset;",Cc={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"/>'},vc={"column-arrow":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 32 32"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 26C0 28.2092 1.79086 30 4 30H14C16.2091 30 18 28.2092 18 26V15H25.8786L24.4394 16.4393C23.8536 17.0251 23.8536 17.9749 24.4394 18.5607C25.0252 19.1464 25.9748 19.1464 26.5606 18.5607L30.5606 14.5607C31.1464 13.9749 31.1464 13.0251 30.5606 12.4393L26.5606 8.43934C25.9748 7.85356 25.0252 7.85356 24.4394 8.43934C23.8536 9.02512 23.8536 9.97488 24.4394 10.5607L25.8786 12H18V6C18 3.79086 16.2091 2 14 2H4C1.79086 2 0 3.79086 0 6V26ZM14 5H10.5V12H15V6C15 5.44772 14.5523 5 14 5ZM4 5H7.5V12H3V6C3 5.44772 3.44772 5 4 5ZM10.5 15H15V26C15 26.5522 14.5523 27 14 27H10.5V15ZM4 27H7.5V15H3V26C3 26.5522 3.44772 27 4 27Z" fill="currentColor"/></svg>',"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>',"pinned-top":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22ZM3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536Z"/></svg>',"pinned-bottom":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22ZM12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536Z"/></svg>',"un-pin":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11Z"/><path fill="currentColor" d="M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904l.589-.825Zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28l2.887-4.044ZM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972L9.277 1Z"/></svg>',"chevron-down":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 6L8 10L4 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-up":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 10L8 6L12 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-left":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-right":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L10 8L6 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"filter-add":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.12126 7.75L10.8517 7.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M6.65934 11.748L9.32778 11.748" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12.2943 1.04872V6.19184M14.9886 3.74341H9.68478" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M8.25488 3C8.04799 3.18323 7.91706 3.45099 7.91699 3.74902C7.91713 4.04868 8.04988 4.31681 8.25879 4.5H2C1.58579 4.5 1.25 4.16421 1.25 3.75C1.25 3.33579 1.58579 3 2 3H8.25488Z" fill="currentColor"/></svg>',edit:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 10.6262V12.5012H5.375L10.905 6.97122L9.03 5.09622L3.5 10.6262ZM12.355 5.52122C12.4014 5.47497 12.4381 5.42002 12.4632 5.35953C12.4883 5.29905 12.5012 5.23421 12.5012 5.16872C12.5012 5.10324 12.4883 5.0384 12.4632 4.97791C12.4381 4.91742 12.4014 4.86248 12.355 4.81622L11.185 3.64622C11.1387 3.59987 11.0838 3.5631 11.0233 3.53801C10.9628 3.51291 10.898 3.5 10.8325 3.5C10.767 3.5 10.7022 3.51291 10.6417 3.53801C10.5812 3.5631 10.5263 3.59987 10.48 3.64622L9.565 4.56122L11.44 6.43622L12.355 5.52122Z" fill="currentColor"/></svg>'},m0=(e,t=1.5)=>{const i=vc[e];if(i)return i;const o=Cc[e];if(!o)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>`+o+"</svg>"},zr=(e={})=>xe({feature:"iconSet",css:()=>((e={})=>{let t="";for(const i of[...Object.keys(Cc),...Object.keys(vc)]){const o=m0(i,e.strokeWidth);t+=`.ag-icon-${i}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(o)}'); }\n`}return t})(e)}),C0=zr(),Wr={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"},colorPickerThumbSize:18,colorPickerTrackSize:12,colorPickerThumbBorderWidth:3,colorPickerTrackBorderRadius:12,colorPickerColorBorderRadius:4},Ur=(()=>xe({feature:"inputStyle",params:{...Wr,inputBackgroundColor:ze,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:We},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:He(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>':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}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){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) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){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-filter-add-select){.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-filter-add-select){.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-filter-add-select){.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)}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:focus{box-shadow:var(--ag-focus-shadow);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}'}))(),Yo='.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:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:solid var(--ag-border-width) 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)}}}',Qo={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:{ref:"borderWidth"},tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},x0=(()=>xe({feature:"tabStyle",params:{...Qo,tabBarBorder:!0,tabBarBackgroundColor:Ke(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:ze},css:Yo}))(),P0=(()=>xe({feature:"tabStyle",params:{...Qo,tabBarBorder:!0,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabHoverTextColor:We,tabSelectedTextColor:We,tabSelectedUnderlineColor:We,tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:"0.3s"},css:Yo}))(),k0=(()=>Ys().withPart(Qs).withPart(Xs).withPart(C0).withPart(x0).withPart(Ur).withPart(Vr).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}))(),I0=(()=>Ys().withPart(Jw).withPart(Qs).withPart(Xs).withPart(u0).withPart(P0).withPart(Ur).withPart(Vr).withParams({accentColor:"#2196f3",selectedRowBackgroundColor:kt(.3),inputFocusBorder:{color:kt(.4)},focusShadow:{radius:2,spread:1.6,color:kt(.4)},iconButtonHoverBackgroundColor:"transparent",iconButtonActiveBackgroundColor:"transparent",checkboxUncheckedBorderColor:He(.45),checkboxIndeterminateBackgroundColor:He(.45),checkboxIndeterminateBorderColor:He(.45),checkboxBorderWidth:2,checkboxBorderRadius:2,fontSize:13,dataFontSize:14,headerFontWeight:700,borderRadius:3,wrapperBorderRadius:3,tabSelectedUnderlineColor:We,tabSelectedBorderWidth:0,tabSelectedUnderlineTransitionDuration:.3,sideButtonSelectedUnderlineColor:We,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineTransitionDuration:.3,sideButtonBorder:!1,sideButtonSelectedBorder:!1,sideButtonBarTopPadding:{calc:"spacing * 3"},sideButtonSelectedBackgroundColor:"transparent",sideButtonHoverTextColor:We,iconButtonHoverColor:We,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonSwitchInset:1,toggleButtonOffBackgroundColor:He(.45),colorPickerThumbSize:13,colorPickerTrackSize:11,colorPickerThumbBorderWidth:2,colorPickerTrackBorderRadius:2,colorPickerColorBorderRadius:2}))(),O0={cssName:"--ag-cell-horizontal-padding",changeKey:"cellHorizontalPaddingChanged",defaultValue:16},B0={cssName:"--ag-indentation-level",changeKey:"indentationLevelChanged",defaultValue:0,noWarn:!0,cacheDefault:!0},H0={cssName:"--ag-row-group-indent-size",changeKey:"rowGroupIndentSizeChanged",defaultValue:0},wc={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},bc={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},Sc={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},$r={cssName:"--ag-row-border",changeKey:"rowBorderWidthChanged",defaultValue:1,border:!0},yc={cssName:"--ag-pinned-row-border",changeKey:"pinnedRowBorderWidthChanged",defaultValue:1,border:!0};function Rc(e,t,i){const o=e.visibleCols.headerGroupRowCount;if(i>=o)return{column:t,headerRowIndex:i};let s=t.getParent();for(;s&&s.getProvidedColumnGroup().getLevel()>i;)s=s.getParent();const n=t.isSpanHeaderHeight();return!s||n&&s.isPadding()?{column:t,headerRowIndex:o}:{column:s,headerRowIndex:s.getProvidedColumnGroup().getLevel()}}var Zs=new Set(["gridPreDestroyed","fillStart","pasteStart"]),Kr=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","pinnedRowsChanged","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","filterUiChanged","filterOpened","floatingFilterUiChanged","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","rowResizeStarted","rowResizeEnded","columnsReset","bulkEditingStarted","bulkEditingStopped","batchEditingStarted","batchEditingStopped"].reduce((e,t)=>(e[t]=function Ah(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}(t),e),{}),Xo=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),q0={tag:"span",cls:"ag-sort-indicator-container",children:[Xo("Order","order"),Xo("Asc","ascending-icon"),Xo("Desc","descending-icon"),Xo("Mixed","mixed-icon"),Xo("None","none-icon")]},qr=class extends Re{constructor(e){super(),this.eSortOrder=V,this.eSortAsc=V,this.eSortDesc=V,this.eSortMixed=V,this.eSortNone=V,e||this.setTemplate(q0)}attachCustomElements(e,t,i,o,s){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=i,this.eSortMixed=o,this.eSortNone=s}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),o=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",i),this.addManagedEventListeners({newColumnsLoaded:i,sortChanged:o,columnRowGroupChanged:o}),this.onSortChanged()}addInIcon(e,t,i){if(null==t)return;const o=Ot(e,this.beans,i);o&&t.appendChild(o)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortNone:i,column:o,gos:s,beans:n}=this,r=n.sortSvc.getDisplaySortForColumn(o);e&&ce(e,"asc"===r,{skipAriaHidden:!0}),t&&ce(t,"desc"===r,{skipAriaHidden:!0}),i&&ce(i,!(!o.getColDef().unSortIcon&&!s.get("unSortIcon"))&&null==r,{skipAriaHidden:!0})}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:i}=this;this.addInIcon("sortUnSort",e,t);const o=t.getColDef().showRowGroup;qt(i)&&o&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:i}=this;e&&ce(e,"mixed"===t.sortSvc.getDisplaySortForColumn(i),{skipAriaHidden:!0})}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:i}}=this;if(!e)return;const o=i.getColumnsWithSortingOrdered(),s=i.getDisplaySortIndexForColumn(t)??-1,n=o.some(a=>i.getDisplaySortIndexForColumn(a)??!1);ce(e,s>=0&&n,{skipAriaHidden:!0}),s>=0?e.textContent=(s+1).toString():Ue(e)}},Y0={selector:"AG-SORT-INDICATOR",component:qr},Zo=["asc","desc",null],ho={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",agNewFiltersToolPanel:"NewFiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"};function Ec(e){return`"${e}"`}var Z0={aggFunc:"SharedAggregation",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:e,editable:t})=>t?"string"==typeof e?ho[e]??"CustomEditor":"CustomEditor":null,cellRenderer:({cellRenderer:e})=>"string"!=typeof e?null:ho[e],cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:e,cellEditor:t})=>e&&!t?"TextEditor":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:e})=>e&&"string"!=typeof e&&"boolean"!=typeof e?"CustomFilter":"string"==typeof e?ho[e]??"ColumnFilter":"ColumnFilter",floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",headerTooltipValueGetter:"Tooltip",mainMenuItems:"ColumnMenu",menuTabs:e=>{const t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some(i=>t.includes(i))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",tooltipComponentSelector:"Tooltip",spanRows:"CellSpan",groupHierarchy:"SharedRowGrouping"},eb={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,headerTooltipValueGetter:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,tooltipComponentSelector:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0,rowGroupingHierarchy:void 0,groupHierarchy:void 0},ob=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","invalidEditValueMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce","renderingMode"],sb=["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","advancedFilterParams","initialState","autoSizeStrategy","selectionColumnDef","findOptions","filterHandlers","groupHierarchyConfig"],nb=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],Fc=["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","rowDragInsertDelay"],rb=["theme","rowSelection"],Pc=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],Dc=["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","enableFilterHandlers","suppressStartEditOnTab","hidePaddedHeaderRows","ssrmExpandAllAffectsAllRows"],ab=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getFullRowEditValidationErrors","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","isRowPinnable","isRowPinned","isRowValidDropPosition"];function Jt(e,t,i){return"number"==typeof t||null==t?null==t||t>=i?null:`${e}: value should be greater than or equal to ${i}`:`${e}: value should be a number`}var cb={alignedGrids:"AlignedGrids",allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",invalidEditValueMode:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getFullRowEditValidationErrors:"EditCore",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:"SharedRowGrouping",grandTotalRow:"ClientSideRowModelHierarchy",initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isRowPinnable:"PinnedRow",isRowPinned:"PinnedRow",localeText:"Locale",masterDetail:"SharedMasterDetail",pagination:"Pagination",pinnedBottomRowData:"PinnedRow",pinnedTopRowData:"PinnedRow",pivotMode:"SharedPivot",pivotPanelShow:"RowGroupingPanel",quickFilterText:"QuickFilter",rowClass:"RowStyle",rowClassRules:"RowStyle",rowData:"ClientSideRowModel",rowDragManaged:"RowDrag",rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:"SharedRowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:"SharedTreeData",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},ub=()=>{const e={autoSizePadding:{validate:({autoSizePadding:i})=>Jt("autoSizePadding",i,0)},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate:({cacheBlockSize:i})=>Jt("cacheBlockSize",i,1)},cacheOverflowSize:{validate:({cacheOverflowSize:i})=>Jt("cacheOverflowSize",i,1)},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:i=>{const o=i.domLayout,s=["autoHeight","normal","print"];return o&&!s.includes(o)?`domLayout must be one of [${s.join()}], currently it's ${o}`:null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate:({enableRowPinning:i,pinnedTopRowData:o,pinnedBottomRowData:s})=>i&&(o||s)?"Manual row pinning cannot be used together with pinned row data. Either set `enableRowPinning` to `false`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":null},isRowPinnable:{supportedRowModels:["clientSide"],validate:({enableRowPinning:i,isRowPinnable:o,pinnedTopRowData:s,pinnedBottomRowData:n})=>o&&(s||n)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!i&&o?"`isRowPinnable` requires `enableRowPinning` to be set.":null},isRowPinned:{supportedRowModels:["clientSide"],validate:({enableRowPinning:i,isRowPinned:o,pinnedTopRowData:s,pinnedBottomRowData:n})=>o&&(s||n)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!i&&o?"`isRowPinned` requires `enableRowPinning` to be set.":null},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},groupHierarchyConfig:{validate({groupHierarchyConfig:i={}},o,s){for(const n of Object.keys(i))s.validation?.validateColDef(i[n]);return null}},icons:{validate:({icons:i})=>{if(i){if(i.smallDown)return Kt(262);if(i.smallLeft)return Kt(263);if(i.smallRight)return Kt(264)}return null}},infiniteInitialRowCount:{validate:({infiniteInitialRowCount:i})=>Jt("infiniteInitialRowCount",i,1)},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},ssrmExpandAllAffectsAllRows:{validate:i=>{if("boolean"==typeof i.ssrmExpandAllAffectsAllRows){if("serverSide"!==i.rowModelType)return"'ssrmExpandAllAffectsAllRows' is only supported with the Server Side Row Model.";if(i.ssrmExpandAllAffectsAllRows&&"function"!=typeof i.getRowId)return"'getRowId' callback must be provided for Server Side Row Model grouping to work correctly."}return null}},keepDetailRowsCount:{validate:({keepDetailRowsCount:i})=>Jt("keepDetailRowsCount",i,1)},paginationPageSize:{validate:({paginationPageSize:i})=>Jt("paginationPageSize",i,1)},paginationPageSizeSelector:{validate:i=>{const o=i.paginationPageSizeSelector;return"boolean"==typeof o||null==o||o.length?null:"'paginationPageSizeSelector' cannot be an empty array.\n If you want to hide the page size selector, set paginationPageSizeSelector to false."}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate:({rowBuffer:i})=>Jt("rowBuffer",i,0)},rowClass:{validate:i=>"function"==typeof i.rowClass?"rowClass should not be a function, please use getRowClass instead":null},rowData:{supportedRowModels:["clientSide"]},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{pagination:{required:[!1,void 0]}}},rowSelection:{validate:({rowSelection:i})=>i&&"string"==typeof i?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':i&&"object"!=typeof i?"Expected `RowSelectionOptions` object for the `rowSelection` property.":i&&"multiRow"!==i.mode&&"singleRow"!==i.mode?`Selection mode "${i.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null},rowStyle:{validate:i=>{const o=i.rowStyle;return o&&"function"==typeof o?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null}},serverSideDatasource:{supportedRowModels:["serverSide"]},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate:({serverSideInitialRowCount:i})=>Jt("serverSideInitialRowCount",i,1)},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:i=>{const o=i.sortingOrder;if(Array.isArray(o)&&o.length>0){const s=o.filter(n=>!Zo.includes(n));if(s.length>0)return`sortingOrder must be an array with elements from [${Zo.map(us).join()}], currently it includes [${s.map(us).join()}]`}else if(!Array.isArray(o)||o.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${o}`;return null}},tooltipHideDelay:{validate:i=>i.tooltipHideDelay&&i.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:i=>i.tooltipShowDelay&&i.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:i=>{const o=i.rowModelType??"clientSide";switch(o){case"clientSide":{const{treeDataChildrenField:s,treeDataParentIdField:n,getDataPath:r,getRowId:a}=i;if(!s&&!n&&!r)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(s){if(r)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(n)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(n){if(!a)return"getRowId callback not provided, tree data with parent id cannot be built.";if(r)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":return i.isServerSideGroup&&i.getServerSideGroupKey?null:`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${o} row model.`}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate:({viewportRowModelBufferSize:i})=>Jt("viewportRowModelBufferSize",i,0)},viewportRowModelPageSize:{validate:({viewportRowModelPageSize:i})=>Jt("viewportRowModelPageSize",i,1)},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate:({autoGroupColumnDef:i,showOpenedGroup:o})=>i?.field&&o?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":i?.valueGetter&&o?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null},renderingMode:{validate:i=>{const o=i.renderingMode,s=["default","legacy"];return o&&!s.includes(o)?`renderingMode must be one of [${s.join()}], currently it's ${o}`:null}},autoSizeStrategy:{validate:({autoSizeStrategy:i})=>{if(!i)return null;const s=i.type;return"fitCellContents"!==s&&"fitGridWidth"!==s&&"fitProvidedWidth"!==s?`Invalid Auto-size strategy. \`autoSizeStrategy\` must be one of ${["fitCellContents","fitGridWidth","fitProvidedWidth"].map(n=>'"'+n+'"').join(", ")}, currently it's ${s}`:"fitProvidedWidth"===s&&"number"!=typeof i.width?`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${i.width}`:null}}},t={};for(const i of Dc)t[i]={expectedType:"boolean"};for(const i of Fc)t[i]={expectedType:"number"};return ft(t,e),t},gb=0,pb=0,Mc="__ag_grid_instance";function Tc(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 Cb=Tc(!0),vb=Tc(!1),bb={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"}]},yb={moduleName:"ColumnHeaderComp",version:G,userComponents:{agColumnHeader:class extends Re{constructor(){super(...arguments),this.eFilter=V,this.eFilterButton=V,this.eSortIndicator=V,this.eMenu=V,this.eLabel=V,this.eText=V,this.eSortOrder=V,this.eSortAsc=V,this.eSortDesc=V,this.eSortMixed=V,this.eSortNone=V,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||null!=this.currentSuppressMenuHide&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){const i={...e};ft(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?Cb:vb}init(e){this.params=e;const{sortSvc:t,touchSvc:i,rowNumbersSvc:o,userCompFactory:s}=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(),o?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(s,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const i=function Eg(e,t,i){return e.getCompDetails(t,ag,void 0,i)}(e,t,t);i&&(this.isLoadingInnerComponent=!0,i.newAgStackInstance().then(o=>{this.isLoadingInnerComponent=!1,o&&(this.isAlive()?(this.innerHeaderComponent=o,this.eText&&this.eText.appendChild(o.getGui())):this.destroyBean(o))}))}setDisplayName(e){const{displayName:t}=e,i=this.currentDisplayName;this.currentDisplayName=t,this.eText&&i!==t&&!this.innerHeaderComponent&&!this.isLoadingInnerComponent&&(this.eText.textContent=te(t))}addInIcon(e,t,i){const o=Ot(e,this.beans,i);o&&t.appendChild(o)}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)return pt(this.eMenu),void(this.eMenu=void 0);const{gos:e,eMenu:t,params:i}=this,o=Mt(e);this.addInIcon(o?"menu":"menuAlt",t,i.column),t.classList.toggle("ag-header-menu-icon",!o);const s=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=s,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(s)}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:o,eMenu:s,eFilterButton:n}=this,r=t.column,a=Mt(i);if(e&&!a){if(o.menuSvc?.isFilterMenuInHeaderEnabled(r))return t.showFilter(n??s??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(s??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:o,eSortOrder:s,eSortAsc:n,eSortDesc:r,eSortMixed:a,eSortNone:l}=this;o.attachCustomElements(s,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,()=>{const o=t.column.isFilterActive();ce(e,o,{skipAriaHidden:!0})},"filterActive")}setupFilterButton(){const{eFilterButton:e,params:t}=this;e&&(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,o){if(!e)return pt(t),!1;const s=this.params.column;return this.addInIcon(o,t,s),this.addManagedListeners(s,{filterChanged:i}),i(),!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)}}},icons:{menu:"menu",menuAlt:"menu-alt"}},Rb={moduleName:"ColumnGroupHeaderComp",version:G,userComponents:{agColumnGroupHeader:class extends Re{constructor(){super(bb),this.agOpened=V,this.agClosed=V,this.agLabel=V,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t,touchSvc:i}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),i?.setupForHeaderGroup(this)}checkWarnings(){this.params.template&&I(89)}workOutInnerHeaderGroupComponent(e,t){const i=function Pg(e,t,i){return e.getCompDetails(t,lg,void 0,i)}(e,t,t);i&&(this.isLoadingInnerComponent=!0,i.newAgStackInstance().then(o=>{this.isLoadingInnerComponent=!1,o&&(this.isAlive()?(this.innerHeaderGroupComponent=o,this.agLabel.appendChild(o.getGui())):this.destroyBean(o))}))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:i},beans:o}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const s=l=>{if(ci(l))return;const d=!i.isExpanded();o.colGroupSvc.setColumnGroupOpened(i.getProvidedColumnGroup(),d,"uiColumnExpanded")};this.addTouchAndClickListeners(o,t,s),this.addTouchAndClickListeners(o,e,s);const n=l=>{zi(l)};this.addManagedElementListeners(t,{dblclick:n}),this.addManagedElementListeners(e,{dblclick:n}),this.addManagedElementListeners(this.getGui(),{dblclick:s}),this.updateIconVisibility();const r=i.getProvidedColumnGroup(),a=this.updateIconVisibility.bind(this);this.addManagedListeners(r,{expandedChanged:a,expandableChanged:a})}addTouchAndClickListeners(e,t,i){e.touchSvc?.setupForHeaderGroupElement(this,t,i),this.addManagedElementListeners(t,{click:i})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:i}}=this;if(i.isExpandable()){const o=i.isExpanded();ce(e,o),ce(t,!o)}else ce(e,!1),ce(t,!1)}addInIcon(e,t){const i=Ot(e,this.beans,null);i&&t.appendChild(i)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:i}=this;ce(t,!1),ce(i,!1)}}setupLabel(e){const{displayName:t,columnGroup:i}=e,o=this.innerHeaderGroupComponent||this.isLoadingInnerComponent;C(t)&&!o&&(this.agLabel.textContent=te(t)),this.toggleCss("ag-sticky-label",!i.getColGroupDef()?.suppressStickyLabel)}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}}},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},Eb={moduleName:"AnimationFrame",version:G,beans:[class extends M{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,0===e&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){!1===this.active&&I(92)}createTask(e,t,i,o,s=!1){this.verify();let n=i;o&&this.batchFrameworkComps&&(n="f1");const r={task:e,index:t,createOrder:++this.taskCount,deferred:s};this.addTaskToList(this[n],r),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,o)=>i.deferred!==o.deferred?i.deferred?-1:1:i.index!==o.index?t*(o.index-i.index):o.createOrder-i.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){const{p1:t,p2:i,f1:o,destroyTasks:s,beans:n}=this,{ctrlsSvc:r,frameworkOverrides:a}=n,l=t.list,d=i.list,c=o.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()&&c.length;)this.sortTaskList(o),m=c.pop().task,m(),h=Date.now()-u}),m=()=>{};else{if(!s.length)break;m=s.pop()}m()}h=Date.now()-u}l.length||d.length||c.length||s.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);si(this.beans,e)}isQueueEmpty(){return!this.ticking}}]},Db={moduleName:"Touch",version:G,beans:[class extends M{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){Oi()&&this.mockContextMenu(e,e.element,(i,o,s)=>{const{rowCtrl:n,cellCtrl:r}=e.getControlsForEventTarget(s?.target??null);r?.column&&r.dispatchCellContextMenuEvent(s??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,s,n,r)})}handleCellDoubleClick(e,t){return!!(()=>{if(!Oi()||Ea("dblclick"))return!1;const o=Date.now(),s=o-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=o,s})()&&(e.onCellDoubleClicked(t),t.preventDefault(),!0)}setupForHeader(e){const{gos:t,sortSvc:i,menuSvc:o}=this.beans;if(t.get("suppressTouch"))return;const{params:s,eMenu:n,eFilterButton:r}=e,a=new Wi(e.getGui(),!0);e.addDestroyFunc(()=>a.destroy());const l=e.shouldSuppressMenuHide(),d=l&&C(n)&&s.enableMenu;let c=a;if(d&&(c=new Wi(n,!0),e.addDestroyFunc(()=>c.destroy())),s.enableMenu||o?.isHeaderContextMenuEnabled(s.column)){const u=d?"tap":"longTap",h=g=>s.showColumnMenuAfterMouseClick(g.touchStart);e.addManagedListeners(c,{[u]:h}),e.addManagedListeners(a,{longTap:h})}if(s.enableSorting&&e.addManagedListeners(a,{tap:h=>{const g=h.touchStart.target;l&&(n?.contains(g)||r?.contains(g))||i?.progressSort(s.column,!1,"uiColumnSorted")}}),s.enableFilterButton&&r){const u=new Wi(r,!0);e.addManagedListeners(u,{tap:()=>s.showFilter(r)}),e.addDestroyFunc(()=>u.destroy())}}setupForHeaderGroup(e){const t=e.params;if(this.beans.menuSvc?.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){const i=new Wi(t.eGridHeader,!0);e.addManagedListeners(i,{longTap:s=>t.showColumnMenuAfterMouseClick(s.touchStart)}),e.addDestroyFunc(()=>i.destroy())}}setupForHeaderGroupElement(e,t,i){const o=new Wi(t,!0);e.addManagedListeners(o,{tap:i}),e.addDestroyFunc(()=>o.destroy())}mockContextMenu(e,t,i){if(!Oi())return;const o=new Wi(t);e.addManagedListeners(o,{longTap:n=>{Do(this.beans,n.touchEvent)&&i(void 0,n.touchStart,n.touchEvent)}}),e.addDestroyFunc(()=>o.destroy())}}]},kc=class{constructor(){this.cellValidations=new Map}getCellValidation(e){const{rowNode:t,column:i}=e||{};return this.cellValidations?.get(t)?.get(i)}hasCellValidation(e){return e?.rowNode&&e.column?!!this.getCellValidation(e):this.cellValidations.size>0}setCellValidation(e,t){const{rowNode:i,column:o}=e;this.cellValidations.has(i)||this.cellValidations.set(i,new Map),this.cellValidations.get(i).set(o,t)}clearCellValidation(e){const{rowNode:t,column:i}=e;this.cellValidations.get(t)?.delete(i)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},Ac=class{constructor(){this.rowValidations=new Map}getRowValidation(e){const{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return e?.rowNode?!!this.getRowValidation(e):this.rowValidations.size>0}setRowValidation({rowNode:e},t){this.rowValidations.set(e,t)}clearRowValidation({rowNode:e}){this.rowValidations.delete(e)}setRowValidationMap(e){this.rowValidations=e}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}};function Yr(e,t={}){const{rowIndex:i,rowId:o,rowCtrl:s,rowPinned:n}=t;if(s)return s;const{rowModel:r,rowRenderer:a}=e;let{rowNode:l}=t;return l||(o?l=function QC(e,t,i){const{rowModel:o,pinnedRowModel:s}=e;let n;return n??(n=o?.getRowNode(t)),i?n??(n=s?.getPinnedRowById(t,i)):(n??(n=s?.getPinnedRowById(t,"top")),n??(n=s?.getPinnedRowById(t,"bottom"))),n}(e,o,n):null!=i&&(l=r.getRow(i))),a.getRowCtrls(l?[l]:[])?.[0]}function Ge(e,t={}){const{cellCtrl:i,colId:o,columnId:s,column:n}=t;if(i)return i;const r=e.colModel.getCol(o??s??Qr(n)),a=t.rowCtrl??Yr(e,t),l=a?.getCellCtrl(r)??void 0;if(l)return l;const d=t.rowNode??a?.rowNode;return d?e.rowRenderer.getCellCtrls([d],[r])?.[0]:void 0}function Ic(e){const{editSvc:t}=e;t?.isBatchEditing()?po(e):t?.stopEditing(void 0,{source:"api"})}function Qr(e){if(e)return"string"==typeof e?e:e.getColId()}var Ht=Symbol("unedited");function Lc(e,t={}){const i=[],o=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns);for(const s of o){const n=s.comp?.getCellEditor();n&&i.push({ctrl:s,editor:Vo(n)})}return i}function hi({pendingValue:e,sourceValue:t}){return e===Ht&&(e=t),e!==t}function go(e,t,i){const o=e.gos.get("enableGroupEdit"),{key:s,event:n,cellStartedEdit:r,silent:a}=i??{},l=Ge(e,t),d=l?.comp?.getCellEditor(),c=Bc(e,t,s,r&&!a),u=e.editModelSvc?.getEdit(t);let h=c.value;if(void 0===h&&(h=u?.sourceValue),e.editModelSvc?.setEdit(t,{editorValue:h,state:"editing"}),d)return void d.refresh?.(c);const g=t.column.getColDef(),p=Ml(e.userCompFactory,g,c),f=null!=p?.popupFromSelector?p.popupFromSelector:!!g.cellEditorPopup,m=null!=p?.popupPositionFromSelector?p.popupPositionFromSelector:g.cellEditorPopupPosition;if(Hc(p.params,n),l){l.editCompDetails=p,l.onEditorAttachedFuncs.push(()=>l.rangeFeature?.unsetComp()),l.comp?.setEditDetails(p,f,m,e.gos.get("reactiveCustomComponents")),l?.rowCtrl?.refreshRow({suppressFlash:!0});const w=e.editModelSvc?.getEdit(t,!0);!a&&!w?.editorState?.cellStartedEditing&&(e.editSvc?.dispatchCellEvent(t,n,"cellEditingStarted",o?{value:h}:{}),e.editModelSvc?.setEdit(t,{editorState:{cellStartedEditing:!0}}))}}function Oc(e,t,i){const o={editorValueExists:!1};if(Zr(e)&&(t.getValidationErrors?.()?.length??0)>0||i?.isCancelling)return o;if(i?.isStopping){const n=t?.isCancelAfterEnd?.();if(n)return{...o,isCancelAfterEnd:n}}return{editorValue:t.getValue(),editorValueExists:!0}}function Bc(e,t,i,o){const{valueSvc:s,gos:n,editSvc:r}=e,a=e.gos.get("enableGroupEdit"),l=Ge(e,t),d=t.rowNode?.rowIndex??void 0,c=r?.isBatchEditing(),u=e.colModel.getCol(t.column.getId()),{rowNode:h,column:g}=t,p=l.comp?.getCellEditor(),f=r?.getCellDataValue(t,!1),m=void 0===f?p?Oc(e,p)?.editorValue:void 0:f,w=m===Ht?s.getValueForDisplay(u,h)?.value:m;return ee(n,{value:a?m:w,eventKey:i??null,column:g,colDef:g.getColDef(),rowIndex:d,node:h,data:h.data,cellStartedEdit:o??!1,onKeyDown:l?.onKeyDown.bind(l),stopEditing:b=>{r.stopEditing(t,{source:c?"ui":"api",suppressNavigateAfterEdit:b}),en(e,t)},eGridCell:l?.eGui,parseValue:b=>s.parseValue(u,h,b,l?.value),formatValue:l?.formatValue.bind(l),validate:()=>{r?.validateEdit()}})}function Xr(e,t){const{editModelSvc:i}=e;i?.getEditMap().forEach((o,s)=>{o.forEach((n,r)=>{!t&&("editing"===n.state||n.pendingValue===Ht)||!hi(n)&&("editing"!==n.state||t)&&i?.removeEdits({rowNode:s,column:r})})})}function Hc(e,t){return t instanceof KeyboardEvent&&"agNumberCellEditor"===e.column.getColDef().cellEditor?e.suppressPreventDefault=["-","+",".","e"].includes(t?.key??"")||e.suppressPreventDefault:t?.preventDefault?.(),e}function $i(e,t){for(const i of e.editModelSvc?.getEditPositions()??[]){const o=Ge(e,i);if(!o)continue;const s=o.comp?.getCellEditor();if(!s)continue;const{editorValue:n,editorValueExists:r,isCancelAfterEnd:a}=Oc(e,s,t);a&&e.editModelSvc?.setEdit(i,{editorState:{isCancelAfterEnd:a}}),Js(e,i,n,0,!r,t)}}function Js(e,t,i,o,s,n){const{editModelSvc:r,valueSvc:a}=e;if(!r)return;const{rowNode:l,column:d}=t;if(!l||!d)return;let c=r.getEdit(t,!0);c?.sourceValue||(c=r.setEdit(t,{sourceValue:a.getValue(d,l,void 0,"api"),pendingValue:c?c.editorValue:Ht})),r.setEdit(t,{editorValue:s?c.sourceValue:i}),n?.persist&&function zb(e,t){const{editModelSvc:i}=e,o=i?.getEdit(t,!0);i?.setEdit(t,{pendingValue:o?.editorValue})}(e,t)}function po(e,t,i){t||(t=e.editModelSvc?.getEditPositions());for(const o of t??[])en(e,o,i)}function en(e,t,i){const o=e.gos.get("enableGroupEdit"),{editModelSvc:s}=e,n=Ge(e,t),r=s?.getEdit(t,!0);if(!n)return void(r&&s?.setEdit(t,{state:"changed"}));const{comp:a}=n;if(a&&!a.getCellEditor())return n?.refreshCell(),void(r&&(s?.setEdit(t,{state:"changed"}),Vc(e,t,o?Gc(i,r):{valueChanged:!1,newValue:void 0,oldValue:r.sourceValue},i)));if(Zr(e)){const d=a?.getCellEditor()?.getValidationErrors?.(),c=s?.getCellValidationModel();d?.length?c?.setCellValidation(t,{errorMessages:d}):c?.clearCellValidation(t)}s?.setEdit(t,{state:"changed"}),a?.setEditDetails(),a?.refreshEditStyles(!1,!1),n?.refreshCell({force:!0,suppressFlash:!0});const l=s?.getEdit(t);l&&"changed"===l.state&&Vc(e,t,o?Gc(i,l):{valueChanged:hi(l)&&!i?.cancel,newValue:i?.cancel||l.editorState.isCancelAfterEnd?void 0:l?.editorValue??r?.pendingValue,oldValue:l?.sourceValue},i)}function Gc(e,t){return e?.cancel?{valueChanged:!1,oldValue:t.sourceValue,newValue:void 0,value:t.sourceValue}:{valueChanged:!1,oldValue:t.sourceValue,newValue:t.pendingValue,value:t.sourceValue}}function Vc(e,t,i,{silent:o,event:s}={}){const{editSvc:n,editModelSvc:r}=e,a=r?.getEdit(t),{editorState:l}=a||{},{isCancelBeforeStart:d}=l||{};!o&&!d&&(n?.dispatchCellEvent(t,s,"cellEditingStopped",i),r?.setEdit(t,{editorState:{cellStoppedEditing:!0}}))}function Zr(e){const{gos:t,colModel:i}=e,o=!!t.get("getFullRowEditValidationErrors"),s=i.getColumnDefs()?.filter(r=>r.editable).some(({cellEditorParams:r})=>{const{minLength:a,maxLength:l,getValidationErrors:d,min:c,max:u}=r||{};return void 0!==a||void 0!==l||void 0!==d||void 0!==c||void 0!==u}),n=e.gridApi.getCellEditorInstances().some(r=>r.getValidationElement||r.getValidationErrors);return s||o||n}function ji(e,t){if(!t&&!Zr(e))return;const i=Lc(e),o=new kc,{ariaAnnounce:s,localeSvc:n,editModelSvc:r,gos:a}=e,l="fullRow"===a.get("editType"),c=Pa(n)("ariaValidationErrorPrefix","Cell Editor Validation");for(const h of i){const{ctrl:g,editor:p}=h,{rowNode:f,column:m}=g,w=p.getValidationErrors?.()??[],b=p.getValidationElement?.(!1)||!p.isPopup?.()&&g.eGui;if(b){const R=null!=w&&w.length>0,T=R?w.join(". "):"";U(b,R),R&&s.announceValue(`${c} ${w}`,"editorValidation"),b instanceof HTMLInputElement?b.setCustomValidity(T):b.classList.toggle("invalid",R)}w?.length>0&&o.setCellValidation({rowNode:f,column:m},{errorMessages:w})}$i(e,{persist:!1}),r?.setCellValidationModel(o);const u=new Set;for(const{ctrl:h}of i)u.add(h.rowCtrl);if(l){const h=_b(e);r?.setRowValidationModel(h)}for(const h of u.values()){h.rowEditStyleFeature?.applyRowStyles();for(const g of h.getAllCellCtrls())g.tooltipFeature?.refreshTooltip(!0),g.editorTooltipFeature?.refreshTooltip(!0),g.editStyleFeature?.applyCellStyles?.()}}var _b=e=>{const t=new Ac,i=e.gos.get("getFullRowEditValidationErrors"),o=e.editModelSvc?.getEditMap();if(!o)return t;for(const s of o.keys()){const n=o.get(s);if(!n)continue;const r=[],{rowIndex:a,rowPinned:l}=s;for(const c of n.keys()){const u=n.get(c);if(!u)continue;const{editorValue:h,pendingValue:g,sourceValue:p}=u,f=h??(g===Ht?void 0:g)??p;r.push({column:c,colId:c.getColId(),rowIndex:a,rowPinned:l,oldValue:p,newValue:f})}const d=i?.({editorsState:r})??[];d.length>0&&t.setRowValidation({rowNode:s},{errorMessages:d})}return t},jb=class extends M{constructor(e,t,i,o){super(),this.cellCtrl=e,this.rowNode=i,this.rowCtrl=o,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){const t=e.key;switch(t){case"Enter":this.onEnterKeyDown(e);break;case"F2":this.onF2KeyDown(e);break;case"Escape":this.onEscapeKeyDown(e);break;case"Tab":this.onTabKeyDown(e);break;case"Backspace":case"Delete":this.onBackspaceOrDeleteKeyDown(t,e);break;case P_DOWN:case P_UP:case P_RIGHT:case P_LEFT:this.onNavigationKeyDown(e,t)}}onNavigationKeyDown(e,t){const{cellCtrl:i,beans:o}=this;if(!o.editSvc?.isEditing(i,{withOpenEditor:!0})){if(e.shiftKey&&i.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const s=i.getFocusedCellPosition();o.navigation?.navigateToNextCell(e,t,s,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:i}=this.beans;if(!t)return;const o=t.extendLatestRangeInDirection(e);o&&(e.key===P_LEFT||e.key===P_RIGHT?i?.ensureColumnVisible(o.column):i?.ensureRowVisible(o.rowIndex))}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:i,beans:o,rowNode:s}=this,{gos:n,rangeSvc:r,eventSvc:a,editSvc:l}=o;if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),function $b(e,t=!1){return"Delete"===e||!t&&"Backspace"===e&&Al()}(e,n.get("enableCellEditingOnBackspace"))&&!l?.isEditing(i,{withOpenEditor:!0})){if(r&&ni(n))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(i.isCellEditable()){const{column:d}=i,c=this.beans.valueSvc.getDeleteValue(d,s);s.setDataValue(d,c,"cellClear")}}else l?.isEditing(i,{withOpenEditor:!0})||o.editSvc?.startEditing(i,{startedEdit:!0,event:t});a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(e){const{cellCtrl:t,beans:i}=this,{editSvc:o,navigation:s}=i,n=o?.isEditing(t,{withOpenEditor:!0}),r=t.rowNode,a=o?.isRowEditing(r,{withOpenEditor:!0}),l=d=>{o?.startEditing(d,{startedEdit:!0,event:e,source:"edit"})&&e.preventDefault()};if(n||a){if(this.isCtrlEnter(e))return void o?.applyBulkEdit(t,i?.rangeSvc?.getCellRanges()||[]);if(ji(i),"block-stop"===o?.checkNavWithValidation(void 0,e))return;o?.isEditing(t,{withOpenEditor:!0})?o?.stopEditing(t,{event:e,source:"edit"}):a&&!t.isCellEditable()?o?.stopEditing({rowNode:r},{event:e,source:"edit"}):l(t)}else if(i.gos.get("enterNavigatesVertically")){const d=e.shiftKey?P_UP:P_DOWN;s?.navigateToNextCell(null,d,t.cellPosition,!1)}else{if(o?.hasValidationErrors())return;o?.hasValidationErrors(t)&&o.revertSingleCellEdit(t,!0),l(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&"Enter"===e.key}onF2KeyDown(e){const{cellCtrl:t,beans:{editSvc:i}}=this;i?.isEditing()&&(ji(this.beans),"block-stop"===i?.checkNavWithValidation(void 0,e))||i?.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){const{cellCtrl:t,beans:{editSvc:i}}=this;"block-stop"===i?.checkNavWithValidation(t,e)&&i.revertSingleCellEdit(t),i?.stopEditing(t,{event:e,cancel:!0})}processCharacter(e){const i=e.target!==this.eGui,{beans:{editSvc:o},cellCtrl:s}=this;if(!i&&!o?.isEditing(s,{withOpenEditor:!0}))if(" "===e.key)this.onSpaceKeyDown(e);else if(o?.isCellEditable(s,"ui")){if(o?.hasValidationErrors()&&!o?.hasValidationErrors(s))return;o?.startEditing(s,{startedEdit:!0,event:e,source:"api"}),!s.editCompDetails?.params?.suppressPreventDefault&&e.preventDefault()}}onSpaceKeyDown(e){const{gos:t,editSvc:i}=this.beans,{rowNode:o}=this.cellCtrl;!i?.isEditing(this.cellCtrl,{withOpenEditor:!0})&&Ai(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,o,"spaceKey"),e.preventDefault()}},Kb=class extends M{constructor(e,t,i){super(),this.cellCtrl=e,this.column=i,this.beans=t}onMouseEvent(e,t){if(!ci(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)}}onCellClicked(e){if(this.beans.touchSvc?.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:i,editSvc:o,editModelSvc:s,frameworkOverrides:n,gos:r}=this.beans,a=e.ctrlKey||e.metaKey,{cellCtrl:l}=this,{column:d,cellPosition:c,rowNode:u}=l,h=ks(r,d,u,e);i&&a&&!h&&i.getCellRangeCount(c)>1&&i.intersectLastRange(!0);const g=l.createEvent(e,"cellClicked");g.isEventHandlingSuppressed=h,t.dispatchEvent(g);const p=d.getColDef();if(p.onCellClicked&&window.setTimeout(()=>{n.wrapOutgoing(()=>{p.onCellClicked(g)})},0),!h&&"editing"!==s?.getState(l)){const f=o?.isEditing(),m=s?.getCellValidationModel().getCellValidationMap().size??0,w=s?.getRowValidationModel().getRowValidationMap().size??0;if(f&&(m>0||w>0))return;o?.shouldStartEditing(l,e)?o?.startEditing(l,{event:e}):o?.shouldStopEditing(l,e)&&("fullRow"===this.beans.gos.get("editType")?o?.stopEditing(l,{event:e,source:"edit"}):o?.stopEditing(void 0,{event:e,source:"edit"}))}}onCellDoubleClicked(e){const{column:t,beans:i,cellCtrl:o}=this,{eventSvc:s,frameworkOverrides:n,editSvc:r,editModelSvc:a,gos:l}=i,d=ks(l,o.column,o.rowNode,e),c=t.getColDef(),u=o.createEvent(e,"cellDoubleClicked");if(u.isEventHandlingSuppressed=d,s.dispatchEvent(u),"function"==typeof c.onCellDoubleClicked&&window.setTimeout(()=>{n.wrapOutgoing(()=>{c.onCellDoubleClicked(u)})},0),!d&&r?.shouldStartEditing(o,e)&&"editing"!==a?.getState(o)){const h=r?.isEditing(),g=a?.getCellValidationModel().getCellValidationMap().size??0,p=a?.getRowValidationModel().getRowValidationMap().size??0;if(h&&(g>0||p>0))return;r?.startEditing(o,{event:e})}}onMouseDown(e){const{ctrlKey:t,metaKey:i,shiftKey:o}=e,s=e.target,{cellCtrl:n,beans:r}=this,{eventSvc:a,rangeSvc:l,rowNumbersSvc:d,focusSvc:c,gos:u,editSvc:h}=r,{column:g,rowNode:p,cellPosition:f}=n,m=ks(u,g,p,e),w=()=>{const k=n.createEvent(e,"cellMouseDown");k.isEventHandlingSuppressed=m,a.dispatchEvent(k)};if(m)return void w();if(this.isRightClickInExistingRange(e))return;const b=l&&!l.isEmpty(),R=this.containsWidget(s),T=li(g);if(d&&T&&!d.handleMouseDownOnCell(f,e))return l&&e.preventDefault(),void e.stopImmediatePropagation();if(!o||!b){const k=h?.isEditing(n),H=u.get("enableCellTextSelection")&&e.defaultPrevented,ae=(yi()||H)&&!k&&!ye(s)&&!R;n.focusCell(ae,e)}if(o&&b&&!c.isCellFocused(f)){e.preventDefault();const k=c.getFocusedCell();if(k){const{column:L,rowIndex:H,rowPinned:ae}=k;h?.isEditing(k)&&h?.stopEditing(k),c.setFocusedCell({column:L,rowIndex:H,rowPinned:ae,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}if(!R){if(l){T&&e.preventDefault();const k=sl(r,e)&&T;o?l.extendLatestRangeToCell(f):k||l.setRangeToCell(f,t||i)}w()}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const i=t.isCellInAnyRange(this.cellCtrl.cellPosition),o=sl(this.beans,e);if(i&&o)return!0}return!1}containsWidget(e){return at(e,"ag-selection-checkbox",3)||at(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),o=t.contains(e.relatedTarget);return i&&o}},qb=class extends M{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();if(e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e){const t=this.refreshSpanHeight.bind(this,e);t(),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:t,recalculateRowBounds:t,pinnedHeightChanged:t})}}refreshSpanHeight(e){const t=e.getCellHeight();null!=t&&(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();bi(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){null!=this.column.getColDef().colSpan&&(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),o=[];if(1===i)o.push(e);else{let s=e;const n=e.getPinned();for(let r=0;s&&r<i&&(o.push(s),s=this.beans.visibleCols.getColAfter(s),s&&!q(s)&&n===s.getPinned());r++);}return o}onLeftChanged(){if(!this.eSetLeft)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eSetLeft.style.left=e+"px"}getCellLeft(){let e;return e=this.beans.gos.get("enableRtl")&&this.colsSpanning?Ae(this.colsSpanning):this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||"left"===this.column.getPinned())return e;const{visibleCols:t}=this.beans,i=t.getColsLeftWidth();return"right"===this.column.getPinned()?i+t.bodyWidth+(e||0):i+(e||0)}_legacyApplyRowSpan(e){if(1===this.rowSpan&&!e)return;const i=Ii(this.beans)*this.rowSpan;this.eContent.style.height=`${i}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},oS=0,fo=class extends M{constructor(e,t,i,o){super(),this.column=e,this.rowNode=t,this.rowCtrl=o,this.rangeFeature=void 0,this.rowResizeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.editStyleFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.hasEdit=!1,this.tooltipFeature=void 0,this.editorTooltipFeature=void 0,this.beans=i,this.gos=i.gos,this.editSvc=i.editSvc,this.hasEdit=!!i.editSvc;const{colId:s}=e;this.instanceId=s+"-"+oS++,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){const{beans:e}=this;this.positionFeature=new qb(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this,e),this.editStyleFeature=e.editSvc?.createCellStyleFeature(this,e),this.mouseListener=new Kb(this,e,this.column),this.keyboardListener=new jb(this,e,this.rowNode,this.rowCtrl),this.enableTooltipFeature();const{rangeSvc:t}=e;t&&ni(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(e,this)),li(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(e,this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.editorTooltipFeature=e.destroyBean(this.editorTooltipFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.editStyleFeature=e.destroyBean(this.editStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.rowResizeFeature=e.destroyBean(this.rowResizeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}enableEditorTooltipFeature(e){this.editorTooltipFeature&&this.disableEditorTooltipFeature(),this.editorTooltipFeature=this.beans.tooltipSvc?.setupCellEditorTooltip(this,e),ji(this.beans)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(e,t,i,o,s,n,r){if(this.comp=e,this.eGui=t,this.printLayout=s,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(o,r),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(e),this.editStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),this.rowResizeFeature?.refreshRowResizer(),n&&this.isCellEditable()||this.hasEdit&&this.editSvc?.isEditing(this,{withOpenEditor:!0})?this.editSvc?.startEditing(this,{startedEdit:!1,source:"api",silent:!0,continueEditing:!0}):this.showValue(!1,!0),this.onCompAttachedFuncs.length){for(const a of this.onCompAttachedFuncs)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 null!=e.cellRenderer||null!=e.cellRendererSelector}getValueToDisplay(){return this.valueFormatted??this.value}getDeferLoadingCellRenderer(){const{beans:e,column:t}=this,{userCompFactory:i,ctrlsSvc:o,eventSvc:s}=e,n=t.getColDef(),r=this.createCellRendererParams();r.deferRender=!0;const a=Dl(i,n,r);if(o.getGridBodyCtrl()?.scrollFeature?.isScrolling()){let l;const d=new Ne(u=>{l=u}),[c]=this.addManagedListeners(s,{bodyScrollEnd:()=>{l(),c()}});return{loadingComp:a,onReady:d}}return{loadingComp:a,onReady:Ne.resolve()}}showValue(e,t){const{beans:i,column:o,rowNode:s,rangeFeature:n}=this,{userCompFactory:r}=i;let l,a=this.getValueToDisplay();const d=s.stub&&null==s.groupData?.[o.getId()],c=o.getColDef();if(d||this.isCellRenderer()){const u=this.createCellRendererParams();l=!d||li(o)?Pl(r,c,u):Dl(r,c,u)}if(!l&&!d&&i.findSvc?.isMatch(s,o)){const u=this.createCellRendererParams();l=Pl(r,{...o.getColDef(),cellRenderer:"agFindCellRenderer"},u)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(s,{checkSiblings:!0})){const u=this.editSvc.prepDetailsDuringBatch(this,{compDetails:l,valueToDisplay:a});u&&(u.compDetails?l=u.compDetails:u.valueToDisplay&&(a=u.valueToDisplay))}this.comp.setRenderDetails(l,a,e),this.customRowDragComp?.refreshVisibility(),!t&&n&&si(i,()=>n?.refreshHandle()),this.rowResizeFeature?.refreshRowResizer()}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e),!0),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()}getCellValueClass(){let i="";return"agCheckboxCellRenderer"===this.column.getColDef().cellRenderer&&(i=" ag-allow-overflow"),`ag-cell-value${i}`}isIncludeControl(e,t=!1){return(null==this.rowNode.rowPinned||t&&$o(this.rowNode))&&!!e}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:i}=this.beans.gridOptions,o=gs(t),s=ai(this.column);return("custom"!==i||"selectionColumn"===o||!s)&&(e.checkboxSelection||s&&"object"==typeof t&&Ji(t))}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),i=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),o=this.includeDndSource!=this.isIncludeControl(e.dndSource),s=this.isAutoHeight!=this.column.isAutoHeight();return t||i||o||s}onPopupEditorClosed(){const{editSvc:e}=this.beans;e?.isEditing(this,{withOpenEditor:!0})&&e?.stopEditing(this,{source:e?.isBatchEditing()?"ui":"api"})}stopEditing(e=!1){const{editSvc:t}=this.beans;return t?.stopEditing(this,{cancel:e,source:t?.isBatchEditing()?"ui":"api"})??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:i,rowNode:o,comp:s,eGui:n,beans:{valueSvc:r,gos:a,editSvc:l}}=this;return ee(a,{value:e,valueFormatted:t,getValue:()=>r.getValueForDisplay(i,o).value,setValue:c=>l?.setDataValue({rowNode:o,column:i},c)||o.setDataValue(i,c),formatValue:this.formatValue.bind(this),data:o.data,node:o,pinned:i.getPinned(),colDef:i.getColDef(),column:i,refreshCell:this.refreshCell.bind(this),eGridCell:n,eParentOfValue:s.getParentOfValue(),registerRowDragger:(c,u,h,g)=>this.registerRowDragger(c,u,g),setTooltip:(c,u)=>{a.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(c,u),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){if(this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e),this.hasEdit&&this.editCompDetails){const{editSvc:t,comp:i}=this;!i?.getCellEditor()&&t.isEditing(this,{withOpenEditor:!0})&&t.startEditing(this,{startedEdit:!1,source:"api",silent:!0})}}refreshCell({force:e,suppressFlash:t,newData:i}={}){const{editStyleFeature:o,customStyleFeature:s,rowCtrl:{rowEditStyleFeature:n},beans:{cellFlashSvc:r,filterManager:a},column:l,comp:d,suppressRefreshCell:c,tooltipFeature:u}=this;if(c)return;const{field:h,valueGetter:g,showRowGroup:p,enableCellChangeFlash:f}=l.getColDef(),w=e||null==h&&null==g&&null==p||i,b=!!d,R=this.updateAndFormatValue(b);if(b){if(w||R){this.showValue(!!i,!1);const k=a?.isSuppressFlashingCellsBecauseFiltering();!t&&!k&&f&&r?.flashCell(this),o?.applyCellStyles?.(),s?.applyUserStyles(),s?.applyClassesFromColDef(),n?.applyRowStyles()}u?.refreshTooltip(),s?.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,{value:o,valueFormatted:s}=this.beans.valueSvc.getValueForDisplay(this.column,this.rowNode,!0);return this.value=o,this.valueFormatted=s,!e||!this.valuesAreEqual(t,this.value)||this.valueFormatted!=i}valuesAreEqual(e,t){const i=this.column.getColDef();return i.equals?i.equals(e,t):e===t}addDomData(e){const t=this.eGui;Li(this.beans.gos,t,As,this),e.addDestroyFunc(()=>Li(this.beans.gos,t,As,null))}createEvent(e,t){const{rowNode:i,column:o,value:s,beans:n}=this;return function Ub(e,t,i,{rowNode:o,column:s},n){return ee(e.gos,{type:i,node:o,data:o.data,value:n,column:s,colDef:s.getColDef(),rowPinned:o.rowPinned,event:t,rowIndex:o.rowIndex})}(n,e,t,{rowNode:i,column:o},s)}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;Fd(e,t,i.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);X(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 null!=this.rangeFeature}focusCell(e=!1,t){const i=this.editSvc?.allowedFocusTargetOnValidation(this);i&&i!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){const{beans:{editSvc:t,focusSvc:i},comp:o}=this;if(!o||t?.isEditing(this)||!this.isCellFocused()||!i.shouldTakeFocus())return;const s=()=>{if(!this.isAlive())return;const n=o.getFocusableElement();this.isCellFocused()&&n.focus({preventScroll:!0})};e?setTimeout(s,0):s()}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged(),this.rowResizeFeature?.refreshRowResizer()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&(li(this.column)&&(e=!0),Dt(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.toggleCss("ag-cell-first-right-pinned",e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.toggleCss("ag-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(Ns(t))return;if(!this.comp)return void(e&&(this.focusEventWhileNotReady=e));const i=this.isCellFocused(),o=t.editSvc?.isEditing(this)??!1;if(this.comp.toggleCss("ag-cell-focus",i),i&&e?.forceBrowserFocus){let s=this.comp.getFocusableElement();if(o){const n=io(s,null,!0);n.length&&(s=n[0])}s.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}i&&e&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:Ee(t),column:this.column}}applyStaticCssClasses(){const{comp:e}=this;e.toggleCss("ag-cell",!0),e.toggleCss("ag-cell-not-inline-editing",!0);const t=1==this.column.isAutoHeight();e.toggleCss("ag-cell-auto-height",t),e.toggleCss("ag-cell-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.editSvc?.isEditing(this)?this.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){const e=1==this.column.getColDef().wrapText;this.comp.toggleCss("ag-cell-wrap-text",e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),i=this.createEvent(e,"cellContextMenu"),{beans:o}=this;o.eventSvc.dispatchEvent(i),t.onCellContextMenu&&window.setTimeout(()=>{o.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(Fe(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)return void this.customRowDragComp.setDragElement(e,t);const o=this.createRowDragComp(e,t,i);o&&(this.customRowDragComp=o,this.addDestroyFunc(()=>{this.beans.context.destroyBean(o),this.customRowDragComp=null}),o.refreshVisibility())}createRowDragComp(e,t,i){const o=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,i);if(o)return this.beans.context.createBean(o),o}cellEditorAttached(){for(const e of this.onEditorAttachedFuncs)e();this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){}getRootElement(){return this.eGui}};function Jr(e,t,i,o,s,n){if(null==i&&null==t)return;const r={},a={},l=(d,c)=>{for(const u of d.split(" "))""!=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;"string"==typeof h?g=!e||e.evaluate(h,o):"function"==typeof h&&(g=h(o)),l(u,p=>{g?r[p]=!0:a[p]=!0})}}if(t&&n)for(const d of Object.keys(t))l(d,c=>{r[c]||(a[c]=!0)});n&&Object.keys(a).forEach(n),Object.keys(r).forEach(s)}function Nc(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var nS=0,tn=class extends M{constructor(e,t,i,o,s){super(),this.rowNode=e,this.useAnimationFrameForCreate=o,this.printLayout=s,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+"-"+nS++,this.rowId=$(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=Nc(this.rowNode),this.setRowType(),this.setAnimateFlags(i),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=t.editSvc?.createRowStyleFeature(this,t),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if("function"!=typeof this.businessKeyForNodeFunc)return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=$(e)}updateGui(e,t){"left"===e?this.leftGui=t:"right"===e?this.rightGui=t:"fullWidth"===e?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,i,o){const{context:s,focusSvc:n}=this.beans,r={rowComp:e,element:t,containerType:i,compBean:o=Ho(this,s,o)};this.allRowGuis.push(r),this.updateGui(i,r),this.initialiseRowComp(r);const a=this.rowNode,l="FullWidthLoading"===this.rowType||a.stub,d=!a.data&&"infinite"===this.beans.rowModel.getType();!l&&!d&&!a.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent();const c=this.fullWidthGui?.element;c&&!this.beans.editSvc?.isEditing(this)&&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"FullWidthDetail"===this.rowType&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";for(const i of this.allRowGuis)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),Ai(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const i=e.rowComp,o=this.getInitialRowClasses(e.containerType);for(const s of o)i.toggleCss(s,!0);this.executeSlideAndFadeAnimations(e),this.rowNode.group&&pe(e.element,1==this.rowNode.expanded),this.setRowCompRowId(i),this.setRowCompRowBusinessKey(i),Li(t,e.element,Is,this),e.compBean.addDestroyFunc(()=>Li(t,e.element,Is,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.toggleCss("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){null!=this.businessKey&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=$(this.rowNode.id);this.rowId=t,null!=t&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(vn(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(vn(()=>{e.rowComp.toggleCss("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(o=>o!==i),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),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");e&&this.areAllContainersReady()&&e({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)})}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:i,beans:{visibleCols:o}}=this,s=!!e||!o.isPinningLeft(),n=!!t,r=!!i||!o.isPinningRight();return s&&n&&r}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return!!e&&e({rowNode:this.rowNode})}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,o=this.beans.colModel.isPivotMode(),s=el(this.gos,this.rowNode,o);this.rowType=e?"FullWidthLoading":i?"FullWidthDetail":t?"FullWidth":s?"FullWidthGroup":"Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:i}=this.beans;!i?.active||e||this.printLayout?this.updateColumnListsImpl(t):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 fo(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}createCellCtrls(e,t,i=null){const o={list:[],map:{}},s=(d,c,u)=>{null!=u?o.list.splice(u,0,c):o.list.push(c),o.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&&s(c,u)}for(const d of e.list){const c=d.column.getInstanceId();null==o.map[c]&&(this.isCellEligibleToBeRemoved(d,i)?d.destroy():n.push([c,d]))}if(n.length)for(const[d,c]of n){const u=o.list.findIndex(g=>g.column.getLeft()>c.column.getLeft()),h=-1===u?void 0:Math.max(u-1,0);s(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(!o.map[d]&&a.allCols.includes(l.column)){const u=this.createFocusedCellCtrl();if(u){const h=o.list.findIndex(p=>p.column.getLeft()>u.column.getLeft()),g=-1===h?void 0:Math.max(h-1,0);s(d,u,g)}}}return o}createFocusedCellCtrl(){const{focusSvc:e,rowSpanSvc:t}=this.beans,i=e.getFocusedCell();if(!i)return;const o=t?.getCellSpan(i.column,this.rowNode);if(o){if(o.firstNode!==this.rowNode||!o.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){for(const t of this.allRowGuis){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 o=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,o,"left");const s=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,s,"right")}}isCellEligibleToBeRemoved(e,t){const{column:s}=e;if(s.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;const{visibleCols:n,editSvc:r}=this.beans,a=r?.isEditing(e),l=e.isCellFocused();return!a&&!l||!(n.allCols.indexOf(s)>=0)}getDomOrder(){return this.gos.get("ensureDomOrder")||nt(this.gos,"print")}listenOnDomOrder(e){e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],()=>{e.rowComp.setDomOrder(this.getDomOrder())})}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;const t=C(this.rowNode.oldRowTop),{visibleCols:i}=this.beans,o=i.isPinningLeft(),s=i.isPinningRight();if(t){const{slideInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows"))return void(n.fullWidth=!0);n.center=!0,n.left=o,n.right=s}else{const{fadeInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows"))return void(n.fullWidth=!0);n.center=!0,n.left=o,n.right=s}}isFullWidth(){return"Normal"!==this.rowType}refreshFullWidth(){const e=(r,a)=>!r||r.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(r.element,a).params),t=e(this.fullWidthGui,null),i=e(this.centerGui,null),o=e(this.leftGui,"left"),s=e(this.rightGui,"right");return t&&i&&o&&s}addListeners(){const{beans:e,gos:t,rowNode:i}=this,{expansionSvc:o,eventSvc:s,context:n,rowSpanSvc:r}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...o?.getRowExpandedListeners(this)??{}}),i.detail&&this.addManagedListeners(i.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(i,{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),rowPinned:this.onRowPinned.bind(this)}),this.addManagedListeners(s,{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()}),r&&this.addManagedListeners(r,{spannedCellsUpdated:({pinned:a})=>{a&&!i.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,n),this.tooltipFeature=this.destroyBean(this.tooltipFeature,n),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,n)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow"))for(const l of this.allRowGuis)this.addRowDraggerToRow(l);else this.rowDragComps=this.destroyBeans(this.rowDragComps,n)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{for(const e of this.getAllCellCtrls())e.onRowIndexChanged()},cellChanged:e=>{for(const t of this.getAllCellCtrls())t.onCellChanged(e)}})}onRowPinned(){for(const e of this.allRowGuis)e.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){this.refreshRow({suppressFlash:!e.update,newData:!e.update})}refreshRow(e){if(this.isFullWidth()===!!this.isNodeFullWidthCell())if(this.isFullWidth())this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);else{for(const i of this.getAllCellCtrls())i.refreshCell(e);for(const i of this.allRowGuis)this.setRowCompRowId(i.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(i.rowComp);this.onRowSelected(),this.postProcessCss()}else this.beans.rowRenderer.redrawRow(this.rowNode)}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.rowEditStyleFeature?.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.beans.rowDropHighlightSvc,t=e?.row===this.rowNode?e.position:"none",i="above"===t,o="inside"===t,s="below"===t,r=this.gos.get("treeData")&&(s||i),a=this.rowNode.uiLevel.toString();for(const l of this.allRowGuis){const d=l.rowComp;d.toggleCss("ag-row-highlight-above",i),d.toggleCss("ag-row-highlight-inside",o),d.toggleCss("ag-row-highlight-below",s),d.toggleCss("ag-row-highlight-indent",r),r?l.element.style.setProperty("--ag-row-highlight-level",a):l.element.style.removeProperty("--ag-row-highlight-level")}}postProcessRowDragging(){const e=this.rowNode.dragging;for(const t of this.allRowGuis)t.rowComp.toggleCss("ag-row-dragging",e)}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:Ee(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.findFullWidthInfoForEvent(e);if(!t)return;const{rowGui:i,column:o}=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??o};l?.navigateToNextCell(e,e.key,c,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||ci(e))return;const t=this.allRowGuis.find(a=>a.element.contains(e.target)),i=t?t.element:null,o=i===e.target,s=Fe(this.beans);let n=!1;i&&s&&(n=i.contains(s)&&s.classList.contains("ag-cell"));let r=null;!o&&!n&&(r=Hi(this.beans,i,!1,e.shiftKey)),(this.isFullWidth()&&o||!r)&&this.beans.navigation?.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){const e=this.allRowGuis.find(t=>$e(t.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:this.gos.get("tabIndex");for(const i of this.allRowGuis)Dt(i.element,"tabindex",t)}onFullWidthRowFocused(e){const t=this.rowNode,i=!!e&&this.isFullWidth()&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned;let o;if(this.fullWidthGui)o=this.fullWidthGui.element;else{const n=this.beans.colModel.getCol(e?.column)?.pinned;o=n?"right"===n?this.rightGui?.element:this.leftGui?.element:this.centerGui?.element}o&&(o.classList.toggle("ag-full-width-focus",i),i&&e?.forceBrowserFocus&&o.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:{}};for(const o of e.list)o!==t&&(i.list.push(o),i.map[o.column.getInstanceId()]=o);return 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)}}createRowEvent(e,t){const{rowNode:i}=this;return ee(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){if(ci(e))return;const t=this.createRowEventWithSource("rowDoubleClicked",e);t.isEventHandlingSuppressed=this.isSuppressMouseEvent(e),this.beans.eventSvc.dispatchEvent(t)}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),i=this.getColumnForFullWidth(t);return t&&i?{rowGui:t,column:i}:void 0}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=at(e.target,"ag-row-drag",3),!this.isFullWidth()||this.isSuppressMouseEvent(e))return;const{rangeSvc:t,focusSvc:i}=this.beans;t?.removeAllCellRanges();const o=this.findFullWidthInfoForEvent(e);if(!o)return;const{rowGui:s,column:n}=o,r=s.element,a=e.target,l=this.rowNode;let d=e.defaultPrevented||yi();r&&r.contains(a)&&ye(a)&&(d=!1),i.setFocusedCell({rowIndex:l.rowIndex,column:n,rowPinned:l.rowPinned,forceBrowserFocus:d})}isSuppressMouseEvent(e){const{gos:t,rowNode:i}=this;if(this.isFullWidth()){const s=this.findFullWidthRowGui(e.target);return function Df(e,t,i,o){const s=t?.suppressMouseEventHandling;return md(e,void 0,i,o,s)}(t,s?.rowComp.getFullWidthCellRendererParams(),i,e)}const o=pr(t,e.target);return null!=o&&ks(t,o.column,i,e)}onRowClick(e){if(ci(e)||this.lastMouseDownOnDragger)return;const i=this.isSuppressMouseEvent(e),{eventSvc:o,selectionSvc:s}=this.beans,n=this.createRowEventWithSource("rowClicked",e);n.isEventHandlingSuppressed=i,o.dispatchEvent(n),!i&&s?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){"FullWidthDetail"===this.rowType&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,e)}createFullWidthCompDetails(e,t){const{gos:i,rowNode:o}=this,s=ee(i,{fullWidth:!0,data:o.data,node:o,value:o.key,valueFormatted:o.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.setupFullWidthRowTooltip(r,a)}}),n=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return function kg(e,t){return e.getCompDetailsFromGridOptions(yg,"agDetailCellRenderer",t,!0)}(n,s);case"FullWidthGroup":{const{value:r,valueFormatted:a}=this.beans.valueSvc.getValueForDisplay(void 0,this.rowNode,!0);return s.value=r,s.valueFormatted=a,function Tg(e,t){return e.getCompDetailsFromGridOptions(Sg,"agGroupRowRenderer",t,!0)}(n,s)}case"FullWidthLoading":return function Mg(e,t){return e.getCompDetailsFromGridOptions(bg,"agLoadingCellRenderer",t,!0)}(n,s);default:return function Dg(e,t){return e.getCompDetailsFromGridOptions(wg,void 0,t,!0)}(n,s)}}setupFullWidthRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.setupFullWidthRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,i="",o){const{rowDragSvc:s,context:n}=this.beans;if(!s||!this.isFullWidth())return;const r=s.createRowDragComp(()=>i,this.rowNode,void 0,e,t,o);this.createBean(r,n),this.addDestroyFunc(()=>{this.destroyBean(r,n)})}onUiLevelChanged(){const e=Nc(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,i="ag-row-level-"+this.rowLevel;for(const o of this.allRowGuis)o.rowComp.toggleCss(t,!0),o.rowComp.toggleCss(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();if(this.firstRowOnPage!==e){this.firstRowOnPage=e;for(const i of this.allRowGuis)i.rowComp.toggleCss("ag-row-first",e)}if(this.lastRowOnPage!==t){this.lastRowOnPage=t;for(const i of this.allRowGuis)i.rowComp.toggleCss("ag-row-last",t)}}getAllCellCtrls(){return 0===this.leftCellCtrls.list.length&&0===this.rightCellCtrls.list.length?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const e=[];if(this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),e.length)for(const t of e)for(const i of this.allRowGuis)i.rowComp.toggleCss(t,!0)}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!0)},e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!1)})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,i=>i.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return"left"===e||"right"===e?e:null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),i=this.isFullWidth(),{rowNode:o,beans:s}=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(o.rowIndex%2==0?"ag-row-even":"ag-row-odd"),o.isRowPinned()&&(n.push("ag-row-pinned"),s.pinnedRowModel?.isManual()&&n.push("ag-row-pinned-manual")),!o.isRowPinned()&&o.pinnedSibling&&n.push("ag-row-pinned-source"),o.isSelected()&&n.push("ag-row-selected"),o.footer&&n.push("ag-row-footer"),n.push("ag-row-level-"+this.rowLevel),o.stub&&n.push("ag-row-loading"),i&&n.push("ag-full-width-row"),s.expansionSvc?.addExpandedCss(n,o),o.dragging&&n.push("ag-row-dragging");const{rowStyleSvc:r}=s;return r&&(r.processClassesFromGridOptions(n,o),r.preProcessRowClassRules(n,o)),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&&("left"===t&&n.push("ag-cell-last-left-pinned"),"right"===t&&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:o,beans:s,gos:n}=this;i.addManagedListeners(t,{pointerenter:r=>{"mouse"===r.pointerType&&o.dispatchRowEvent("mouseEnter")},pointerleave:r=>{"mouse"===r.pointerType&&o.dispatchRowEvent("mouseLeave")}}),i.addManagedListeners(o,{mouseEnter:()=>{!s.dragSvc?.dragging&&!n.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),o.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,o=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(i,e),o)}forEachGui(e,t){if(e)t(e);else for(const i of this.allRowGuis)t(i)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(null==this.rowNode.rowHeight)return;const t=this.rowNode.rowHeight,i=this.beans.environment.getDefaultRowHeight(),s=Ya(this.gos)?Ci(this.beans,this.rowNode).height:void 0,n=s?Math.min(i,s)-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&&Xi(this.gos)&&!t.sticky)if(null!=t.rowTop){const s=this.roundRowTopToBounds(t.rowTop);this.setRowTop(s)}else for(const s of this.allRowGuis)s.rowComp.toggleCss("ag-opacity-zero",!0);this.fullWidthGui?.element.contains(Fe(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;const e=t=>{for(const i of t.list)i.destroy();return{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.toggleCss("ag-row-focus",this.rowFocused),t.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e}=this.beans,t=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses())}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){return this.rowNode.isRowPinned()||this.rowNode.sticky?e:e+this.beans.pageBounds.getPixelOffset()*(t?1:-1)}setRowTop(e){if(!this.printLayout&&C(e)){const t=this.applyPaginationOffset(e),s=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(s)}}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 o=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,s=this.applyPaginationOffset(o);i=t.isRowPinned()?s:this.beans.rowContainerHeight.getRealPixelPosition(s)}return i+"px"}setRowTopStyle(e){for(const t of this.allRowGuis)this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`)}getCellCtrl(e,t=!1){let i=null;for(const o of this.getAllCellCtrls())o.column==e&&(i=o);if(null!=i||t)return i;for(const o of this.getAllCellCtrls())o?.getColSpanningList().indexOf(e)>=0&&(i=o);return i}onRowIndexChanged(){null!=this.rowNode.rowIndex&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){const t=this.rowNode.getRowIndexString();if(null===t)return;const i=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),o=this.rowNode.rowIndex%2==0,s=i+this.rowNode.rowIndex+1;this.forEachGui(e,n=>{n.rowComp.setRowIndex(t),n.rowComp.toggleCss("ag-row-even",o),n.rowComp.toggleCss("ag-row-odd",!o),A(n.element,s)})}};function ea(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var aS={moduleName:"KeyboardNavigation",version:G,beans:[class extends M{constructor(){super(),this.beanName="navigation",this.onPageDown=Ma(this.onPageDown,100),this.onPageUp=Ma(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const i=e.key,o=e.altKey,s=e.ctrlKey||e.metaKey,n=!!this.beans.rangeSvc&&e.shiftKey,r=function em(e,t){return pr(e,t.target)?.getFocusedCellPosition()??null}(this.gos,e);let a=!1;switch(i){case"Home":case"End":!s&&!o&&(this.onHomeOrEndKey(i),a=!0);break;case P_LEFT:case P_RIGHT:case P_UP:case P_DOWN:if(!r)return!1;s&&!o&&!n&&(this.onCtrlUpDownLeftRight(i,r),a=!0);break;case"PageDown":case"PageUp":!s&&!o&&(a=this.handlePageUpDown(i,r,t))}return a&&e.preventDefault(),a}handlePageUpDown(e,t,i){return i&&(t=this.beans.focusSvc.getFocusedCell()),!!t&&("PageUp"===e?this.onPageUp(t):this.onPageDown(t),!0)}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:i,focusIndex:o,focusColumn:s,isAsync:n,rowPinned:r}){const{scrollFeature:a}=this.gridBodyCon;C(i)&&!i.isPinned()&&a.ensureColumnVisible(i),C(e)&&a.ensureIndexVisible(e,t),n||a.ensureIndexVisible(o);const{focusSvc:l,rangeSvc:d}=this.beans;l.setFocusedCell({rowIndex:o,column:s,rowPinned:r,forceBrowserFocus:!0}),d?.setRangeToCell({rowIndex:o,rowPinned:r,column:s})}onPageDown(e){const t=this.beans,i=ea(t),o=this.getViewportHeight(),{pageBounds:s,rowModel:n,rowAutoHeight:r}=t,a=s.getPixelOffset(),d=n.getRowIndexAtPixel(i.top+o+a);r?.active?this.navigateToNextPageWithAutoHeight(e,d):this.navigateToNextPage(e,d)}onPageUp(e){const t=this.beans,i=ea(t),{pageBounds:o,rowModel:s,rowAutoHeight:n}=t,r=o.getPixelOffset(),l=s.getRowIndexAtPixel(i.top+r);n?.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,i=!1){const{pageBounds:o,rowModel:s}=this.beans,n=this.getViewportHeight(),r=o.getFirstRow(),a=o.getLastRow(),l=o.getPixelOffset(),d=s.getRow(e.rowIndex),c=i?d?.rowHeight-n-l:n-l;let g,h=s.getRowIndexAtPixel(d?.rowTop+c+l);h===e.rowIndex&&(t=h=e.rowIndex+(i?-1:1)),i?(g="bottom",h<r&&(h=r),t<r&&(t=r)):(g="top",h>a&&(h=a),t>a&&(t=a)),this.isRowTallerThanView(s.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 o=this.getNextFocusIndexForAutoHeight(e,i);this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:o,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const i=t?-1:1,o=this.getViewportHeight(),{pageBounds:s,rowModel:n}=this.beans,r=s.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>o)break;a+=c}l+=i}return Math.max(0,Math.min(l,r))}getViewportHeight(){const e=this.beans,t=ea(e),i=this.beans.scrollVisibleSvc.getScrollbarWidth();let o=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(o-=i),o}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return"number"==typeof t&&t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const i=this.beans.cellNavigation.getNextCellToFocus(e,t,!0),o=this.getNormalisedPosition(i),{rowIndex:s,rowPinned:n,column:r}=o??i;this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:r,focusIndex:s,focusColumn:r,rowPinned:n})}onHomeOrEndKey(e){const t="Home"===e,{visibleCols:i,pageBounds:o,rowModel:s}=this.beans,n=i.allCols,r=t?o.getFirstRow():o.getLastRow(),a=s.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,o=this.tabToNextCellCommon(e,i,t),s=this.beans,{ctrlsSvc:n,pageBounds:r,focusSvc:a,gos:l}=s;if(!1===o)if(i){const{rowIndex:d,rowPinned:c}=e.getRowPosition();(c?0===d:d===r.getFirstRow())&&(0===l.get("headerHeight")||_i(s)?co(s,!0,!0):(t.preventDefault(),a.focusPreviousFromFirstCell(t)))}else e instanceof fo&&e.focusCell(!0),(a.focusOverlay(!1)||co(s,i))&&t.preventDefault();else o?t.preventDefault():null===o&&n.get("gridCtrl").allowFocusForNextCoreContainer(i)}tabToNextCell(e,t){const i=this.beans,{focusSvc:o,rowRenderer:s}=i,n=o.getFocusedCell();if(!n)return!1;let r=uo(i,n);return!(!r&&(r=s.getRowByPosition(n),!r?.isFullWidth())||!this.tabToNextCellCommon(r,e,t,"api"))}tabToNextCellCommon(e,t,i,o="ui"){const{editSvc:s,focusSvc:n}=this.beans;let r;const a=e instanceof fo?e:e.getAllCellCtrls()?.[0];return r=s?.isEditing()?s?.moveToNextCell(a,t,i,o):this.moveToNextCellNotEditing(e,t,i),null===r?r:r||!!n.focusedHeader}moveToNextCellNotEditing(e,t,i){const o=this.beans.visibleCols.allCols;let s;if(e instanceof tn){if(s={...e.getRowPosition(),column:t?o[0]:Ae(o)},this.gos.get("embedFullWidthRows")&&i){const r=e.findFullWidthInfoForEvent(i);r&&(s.column=r.column)}}else s=e.getFocusedCellPosition();const n=this.findNextCellToFocusOn(s,{backwards:t,startEditing:!1});if(!1===n)return null;if(n instanceof fo)n.focusCell(!0);else if(n)return this.tryToFocusFullWidthRow(n,t);return C(n)}findNextCellToFocusOn(e,{backwards:t,startEditing:i,skipToNextEditableCell:o}){let s=e;const n=this.beans,{cellNavigation:r,gos:a,focusSvc:l,rowRenderer:d,rangeSvc:c}=n;for(;;){e!==s&&(e=s),t||(s=this.getLastCellOfColSpan(s)),s=r.getNextTabbedCell(s,t);const u=a.getCallback("tabToNextCell");if(C(u)){const f=u({backwards:t,editing:i,previousCellPosition:e,nextCellPosition:s||null});if(!0===f)s=e;else{if(!1===f)return!1;s={rowIndex:f.rowIndex,column:f.column,rowPinned:f.rowPinned}}}if(!s)return null;if(s.rowIndex<0){const p=Zt(n);return l.focusHeaderPosition({headerPosition:{headerRowIndex:p+s.rowIndex,column:s.column},fromCell:!0}),null}const h="fullRow"===a.get("editType");if(i&&(!h||o)&&!this.isCellEditable(s))continue;this.ensureCellVisible(s);const g=uo(n,s);if(!g){const p=d.getRowByPosition(s);if(!p||!p.isFullWidth()||i)continue;return{...p.getRowPosition(),column:s?.column}}if(!r.isSuppressNavigable(g.column,g.rowNode))return g.setFocusedCellPosition(s),c?.setRangeToCell(s),g}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return!!t&&e.column.isCellEditable(t)}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:i,rowModel:o}=this.beans;return"top"===t?i?.getPinnedTopRow(e):"bottom"===t?i?.getPinnedBottomRow(e):o.getRow(e)}navigateToNextCell(e,t,i,o){let s=i,n=!1;const r=this.beans,{cellNavigation:a,focusSvc:l,gos:d}=r;for(;s&&(s===i||!this.isValidNavigateCell(s));)d.get("enableRtl")?t===P_LEFT&&(s=this.getLastCellOfColSpan(s)):t===P_RIGHT&&(s=this.getLastCellOfColSpan(s)),s=a.getNextCellToFocus(t,s),n=q(s);if(n&&e&&e.key===P_UP&&(s={rowIndex:-1,rowPinned:null,column:i.column}),o){const u=d.getCallback("navigateToNextCell");if(C(u)){const g=u({key:t,previousCellPosition:i,nextCellPosition:s||null,event:e});s=C(g)?{rowPinned:g.rowPinned,rowIndex:g.rowIndex,column:g.column}:null}}if(!s)return;if(s.rowIndex<0){const u=Zt(r);return void l.focusHeaderPosition({headerPosition:{headerRowIndex:u+s.rowIndex,column:i.column},event:e||void 0,fromCell:!0})}const c=this.getNormalisedPosition(s);c?this.focusPosition(c):this.tryToFocusFullWidthRow(s)}getNormalisedPosition(e){if(this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);const i=uo(this.beans,e);return i?(e=i.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:i,rowRenderer:o,focusSvc:s,eventSvc:n}=this.beans,r=i.allCols;if(!o.getRowByPosition(e)?.isFullWidth())return!1;const l=s.getFocusedCell(),d={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?Ae(r):r[0])};this.focusPosition(d);const c=t??(null!=l&&function jC(e,t){switch(e.rowPinned){case"top":if("top"!==t.rowPinned)return!0;break;case"bottom":if("bottom"!==t.rowPinned)return!1;break;default:if(C(t.rowPinned))return"top"!==t.rowPinned}return e.rowIndex<t.rowIndex}(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!!ui(this.beans,e)}getLastCellOfColSpan(e){const t=uo(this.beans,e);if(!t)return e;const i=t.getColSpanningList();return 1===i.length?e:{rowIndex:e.rowIndex,column:Ae(i),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=Xa(this.gos),i=this.beans.rowModel.getRow(e.rowIndex),o=t&&i?.sticky,{scrollFeature:s}=this.gridBodyCon;!o&&q(e.rowPinned)&&s.ensureIndexVisible(e.rowIndex),e.column.isPinned()||s.ensureColumnVisible(e.column)}ensureColumnVisible(e){const t=this.gridBodyCon.scrollFeature;e.isPinned()||t.ensureColumnVisible(e)}ensureRowVisible(e){this.gridBodyCon.scrollFeature.ensureIndexVisible(e)}},class extends M{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===P_UP,o=e===P_DOWN,s=e===P_LEFT;let n,r;const{pageBounds:a,gos:l,visibleCols:d,pinnedRowModel:c}=this.beans,{rowPinned:u}=t;if(i||o)r=u&&c?i?0:"top"===u?c.getPinnedTopRowCount()-1:c.getPinnedBottomRowCount()-1:i?a.getFirstRow():a.getLastRow(),n=t.column;else{const h=l.get("enableRtl");r=t.rowIndex,n=(s!==h?d.allCols:[...d.allCols].reverse()).find(p=>this.isCellGoodToFocusOn({rowIndex:r,rowPinned:null,column:p}))}return n?{rowIndex:r,rowPinned:u,column:n}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let i=t,o=!1;for(;!o;){switch(e){case P_UP:i=this.getCellAbove(i);break;case P_DOWN:i=this.getCellBelow(i);break;case P_RIGHT:i=this.gos.get("enableRtl")?this.getCellToLeft(i):this.getCellToRight(i);break;case P_LEFT:i=this.gos.get("enableRtl")?this.getCellToRight(i):this.getCellToLeft(i);break;default:i=null,I(8,{key:e})}o=!i||this.isCellGoodToFocusOn(i)}return i}isCellGoodToFocusOn(e){const t=e.column;let i;const{pinnedRowModel:o,rowModel:s}=this.beans;switch(e.rowPinned){case"top":i=o?.getPinnedTopRow(e.rowIndex);break;case"bottom":i=o?.getPinnedBottomRow(e.rowIndex);break;default:i=s.getRow(e.rowIndex)}return!!i&&!this.isSuppressNavigable(t,i)}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=Xd(this.beans,t,!0);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=Us(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned},!0);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,o=t.allCols;let s=e.rowIndex,n=e.rowPinned,r=t.getColAfter(e.column);if(!r){r=o[0];const a=Xd(this.beans,e,!0);if(q(a)||!a.rowPinned&&!(i?.isRowInPage(a.rowIndex)??1))return null;s=a?a.rowIndex:null,n=a?a.rowPinned:null}return{rowIndex:s,column:r,rowPinned:n}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:i,pagination:o}=t,s=i.allCols;let n=e.rowIndex,r=e.rowPinned,a=i.getColBefore(e.column);if(!a){a=Ae(s);const l=Us(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);if(q(l)||!l.rowPinned&&!(o?.isRowInPage(l.rowIndex)??1))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;return"boolean"==typeof i?i:"function"==typeof i&&i(e.createColumnFunctionCallbackParams(t))}},class extends M{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=ve(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let i;const{colModel:o,colGroupSvc:s,ctrlsSvc:n}=this.beans;if("string"==typeof e?(i=o.getCol(e),i||(i=s?.getColumnGroup(e)??null)):i=e,!i)return null;const a=n.getHeaderRowContainerCtrl()?.getAllCtrls(),l="filter"===Ae(a||[]).type,d=Zt(this.beans)-1;let c=-1,u=i;for(;u;)c++,u=u.getParent();let h=c;return t&&l&&h===d-1&&h++,-1===h?null:{headerRowIndex:h,column:i}}navigateVertically(e,t){const{focusSvc:i,visibleCols:o}=this.beans,{focusedHeader:s}=i;if(!s)return!1;const{headerRowIndex:n}=s,r=s.column,a=Zt(this.beans),l=this.getHeaderRowType(n),d=o.headerGroupRowCount;let{headerRowIndex:c,column:u,headerRowIndexWithoutSpan:h}="UP"===e?function _0(e,t,i){const o=i-1;if("filter"!==e){const s=t instanceof wi&&t.isSpanHeaderHeight();let n=t.getParent();for(;n&&(n.getProvidedColumnGroup().getLevel()>o||s&&n.isPadding());)n=n.getParent();if(n)return s?{column:n,headerRowIndex:n.getProvidedColumnGroup().getLevel(),headerRowIndexWithoutSpan:o}:{column:n,headerRowIndex:o,headerRowIndexWithoutSpan:o}}return{column:t,headerRowIndex:o,headerRowIndexWithoutSpan:o}}(l,r,n):function W0(e,t,i){const o=t+1,s={column:e,headerRowIndex:o,headerRowIndexWithoutSpan:o};if(e instanceof No){if(o>=i)return{column:e.getDisplayedLeafColumns()[0],headerRowIndex:i,headerRowIndexWithoutSpan:o};let r=e.getDisplayedChildren()[0];if(r instanceof No&&r.isPadding()){const l=r.getDisplayedLeafColumns()[0];l.isSpanHeaderHeight()&&(r=l)}s.column=r,r instanceof wi&&r.isSpanHeaderHeight()&&(s.headerRowIndex=i,s.headerRowIndexWithoutSpan=o)}return s}(r,n,d),g=!1;return c<0&&(c=0,u=r,g=!0),c>=a?(c=-1,this.currentHeaderRowWithoutSpan=-1):void 0!==h&&(this.currentHeaderRowWithoutSpan=h),!(!g&&!u)&&i.focusHeaderPosition({headerPosition:{headerRowIndex:c,column:u},allowUserOverride:!0,event:t})}navigateHorizontally(e,t=!1,i){const{focusSvc:o,gos:s}=this.beans,n={...o.focusedHeader};let r,a;-1!==this.currentHeaderRowWithoutSpan?n.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=n.headerRowIndex,"LEFT"===e!==s.get("enableRtl")?(a="Before",r=this.findHeader(n,a)):(a="After",r=this.findHeader(n,a));const l=s.getCallback("tabToNextHeader");if(t&&l){const d=o.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:r,direction:a});if(d){const{headerRowIndex:c}=o.focusedHeader||{};null!=c&&c!=n.headerRowIndex&&(this.currentHeaderRowWithoutSpan=c)}return d}return r||!t?o.focusHeaderPosition({headerPosition:r,direction:a,fromTab:t,allowUserOverride:!0,event:i}):this.focusNextHeaderRow(n,a,i)}focusNextHeaderRow(e,t,i){const o=this.beans,s=e.headerRowIndex;let r,n=null;const a=Zt(o),l=this.beans.visibleCols.allCols;if("Before"===t){if(s<=0)return!1;n=Ae(l),r=s-1,this.currentHeaderRowWithoutSpan-=1}else n=l[0],r=s+1,this.currentHeaderRowWithoutSpan<a?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1;let{column:d,headerRowIndex:c}=Rc(this.beans,n,r);return c>=a&&(c=-1),o.focusSvc.focusHeaderPosition({headerPosition:{column:d,headerRowIndex:c},direction:t,fromTab:!0,allowUserOverride:!0,event:i})}scrollToColumn(e,t="After"){if(e.getPinned())return;let i;if(qe(e)){const o=e.getDisplayedLeafColumns();i="Before"===t?Ae(o):o[0]}else i=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(i)}findHeader(e,t){const{colGroupSvc:i,visibleCols:o}=this.beans;let s=e.column;if(s instanceof No){const l=s.getDisplayedLeafColumns();s="Before"===t?l[0]:l[l.length-1]}const n="Before"===t?o.getColBefore(s):o.getColAfter(s);if(!n)return;if(e.headerRowIndex>=o.headerGroupRowCount)return{headerRowIndex:e.headerRowIndex,column:n};const a=i?.getColGroupAtLevel(n,e.headerRowIndex);return a?a.isPadding()&&n.isSpanHeaderHeight()?{headerRowIndex:o.headerGroupRowCount,column:n}:{headerRowIndex:e.headerRowIndex,column:a??n}:{headerRowIndex:n instanceof wi&&n.isSpanHeaderHeight()?o.headerGroupRowCount:e.headerRowIndex,column:n}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}}],apiFunctions:{getFocusedCell:function Tb(e){return e.focusSvc.getFocusedCell()},clearFocusedCell:function kb(e){return e.focusSvc.clearFocusedCell()},setFocusedCell:function Ab(e,t,i,o){e.focusSvc.setFocusedCell({rowIndex:t,column:i,rowPinned:o,forceBrowserFocus:!0})},setFocusedHeader:function Ob(e,t,i=!1){const o=e.headerNavigation?.getHeaderPositionForColumn(t,i);o&&e.focusSvc.focusHeaderPosition({headerPosition:o})},tabToNextCell:function Ib(e,t){return e.navigation?.tabToNextCell(!1,t)??!1},tabToPreviousCell:function Lb(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}}},uS=class extends M{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&&(ce(i,t),$t(i,e))}},gS={moduleName:"PinnedColumn",version:G,beans:[class extends M{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,o=nt(e,"print"),s=o?0:t.getColsLeftWidth(),n=o?0:t.getDisplayedColumnsRightWidth();s!=this.leftWidth&&(this.leftWidth=s,i.dispatchEvent({type:"leftPinnedWidthChanged"})),n!=this.rightWidth&&(this.rightWidth=n,i.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const t=wt(this.gridBodyCtrl.eBodyViewport);if(t<=50)return;const i=this.getPinnedColumnsOverflowingViewport(t-50),o=this.gos.getCallback("processUnpinnedColumns"),{columns:s,hasLockedPinned:n}=i;let r=s;!r.length&&!n||(o&&(r=o({columns:r,viewportWidth:t})),r?.length&&(r=r.filter(a=>!li(a)),this.setColsPinned(r,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new uS(e,t)}setColsPinned(e,t,i){const{colModel:o,colAnimation:s,visibleCols:n,gos:r}=this.beans;if(!o.cols||!e?.length)return;if(nt(r,"print"))return void I(37);let a;s?.start(),a=!0===t||"left"===t?"left":"right"===t?"right":null;const l=[];for(const d of e){if(!d)continue;const c=o.getCol(d);c&&c.getPinned()!==a&&(this.setColPinned(c,a),l.push(c))}l.length&&(n.refresh(i),Cl(this.eventSvc,l,i)),s?.finish()}initCol(e){const{pinned:t,initialPinned:i}=e.colDef;this.setColPinned(e,void 0!==t?t:i)}setColPinned(e,t){e.pinned=!0===t||"left"===t?"left":"right"===t?"right":null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){const{scrollVisibleSvc:t}=this.beans;if(null==e.pinned)return;const i="left"===e.pinned,o="right"===e.pinned;e.hidden=!0;const s=()=>{const n=i?this.leftWidth:this.rightWidth;if(null==n)return;const r=0==n,a=e.hidden!==r,l=this.gos.get("enableRtl"),d=t.getScrollbarWidth();e.comp.setPinnedContainerWidth(`${t.verticalScrollShowing&&(l&&i||!l&&o)?n+d:n}px`),e.comp.setDisplayed(!r),a&&(e.hidden=r,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:s,rightPinnedWidthChanged:s,scrollVisibilityChanged:s,scrollbarWidthChanged:s})}getHeaderResizeDiff(e,t){if(t.getPinned()){const{leftWidth:o,rightWidth:s}=this,n=wt(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(o+s+e>n){if(!(n>o+s))return 0;e=n-o-s}}return e}getPinnedColumnsOverflowingViewport(e){const o=(this.rightWidth??0)+(this.leftWidth??0);let s=!1;if(o<e)return{columns:[],hasLockedPinned:s};const{visibleCols:n}=this.beans,r=[...n.leftCols],a=[...n.rightCols];let l=0,d=0;const u=[];let h=o-0-e;for(;(d<r.length||l<a.length)&&h>0;){if(l<a.length){const g=a[l++];if(g.colDef.lockPinned){s=!0;continue}h-=g.getActualWidth(),u.push(g)}if(d<r.length&&h>0){const g=r[d++];if(g.colDef.lockPinned){s=!0;continue}h-=g.getActualWidth(),u.push(g)}}return{columns:u,hasLockedPinned:s}}}],css:[".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}"]},fS={moduleName:"Aria",version:G,beans:[class extends M{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=it(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=ve(e),i=this.descriptionContainer=t.createElement("div");i.classList.add("ag-aria-description-container"),x(i,"polite"),function B(e,t){ke(e,"relevant",t)}(i,"additions text"),function E(e,t){ke(e,"atomic",t)}(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(()=>{this.handleAnnouncementUpdate(e)},50)}handleAnnouncementUpdate(e){if(!this.isAlive()||!this.descriptionContainer)return;let t=e;null!=t&&""!=t.replace(/[ .]/g,"")?(this.lastAnnouncement===t&&(t=`${t}\u200b`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t):this.lastAnnouncement=""}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(Ue(e),e.remove()),this.descriptionContainer=null,this.pendingAnnouncements.clear()}}]},zc="ag-delay-render",vS={moduleName:"ColumnDelayRender",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="colDelayRenderSvc",this.hideRequested=!1,this.alreadyRevealed=!1,this.timesRetried=0,this.requesters=new Set}hideColumns(e){this.alreadyRevealed||this.requesters.has(e)||(this.requesters.add(e),this.hideRequested||(this.beans.ctrlsSvc.whenReady(this,t=>{t.gridBodyCtrl.eGridBody.classList.add(zc)}),this.hideRequested=!0))}revealColumns(e){if(this.alreadyRevealed||!this.isAlive()||(this.requesters.delete(e),this.requesters.size>0))return;const{renderStatus:t,ctrlsSvc:i}=this.beans;if(t){if(!t.areHeaderCellsRendered()&&this.timesRetried<5)return this.timesRetried++,void setTimeout(()=>this.revealColumns(e));this.timesRetried=0}i.getGridBodyCtrl().eGridBody.classList.remove(zc),this.alreadyRevealed=!0}}],css:[":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}"]},RS={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"}]}]},_c=class extends Re{constructor(){super(RS),this.eOverlayWrapper=V,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeCssClass=null,this.elToFocusAfter=null,this.registerCSS(".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:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}")}handleKeyDown(e){if("Tab"!==e.key||e.defaultPrevented||ci(e))return;const t=this.beans;if(Hi(t,this.eOverlayWrapper,!1,e.shiftKey))return;let o=!1;o=e.shiftKey?t.focusSvc.focusGridView({column:Ae(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):co(t,!1),o&&e.preventDefault()}updateLayoutClasses(e,t){const i=this.eOverlayWrapper.classList,{AUTO_HEIGHT:o,NORMAL:s,PRINT:n}=zt;i.toggle(o,t.autoHeight),i.toggle(s,t.normal),i.toggle(n,t.print)}postConstruct(){this.createManagedBean(new cr(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,o){if(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,e){if(this.setDisplayed(!0,{skipAriaHidden:!0}),i&&this.isGridFocused()){const s=Fe(this.beans);s&&!Rt(this.beans)&&(this.elToFocusAfter=s)}e.then(s=>{if(this.activePromise===e){if(this.activePromise=null,s){if(this.activeOverlay!==s&&(this.eOverlayWrapper.appendChild(s.getGui()),this.activeOverlay=s,o)){const n=s;this.updateListenerDestroyFunc=this.addManagedPropertyListener(o,({currentValue:r})=>{n.refresh?.(ee(this.gos,{...r??{}}))})}i&&this.isGridFocused()&&Bi(this.eOverlayWrapper)}}else this.activeOverlay!==s&&(this.destroyBean(s),s=null)})}}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),Ue(this.eOverlayWrapper),t?.focus?.({preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=Fe(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setOverlayWrapperComp(void 0),super.destroy()}},xS={selector:"AG-OVERLAY-WRAPPER",component:_c},FS={moduleName:"Overlay",version:G,userComponents:{agLoadingOverlay:class extends Ld{init(){const e=Ee(this.gos.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(e??Mm),!e){const i=this.getLocaleTextFunc()("loadingOoo","Loading...");this.getGui().textContent=i,this.beans.ariaAnnounce.announceValue(i,"overlay")}}},agNoRowsOverlay:class extends Ld{init(){const e=Ee(this.gos.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(e??km),!e){const i=this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=i,this.beans.ariaAnnounce.announceValue(i,"overlay")}}}},apiFunctions:{showLoadingOverlay:function wS(e){e.overlays?.showLoadingOverlay()},showNoRowsOverlay:function bS(e){e.overlays?.showNoRowsOverlay()},hideOverlay:function SS(e){e.overlays?.hideOverlay()}},beans:[class extends M{constructor(){super(...arguments),this.beanName="overlays",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}postConstruct(){this.isClientSide=je(this.gos),this.isServerSide=!this.isClientSide&&Qi(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 0!==this.state&&!!this.eWrapper}isExclusive(){return 1===this.state&&!!this.eWrapper}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos,t=e.get("loading");!t&&(void 0!==t||e.get("suppressLoadingOverlay"))||this.doShowLoadingOverlay()}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;e.get("loading")||e.get("suppressNoRowsOverlay")||this.doShowNoRowsOverlay()}hideOverlay(){this.showInitialOverlay=!1,this.gos.get("loading")?I(99):this.doHideOverlay()}getOverlayWrapperSelector(){return xS}getOverlayWrapperCompClass(){return _c}updateOverlayVisibility(){if(!this.eWrapper)return void(this.state=0);const{state:e,isClientSide:t,isServerSide:i,beans:{gos:o,colModel:s,rowModel:n}}=this;let r=this.gos.get("loading");void 0!==r&&(this.showInitialOverlay=!1),this.showInitialOverlay&&void 0===r&&!o.get("suppressLoadingOverlay")&&(r=!o.get("columnDefs")||!s.ready||!o.get("rowData")&&t),r?1!==e&&this.doShowLoadingOverlay():(this.showInitialOverlay=!1,t&&n.isEmpty()&&!o.get("suppressNoRowsOverlay")?2!==e&&this.doShowNoRowsOverlay():(1===e||!i&&0!==e)&&this.doHideOverlay())}doShowLoadingOverlay(){this.eWrapper&&(this.state=1,this.showOverlay(function Lg(e,t){return e.getCompDetailsFromGridOptions(fg,"agLoadingOverlay",t,!0)}(this.beans.userCompFactory,ee(this.gos,{})),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){this.eWrapper&&(this.state=2,this.showOverlay(function Og(e,t){return e.getCompDetailsFromGridOptions(mg,"agNoRowsOverlay",t,!0)}(this.beans.userCompFactory,ee(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 o=e?.newAgStackInstance()??null;this.eWrapper?.showOverlay(o,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;2===this.state&&(t=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0),this.wrapperPadding!==t&&(this.wrapperPadding=t,e.updateOverlayWrapperPaddingTop(t))}}]},TS=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(null==e?.id)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 null!=this.entriesMap[e.id]}removeRow(e){const t=e.id,i=this.entriesMap[t];delete this.entriesMap[t],Lt(this.entriesList,i)}removeFromCache(e){delete this.entriesMap[e.rowNode.id],Lt(this.entriesList,e)}getEntries(){return this.entriesList}};function ta(e){if(!e)return;const t={top:{},bottom:{},normal:{}};for(const i of e){const o=i.id;switch(i.rowPinned){case"top":t.top[o]=i;break;case"bottom":t.bottom[o]=i;break;default:t.normal[o]=i}}return t}function ia(e,t){const i=e.id;switch(e.rowPinned){case"top":return null!=t.top[i];case"bottom":return null!=t.bottom[i];default:return null!=t.normal[i]}}var Wc={moduleName:"Sort",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,i){const o=this.getNextSortDirection(e);this.setSortForColumn(e,o,t,i)}progressSortFromEvent(e,t){const o="ctrl"===this.gos.get("multiSortKey")?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,o,"uiColumnSorted")}setSortForColumn(e,t,i,o){"asc"!==t&&"desc"!==t&&(t=null);const{gos:s,showRowGroupCols:n}=this.beans;let a=[e];if(qt(s)&&e.getColDef().showRowGroup){const u=n?.getSourceColumnsForGroupColumn?.(e)?.filter(h=>h.isSortable());u&&(a=[e,...u])}for(const c of a)this.setColSort(c,t,o);const d=[];if(!i&&!s.get("alwaysMultiSort")||s.get("suppressMultiSort")){const c=this.clearSortBarTheseColumns(a,o);d.push(...c)}this.updateSortIndex(e),d.push(...a),this.dispatchSortChangedEvents(o,d)}updateSortIndex(e){const{gos:t,colModel:i,showRowGroupCols:o}=this.beans,s=qt(t),n=o?.getShowRowGroupCol(e.getId()),r=s&&n||e,a=this.getColumnsWithSortingOrdered();i.forAllCols(c=>this.setColSortIndex(c,null));const l=a.filter(c=>!(s&&c.getColDef().showRowGroup||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(o=>{e.includes(o)||(o.getSort()&&i.push(o),this.setColSort(o,void 0,t))}),i}getNextSortDirection(e){const t=e.getColDef().sortingOrder??this.gos.get("sortingOrder")??Zo,i=t.indexOf(e.getSort());return i<0||i==t.length-1?t[0]:t[i+1]}getIndexedSortMap(){const{gos:e,colModel:t,showRowGroupCols:i,rowGroupColsSvc:o}=this.beans;let s=[];if(t.forAllCols(d=>{d.getSort()&&s.push(d)}),t.isPivotMode()){const d=qt(e);s=s.filter(c=>{const u=!!c.getAggFunc(),h=!c.isPrimary(),g=d?i?.getShowRowGroupCol(c.getId()):c.getColDef().showRowGroup;return u||h||g})}const n=o?.columns.filter(d=>!!d.getSort())??[],r={};s.forEach((d,c)=>r[d.getId()]=c),s.sort((d,c)=>{const u=d.getSortIndex(),h=c.getSortIndex();return null!=u&&null!=h?u-h:null==u&&null==h?r[d.getId()]>r[c.getId()]?1:-1:null==h?-1:1});const a=qt(e)&&!!n.length;a&&(s=[...new Set(s.map(d=>i?.getShowRowGroupCol(d.getId())??d))]);const l=new Map;if(s.forEach((d,c)=>l.set(d,c)),a)for(const d of n){const c=i.getShowRowGroupCol(d.getId());l.set(d,l.get(c))}return 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=qt(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 o=null!=e.getColDef().field||e.getColDef().valueGetter?[e,...t]:t,s=o[0].getSort();return o.every(r=>r.getSort()==s)?s:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t,i){let o=0;e.addManagedListeners(t,{movingChanged:()=>{o=Date.now()}}),i&&e.addManagedElementListeners(i,{click:n=>{const r=t.isMoving(),l=Date.now()-o<50;r||l||this.progressSortFromEvent(t,n)}});const s=()=>{const n=t.getSort();if(e.toggleCss("ag-header-cell-sorted-asc","asc"===n),e.toggleCss("ag-header-cell-sorted-desc","desc"===n),e.toggleCss("ag-header-cell-sorted-none",!n),t.getColDef().showRowGroup){const l=!this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t)?.every(d=>t.getSort()==d.getSort());e.toggleCss("ag-header-cell-sorted-mixed",l)}};e.addManagedEventListeners({sortChanged:s,columnRowGroupChanged:s})}initCol(e){const{sort:t,initialSort:i,sortIndex:o,initialSortIndex:s}=e.colDef;void 0!==t?("asc"===t||"desc"===t)&&(e.sort=t):("asc"===i||"desc"===i)&&(e.sort=i),void 0!==o?null!==o&&(e.sortIndex=o):null!==s&&(e.sortIndex=s)}updateColSort(e,t,i){void 0!==t&&this.setColSort(e,"desc"===t||"asc"===t?t: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 qr(e)}getSortIndicatorSelector(){return Y0}},class extends M{constructor(){super(...arguments),this.beanName="rowNodeSorter"}postConstruct(){const{gos:e}=this;this.isAccentedSort=e.get("accentedSort"),this.primaryColumnsSortGroups=qt(e),this.addManagedPropertyListener("accentedSort",t=>this.isAccentedSort=t.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=qt(e))}doFullSort(e,t){const i=e.map((o,s)=>({currentPos:s,rowNode:o}));return i.sort(this.compareRowNodes.bind(this,t)),i.map(o=>o.rowNode)}compareRowNodes(e,t,i){const o=t.rowNode,s=i.rowNode;for(let n=0,r=e.length;n<r;n++){const a=e[n],l="desc"===a.sort,d=this.getValue(o,a.column),c=this.getValue(s,a.column);let u;const h=this.getComparator(a,o);if(u=h?h(d,c,o,s,l):Je(d,c,this.isAccentedSort),!isNaN(u)&&0!==u)return"asc"===a.sort?u:-1*u}return t.currentPos-i.currentPos}getComparator(e,t){const i=e.column,o=i.getColDef().comparator;if(null!=o)return o;if(!i.getColDef().showRowGroup)return;const s=!t.group&&i.getColDef().field;if(!s)return;const n=this.beans.colModel.getColDefCol(s);return n?n.getColDef().comparator:void 0}getValue(e,t){const{valueSvc:i,colModel:o,showRowGroupCols:s,gos:n}=this.beans;if(!this.primaryColumnsSortGroups)return i.getValue(t,e,!1);if(e.rowGroupColumn===t){if(Ja(n,o.isPivotActive())){const d=e.data?e:id(e.childrenAfterGroup);return d&&i.getValue(t,d,!1)}const l=s?.getShowRowGroupCol(t.getId());return l?e.groupData?.[l.getId()]:void 0}return e.group&&t.getColDef().showRowGroup?void 0:i.getValue(t,e,!1)}}],apiFunctions:{onSortChanged:function AS(e){e.sortSvc?.onSortChanged("api")}},userComponents:{agSortIndicator:qr},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"}},NS={moduleName:"ValueCache",version:G,beans:[class extends M{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 o=this.cacheVersion;e.__cacheVersion!==o&&(e.__cacheVersion=o,e.__cacheData={}),e.__cacheData[t]=i}}getValue(e,t){if(this.active&&e.__cacheVersion===this.cacheVersion)return e.__cacheData[t]}}],apiFunctions:{expireValueCache:function LS(e){e.valueCache?.expire()}}},zS={moduleName:"Expression",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if("string"==typeof e)return this.evaluateExpression(e,t);Me(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 Me(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),o=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",i);return t[e]=o,o}createFunctionBody(e){return e.includes("return")?e:"return "+e+";"}}]},_S={moduleName:"ChangeDetection",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.clientSideRowModel=null}postConstruct(){const{gos:e,rowModel:t}=this.beans;je(e)&&(this.clientSideRowModel=t),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){const{gos:t,rowRenderer:i}=this.beans;if("paste"===e.source||t.get("suppressChangeDetection"))return;const o=e.node,s=[o],n=this.clientSideRowModel,r=n?.rootNode;if(r&&!o.isRowPinned()){const a=t.get("aggregateOnlyChangedColumns"),l=new Ko(a,r);l.addParentNode(o.parent,[e.column]),n.doAggregate(l),l.forEachChangedNodeDepthFirst(d=>{s.push(d),d.sibling&&s.push(d.sibling)})}i.refreshCells({rowNodes:s})}}]},WS={moduleName:"CellApi",version:G,apiFunctions:{getCellValue:function OS(e,t){const{colKey:i,rowNode:o,useFormatter:s}=t,n=e.colModel.getColDefCol(i)??e.colModel.getCol(i);if(q(n))return null;const r=e.valueSvc.getValueForDisplay(n,o,s);return s?r.valueFormatted??te(r.value):r.value}}},$S={moduleName:"CommunityCore",version:G,beans:[class extends M{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()}},class extends M{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new Kd,this.fns={...kr,dispatchEvent:PC},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(jd))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:o}=this;i!==kr&&(i[e]=o?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:i,fns:{[e]:o}}=this;return o?o(i,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:i,preDestroyLink:o}=this;if(t){const s=jd[e];i.assertModuleRegistered(s,`api.${e}`)&&I(27,{fnName:e,module:s})}else I(26,{fnName:e,preDestroyLink:o})}destroy(){super.destroy(),this.fns=kr,this.beans=null}},class extends _p{constructor(){super(...arguments),this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},this.selectors={},this.icons={}}postConstruct(){const e=this.gos.get("components");if(null!=e)for(const t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){const{icons:t,userComponents:i,dynamicBeans:o,selectors:s}=e;if(i){const n=(r,a,l,d)=>{this.agGridDefaults[r]=a,(l||d)&&(this.agGridDefaultOverrides[r]={params:l,processParams:d})};for(const r of Object.keys(i)){let a=i[r];if(Gg(a)&&(a=a.getComp(this.beans)),"object"==typeof a){const{classImp:l,params:d,processParams:c}=a;n(r,l,d,c)}else n(r,a)}}this.registerDynamicBeans(o);for(const n of s??[])this.selectors[n.selector]=n;if(t)for(const n of Object.keys(t))this.icons[n]=t[n]}getUserComponent(e,t){const i=(a,l,d,c)=>({componentFromFramework:l,component:a,params:d,processParams:c}),{frameworkOverrides:o}=this.beans,s=o.frameworkComponent(t,this.gos.get("components"));if(null!=s)return i(s,!0);const n=this.jsComps[t];if(n)return i(n,o.isFrameworkComponent(n));const r=this.agGridDefaults[t];if(r){const a=this.agGridDefaultOverrides[t];return i(r,!1,a?.params,a?.processParams)}return this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}getDynamicError(e,t){return t?Kt(279,{name:e}):this.beans.validation?.missingDynamicBean(e)??Kt(256)}},class extends M{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,o=!1){return this.getCompDetails(this.gridOptions,e,t,i,o)}getCompDetails(e,t,i,o,s=!1){const{name:n,cellRenderer:r}=t;let g,p,{compName:a,jsComp:l,fwComp:d,paramsFromSelector:c,popupFromSelector:u,popupPositionFromSelector:h}=Fl(this.beans.frameworkOverrides,e,t,o);const f=R=>{const T=this.registry.getUserComponent(n,R);T&&(l=T.componentFromFramework?void 0:T.component,d=T.componentFromFramework?T.component:void 0,g=T.params,p=T.processParams)};if(null!=a&&f(a),null==l&&null==d&&null!=i&&f(i),l&&r&&!function ig(e){return!!e&&e.prototype&&"getGui"in e.prototype}(l)&&(l=this.agCompUtils?.adaptFunction(t,l)),!l&&!d){const{validation:R}=this.beans;return void(!s||a===i&&i?i&&!R&&Me(146,{comp:i}):a?R?.isProvidedUserComp(a)||Me(50,{compName:a}):i?R||Me(260,{...this.gos.getModuleErrorParams(),propName:n,compName:i}):Me(216,{name:n}))}const m=this.mergeParams(e,t,o,c,g,p),w=null==l,b=l??d;return{componentFromFramework:w,componentClass:b,params:m,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(b,w,m,t)}}newAgStackInstance(e,t,i,o){let n;n=t?this.frameworkCompWrapper.wrap(e,o.mandatoryMethods,o.optionalMethods,o):new e,this.createBean(n);const r=n.init?.(i);return null==r?Ne.resolve(n):r.then(()=>n)}mergeParams(e,t,i,o=null,s,n){const r={...i,...s},l=e?.[t.name+"Params"];return"function"==typeof l?ft(r,l(i)):"object"==typeof l&&ft(r,l),ft(r,o),n?n(r):r}},class extends M{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=function Vg(){if(void 0!==Vn)return Vn;if(!document.body)return-1;let e=1e6;const t=kl()?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){const o=2*e;if(i.style.height=o+"px",o>t||i.clientHeight!==o)break;e=o}return i.remove(),Vn=e,e}(),mi(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;mi(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="number"==typeof e?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=null!=e&&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();return this.maxScrollY*(e/t)}},class extends M{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.headerGroupRowCount=0,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colFlex:i,colModel:o,colGroupSvc:s,colViewport:n,selectionColSvc:r}=this.beans;t||this.buildTrees(o,s),s?.updateOpenClosedVisibility(),this.leftCols=Br(this.treeLeft),this.centerCols=Br(this.treeCenter),this.rightCols=Br(this.treeRight),r?.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(o),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(a=>a.isAutoHeight()),i?.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(o,this.leftCols,this.rightCols,e),n.checkViewportColumns(!1),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}getHeaderRowCount(){if(!this.gos.get("hidePaddedHeaderRows"))return this.beans.colModel.cols.treeDepth;let e=0;for(const t of this.allCols){let i=t.getParent();for(;i;){if(!i.isPadding()){const o=i.getProvidedColumnGroup().getLevel()+1;o>e&&(e=o);break}i=i.getParent()}}return e}updateBodyWidths(){const e=ri(this.centerCols),t=ri(this.leftCols),i=ri(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,o){let s,n;this.gos.get("enableRtl")?(s=t?t[0]:null,n=i?Ae(i):null):(s=t?Ae(t):null,n=i?i[0]:null);for(const r of e.getCols())r.setLastLeftPinned(r===s,o),r.setFirstRightPinned(r===n,o)}buildTrees(e,t){const i=e.getColsToShow(),o=i.filter(l=>"left"==l.getPinned()),s=i.filter(l=>"right"==l.getPinned()),n=i.filter(l=>"left"!=l.getPinned()&&"right"!=l.getPinned()),r=new yl,a=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=a({columns:o,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=a({columns:s,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=[],o=[],s=[];for(const n of t){const r=n.getPinned();r?!0===r||"left"===r?i.push(n):s.push(n):o.push(n)}this.ariaOrderColumns=i.concat(o).concat(s)}getAriaColIndex(e){let t;return t=qe(e)?e.getLeafColumns()[0]:e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){for(const e of[this.treeLeft,this.treeRight,this.treeCenter])for(const t of e)qe(t)&&t.checkLeft()}setLeftValuesOfCols(e){const{colModel:t}=this.beans;if(!t.getColDefCols())return;const o=t.getCols().slice(0),s=this.gos.get("enableRtl");for(const n of[this.leftCols,this.rightCols,this.centerCols]){if(s){let r=ri(n);for(const a of n)r-=a.getActualWidth(),a.setLeft(r,e)}else{let r=0;for(const a of n)a.setLeft(r,e),r+=a.getActualWidth()}Xv(o,n)}for(const n of o)n.setLeft(null,e)}joinCols(){this.allCols=this.gos.get("enableRtl")?this.rightCols.concat(this.centerCols).concat(this.leftCols):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,o){const s=[];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;if(i){u=!1;for(const h of c)i(h)&&(u=!0)}else u=!0;u&&(0===s.length&&n&&o&&o(a)&&s.push(n),s.push(a)),n=a}return s}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};Ui(this.treeCenter,!1,e),Ui(this.treeLeft,!1,e),Ui(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 o=this[t[i]];if(o.length)return e?Ae(o):o[0]}return null}getColAfter(e){const t=this.allCols,i=t.indexOf(e);return i<t.length-1?t[i+1]:null}getColsLeftWidth(){return ri(this.leftCols)}getDisplayedColumnsRightWidth(){return ri(this.rightCols)}isColAtEdge(e,t){const i=this.allCols;if(!i.length)return!1;const o="first"===t;let s;if(qe(e)){const n=e.getDisplayedLeafColumns();if(!n.length)return!1;s=o?n[0]:Ae(n)}else s=e;return(o?i[0]:Ae(i))===s}},class extends Wp{postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}},class extends M{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=pb++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new S,this.globalEventHandlerFactory=e=>(t,i)=>{if(!this.isAlive())return;const o=Zs.has(t);if(o&&!e||!o&&e||!function mb(e){return!!Kr[e]}(t))return;const s=(n,r)=>{const l=this.gridOptions[Kr[n]];"function"==typeof l&&this.beans.frameworkOverrides.wrapOutgoing(()=>l(r))};if(this.gridReadyFired)s(t,i);else if("gridReady"===t){s(t,i),this.gridReadyFired=!0;for(const n of this.queueEvents)s(n.eventName,n.event);this.queueEvents=[]}else this.queueEvents.push({eventName:t,event:i})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.validateGridOptions(this.gridOptions),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:"optionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){return this.gridOptions[e]??Ia[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return C(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(i=>e(this.addCommon(i)))}updateGridOptions({options:e,force:t,source:i="api"}){const o={id:gb++,properties:[]},s=[],{gridOptions:n,validation:r}=this;for(const a of Object.keys(e)){const l=Mo.applyGlobalGridOption(a,e[a]);r?.warnOnInitialPropertyUpdate(i,a);const c=n[a];(t||"object"==typeof l&&"api"===i||c!==l)&&(n[a]=l,s.push({type:a,currentValue:l,previousValue:c,changeSet:o,source:i}))}this.validateGridOptions(this.gridOptions),o.properties=s.map(a=>a.type);for(const a of s)mi(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}addCommon(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t){for(const i of Object.keys(e)){const o=e[i];if(null==o||!1===o)continue;let s=t[i];"function"==typeof s&&(s=s(e,this.gridOptions,this.beans)),s&&this.assertModuleRegistered(s,i)}}validateGridOptions(e){this.validateOptions(e,cb),this.validation?.processGridOptions(e)}validateColDef(e,t,i){(i||!this.beans.dataTypeSvc?.isColPendingInference(t))&&(this.validateOptions(e,Z0),this.validation?.validateColDef(e))}assertModuleRegistered(e,t){const i=Array.isArray(e)?e.some(o=>this.isModuleRegistered(o)):this.isModuleRegistered(e);return i||Me(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),i}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:bn(),rowModelType:this.get("rowModelType"),isUmd:!1}}isModuleRegistered(e){return wn(e,this.gridId,this.get("rowModelType"))}setInstanceDomData(e){e[Mc]=this.instanceId}isElementInThisInstance(e){let t=e;for(;t;){const i=t[Mc];if(C(i))return i===this.instanceId;t=t.parentElement}return!1}},class extends M{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","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(eo(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),eo(e.source)))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:i,colAutosize:o,rowGroupColsSvc:s,pivotColsSvc:n,valueColsSvc:r,visibleCols:a,eventSvc:l,groupHierarchyColSvc:d}=t,c=this.colDefs?wl(t,e):void 0;i?.expire();const u=this.colDefCols?.list,h=this.colDefCols?.tree,g=function Wh(e,t=null,i,o,s){const n=new Gh,{existingCols:r,existingGroups:a,existingColKeys:l}=function dl(e){const t=[],i=[],o=[];return e&&Yt(null,e,s=>{if(lt(s))i.push(s);else{const n=s;o.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:i,existingColKeys:o}}(o);n.addExistingKeys(l);const d=cl(e,t,0,i,r,n,a,s),{colGroupSvc:c}=e,u=c?.findMaxDepth(d,0)??0,h=c?c.balanceColumnTree(d,0,u,n):d;return Yt(null,h,ll),{columnTree:h,treeDepth:u}}(t,this.colDefs,!0,h,e);ms(t,this.colDefCols?.tree,g.columnTree);const p=g.columnTree,f=g.treeDepth,m=al(p),w={};for(const b of m)w[b.getId()]=b;this.colDefCols={tree:p,treeDepth:f,list:m,map:w},this.createColumnsForService([d],this.colDefCols,e),s?.extractCols(e,u),n?.extractCols(e,u),r?.extractCols(e,u),this.ready=!0,this.refreshCols(!0,e),a.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),c&&(this.changeEventsDispatching=!0,c(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),"gridInitializing"===e&&o?.applyAutosizeStrategy()}refreshCols(e,t){if(!this.colDefCols)return;const i=this.cols?.tree;this.saveColOrder();const{autoColSvc:o,selectionColSvc:s,rowNumbersSvc:n,quickFilter:r,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:d,visibleCols:c,colViewport:u,eventSvc:h}=this.beans,g=this.selectCols(a,this.colDefCols);this.createColumnsForService([o,s,n],g,t);const p=function Sh(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}(this.gos,this.showingPivotResult);(!e||p)&&this.restoreColOrder(g),this.positionLockedCols(g),l?.refresh(),r?.refreshCols(),this.setColSpanActive(),d?.setAutoHeightActive(g),c.clear(),u.clear(),!bi(i,this.cols.tree)&&h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,i){for(const o of e)o&&(o.createColumns(t,s=>{this.lastOrder=s(this.lastOrder),this.lastPivotOrder=s(this.lastPivotOrder)},i),o.addColumns(t))}selectCols(e,t){const i=e?.getPivotResultCols()??null;this.showingPivotResult=null!=i;const{map:o,list:s,tree:n,treeDepth:r}=i??t;return this.cols={list:s.slice(),map:{...o},tree:n.slice(),treeDepth:r},i&&(i.list.some(l=>void 0!==this.cols?.map[l.getColId()])||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{valueColsSvc:e,selectionColSvc:t,gos:i}=this.beans,o=this.isPivotMode()&&!this.showingPivotResult,s=t?.isSelectionColumnEnabled(),n=i.get("rowNumbers"),r=e?.columns;return this.cols.list.filter(l=>{const d=Mn(l);if(o){const c=r?.includes(l);return d||c||s&&ai(l)||n&&li(l)}return d||l.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,i){Nt(this.beans,{state:e.map(o=>({colId:"string"==typeof o?o:o.getColId(),hide:!t}))},i)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const i=t.filter(u=>null!=e.map[u.getId()]);if(0===i.length)return;if(i.length===e.list.length)return void(e.list=i);const o=u=>{const h=u.getOriginalParent();return!!h&&(h.getChildren().length>1||o(h))};if(!i.some(u=>o(u))){const u=new Set(i);for(const h of e.list)u.has(h)||i.push(h);return void(e.list=i)}const s=new Map;for(let u=0;u<i.length;u++)s.set(i[u],u);const n=e.list.filter(u=>!s.has(u));if(0===n.length)return void(e.list=i);const r=(u,h)=>{const g=h?h.getOriginalParent():u.getOriginalParent();if(!g)return null;let p=null,f=null;for(const m of g.getChildren())if(m!==h&&m!==u){if(m instanceof wi){const w=s.get(m);if(null==w)continue;(null==p||p<w)&&(p=w,f=m);continue}m.forEachLeafColumn(w=>{const b=s.get(w);null!=b&&(null==p||p<b)&&(p=b,f=w)})}return f??r(u,g)},a=[],l=new Map;for(const u of n){const h=r(u,null);if(null==h){a.push(u);continue}const g=l.get(h);void 0===g?l.set(h,u):Array.isArray(g)?g.push(u):l.set(h,[g,u])}const d=new Array(e.list.length);let c=d.length-1;for(let u=a.length-1;u>=0;u--)d[c--]=a[u];for(let u=i.length-1;u>=0;u--){const h=i[u],g=l.get(h);if(g)if(Array.isArray(g))for(let p=g.length-1;p>=0;p--)d[c--]=g[p];else d[c--]=g;d[c--]=h}e.list=d}positionLockedCols(e){e.list=pl(e.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(e){return this.colDefCols&&this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[],e)}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some(e=>null!=e.getColDef().colSpan)}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);const{visibleCols:i,eventSvc:o}=this.beans;i.refresh(t),o.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=eo(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){ms(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:o,groupHierarchyColSvc:s}=this.beans;Oo(this.colDefCols?.list,e),Oo(i?.columns?.list,e),Oo(o?.columns?.list,e),Oo(s?.columns?.list,e),Oo(t?.getPivotResultCols()?.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>null!=t):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return null==e?null:this.getColFromCollection(e,this.cols)}getColById(e){return this.cols?.map[e]??null}getColFromCollection(e,t){if(null==t)return null;const{map:i,list:o}=t;if("string"==typeof e&&i[e])return i[e];for(let a=0;a<o.length;a++)if(Bo(o[a],e))return o[a];const{autoColSvc:s,selectionColSvc:n,groupHierarchyColSvc:r}=this.beans;return s?.getColumn(e)??n?.getColumn(e)??r?.getColumn(e)??null}},class extends M{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?Math.max(t.rowTop+t.rowHeight-e.rowTop,0):0}getCurrentPagePixelRange(){const{topRowBounds:e,bottomRowBounds:t}=this;return{pageFirstPixel:e?.rowTop??0,pageLastPixel:t?t.rowTop+t.rowHeight:0}}calculateBounds(e,t){const{rowModel:i}=this.beans,o=i.getRowBounds(e);o&&(o.rowIndex=e),this.topRowBounds=o;const s=i.getRowBounds(t);s&&(s.rowIndex=t),this.bottomRowBounds=s,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},class extends M{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)}},class extends M{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=()=>{for(const n of this.getAllCellCtrls())n.onCellSelectionChanged()},t=()=>{for(const n of this.getAllCellCtrls())n.updateRangeBordersIfRangeCount()},i=()=>{this.eventSvc.addListener("cellSelectionChanged",e),this.eventSvc.addListener("columnMoved",t),this.eventSvc.addListener("columnPinned",t),this.eventSvc.addListener("columnVisible",t)},o=()=>{this.eventSvc.removeListener("cellSelectionChanged",e),this.eventSvc.removeListener("columnMoved",t),this.eventSvc.removeListener("columnPinned",t),this.eventSvc.removeListener("columnVisible",t)};this.addDestroyFunc(()=>o()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{ni(this.gos)?i():o()}),ni(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,this.editSvc=e.editSvc}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),pinnedRowsChanged:this.onPinnedRowsChanged.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",o=>this.onSuppressCellFocusChanged(o.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:o,previousValue:s})=>{(!s&&o||s&&!o)&&this.redrawRows()});const{stickyRowSvc:e,gos:t,showRowGroupCols:i}=this.beans;if(i&&this.addManagedPropertyListener("showOpenedGroup",()=>{const o=i.getShowRowGroupCols();o.length&&this.refreshCells({columns:o,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const o=this.gridBodyCtrl;o.setStickyTopHeight(0),o.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=nt(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount();this.cachedRowCtrls=new TS(e??3)}}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()??[];this.allRowCtrls=t.length>0||i.length>0?[...e,...t,...i]:e}isCellBeingRendered(e,t){const i=this.rowCtrlsByRowIndex[e];return t&&i?!(!i.isFullWidth()&&!this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:e,column:t,rowPinned:null})&&!i.getCellCtrl(t)&&i.isRowRendered()):!!i}updateCellFocus(e){for(const t of this.getAllCellCtrls())t.onCellFocused(e);for(const t of this.getFullWidthRowCtrls())t.onFullWidthRowFocused(e)}onCellFocusChanged(e){if(null!=e?.rowIndex&&!e.rowPinned){const t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){for(const t of this.getAllCellCtrls())t.onSuppressCellFocusChanged(e);for(const t of this.getFullWidthRowCtrls())t.onSuppressCellFocusChanged(e)}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;if(t)for(const i of this.getAllCellCtrls())t.onFlashCells(i,e)},columnHoverChanged:()=>{for(const e of this.getAllCellCtrls())e.onColumnHover()},displayedColumnsChanged:()=>{for(const e of this.getAllCellCtrls())e.onDisplayedColumnsChanged()},displayedColumnsWidthChanged:()=>{if(this.printLayout)for(const e of this.getAllCellCtrls())e.onLeftChanged()}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){for(const e of this.destroyFuncsForColumnListeners)e();this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();const e=this.colModel.getCols();for(const t of e){const i=l=>{for(const d of this.getAllCellCtrls())d.column===t&&l(d)},o=()=>{i(l=>l.onLeftChanged())},s=()=>{i(l=>l.onWidthChanged())},n=()=>{i(l=>l.onFirstRightPinnedChanged())},r=()=>{i(l=>l.onLastLeftPinnedChanged())},a=()=>{i(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",o),t.__addEventListener("widthChanged",s),t.__addEventListener("firstRightPinnedChanged",n),t.__addEventListener("lastLeftPinnedChanged",r),t.__addEventListener("colDefChanged",a),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",o),t.__removeEventListener("widthChanged",s),t.__removeEventListener("firstRightPinnedChanged",n),t.__removeEventListener("lastLeftPinnedChanged",r),t.__removeEventListener("colDefChanged",a)})}}onDomLayoutChanged(){const e=nt(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){this.redrawAfterModelUpdate({recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0})}getAllCellsNotSpanningForColumn(e){const t=[];for(const i of this.getAllRowCtrls()){const o=i.getCellCtrl(e,!0)?.eGui;o&&t.push(o)}return t}refreshFloatingRowComps(e=!0){this.refreshFloatingRows(this.topRowCtrls,"top",e),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",e)}refreshFloatingRows(e,t,i){const{pinnedRowModel:o,beans:s,printLayout:n}=this,r=Object.fromEntries(e.map(l=>[l.rowNode.id,l]));o?.forEachPinnedRow(t,(l,d)=>{const c=e[d];c&&void 0===o.getPinnedRowById(c.rowNode.id,t)&&(c.destroyFirstPass(),c.destroySecondPass()),l.id in r&&i?(e[d]=r[l.id],delete r[l.id]):e[d]=new tn(l,s,!1,!1,n)});const a=("top"===t?o?.getPinnedTopRowCount():o?.getPinnedBottomRowCount())??0;e.length=a}onPinnedRowDataChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else{if(this.cachedRowCtrls?.has(e))return void this.cachedRowCtrls.removeRow(e);{const i=o=>{const s=o[e.rowIndex];s&&s.rowNode===e&&(s.destroyFirstPass(),s.destroySecondPass(),o[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){const{editSvc:t}=this.beans;if(t?.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:"api"})),null==e)this.redrawAfterModelUpdate();else{for(const o of e??[])this.redrawRow(o,!0);this.dispatchDisplayedRowsChanged(!1)}}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const i=!e.domLayoutChanged&&!!e.recycleRows,o=e.animate&&Xi(this.gos),s=i?this.getRowsToRecycle():null;i||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:n,gos:r}=this;if(n){n.checkStickyRows();const a=n.extraTopHeight+n.extraBottomHeight;a&&this.updateContainerHeights(a)}this.recycleRows(s,o),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(r.get("enableRowPinning")?i:void 0),this.dispatchDisplayedRowsChanged(),null!=t&&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)return void t.setModelHeight(null);let i=this.pageBounds.getCurrentPageHeight();0===i&&(i=1),t.setModelHeight(i+e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error(Kt(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);i?e.rowIndex===i.rowIndex&&e.rowPinned==i.rowPinned?t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(ee(this.gos,{...i,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"})):t.setFocusedCell({...i,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0}):t.focusHeaderPosition({headerPosition:{headerRowIndex:Zt(this.beans)-1,column:e.column}})}findPositionToFocus(e){const{pagination:t,pageBounds:i}=this.beans;let o=e;for(null==o.rowPinned&&t&&i&&!t.isRowInPage(o.rowIndex)&&(o={rowPinned:null,rowIndex:i.getFirstRow()});o;){if(null==o.rowPinned&&i)if(o.rowIndex<i.getFirstRow()){if(o=Us(this.beans,{rowPinned:null,rowIndex:0}),!o)return null}else o.rowIndex>i.getLastRow()&&(o={rowPinned:null,rowIndex:i.getLastRow()});const s=this.getRowByPosition(o);if(s?.isAlive())return{...s.getRowPosition(),column:e.column};o=Us(this.beans,o)}return null}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),i=t.length;for(let o=0;o<i;o++){const s=t[o].getAllCellCtrls(),n=s.length;for(let r=0;r<n;r++)e.push(s[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 o=this.rowCtrlsByRowIndex[t];o&&o.addEventListener(e,i)}refreshCells({rowNodes:e,columns:t,force:i,suppressFlash:o}={}){const s={force:i,newData:!1,suppressFlash:o};for(const n of this.getCellCtrls(e,t))n.refreshOrDestroyCell(s);this.refreshFullWidth(e)}refreshRows(e={}){for(const t of this.getRowCtrls(e.rowNodes))t.refreshRow(e);this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=!1;for(const i of this.getRowCtrls(e))i.isFullWidth()&&(i.refreshFullWidth()||(t=!0,this.redrawRow(i.rowNode,!0)));t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){const t=ta(e),i=this.getAllRowCtrls();return e&&t?i.filter(o=>ia(o.rowNode,t)):i}getCellCtrls(e,t){let i;C(t)&&(i={},t.forEach(s=>{const n=this.colModel.getCol(s);C(n)&&(i[n.getId()]=!0)}));const o=[];for(const s of this.getRowCtrls(e))for(const n of s.getAllCellCtrls()){const r=n.column.getId();i&&!i[r]||o.push(n)}return o}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))null==this.rowCtrlsByRowIndex[i].rowNode.id&&e.push(i);this.removeRowCtrls(e);const t={};for(const i of Object.values(this.rowCtrlsByRowIndex))t[i.rowNode.id]=i;return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){for(const i of e){const o=this.rowCtrlsByRowIndex[i];o&&(o.destroyFirstPass(t),o.destroySecondPass()),delete this.rowCtrlsByRowIndex[i]}}onBodyScroll(e){"vertical"===e.direction&&this.redraw({afterScroll:!0})}redraw(e={}){const{focusSvc:t,animationFrameSvc:i}=this.beans,{afterScroll:o}=e;let s;const n=this.stickyRowFeature;n&&(s=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)}if((!o||l||this.firstRenderedRow!==r||this.lastRenderedRow!==a)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,o),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(o&&!l),null!=s)){const c=t?.getFocusCellToUseAfterRefresh();null!=s&&null==c&&(i?.flushAllFrames(),this.restoreFocusedCell(s))}}removeRowCompsNotToDraw(e,t){const i={};for(const n of e)i[n]=!0;const s=Object.keys(this.rowCtrlsByRowIndex).filter(n=>!i[n]);this.removeRowCtrls(s,t)}calculateIndexesToDraw(e){const t=[];for(let r=this.firstRenderedRow;r<=this.lastRenderedRow;r++)t.push(r);const i=this.beans.pagination,o=this.beans.focusSvc?.getFocusedCell()?.rowIndex;null!=o&&(o<this.firstRenderedRow||o>this.lastRenderedRow)&&(!i||i.isRowInPage(o))&&o<this.rowModel.getRowCount()&&t.push(o);const s=r=>{const a=r.rowNode.rowIndex;null==a||a===o||(a<this.firstRenderedRow||a>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(r)&&t.push(a)};for(const r of Object.values(this.rowCtrlsByRowIndex))s(r);if(e)for(const r of Object.values(e))s(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 o=this.calculateIndexesToDraw(e);(this.printLayout||i)&&(t=!1),this.removeRowCompsNotToDraw(o,!t);for(const s of o)this.createOrUpdateRowCtrl(s,e,t,i);if(e){const{animationFrameSvc:s}=this.beans;s?.active&&i&&!this.printLayout?s.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=[];for(const t of this.getFullWidthRowCtrls())e.push(t.rowNode.rowIndex.toString());this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=ta(e);return this.getAllRowCtrls().filter(i=>!!i.isFullWidth()&&!(null!=t&&!ia(i.rowNode,t)))}createOrUpdateRowCtrl(e,t,i,o){let s,n=this.rowCtrlsByRowIndex[e];if(n||(s=this.rowModel.getRow(e),C(s)&&C(t)&&t[s.id]&&s.alreadyRendered&&(n=t[s.id],t[s.id]=null)),!n){if(s||(s=this.rowModel.getRow(e)),!C(s))return;n=this.createRowCon(s,i,o)}s&&(s.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=n}destroyRowCtrls(e,t){const i=[];if(e)for(const o of Object.values(e))if(o){if(this.cachedRowCtrls&&o.isCacheable()){this.cachedRowCtrls.addRow(o);continue}if(o.destroyFirstPass(!t),t){const s=o.instanceId;this.zombieRowCtrls[s]=o,i.push(()=>{o.destroySecondPass(),delete this.zombieRowCtrls[s]})}else o.destroySecondPass()}t&&(i.push(()=>{this.isAlive()&&(this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged())}),window.setTimeout(()=>{for(const o of i)o()},400))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){return this.getRowBuffer()*Ii(this.beans)}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:i}=this;let o,s;if(e.updateOffset(),i.isRowsToRender())if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),o=t.getFirstRow(),s=t.getLastRow();else{const c=this.getRowBufferInPixels(),u=this.ctrlsSvc.getScrollFeature(),h=this.gos.get("suppressRowVirtualisation");let p,f,g=!1;do{const T=t.getPixelOffset(),{pageFirstPixel:k,pageLastPixel:L}=t.getCurrentPagePixelRange(),H=e.divStretchOffset,ae=u.getVScrollPosition(),ue=ae.top,le=ae.bottom;h?(p=k+H,f=L+H):(p=Math.max(ue+T-c,k)+H,f=Math.min(le+T+c,L)+H),this.firstVisibleVPixel=Math.max(ue+T,k)+H,this.lastVisibleVPixel=Math.min(le+T,L)+H,g=this.ensureAllRowsInRangeHaveHeightsCalculated(p,f)}while(g);let m=i.getRowIndexAtPixel(p),w=i.getRowIndexAtPixel(f);const b=t.getFirstRow(),R=t.getLastRow();m<b&&(m=b),w>R&&(w=R),o=m,s=w}else o=0,s=-1;const n=nt(this.gos,"normal"),r=this.gos.get("suppressMaxRenderedRowRestriction"),a=Math.max(this.getRowBuffer(),500);n&&!r&&s-o>a&&(s=o+a),(o!==this.firstRenderedRow||s!==this.lastRenderedRow)&&(this.firstRenderedRow=o,this.lastRenderedRow=s,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:o,lastRow:s}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,si(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const i=this.pinnedRowModel?.ensureRowHeightsValid(),o=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:s,rowModel:n}=this,r=n.ensureRowHeightsValid(e,t,s.getFirstRow(),s.getLastRow());return(r||o)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),!!(o||r||i)&&(this.updateContainerHeights(),!0)}doNotUnVirtualiseRow(e){const o=e.rowNode,s=this.focusSvc.isRowFocused(o.rowIndex,o.rowPinned),n=this.editSvc?.isEditing(e);return!!(s||n||o.detail)&&!!this.isRowPresent(o)}isRowPresent(e){return!!this.rowModel.isRowPresent(e)&&(this.beans.pagination?.isRowInPage(e.rowIndex)??!0)}createRowCon(e,t,i){const o=this.cachedRowCtrls?.getRow(e)??null;return o||new tn(e,this.beans,t,i&&!this.printLayout&&!!this.beans.animationFrameSvc?.active,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(o=>o.rowNode);return[...this.getStickyTopRowCtrls().map(o=>o.rowNode),...e,...this.getStickyBottomRowCtrls().map(o=>o.rowNode)]}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(o=>o.rowNode.rowIndex===i)||null,t||(t=this.getStickyBottomRowCtrls().find(o=>o.rowNode.rowIndex===i)||null))}return t}isRangeInRenderedViewport(e,t){return null!=e&&null!=t&&!(t<this.firstRenderedRow||e>this.lastRenderedRow)}},class extends M{constructor(){super(...arguments),this.beanName="valueSvc",this.hasEditSvc=!1,this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc,this.editSvc=e.editSvc,this.hasEditSvc=!!e.editSvc}postConstruct(){this.initialised||this.init()}init(){this.executeValueGetter=this.valueCache?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=Qi(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.addListener("cellValueChanged",e,!0),this.addDestroyFunc(()=>this.eventSvc.removeListener("cellValueChanged",e,!0)),this.addManagedPropertyListener("treeData",t=>this.isTreeData=t.currentValue)}getValueForDisplay(e,t,i=!1,o=!1,s="ui"){const{showRowGroupColValueSvc:n}=this.beans,r=!e&&t.group,a=e?.colDef.showRowGroup;if(n&&(!this.isTreeData||t.footer)&&(r||a)){const f=n.getGroupValue(t,e);if(null==f)return{value:null,valueFormatted:null};if(!i)return{value:f.value,valueFormatted:null};const m=n.formatAndPrefixGroupColValue(f,e,o);return{value:f.value,valueFormatted:m}}if(!e)return{value:t.key,valueFormatted:null};const d=t.leafGroup&&this.colModel.isPivotMode(),c=t.group&&t.expanded&&!t.footer&&!d,u=this.gos.get("groupSuppressBlankHeader")||!t.sibling,g=this.getValue(e,t,c&&!u,s);return{value:g,valueFormatted:!i||o&&!1===e.colDef.useValueFormatterForExport?null:this.formatValue(e,t,g)}}getValue(e,t,i=!1,o="ui"){if(this.initialised||this.init(),!t)return;const s=e.getColDef(),n=s.field,r=e.getColId(),a=t.data;if(this.hasEditSvc&&"ui"===o){const f=this.editSvc;if(f.isEditing()){const m=f.getCellDataValue({rowNode:t,column:e},!0);if(void 0!==m)return m}}let l;const d=s.showRowGroup;if("string"==typeof d&&(this.beans.rowGroupColsSvc?.getColumnIndex(d)??-1)>t.level)return null;const c="string"!=typeof d||!t.group,u=t.groupData&&r in t.groupData,h=!i&&t.aggData&&void 0!==t.aggData[r],g=this.isSsrm&&i&&!!s.aggFunc,p=this.isSsrm&&t.footer&&t.field&&(!0===s.showRowGroup||s.showRowGroup===t.field);if(this.isTreeData&&h)l=t.aggData[r];else if(this.isTreeData&&s.valueGetter)l=this.executeValueGetter(s.valueGetter,a,e,t);else if(this.isTreeData&&n&&a)l=qo(a,n,e.isFieldContainsDots());else if(u)l=t.groupData[r];else if(h)l=t.aggData[r];else if(s.valueGetter&&!g){if(!c)return l;l=this.executeValueGetter(s.valueGetter,a,e,t)}else if(p)l=qo(a,t.field,e.isFieldContainsDots());else if(n&&a&&!g){if(!c)return l;l=qo(a,n,e.isFieldContainsDots())}if(this.cellExpressions&&"string"==typeof l&&0===l.indexOf("=")){const f=l.substring(1);l=this.executeValueGetter(f,a,e,t)}return l}parseValue(e,t,i,o){const s=e.getColDef(),n=s.valueParser;if(C(n)){const r=ee(this.gos,{node:t,data:t?.data,oldValue:o,newValue:i,colDef:s,column:e});return"function"==typeof n?n(r):this.expressionSvc?.evaluate(n,r)}return i}getDeleteValue(e,t){return C(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay(e,t).value)??null:null}formatValue(e,t,i,o,s=!0){const{expressionSvc:n}=this.beans;let a,r=null;const l=e.getColDef();if(o?a=o:s&&(a=l.valueFormatter),a){const c=ee(this.gos,{value:i,node:t,data:t?t.data:null,colDef:l,column:e});r="function"==typeof a?a(c):n?n.evaluate(a,c):null}else if(l.refData)return l.refData[i]||"";return null==r&&Array.isArray(i)&&(r=i.join(", ")),r}setValue(e,t,i,o){const s=this.colModel.getColDefCol(t);if(!e||!s)return!1;q(e.data)&&(e.data={});const{field:n,valueSetter:r}=s.getColDef();if(q(n)&&q(r))return I(17),!1;if(this.dataTypeSvc&&!this.dataTypeSvc.checkType(s,i))return I(135),!1;const a=ee(this.gos,{node:e,data:e.data,oldValue:this.getValue(s,e,void 0,o),newValue:i,colDef:s.getColDef(),column:s});let l;if(a.newValue=i,l=C(r)?"function"==typeof r?r(a):this.expressionSvc?.evaluate(r,a):this.setValueUsingField(e.data,n,i,s.isFieldContainsDots()),void 0===l&&(l=!0),!l)return!1;e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const d=this.getValue(s,e);return this.dispatchCellValueChangedEvent(e,a,d,o),e.pinnedSibling&&this.dispatchCellValueChangedEvent(e.pinnedSibling,a,d,o),!0}dispatchCellValueChangedEvent(e,t,i,o){this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:t.column,colDef:t.colDef,data:e.data,node:e,oldValue:t.oldValue,newValue:i,value:i,source:o})}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;"function"==typeof t&&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,o){if(!t)return!1;let s=!1;if(o){const n=t.split(".");let r=e;for(;n.length>0&&r;){const a=n.shift();0===n.length?(s=r[a]===i,s||(r[a]=i)):r=r[a]}}else s=e[t]===i,s||(e[t]=i);return!s}executeValueGetterWithValueCache(e,t,i,o){const s=i.getColId(),n=this.valueCache.getValue(o,s);if(void 0!==n)return n;const r=this.executeValueGetterWithoutValueCache(e,t,i,o);return this.valueCache.setValue(o,s,r),r}executeValueGetterWithoutValueCache(e,t,i,o){const s=ee(this.gos,{data:t,node:o,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,o)});let n;return n="function"==typeof e?e(s):this.expressionSvc?.evaluate(e,s),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),o=e.getColDef().keyCreator;let s=i;return o&&(s=o(ee(this.gos,{value:i,colDef:e.getColDef(),column:e,node:t,data:t.data}))),"string"==typeof s||null==s||(s=String(s),"[object Object]"===s&&I(121)),s}},class extends M{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(function Kg(e){const t=ve(e);return function $g(e){ys>0||(e.addEventListener("keydown",Rs),e.addEventListener("mousedown",Rs))}(t),ys++,()=>{ys--,function jg(e){ys>0||(e.removeEventListener("keydown",Rs),e.removeEventListener("mousedown",Rs))}(t)}}(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,null!=this.focusFallbackTimeout&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,null!=this.focusFallbackTimeout&&(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(Fe(this.beans),Td)?this.focusedHeader:null}doesRowOrCellHaveBrowserFocus(){const e=Fe(this.beans);return!!this.isDomDataPresentInHierarchy(e,As)||this.isDomDataPresentInHierarchy(e,Is)}isDomDataPresentInHierarchy(e,t){let i=e;for(;i;){if(Qa(this.gos,i,t))return!0;i=i.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){const{rowIndex:t,rowPinned:i,column:o}=e,s={rowIndex:t,rowPinned:i,column:o,isFullWidthCell:!1},n=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i});return n&&(s.isFullWidthCell=n.isFullWidth()),s}clearFocusedCell(){if(null==this.focusedCell)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:o,forceBrowserFocus:s=!1,preventScrollOnBrowserFocus:n=!1,sourceEvent:r}=e,a=this.colModel.getCol(t);if(!a)return void(this.focusedCell=null);this.focusedCell={rowIndex:i,rowPinned:Ee(o),column:a};const l=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:"cellFocused",...l,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:s,preventScrollOnBrowserFocus:n,sourceEvent:r}),this.previousCellFocusParams=l}isCellFocused(e){return null!=this.focusedCell&&Qd(e,this.focusedCell)}isHeaderWrapperFocused(e){if(null==this.focusedHeader)return!1;const{column:t,rowCtrl:{rowIndex:i,pinned:o}}=e,{column:s,headerRowIndex:n}=this.focusedHeader;return t===s&&i===n&&o==s.getPinned()}focusHeaderPosition(e){if(this.setFocusRecovered(),_i(this.beans))return!1;const{direction:t,fromTab:i,allowUserOverride:o,event:s,fromCell:n,rowWithoutSpanValue:r,scroll:a=!0}=e;let{headerPosition:l}=e;if(n&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(l);if(o){const d=this.focusedHeader,c=Zt(this.beans);if(i){const u=this.gos.getCallback("tabToNextHeader");u&&(l=this.getHeaderPositionFromUserFunc({userFunc:u,direction:t,currentPosition:d,headerPosition:l,headerRowCount:c}))}else{const u=this.gos.getCallback("navigateToNextHeader");u&&s&&(l=u({key:s.key,previousHeaderPosition:d,nextHeaderPosition:l,headerRowCount:c,event:s}))}}return!!l&&this.focusProvidedHeaderPosition({headerPosition:l,direction:t,event:s,fromCell:n,rowWithoutSpanValue:r,scroll:a})}focusHeaderPositionFromUserFunc(e){if(_i(this.beans))return!1;const{userFunc:t,headerPosition:i,direction:o,event:s}=e,n=this.focusedHeader,r=Zt(this.beans),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:o,currentPosition:n,headerPosition:i,headerRowCount:r});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:o,event:s})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:i,currentPosition:o,headerPosition:s,headerRowCount:n}=e,a=t({backwards:"Before"===i,previousHeaderPosition:o,nextHeaderPosition:s,headerRowCount:n});return!0===a?o:!1===a?null:a}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:i,fromCell:o,rowWithoutSpanValue:s,event:n,scroll:r=!0}=e,{column:a,headerRowIndex:l}=t,{filterManager:d,ctrlsSvc:c,headerNavigation:u}=this.beans;if(this.focusedHeader&&function fm(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}(e.headerPosition,this.focusedHeader))return!1;if(-1===l)return d?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:a,event:n});r&&u?.scrollToColumn(a,i);const g=c.getHeaderRowContainerCtrl(a.getPinned())?.focusHeader(t.headerRowIndex,a,n)||!1;return u&&g&&(null!=s||o)&&(u.currentHeaderRowWithoutSpan=s??-1),g}focusFirstHeader(){if(this.overlays?.isExclusive()&&this.focusOverlay())return!0;const e=this.visibleCols.allCols[0];if(!e)return!1;const t=Rc(this.beans,e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.isExclusive()&&this.focusOverlay(!0))return!0;const t=Zt(this.beans)-1,i=Ae(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 null!=this.focusedCell&&this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===Ee(t)}focusOverlay(e){const t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&Bi(t,e)}focusGridView(e){const{backwards:t=!1,canFocusOverlay:i=!0,event:o}=e;if(this.overlays?.isExclusive())return i&&this.focusOverlay(t);if(Ns(this.beans))return t&&!_i(this.beans)?this.focusLastHeader():!(!i||!this.focusOverlay(t))||!t&&co(this.beans,t);const s=t?function YC(e){let t,i=null;const{pinnedRowModel:o,pageBounds:s}=e,n=o?.getPinnedBottomRowCount(),r=o?.getPinnedTopRowCount();return n?(i="bottom",t=n-1):e.rowModel.getRowCount()?t=s.getLastRow():r&&(i="top",t=r-1),void 0===t?null:{rowIndex:t,rowPinned:i}}(this.beans):function qC(e){let i,t=0;const{pinnedRowModel:o,rowModel:s,pageBounds:n}=e;return o?.getPinnedTopRowCount()?i="top":s.getRowCount()?(i=null,t=n.getFirstRow()):o?.getPinnedBottomRowCount()&&(i="bottom"),void 0===i?null:{rowIndex:t,rowPinned:i}}(this.beans);if(s){const n=e.column??this.focusedHeader?.column,{rowIndex:r,rowPinned:a}=s,l=ui(this.beans,s);if(!n||!l||null==r)return!1;if(n.isSuppressNavigable(l)){const d=this.gos.get("enableRtl");let c;return c=o&&"Tab"!==o.key?o.key:d?P_LEFT:P_RIGHT,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(s)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(s,t)||(this.setFocusedCell({rowIndex:r,column:n,rowPinned:Ee(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:Zt(this.beans)-1}}):this.focusGridView({column:i})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},class extends zp{constructor(){super(...arguments),this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1}initVariables(){this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(wc),this.getSizeEl(bc),this.getSizeEl(Sc),this.getSizeEl($r),this.getSizeEl(yc),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(yc)}getRowBorderWidth(){return this.getCSSVariablePixelValue($r)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(wc)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(bc)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(O0)}getCellPaddingLeft(){const e=this.getDefaultCellHorizontalPadding(),t=this.getCSSVariablePixelValue(B0);return e-1+this.getCSSVariablePixelValue(H0)*t}getCellPadding(){const e=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+e}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(Sc)}refreshRowHeightVariable(){const{eRootDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),i=this.gos.get("rowHeight");if(null==i||isNaN(i)||!isFinite(i))return null!==t&&e.style.setProperty("--ag-line-height",null),-1;const o=`${i}px`;return t!=o?(e.style.setProperty("--ag-line-height",o),i):""!=t?Number.parseFloat(t):-1}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(null!=t)return t;const i=this.measureSizeEl(e);return"detached"===i||"no-styles"===i?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,i),i)}measureSizeEl(e){const t=this.getSizeEl(e);if(null==t.offsetParent)return"detached";const i=t.offsetWidth;return 15538===i?"no-styles":(this.sizesMeasured=!0,i)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=Ye({tag:"div",cls:"ag-measurement-container"}),this.eRootDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;const i=this.getMeasurementContainer();t=Ye({tag:"div"});const{border:o,noWarn:s}=e;o?(t.className="ag-measurement-element-border",t.style.setProperty("--ag-internal-measurement-border",`var(${e.cssName}, solid 15538px)`)):t.style.width=`var(${e.cssName}, 15538px)`,i.appendChild(t),this.sizeEls.set(e,t);let n=this.measureSizeEl(e);"no-styles"===n&&!s&&I(9,{variable:e});const r=pi(this.beans,t,()=>{const a=this.measureSizeEl(e);"detached"===a||"no-styles"===a||(this.lastKnownValues.set(e,a),a!==n&&(n=a,this.fireStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>r()),t}fireStylesChangedEvent(e){"rowBorderWidthChanged"===e&&this.refreshRowBorderWidthVariable(),this.eventSvc.dispatchEvent({type:"gridStylesChanged",[e]:!0})}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue($r);this.eRootDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}postProcessThemeChange(e,t){e&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&Me(t?106:239)}getAdditionalCss(){const e=new Map;return e.set("core",['.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-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-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}: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:not(.ag-allow-overflow),.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{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-top:not(.ag-invisible)){border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-bottom:not(.ag-invisible)){border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-data-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}: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-data-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}: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-data-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,.ag-row-highlight-inside:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;pointer-events:none;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after,:where(.ag-ltr) .ag-row-highlight-inside:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after,:where(.ag-rtl) .ag-row-highlight-inside:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto}:where(.ag-ltr) .ag-row-highlight-indent:after{left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size));right:1px}:where(.ag-rtl) .ag-row-highlight-indent:after{left:1px;right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside:after{background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);display:block;height:auto;inset:0;width:auto}.ag-body,.ag-floating-bottom,.ag-floating-top{background-color:var(--ag-data-background-color)}.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-data-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%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.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-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-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-virtual-list-item{height:var(--ag-list-item-height);position:absolute;width:100%}.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}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.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-icon-button-active-indicator-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;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}']),function G0(e,t){for(const i of t.sort((o,s)=>o.moduleName.localeCompare(s.moduleName))){const o=i.css;o&&e.set(`module-${i.moduleName}`,o)}}(e,Array.from(function gh(){return new Set(Oa)}())),e}getDefaultTheme(){return k0}themeError(e){Me(240,{theme:e})}},class extends M{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){this.horizontalScrollShowing=!0===this.gos.get("alwaysShowHorizontalScroll"),this.verticalScrollShowing=!0===this.gos.get("alwaysShowVerticalScroll"),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(null==this.scrollbarWidth){const e=this.gos.get("scrollbarWidth"),i="number"==typeof e&&e>=0?e:function Ng(){return null==Gn&&Il(),Gn}();null!=i&&(this.scrollbarWidth=i,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},class extends M{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",()=>{if(this.updateReady(),this.ready){for(const e of this.readyCallbacks)e(this.params);this.readyCallbacks.length=0}},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){const e=Object.values(this.params);this.ready=23===e.length&&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}},class extends M{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"}),mi(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns)return this.waitingForColumns=!1,void this.setColumnsAndData(t);this.beans.colModel.setColumnDefs(t,eo(e.source))}}},class extends M{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;const o=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:s}=this.beans;return i&&s?s.getHeaderName(e,o):o}getDisplayNameForProvidedColumnGroup(e,t,i){const o=t?.getColGroupDef();return o?this.getHeaderName(o,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,o,s){const n=e.headerValueGetter;if(n){const r=ee(this.gos,{colDef:e,column:t,columnGroup:i,providedColumnGroup:o,location:s});return"function"==typeof n?n(r):"string"==typeof n?this.beans.expressionSvc?.evaluate(n,r)??null:""}return null!=e.headerName?e.headerName:e.field?function Lw(e){return e&&null!=e?e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z])([a-z])/g,"$1 $2$3").replace(/\./g," ").split(" ").map(s=>s.substring(0,1).toUpperCase()+(s.length>1?s.substring(1,s.length):"")).join(" "):null}(e.field):""}},class extends M{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[]}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}setScrollPosition(e,t,i=!1){const{visibleCols:o}=this;if(e!==this.scrollWidth||t!==this.scrollPosition||o.isBodyWidthDirty){if(this.scrollWidth=e,this.scrollPosition=t,o.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const r=o.bodyWidth;this.viewportLeft=r-t-e,this.viewportRight=r-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(i)}}getColumnHeadersToRender(e){switch(e){case"left":return this.columnsToRenderLeft;case"right":return this.columnsToRenderRight;default:return this.columnsToRenderCenter}}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]}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||0===this.viewportRight}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return!(!e.isAutoHeaderHeight()&&!function Hw(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}(e))||this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,i=t+e.getActualWidth(),o=this.viewportLeft-200,s=this.viewportRight+200;return!(t<o&&i<o||t>s&&i>s)}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 i=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:o}=this;return o.getColsForRow(e,o.centerCols,i,n=>{const r=n.getLeft();return C(r)&&r>this.viewportLeft})}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){const{leftCols:e,rightCols:t}=this.visibleCols;this.columnsToRenderLeft=e,this.columnsToRenderRight=t,this.columnsToRenderCenter=this.colsWithinViewport;const i=o=>{const s=new Set,n={};for(const r of o){let a=r.getParent();const l=r.isSpanHeaderHeight();for(;a&&!s.has(a);){if(l&&a.isPadding()){a=a.getParent();continue}const c=a.getProvidedColumnGroup().getLevel();n[c]??(n[c]=[]),n[c].push(a),s.add(a),a=a.getParent()}}return n};this.rowsOfHeadersToRenderLeft=i(e),this.rowsOfHeadersToRenderRight=i(t),this.rowsOfHeadersToRenderCenter=i(this.headerColsWithinViewport)}extractViewport(){this.extractViewportColumns();const t=this.getViewportColumns().map(o=>`${o.getId()}-${o.getPinned()||"normal"}`).join("#"),i=this.colsWithinViewportHash!==t;return i&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),i}},class extends M{constructor(){super(...arguments),this.beanName="iconSvc"}createIconNoSpan(e,t){return Ot(e,this.beans,t?.column)}}],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:function qd(e){return e.context.getId()},destroy:function MC(e){e.gridDestroySvc.destroy()},isDestroyed:function TC(e){return e.gridDestroySvc.destroyCalled},getGridOption:function kC(e,t){return e.gos.get(t)},setGridOption:function AC(e,t,i){Yd(e,{[t]:i})},updateGridOptions:Yd,isModuleRegistered:function IC(e,t){const i=t.replace(/Module$/,"");return e.gos.isModuleRegistered(i)}},dependsOn:[Aw,Tv,Hv,Wc,yb,ew,Rb,FS,_S,Eb,aS,gS,fS,Db,Vw,Iw,zS,sw,vS]},Uc={AdvancedFilter:1,AiToolkit:1,AllEnterprise:1,BatchEdit: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,NewFiltersToolPanel: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},oa=["TextFilter","NumberFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],jS={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:oa,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],RowModelSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...oa,"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:[...oa,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},KS={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function Jo(e,t=!1){return!t||"IntegratedCharts"!==e&&"Sparklines"!==e?`${e}Module`:`${e}Module.with(AgChartsEnterpriseModule)`}function jc({moduleName:e,rowModelType:t}){return`To use the ${e}Module you must set the gridOption "rowModelType='${t}'"`}var Kc=({reasonOrId:e,moduleName:t,gridScoped:i,gridId:o,rowModelType:s,additionalText:n,isUmd:r})=>{const a=function qS(e,t){const i=[];for(const o of Array.isArray(e)?e:[e]){const s=jS[o];if(s)for(const n of s){const r=KS[n];(!r||r===t)&&i.push(n)}else i.push(o)}return i}(t,s),l="string"==typeof e?e:ey[e];if(r)return function QS(e,t){const i=t.filter(n=>"IntegratedCharts"===n||"Sparklines"===n);let o="";return!globalThis?.agCharts&&i.length>0?o=`Unable to use ${e} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise.\n`:t.some(n=>Uc[n])&&(o+=`Unable to use ${e} as that requires the ag-grid-enterprise script to be included.\n`),o}(l,a);const d=a.filter(h=>"IntegratedCharts"===h||"Sparklines"===h),c=d.length>0?`${d.map(h=>Jo(h)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`Unable to use ${l} as ${a.length>1?"one of "+a.map(h=>Jo(h)).join(", "):Jo(a[0])} is not registered${i?" for gridId: "+o:""}. ${c} Check if you have registered the module:\n\n${(e=>{const t=e.map(o=>`import { ${Jo(o)} } from '${Uc[o]?"ag-grid-enterprise":"ag-grid-community"}';`);return e.some(o=>"IntegratedCharts"===o||"Sparklines"===o)&&t.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community'; \n${t.join(" \n")} \n\nModuleRegistry.registerModules([ ${e.map(o=>Jo(o,!0)).join(", ")} ]); \n\nFor more info see: ${Yi}/modules/`})(a)}`+(n?` \n\n${n}`:"")},qc=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.\n\nimport { AgChartsEnterpriseModule } from 'ag-charts-enterprise';\nimport { ModuleRegistry } from 'ag-grid-community';\nimport { ${e} } from 'ag-grid-enterprise';\n \nModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);\n `,ZS={1:()=>"`rowData` must be an array",2:({nodeId:e})=>`Duplicate node id '${e}' detected from getRowId callback, this could cause issues in your grid.`,3:()=>"Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.",4:({id:e})=>`Could not find row id=${e}, data item was not found for this id`,5:({data:e})=>["Could not find data item as object was not found.",e," Consider using getRowId to help the Grid find matching row data"],6:()=>"'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'",7:()=>"Pivoting is not supported with aligned grids as it may produce different columns in each grid.",8:({key:e})=>`Unknown key for navigation ${e}`,9:({variable:e})=>`No value for ${e?.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e?.defaultValue} will be used and updated when styles load.`,10:({eventType:e})=>`As of v33, the '${e}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,11:()=>"No gridOptions provided to createGrid",12:({colKey:e})=>["column ",e," not found"],13:()=>"Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.",14:({groupPrefix:e})=>`Row IDs cannot start with ${e}, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:e})=>["value should be either a string or a function",e],16:({expression:e,params:t,e:i})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",i],17:()=>"you need either field or valueSetter set on colDef for editing to work",18:()=>"alignedGrids contains an undefined option.",19:()=>"alignedGrids - No api found on the linked grid.",20:()=>'You may want to configure via a callback to avoid setup race conditions:\n "alignedGrids: () => [linkedGrid]"',21:()=>"pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.",22:({key:e})=>`${e} is an initial property and cannot be updated.`,23:()=>"The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",24:()=>"row height must be a number if not using standard row model",25:({id:e})=>["The getRowId callback must return a string. The ID ",e," is being cast to a string."],26:({fnName:e,preDestroyLink:t})=>`Grid API function ${e}() cannot be called as the grid has been destroyed.\n Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.\n To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${t}`,27:({fnName:e,module:t})=>`API function '${e}' not registered to module '${t}'`,28:()=>"setRowCount cannot be used while using row grouping.",29:()=>"tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",30:({toIndex:e})=>["tried to insert columns in invalid location, toIndex = ",e,"remember that you should not count the moving columns when calculating the new index"],31:()=>"infinite loop in resizeColumnSets",32:()=>"applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.",33:()=>"stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON.",34:({key:e})=>`the column type '${e}' is a default column type and cannot be overridden.`,35:()=>"Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type.",36:({t:e})=>"colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes",37:()=>"Changing the column pinning status is not allowed with domLayout='print'",38:({iconName:e})=>`provided icon '${e}' needs to be a string or a function`,39:()=>"Applying column order broke a group where columns should be married together. Applying new order has been discarded.",40:({e,method:t})=>`${e}\n${(e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`)(t)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support document.execCommand('copy') for clipboard operations",43:({iconName:e})=>`As of v33, icon '${e}' is deprecated. Use the icon CSS name instead.`,44:()=>'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',45:({parentCellDataType:e})=>`The data type definition ${e} does not exist.`,46:()=>'The "baseDataType" property of a data type definition must match that of its parent.',47:({cellDataType:e})=>`Missing data type definition - "${e}"`,48:({property:e})=>`Cell data type is "object" but no Value ${e} has been provided. Please either provide an object data type definition with a Value ${e}, or set "colDef.value${e}"`,49:({methodName:e})=>`Framework component is missing the method ${e}()`,50:({compName:e})=>`Could not find component ${e}, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"addRowDropZone - A container target needs to be provided",56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`setFilterModel() - no column found for colId: ${e}`,63:({colId:e})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>"filter missing setModel method, which is needed for setFilterModel",66:()=>"filter API missing getModel method, which is needed for getFilterModel",67:()=>"Filter is missing isFilterActive() method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:e})=>`getGui method from filter returned ${e}; it should be a DOM element.`,70:({newFilter:e})=>"Grid option quickFilterText only supports string inputs, received: "+typeof e,71:()=>"debounceMs is ignored when apply button is present",72:({keys:e})=>["ignoring FilterOptionDef as it doesn't contain one of ",e],73:()=>"invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:e})=>['Unexpected type of filter "',e,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing 'conditions'",78:()=>'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',79:()=>'"filterParams.maxNumConditions" must be greater than or equal to zero.',80:()=>'"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',81:()=>'"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',82:({param:e})=>`DateFilter ${e} is not a number`,83:()=>"DateFilter minValidYear should be <= maxValidYear",84:()=>"DateFilter minValidDate should be <= maxValidDate",85:()=>"DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",86:()=>"DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",87:()=>"DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",88:({index:e})=>`Invalid row index for ensureIndexVisible: ${e}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing getRows method",91:()=>"Filter is missing method doesFilterPass",92:()=>"AnimationFrameService called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:i,pageSizeOptions:o})=>`'paginationPageSize=${e}'${t?"":" (default value)"}, but ${e} is not included in${i?"":" the default"} paginationPageSizeSelector=[${o?.join(", ")}].`,95:({paginationPageSizeOption:e,paginationPageSizeSelector:t})=>`Either set '${t}' to an array that includes ${e} or to 'false' to disable the page size selector.`,96:({id:e,data:t})=>["Duplicate ID",e,"found for pinned row with data",t,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:e})=>`cellEditor for column ${e} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",101:({propertyName:e,componentName:t,agGridDefaults:i,jsComps:o})=>{const s=[],r=$n({inputValue:t,allSuggestions:[...Object.keys(i??[]).filter(a=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(a)),...Object.keys(o??[]).filter(a=>!!o[a])],hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return s.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.\n`),r.length>0&&s.push(` Did you mean: [${r.slice(0,3)}]?\n`),s.push("If using a custom component check it has been registered correctly."),s},102:()=>"selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:e,param:t})=>`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`,105:({e})=>["chart rendering failed",e],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${Yi}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>["chart update failed",e],109:({inputValue:e,allSuggestions:t})=>{const i=$n({inputValue:e,allSuggestions:t,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return[`Could not find '${e}' aggregate function. It was configured as "aggFunc: '${e}'" but it wasn't found in the list of registered aggregations.`,i.length>0?` Did you mean: [${i.slice(0,3)}]?`:"","If using a custom aggregation function check it has been registered correctly."].join("\n")},110:()=>"groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup",111:()=>"Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.",113:()=>"Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values",114:({component:e})=>`Could not find component with name of ${e}. Is it in Vue.components?`,116:()=>"Invalid selection state. The state must conform to `IServerSideSelectionState`.",117:()=>"selectAll must be of boolean type.",118:()=>"Infinite scrolling must be enabled in order to set the row count.",119:()=>"Unable to instantiate filter",120:()=>"MultiFloatingFilterComp expects MultiFilter as its parent",121:()=>"a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (see AG Grid docs) or b) to toString() on the object to return a key",122:()=>"could not find the document, document is empty",123:()=>"Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.",124:()=>"No active charts to update.",125:({chartId:e})=>`Unable to update chart. No active chart found with ID: ${e}.`,126:()=>"unable to restore chart as no chart model is provided",127:({allRange:e})=>`unable to create chart as ${e?"there are no columns in the grid":"no range is selected"}.`,128:({feature:e})=>`${e} is only available if using 'multiRow' selection mode.`,129:({feature:e,rowModel:t})=>`${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`,130:()=>'cannot multi select unless selection mode is "multiRow"',132:()=>"Row selection features are not available unless `rowSelection` is enabled.",133:({iconName:e})=>`icon '${e}' function should return back a string or a dom object`,134:({iconName:e})=>`Did not find icon '${e}'`,135:()=>"Data type of the new value does not match the cell data type of the column",136:()=>"Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.",137:({type:e,currentChartType:t})=>`Unable to update chart as a '${e}' update type is not permitted on a ${t}.`,138:({chartType:e})=>`invalid chart type supplied: ${e}`,139:({customThemeName:e})=>`a custom chart theme with the name ${e} has been supplied but not added to the 'chartThemes' list`,140:({name:e})=>`no stock theme exists with the name '${e}' and no custom chart theme with that name was supplied to 'customChartThemes'`,141:()=>"cross filtering with row grouping is not supported.",142:()=>"cross filtering is only supported in the client side row model.",143:({panel:e})=>`'${e}' is not a valid Chart Tool Panel name`,144:({type:e})=>`Invalid charts data panel group name supplied: '${e}'`,145:({group:e})=>`As of v32, only one charts customize panel group can be expanded at a time. '${e}' will not be expanded.`,146:({comp:e})=>`Unable to instantiate component '${e}' as its module hasn't been loaded. Add 'ValidationModule' to see which module is required.`,147:({group:e})=>`Invalid charts customize panel group name supplied: '${e}'`,148:({group:e})=>`invalid chartGroupsDef config '${e}'`,149:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,150:()=>"'seriesChartTypes' are required when the 'customCombo' chart type is specified.",151:({chartType:e})=>`invalid chartType '${e}' supplied in 'seriesChartTypes', converting to 'line' instead.`,152:({colId:e})=>`no 'seriesChartType' found for colId = '${e}', defaulting to 'line'.`,153:({chartDataType:e})=>`unexpected chartDataType value '${e}' supplied, instead use 'category', 'series' or 'excluded'`,154:({colId:e})=>`cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: ${e}`,155:({option:e})=>`'${e}' is not a valid Chart Toolbar Option`,156:({panel:e})=>`Invalid panel in chartToolPanelsDef.panels: '${e}'`,157:({unrecognisedGroupIds:e})=>["unable to find group(s) for supplied groupIds:",e],158:()=>"can not expand a column item that does not represent a column group header",159:()=>"Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",160:()=>"Export cancelled. Export is not allowed as per your configuration.",161:()=>"The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'",162:({id:e,dataType:t})=>`Unrecognized data type for excel export [${e}.dataType=${t}]`,163:({featureName:e})=>`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.\n Please turn off ${e} to enable Excel table exports.`,164:()=>"Unable to add data table to Excel sheet: A table already exists.",165:()=>"Unable to add data table to Excel sheet: Missing required parameters.",166:({unrecognisedGroupIds:e})=>["unable to find groups for these supplied groupIds:",e],167:({unrecognisedColIds:e})=>["unable to find columns for these supplied colIds:",e],168:()=>"detailCellRendererParams.template should be function or string",169:()=>'Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.',170:({providedStrategy:e})=>`invalid cellRendererParams.refreshStrategy = ${e} supplied, defaulting to refreshStrategy = 'rows'.`,171:()=>"could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions",172:()=>"could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData",173:({group:e})=>`invalid chartGroupsDef config '${e}'`,174:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,175:({menuTabName:e,itemsToConsider:t})=>[`Trying to render an invalid menu item '${e}'. Check that your 'menuTabs' contains one of `,t],176:({key:e})=>`unknown menu item type ${e}`,177:()=>"valid values for cellSelection.handle.direction are 'x', 'y' and 'xy'. Default to 'xy'.",178:({colId:e})=>`column ${e} is not visible`,179:()=>"totalValueGetter should be either a function or a string (expression)",180:()=>"agRichSelectCellEditor requires cellEditorParams.values to be set",181:()=>"agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",182:()=>'you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data',183:()=>"Group Column Filter only works on group columns. Please use a different filter.",184:({parentGroupData:e,childNodeData:t})=>["duplicate group keys for row data, keys should be unique",[e,t]],185:({data:e})=>["getDataPath() should not return an empty path",[e]],186:({rowId:e,rowData:t,duplicateRowsData:i})=>["duplicate group keys for row data, keys should be unique",e,t,...i??[]],187:({rowId:e,firstData:t,secondData:i})=>[`Duplicate node id ${e}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`,"first instance",t,"second instance",i],188:e=>`getRowId callback must be provided for Server Side Row Model ${e?.feature||"selection"} to work correctly.`,189:({startRow:e})=>`invalid value ${e} for startRow, the value should be >= 0`,190:({rowGroupId:e,data:t})=>["null and undefined values are not allowed for server side row model keys",e?`column = ${e}`:"","data is ",t],194:({method:e})=>`calling gridApi.${e}() is only possible when using rowModelType=\`clientSide\`.`,195:({justCurrentPage:e})=>`selecting just ${e?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`,196:({key:e})=>`Provided ids must be of string type. Invalid id provided: ${e}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:Kc,201:({rowModelType:e})=>`Could not find row model for rowModelType = ${e}`,202:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model. Use `api.getServerSideSelectionState()` instead.",203:()=>"Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.",204:()=>"Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.",205:({duplicateIdText:e})=>`Unable to display rows as duplicate row ids (${e}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,206:()=>"getRowId callback must be implemented for transactions to work. Transaction was ignored.",207:()=>'The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.',208:()=>"Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.",209:()=>`Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${Yi}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:e})=>`unable to lookup Tool Panel as invalid key supplied: ${e}`,215:({key:e,defaultByKey:t})=>`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(t??{}).join(",")}`,216:({name:e})=>`Missing component for '${e}'`,217:({invalidColIds:e})=>["unable to find grid columns for the supplied colDef(s):",e],218:({property:e,defaultOffset:t})=>`${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,219:({property:e})=>`Property ${e} does not exist on the target object.`,220:({lineDash:e})=>`'${e}' is not a valid 'lineDash' option.`,221:()=>"agAggregationComponent should only be used with the client and server side row model.",222:()=>"agFilteredRowCountComponent should only be used with the client side row model.",223:()=>"agSelectedRowCountComponent should only be used with the client and server side row model.",224:()=>"agTotalAndFilteredRowCountComponent should only be used with the client side row model.",225:()=>"agTotalRowCountComponent should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:e})=>`unrecognised menu item ${e}`,229:({index:e})=>["invalid row index for ensureIndexVisible: ",e],230:()=>"detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",232:()=>"Using both rowData and v-model. rowData will be ignored.",233:({methodName:e})=>`Framework component is missing the method ${e}()`,234:()=>'Group Column Filter does not work with the colDef property "field". This property will be ignored.',235:()=>'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',236:()=>'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"setRowCount can only accept a positive row count.",239:()=>'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',240:({theme:e})=>`theme grid option must be a Theming API theme object or the string "legacy", received: ${e}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>"Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule. \nPlease rebuild the selection state and reapply it.",248:()=>"SetFloatingFilter expects SetFilter as its parent",249:()=>"Must supply a Value Formatter in Set Filter params when using a Key Creator",250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:e})=>`AG Grid: Unable to create chart as an invalid chartType = '${e}' was supplied.`,252:()=>"cannot get grid to draw rows when it is in the middle of drawing rows. \nYour code probably called a grid API method while the grid was in the render stage. \nTo overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0). \nTo see what part of your code that caused the refresh check this stacktrace.",253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e?.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>qc("IntegratedChartsModule"),258:()=>qc("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:i,gridId:o,rowModelType:s})=>Kc({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:ho[t],gridId:o,gridScoped:i,rowModelType:s}),261:()=>"As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",262:()=>'As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor.',263:()=>'As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.',264:()=>'As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus.',265:({colId:e})=>`Unable to infer chart data type for column '${e}' if first data entry is null. Please specify "chartDataType", or a "cellDataType" in the column definition. For more information, see ${Yi}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using treeDataChildrenField",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:e,parentId:t})=>`Cycle detected for row with id='${e}' and parent id='${t}'. Resetting the parent for row with id='${e}' and showing it as a root-level node.`,271:({id:e,parentId:t})=>`Parent row not found for row with id='${e}' and parent id='${t}'. Showing row with id='${e}' as a root-level node.`,272:()=>"No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:\n \n import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';\n \n ModuleRegistry.registerModules([ AllCommunityModule ]);\n ",273:({providedId:e,usedId:t})=>`Provided column id '${e}' was already in use, ensure all column and group ids are unique. Using '${t}' instead.`,274:({prop:e})=>{let t=`Since v33, ${e} has been deprecated.`;switch(e){case"maxComponentCreationTimeMs":t+=" This property is no longer required and so will be removed in a future version.";break;case"setGridApi":t+=" This method is not called by AG Grid. To access the GridApi see: https://ag-grid.com/react-data-grid/grid-interface/#grid-api ";break;case"children":t+=" For multiple versions AgGridReact does not support children."}return t},275:jc,276:()=>"Row Numbers Row Resizer cannot be used when Grid Columns have `autoHeight` enabled.",277:({colId:e})=>`'enableFilterHandlers' is set to true, but column '${e}' does not have 'filter.doesFilterPass' or 'filter.handler' set.`,278:({colId:e})=>`Unable to create filter handler for column '${e}'`,279:e=>{},280:({colId:e})=>`'name' must be provided for custom filter components for column '${e}`,281:({colId:e})=>`Filter for column '${e}' does not have 'filterParams.buttons', but the new Filters Tool Panel has buttons configured. Either configure buttons for the filter, or disable buttons on the Filters Tool Panel.`,282:()=>"New filter tool panel requires `enableFilterHandlers: true`.",283:()=>"As of v34, use the same method on the filter handler (`api.getColumnFilterHandler(colKey)`) instead.",284:()=>"As of v34, filters are active when they have a model. Use `api.getColumnFilterModel()` instead.",285:()=>"As of v34, use (`api.getColumnFilterModel()`) instead.",286:()=>"As of v34, use (`api.setColumnFilterModel()`) instead.",287:()=>"`api.doFilterAction()` requires `enableFilterHandlers = true",288:()=>"`api.getColumnFilterModel(key, true)` requires `enableFilterHandlers = true",289:({rowModelType:e})=>`Row Model '${e}' is not supported with Batch Editing`,290:({rowIndex:e,rowPinned:t})=>`Row with index '${e}' and pinned state '${t}' not found`,291:()=>"License Key being set multiple times with different values. This can result in an incorrect license key being used,",292:({colId:e})=>`The Multi Filter for column '${e}' has buttons configured against the child filters. When 'enableFilterHandlers=true', buttons must instead be provided against the parent Multi Filter params. The child filter buttons will be ignored.`};function JS(e,t){const i=ZS[e];if(!i)return[`Missing error text for error id ${e}!`];const o=i(t),n=`\nSee ${ja(e,t)}`;return Array.isArray(o)?o.concat(n):[o,n]}var ey={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},sa=new WeakMap,na=new WeakMap;function ty(e,t,i){if(!t)return Me(11),{};const o=i;let s;if(!o?.setThemeOnGridDiv){const r=Ye({tag:"div"});r.style.height="100%",e.appendChild(r),e=r,s=()=>e.remove()}return(new oy).create(e,t,r=>{const a=new FC(e);r.createBean(a)},void 0,i,s)}var iy=1,oy=class{create(e,t,i,o,s,n){const r=Mo.applyGlobalGridOptions(t),a=r.gridId??String(iy++),l=this.getRegisteredModules(s,a,r.rowModelType),d=this.createBeansList(r.rowModelType,l,a),c=this.createProvidedBeans(e,r,s);if(!d)return;const h={providedBeanInstances:c,beanClasses:d,id:a,beanInitComparator:dC,beanDestroyComparator:cC,derivedBeans:[aC],destroyCallback:()=>{na.delete(p),sa.delete(e),function uh(e){delete ki[e]}(a),n?.()}},g=new Vp(h);this.registerModuleFeatures(g,l),i(g),g.getBean("syncSvc").start(),o?.(g);const p=g.getBean("gridApi");return sa.set(e,p),na.set(p,e),p}getRegisteredModules(e,t,i){return To($S,void 0,!0),e?.modules?.forEach(o=>To(o,t)),function hh(e,t){const i=ki[e]??{};return[...Object.values(ls.all??{}),...Object.values(i.all??{}),...Object.values(ls[t]??{}),...Object.values(i[t]??{})]}(t,Yc(i))}registerModuleFeatures(e,t){const i=e.getBean("registry"),o=e.getBean("apiFunctionSvc");for(const s of t){i.registerModule(s);const n=s.apiFunctions;if(n){const r=Object.keys(n);for(const a of r)o?.addFunction(a,n[a])}}}createProvidedBeans(e,t,i){let o=i?i.frameworkOverrides:null;q(o)&&(o=new Ud);const s={gridOptions:t,eGridDiv:e,eRootDiv:e,globalListener:i?i.globalListener:null,globalSyncListener:i?i.globalSyncListener:null,frameworkOverrides:o};return i?.providedBeanInstances&&Object.assign(s,i.providedBeanInstances),s}createBeansList(e,t,i){const o={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},s=Yc(e),n=o[s];if(!n)return void ko(201,{rowModelType:s},`Unknown rowModelType ${s}.`);if(!function ph(){return Ba}())return void ko(272,void 0,"No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:\n \n import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';\n \n ModuleRegistry.registerModules([ AllCommunityModule ]);\n ");if(!e){const a=Object.entries(o).filter(([l,d])=>wn(d,i,l));if(1==a.length){const[l,d]=a[0];if(l!==s){const c={moduleName:d,rowModelType:l};return void ko(275,c,jc(c))}}}if(!wn(n,i,s))return void ko(200,{reasonOrId:`rowModelType = '${s}'`,moduleName:n,gridScoped:bn(),gridId:i,rowModelType:s},`Missing module ${n}Module for rowModelType ${s}.`);const r=new Set;for(const a of t)for(const l of a.beans??[])r.add(l);return Array.from(r)}};function Yc(e){return e??"clientSide"}function Mi(e){const t=e.rowModel;return"clientSide"===t.getType()?t:void 0}function on(e){const t=e.rowModel;return"infinite"===t.getType()?t:void 0}function ra(e){return e.filter(t=>null!=t)}var ay=class{wrap(e,t,i,o){const s=this.createWrapper(e,o);for(const n of t??[])this.createMethod(s,n,!0);for(const n of i??[])this.createMethod(s,n,!1);return s}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&&I(49,{methodName:t}),null)}}};function sn(e){return"whenTruncated"===e.get("tooltipShowMode")}var dy=class extends M{getFileName(e){const t=this.getDefaultFileExtension();return e?.length||(e=this.getDefaultFileName()),e.includes(".")?e:`${e}.${t}`}getData(e){const t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},cy=class{constructor(e){const{colModel:t,rowGroupColsSvc:i,colNames:o,valueSvc:s,gos:n,processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:d}=e;this.colModel=t,this.rowGroupColsSvc=i,this.colNames=o,this.valueSvc=s,this.gos=n,this.processCellCallback=r,this.processHeaderCallback=a,this.processGroupHeaderCallback=l,this.processRowGroupCallback=d}prepare(e){}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e,t,i,o,s){const n=0===t&&el(this.gos,s,this.colModel.isPivotMode());if(this.processRowGroupCallback&&(this.gos.get("treeData")||s.group)&&(e.isRowGroupDisplayed(s.rowGroupColumn?.getColId()??"")||n))return{value:this.processRowGroupCallback(ee(this.gos,{column:e,node:s}))??""};if(this.processCellCallback)return{value:this.processCellCallback(ee(this.gos,{accumulatedRowIndex:i,column:e,node:s,value:this.valueSvc.getValueForDisplay(e,s,void 0,void 0).value,type:o,parseValue:h=>this.valueSvc.parseValue(e,s,h,this.valueSvc.getValue(e,s,void 0)),formatValue:h=>this.valueSvc.formatValue(e,s,h)??h}))??""};const r=this.gos.get("treeData"),a=this.valueSvc;if((-1!==s.level||!s.footer)&&(n||!0===e.colDef.showRowGroup&&(s.group||r))){let h="",g=s;for(;g&&-1!==g.level;){const{value:p,valueFormatted:f}=a.getValueForDisplay(n?void 0:e,g,!0,!0);h=` -> ${f??p??""}${h}`,g=g.parent}return{value:h,valueFormatted:h}}const{value:c,valueFormatted:u}=a.getValueForDisplay(e,s,!0,!0);return{value:c??"",valueFormatted:u}}getHeaderName(e,t){return e?e(ee(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}},hy={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,renderingMode:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0,enableFilterHandlers:!0,filterHandlers:!0},St="clientSide",dt="serverSide",mo="infinite",gy={onGroupExpandedOrCollapsed:[St],refreshClientSideRowModel:[St],isRowDataEmpty:[St],forEachLeafNode:[St],forEachNodeAfterFilter:[St],forEachNodeAfterFilterAndSort:[St],resetRowHeights:[St,dt],applyTransaction:[St],applyTransactionAsync:[St],flushAsyncTransactions:[St],getBestCostNodeSelection:[St],getServerSideSelectionState:[dt],setServerSideSelectionState:[dt],applyServerSideTransaction:[dt],applyServerSideTransactionAsync:[dt],applyServerSideRowData:[dt],retryServerSideLoads:[dt],flushServerSideAsyncTransactions:[dt],refreshServerSide:[dt],getServerSideGroupLevelState:[dt],refreshInfiniteCache:[mo],purgeInfiniteCache:[mo],getInfiniteRowCount:[mo],isLastRowIndexKnown:[mo,dt],expandAll:[St,dt],collapseAll:[St,dt],onRowHeightChanged:[St,dt],setRowCount:[mo,dt],getCacheBlockState:[mo,dt]},py={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")'}},my={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",tooltipFeature:"Tooltip",highlightTooltipFeature:"Tooltip",tooltipStateManager:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},Cy={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,"filter-add":1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1,"column-arrow":1,"un-pin":1,"pinned-top":1,"pinned-bottom":1,"chevron-up":1,"chevron-down":1,"chevron-left":1,"chevron-right":1,edit:1},vy={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterAdd:"NewFiltersToolPanel",filterCardCollapse:"NewFiltersToolPanel",filterCardExpand:"NewFiltersToolPanel",filterCardEditing:"NewFiltersToolPanel",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",ensureColumnVisible:["ColumnsToolPanel","ColumnMenu"],groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuValue:"MenuCore",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore",rowPin:"PinnedRow",rowUnpin:"PinnedRow",rowPinBottom:"PinnedRow",rowPinTop:"PinnedRow"},wy=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),yy=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),Ry={moduleName:"Validation",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,function fh(e){Ua=e}(JS)}warnOnInitialPropertyUpdate(e,t){"api"===e&&hy[t]&&I(22,{key:t})}processGridOptions(e){this.processOptions(e,{objectName:"gridOptions",allProperties:[...nb,...sb,...ob,...Fc,...ab,...Dc,...Pc,...rb,...Object.values(Kr)],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:{suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."},suppressAdvancedFilterEval:{version:"34",message:"Advanced filter no longer uses function evaluation, so this option has no effect."}},validations:ub()})}validateApiFunction(e,t){return function fy(e,t,i){const o=py[e];if(o){const{version:n,new:r,old:a,message:l}=o,d=a??e;return(...c)=>(Ki(`Since ${n} api.${d} is deprecated. ${r?`Please use ${r} instead. `:""}${l??""}`),t.apply(t,c))}const s=gy[e];return s?(...n)=>{const r=i.rowModel.getType();if(s.includes(r))return t.apply(t,n);qi(`api.${e} can only be called when gridOptions.rowModelType is ${s.join(" or ")}`)}:t}(e,t,this.beans)}missingUserComponent(e,t,i,o){const s=ho[t];s?this.gos.assertModuleRegistered(s,`AG Grid '${e}' component: ${t}`):I(101,{propertyName:e,componentName:t,agGridDefaults:i,jsComps:o})}missingDynamicBean(e){const t=my[e];return t?Kt(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){yy.has(e)&&I(10,{eventType:e})}validateIcon(e){if(wy.has(e)&&I(43,{iconName:e}),Cy[e])return;const t=vy[e];t?Me(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:bn(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."}):I(134,{iconName:e})}isProvidedUserComp(e){return!!ho[e]}validateColDef(e){this.processOptions(e,{objectName:"colDef",allProperties:Object.keys(eb),docsUrl:"column-properties/",deprecations:{checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."},rowGroupingHierarchy:{version:"34.3",message:"Use `colDef.groupHierarchy` instead."}},validations:{autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(t,{paginationAutoPageSize:i})=>i?"colDef.autoHeight is not supported with paginationAutoPageSize.":null},cellRendererParams:{validate:t=>null==t.rowGroup&&null==t.rowGroupIndex&&"agGroupCellRenderer"!==t.cellRenderer||!("checkbox"in t.cellRendererParams)?null:'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.'},flex:{validate:(t,i)=>i.autoSizeStrategy?"colDef.flex is not supported with gridOptions.autoSizeStrategy":null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(t,{rowSelection:i})=>"multiple"===i?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:i})=>"multiple"===i?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:i})=>"multiple"===i?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:t=>{const i=t.headerValueGetter;return"function"==typeof i||"string"==typeof i?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:t})=>{if(t){if(t.smallDown)return Kt(262);if(t.smallLeft)return Kt(263);if(t.smallRight)return Kt(264)}return null}},sortingOrder:{validate:t=>{const i=t.sortingOrder;if(Array.isArray(i)&&i.length>0){const o=i.filter(s=>!Zo.includes(s));if(o.length>0)return`sortingOrder must be an array with elements from [${Zo.map(us).join()}], currently it includes [${o.map(us).join()}]`}else if(!Array.isArray(i)||i.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${i}`;return null}},type:{validate:t=>{const i=t.type;return i instanceof Array?i.some(s=>"string"!=typeof s)?"if colDef.type is supplied an array it should be of type 'string[]'":null:"string"==typeof i?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(t,{suppressRowTransform:i})=>i?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{dependencies:{editable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(t,{rowSelection:i,cellSelection:o,suppressRowTransform:s,enableCellSpan:n,rowDragEntireRow:r,enableCellTextSelection:a})=>"object"==typeof i&&"singleRow"===i?.mode&&i?.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":o?"colDef.spanRows is not supported with cellSelection.":s?"colDef.spanRows is not supported with suppressRowTransform.":n?r?"colDef.spanRows is not supported with rowDragEntireRow.":a?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."},groupHierarchy:{validate(t,{groupHierarchyConfig:i={}},o){const s=new Set(["year","quarter","month","formattedMonth","day","hour","minute","second"]),n=[];for(const r of t.groupHierarchy??[])"object"!=typeof r?!s.has(r)&&!(r in i)&&n.push(Ec(r)):o.validation?.validateColDef(r);return n.length>0?`The following parts of colDef.groupHierarchy are not recognised: ${n.join(", ")}.\nChoose one of ${[...s].map(Ec).join(", ")}, or define your own parts in gridOptions.groupHierarchyConfig.`:null}}}})}processOptions(e,t){const{validations:i,deprecations:o,allProperties:s,propertyExceptions:n,objectName:r,docsUrl:a}=t;s&&!0!==this.gridOptions.suppressPropertyNamesCheck&&this.checkProperties(e,[...n??[],...Object.keys(o)],s,r,a);const l=new Set;if(Object.keys(e).forEach(c=>{const u=o[c];if(u){const{message:b,version:R}=u;l.add(`As of v${R}, ${String(c)} is deprecated. ${b??""}`)}const h=e[c];if(null==h||!1===h)return;const g=i[c];if(!g)return;const{dependencies:p,validate:f,supportedRowModels:m,expectedType:w}=g;if(w){const b=typeof h;if(b!==w)return void l.add(`${String(c)} should be of type '${w}' but received '${b}' (${h}).`)}if(m){const b=this.gridOptions.rowModelType??"clientSide";if(!m.includes(b))return void l.add(`${String(c)} is not supported with the '${b}' row model. It is only valid with: ${m.join(", ")}.`)}if(p){const b=this.checkForRequiredDependencies(c,p,e);if(b)return void l.add(b)}if(f){const b=f(e,this.gridOptions,this.beans);if(b)return void l.add(b)}}),l.size>0)for(const c of l)Ki(c)}checkForRequiredDependencies(e,t,i){const s=Object.entries(t).filter(([n,r])=>!r.required.includes(i[n]));return 0===s.length?null:s.map(([n,r])=>`'${String(e)}' requires '${n}' to be one of [${r.required.map(a=>null===a?"null":void 0===a?"undefined":a).join(", ")}]. ${r.reason??""}`).join("\n ")}checkProperties(e,t,i,o,s){const r=function Sy(e,t,i){const o={},s=e.filter(n=>!t.some(r=>r===n));if(s.length>0)for(const n of s)o[n]=$n({inputValue:n,allSuggestions:i}).values;return o}(Object.getOwnPropertyNames(e),["__ob__","__v_skip","__metadata__",...t,...i],i),a=Object.keys(r);for(const l of a){let c=`invalid ${o} property '${l}' did you mean any of these: ${r[l].slice(0,8).join(", ")}.`;i.includes("context")&&(c+=`\nIf you are trying to annotate ${o} with application data, use the '${o}.context' property instead.`),Ki(c)}a.length>0&&s&&Ki(`to see all the valid ${o} properties please check: ${this.beans.frameworkOverrides.getDocLink(s)}`)}}]};function Xc(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var Dy={moduleName:"SharedMenu",version:G,beans:[class extends M{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){this.showColumnMenuCommon(Id(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,i){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,i)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}hideFilterMenu(){Id(this.beans)?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(Mt(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&vi(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&"new"===this.gos.get("columnMenu")}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(Oi()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!Mt(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!(!this.beans.filterManager?.isFilterAllowed(e)||Mt(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 Mt(e)?!!e.exists("suppressMenuHide")&&t:t}showColumnMenuCommon(e,t,i,o){const{positionBy:s,onClosedCallback:n}=t,r=t.column;if("button"===s){const{buttonElement:a}=t;e?.showMenuAfterButtonClick(r,a,i,n,o)}else if("mouse"===s){const{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(r,a,i,n,o)}else if(r){const a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(r,"auto"),si(a,()=>{const d=l.getHeaderRowContainerCtrl(r.getPinned())?.getHeaderCtrlForColumn(r);d&&e?.showMenuAfterButtonClick(r,d.getAnchorElementForMenu(o),i,n,o)})}}}],apiFunctions:{showColumnMenu:function Fy(e,t){const i=e.colModel.getCol(t);i?e.menuSvc?.showColumnMenu({column:i,positionBy:"auto"}):Me(12,{colKey:t})},hidePopupMenu:function Py(e){e.menuSvc?.hidePopupMenu()}}},nn={moduleName:"Popup",version:G,beans:[class extends Yp{postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getDefaultPopupParent(){return this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:i,event:o}=e,s=t.getBoundingClientRect(),n=this.getParentRect();this.setAlignedTo(t,i);let r=!1;this.positionPopup({ePopup:i,keepWithinBounds:!0,updatePosition:()=>{const l=this.keepXYWithinBounds(i,s.top-n.top,0),d=i.clientWidth>0?i.clientWidth:200;r||(i.style.minWidth=`${d}px`,r=!0);const u=n.right-n.left-d;let h;return this.gos.get("enableRtl")?(h=p(),h<0&&(h=g(),this.setAlignedStyles(i,"left")),h>u&&(h=0,this.setAlignedStyles(i,"right"))):(h=g(),h>u&&(h=p(),this.setAlignedStyles(i,"right")),h<0&&(h=0,this.setAlignedStyles(i,"left"))),{x:h,y:l};function g(){return s.right-n.left-2}function p(){return s.left-n.left-d}},postProcessCallback:()=>this.callPostProcessPopup(e,"subMenu",i,t,o instanceof MouseEvent?o:void 0)})}callPostProcessPopup(e,t,i,o,s){const n=this.gos.getCallback("postProcessPopup");if(n){const{column:r,rowNode:a}=e;n({column:r,rowNode:a,ePopup:i,type:t,eventSource:o,mouseEvent:s})}}getActivePopups(){return this.popupList.map(e=>e.element)}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const i of this.popupList)t.applyThemeClasses(i.wrapper)}}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return ci(e)}}]},_y={filterHandler:()=>({doesFilterPass:()=>!0})},Yy={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},aa=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){const i=e.filterOptions??t;this.filterOptions!==i&&(this.filterOptions=i,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){const{filterOptions:e}=this;if(e)for(const t of e)"string"!=typeof t&&([["displayKey"],["displayName"],["predicate","test"]].every(s=>!!s.some(n=>null!=t[n])||(I(72,{keys:s}),!1))?this.customFilterOptions[t.displayKey]=t:this.filterOptions=e.filter(s=>s===t)||[])}getDefaultItem(e){const{filterOptions:t}=this;if(e)return e;if(t.length>=1){const i=t[0];if("string"==typeof i)return i;if(i.displayKey)return i.displayKey;I(73)}else I(74)}getCustomOption(e){return this.customFilterOptions[e]}};function es(e,t,i){return null==i?e.splice(t):e.splice(t,i)}function rn(e){return null==e||"string"==typeof e&&0===e.trim().length}function ts(e,t){const i=t.getCustomOption(e);if(i){const{numberOfInputs:s}=i;return s??1}return e&&["empty","notBlank","blank"].indexOf(e)>=0?0:"inRange"===e?2:1}var la=class extends xf{constructor(e,t,i){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=i,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(e){super.setParams(e);const t=new aa;this.optionsFactory=t,t.init(e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e)}commonUpdateSimpleParams(e){this.setNumConditions(e),this.defaultJoinOperator=function Xy(e){return"AND"===e||"OR"===e?e:"AND"}(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions();const t=this.getGui();this.isReadOnly()?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,i)=>{t.setValue(0===i?e:this.optionsFactory.defaultOption,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return 0===e.length?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return 0===e.length?t:!0===e[0].getValue()?"OR":"AND"}areNonNullModelsEqual(e,t){const i=!e.operator,o=!t.operator;if(!i&&o||i&&!o)return!1;let n;return n=i?this.areSimpleModelsEqual(e,t):e.operator===t.operator&&bi(e.conditions,t.conditions,(l,d)=>this.areSimpleModelsEqual(l,d)),n}setModelIntoUi(e,t){if(null==e)return this.resetUiToDefaults(t),Ne.resolve();if(e.operator){const o=e;let s=o.conditions;null==s&&(s=[],I(77));const n=function Jy(e,t){let i=e.length;return i>t&&(e.splice(t),I(78),i=t),i}(s,this.maxNumConditions),r=this.getNumConditions();if(n<r)this.removeConditionsAndOperators(n);else if(n>r)for(let l=r;l<n;l++)this.createJoinOperatorPanel(),this.createOption();const a="OR"===o.operator;this.eJoinAnds.forEach(l=>l.setValue(!a,!0)),this.eJoinOrs.forEach(l=>l.setValue(a,!0)),s.forEach((l,d)=>{this.eTypes[d].setValue(l.type,!0),this.setConditionIntoUi(l,d)})}else{const o=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(o.type,!0),this.setConditionIntoUi(o,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),Ne.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(I(79),t=1),this.maxNumConditions=t;let i=e.numAlwaysVisibleConditions??1;i<1&&(I(80),i=1),i>t&&(I(81),i=t),this.numAlwaysVisibleConditions=i}createOption(){const e=this.getGui(),t=this.createManagedBean(new Yn);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const i=this.createEValue();this.eConditionBodies.push(i),e.appendChild(i),this.putOptionsIntoDropdown(t),this.resetType(t);const o=this.getNumConditions()-1;this.forEachPositionInput(o,s=>this.resetInput(s)),this.addChangedListeners(t,o)}createJoinOperatorPanel(){const e=Ye({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),i=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const o=this.eJoinPanels.length-1,s=this.joinOperatorId++;this.resetJoinOperatorAnd(t,o,s),this.resetJoinOperatorOr(i,o,s),this.isReadOnly()||(t.onValueChange(this.listener),i.onValueChange(this.listener))}createJoinOperator(e,t,i){const o=this.createManagedBean(new Zg);e.push(o);const s="ag-filter-condition-operator";return o.addCss(s),o.addCss(`${s}-${i}`),t.appendChild(o.getGui()),o}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>"string"==typeof e?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const i of t)e.addOption(i);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,i=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:i?this.getLocaleTextFunc()(i.displayKey,i.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let i=0;i<this.getNumConditions();i++)this.isConditionUiComplete(i)?e=i:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const i=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<i){this.removeConditionsAndOperators(i+1);const o=e+1,s=i-o;s>0&&this.removeConditionsAndOperators(o,s),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((o,s)=>{const n=this.isConditionDisabled(s,e);o.setDisabled(n||this.filterListOptions.length<=1),1===s&&(Et(this.eJoinPanels[0],n),this.eJoinAnds[0].setDisabled(n),this.eJoinOrs[0].setDisabled(n))}),this.eConditionBodies.forEach((o,s)=>{ce(o,this.isConditionBodyVisible(s))});const i="OR"===(t??this.getJoinOperator());for(const o of this.eJoinAnds)o.setValue(!i,!0);for(const o of this.eJoinOrs)o.setValue(i,!0);this.forEachInput((o,s,n,r)=>{this.setElementDisplayed(o,s<r),this.setElementDisabled(o,this.isConditionDisabled(n,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:i,eConditionBodies:o,eJoinPanels:s,eJoinAnds:n,eJoinOrs:r}=this;this.removeComponents(i,e,t),this.removeElements(o,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(s,a,t),this.removeComponents(n,a,t),this.removeComponents(r,a,t)}removeElements(e,t,i){const o=es(e,t,i);for(const s of o)pt(s)}removeComponents(e,t,i){const o=es(e,t,i);for(const s of o)pt(s.getGui()),this.destroyBean(s)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let t;if(!this.isReadOnly()){const i=this.getInputs(0)[0];t=i instanceof Gi&&this.isConditionBodyVisible(0)?i.getInputElement():this.eTypes[0]?.getFocusableElement()}(t??this.getGui()).focus({preventScroll:!0})}}afterGuiDetached(){super.afterGuiDetached();const e=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(e.column))return;e.onStateChange({model:e.model});let t=-1,i=-1,o=!1;const s=this.getJoinOperator();for(let r=this.getNumConditions()-1;r>=0;r--)if(this.isConditionUiComplete(r))-1===t&&(t=r,i=r);else{const l=r<t;(r>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(r-1)||l)&&(this.removeConditionsAndOperators(r,1),o=!0,l&&i--)}let n=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),n=!0),this.shouldAddNewConditionAtEnd(i===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),n=!0),n&&this.updateConditionStatusesAndValues(i,s),o&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=i}getModelAsString(e){return this.params.getHandler()?.getModelAsString?.(e)??""}getPlaceholderText(e,t){let i=this.translate(e);if("function"==typeof this.filterPlaceholder){const o=this.eTypes[t].getValue(),s=this.translate(o);i=this.filterPlaceholder({filterOptionKey:o,filterOption:s,placeholder:i})}else"string"==typeof this.filterPlaceholder&&(i=this.filterPlaceholder);return i}resetPlaceholder(){const e=this.getLocaleTextFunc();this.forEachInput((t,i,o,s)=>{if(!(t instanceof Gi))return;const n=0===i&&s>1?"inRangeStart":0===i?"filterOoo":"inRangeEnd",r=0===i&&s>1?e("ariaFilterFromValue","Filter from value"):0===i?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(n,o)),t.setInputAriaLabel(r)})}setElementValue(e,t,i){e instanceof Gi&&e.setValue(null!=t?String(t):null,!0)}setElementDisplayed(e,t){Rl(e)&&ce(e.getGui(),t)}setElementDisabled(e,t){Rl(e)&&Et(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Gi&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,i)=>{this.forEachPositionTypeInput(i,t,e)})}forEachPositionInput(e,t){const i=this.getConditionType(e);this.forEachPositionTypeInput(e,i,t)}forEachPositionTypeInput(e,t,i){const o=ts(t,this.optionsFactory),s=this.getInputs(e);for(let n=0;n<s.length;n++){const r=s[n];null!=r&&i(r,n,e,o)}}isConditionDisabled(e,t){return!!this.isReadOnly()||0!==e&&e>t+1}isConditionBodyVisible(e){return ts(this.getConditionType(e),this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||"empty"===this.getConditionType(e)||this.getValues(e).some(i=>null==i))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinAnds.forEach((t,i)=>this.resetJoinOperatorAnd(t,i,this.joinOperatorId+i)),this.eJoinOrs.forEach((t,i)=>this.resetJoinOperatorOr(t,i,this.joinOperatorId+i)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){const i=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(i).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,i){this.resetJoinOperator(e,t,"AND"===this.defaultJoinOperator,this.translate("andCondition"),i)}resetJoinOperatorOr(e,t,i){this.resetJoinOperator(e,t,"OR"===this.defaultJoinOperator,this.translate("orCondition"),i)}resetJoinOperator(e,t,i,o,s){this.updateJoinOperatorDisabled(e.setValue(i,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${s}`).setLabel(o),t)}updateJoinOperatorsDisabled(){const e=(t,i)=>this.updateJoinOperatorDisabled(t,i);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const i=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((o,s,n)=>{n===t&&this.setElementValue(o,null!=i[s]?i[s]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,i,o)=>{this.setElementValue(t,0===i&&0===o?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,i=>{this.attachElementOnChange(i,this.listener)}))}hasInvalidInputs(){return!1}isReadOnly(){return!!this.params.readOnly}},Zc=class{constructor(e,t,i,o,s,n){this.alive=!0,this.context=e,this.eParent=s;const r=function Ig(e,t,i){return e.getCompDetails(t,sg,"agDateInput",i,!0)}(t,i,o);r&&r.newAgStackInstance().then(a=>{if(!this.alive)return void e.destroyBean(a);if(this.dateComp=a,!a)return;s.appendChild(a.getGui()),a?.afterGuiAttached?.();const{tempValue:l,disabled:d}=this;l&&a.setDate(l),null!=d&&a.setDisabled?.(d),n?.(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){const t=this.dateComp;t?t.setDisabled?.(e):this.disabled=e}setDisplayed(e){ce(this.eParent,e)}setInputPlaceholder(e){this.dateComp?.setInputPlaceholder?.(e)}setInputAriaLabel(e){this.dateComp?.setInputAriaLabel?.(e)}afterGuiAttached(e){this.dateComp?.afterGuiAttached?.(e)}updateParams(e){this.dateComp?.refresh?.(e)}},da=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function Jc(e,t){const{dateFrom:i,dateTo:o,type:s}=e||{};return[i&&bt(i,void 0,!0)||null,o&&bt(o,void 0,!0)||null].slice(0,ts(s,t))}var tu=1/0,iu=class extends M{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,i=new aa;this.optionsFactory=i,i.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(i,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if("colDef"===e.source){const t=e.filterParams,i=this.optionsFactory;i.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:i,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(null==t)return!0;const{operator:i}=t,o=[];i?o.push(...t.conditions??[]):o.push(t);const s=i&&"OR"===i?"some":"every",n=this.params.getValue(e.node);return o[s](r=>this.individualConditionPasses(e,r,n))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:i,maxNumConditions:o}}=e;if(null==t)return;let n=gd(t)?t.conditions:[t];const r=i?.map(c=>"string"==typeof c?c:c.displayKey)??this.defaultOptions;if(n&&!n.every(c=>void 0!==r.find(u=>u===c.type)))return this.params={...e,model:null},void e.onModelChange(null);let l=!1;const d=this.filterType;if((n&&!n.every(c=>c.filterType===d)||t.filterType!==d)&&(n=n.map(c=>({...c,filterType:d})),l=!0),"number"==typeof o&&n&&n.length>o&&(n=n.slice(0,o),l=!0),l){const c=n.length>1?{...t,filterType:d,conditions:n}:{...n[0],filterType:d};this.params={...e,model:c},e.onModelChange(c)}}individualConditionPasses(e,t,i){const o=this.optionsFactory,s=this.mapValuesFromModel(t,o),r=function Zy(e,t,i){if(null==e)return;const{predicate:o}=e;return null==o||t.some(s=>null==s)?void 0:o(t,i)}(o.getCustomOption(t.type),s,i);return r??(null==i?this.evaluateNullValue(t.type):this.evaluateNonNullValue(s,i,t,e))}},ou=class extends iu{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:i,includeBlanksInGreaterThan:o,includeBlanksInLessThan:s,includeBlanksInRange:n}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(i)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(o)return!0;break;case"lessThan":case"lessThanOrEqual":if(s)return!0;break;case"inRange":if(n)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,i){const o=i.type;if(!this.isValid(t))return"notEqual"===o||"notBlank"===o;const s=this.comparator(),n=null!=e[0]?s(e[0],t):0;switch(o){case"equals":return 0===n;case"notEqual":return 0!==n;case"greaterThan":return n>0;case"greaterThanOrEqual":return n>=0;case"lessThan":return n<0;case"lessThanOrEqual":return n<=0;case"inRange":{const r=s(e[1],t);return this.params.filterParams.inRangeInclusive?n>=0&&r<=0:n>0&&r<0}case"blank":return rn(t);case"notBlank":return!rn(t);default:return I(76,{filterModelType:o}),!0}}},su={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},t1={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},ca=class extends M{constructor(e,t,i){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=i}getModelAsString(e,t){const i=this.getLocaleTextFunc(),o="filterToolPanel"===t;if(!e)return o?Fi(this,"filterSummaryInactive"):null;if(null!=e.operator){const n=e;return(n.conditions??[]).map(d=>this.getModelAsString(d,t)).join(` ${Fi(this,"AND"===n.operator?"andCondition":"orCondition")} `)}if("blank"===e.type||"notBlank"===e.type)return o?Fi(this,"blank"===e.type?"filterSummaryBlank":"filterSummaryNotBlank"):i(e.type,e.type);{const n=e,r=this.optionsFactory.getCustomOption(n.type),{displayKey:a,displayName:l,numberOfInputs:d}=r||{};return a&&l&&0===d?i(a,l):this.conditionToString(n,o,"inRange"===n.type||2===d,a,l)}}updateParams(e){const{optionsFactory:t,filterParams:i}=e;this.optionsFactory=t,this.filterParams=i}conditionForToolPanel(e,t,i,o,s,n){let r;const a=this.getTypeKey(e);return a&&(r=Fi(this,a)),s&&n&&(r=this.getLocaleTextFunc()(s,n)),null!=r?t?`${r} ${Fi(this,"filterSummaryInRangeValues",[i(),o()])}`:`${r} ${i()}`:null}getTypeKey(e){const t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){const t=this.valueFormatter;return t?t(e??null)??"":String(e)}},nu=class extends ca{constructor(e,t){super(e,t,i=>{const{dataTypeSvc:o,valueSvc:s}=this.beans,n=t.column,r=o?.getDateFormatterFunction(n),a=r?r(i??void 0):i;return s.formatValue(n,null,a)}),this.filterTypeKeys=su}conditionToString(e,t,i,o,s){const{type:n}=e,r=bt(e.dateFrom),a=bt(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,d=t?this.formatValue.bind(this):h=>Un(h,l),c=()=>null!==r?d(r):"null",u=()=>null!==a?d(a):"null";if(t){const h=this.conditionForToolPanel(n,i,c,u,o,s);if(null!=h)return h}return i?`${c()}-${u()}`:null!=r?d(r):`${n}`}};function i1(e,t){return t<e?-1:t>e?1:0}var ru=class extends Re{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e)return void(this.lastType=this.optionsFactory.defaultOption);let i;i=e.operator?e.conditions[0]:e,this.lastType=i.type}canWeEditAfterModelFromParentFilter(e){return e?!e.operator&&this.isTypeEditable(e.type):this.isTypeEditable(this.lastType)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");this.reactive=t,this.setParams(e),t&&this.onModelUpdated(e.model)}setParams(e){const t=new aa;this.optionsFactory=t,t.init(e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(t,e.filterParams)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const i=this.optionsFactory.defaultOption;t||(this.lastType=i),this.readOnly=!!e.filterParams.readOnly;const o=this.isTypeEditable(i);this.setEditable(o)}refresh(e){this.params=e;const t=e,i=this.reactive;if((!i||"colDef"===t.source)&&this.updateParams(e),i){const{source:o,model:s}=t;if("dataChanged"===o||"ui"===o)return;this.onModelUpdated(s)}}updateParams(e){const t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||this.onModelUpdated(e)}hasSingleInput(e){const t=this.optionsFactory.getCustomOption(e)?.numberOfInputs;return null==t||1==t}isTypeEditable(e){return!!e&&!this.readOnly&&this.hasSingleInput(e)&&["inRange","empty","blank","notBlank"].indexOf(e)<0}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},s1={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eReadOnlyText"},{tag:"div",ref:"eDateWrapper",cls:"ag-date-floating-filter-wrapper"}]},r1={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},ua=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function ha(e){const{allowedCharPattern:t}=e??{};return t??null}function ga(e){return null==e||isNaN(e)?null:e}function au(e,t){const{filter:i,filterTo:o,type:s}=e||{};return[ga(i),ga(o)].slice(0,ts(s,t))}var lu=class extends ca{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=su}conditionToString(e,t,i,o,s){const{filter:n,filterTo:r,type:a}=e,l=this.formatValue.bind(this);if(t){const d=this.conditionForToolPanel(a,i,()=>l(n),()=>l(r),o,s);if(null!=d)return d}return i?`${l(n)}-${l(r)}`:null!=n?l(n):`${a}`}},du=class extends M{constructor(e){super(),this.params=e,this.eInput=V,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new Vi(this.params?.config));const t=this.eInput.getGui();e.appendChild(t);const i=o=>this.onValueChanged(o);this.addManagedListeners(t,{input:i,keydown:i})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t}){const{eInput:i}=this;i.setInputAriaLabel(e),void 0!==t&&i.setAutoComplete(t)}};function pa(e){const t=e?.trim();return""===t?e:t}function cu(e,t){const{filter:i,filterTo:o,type:s}=e||{};return[i||null,o||null].slice(0,ts(s,t))}var c1={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},uu=class extends ru{constructor(){super(...arguments),this.eFloatingFilterInputContainer=V,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(c1)}onModelUpdated(e){this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e))}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){const t=e.browserAutoComplete??!1,{inputSvc:i,defaultDebounceMs:o,readOnly:s}=this;if(i.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:t}),this.applyActive=Ts(e.filterParams),!s){const n=ar(e.filterParams,o),r=it(this,this.syncUpWithParentFilter.bind(this),n);i.setValueChangedListener(r)}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,i=t.getValue();Ue(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(i,!0)}syncUpWithParentFilter(e){const t="Enter"===e.key,i=this.reactive;if(i&&this.params.onUiChange(),this.applyActive&&!t)return;const{inputSvc:o,params:s,lastType:n}=this;let r=o.getValue();if(s.filterParams.trimInput&&(r=pa(r),o.setValue(r,!0)),i){const a=s,l=a.model,d=this.convertValue(r),c=null==d?null:{...l??{filterType:this.filterType,type:n??this.optionsFactory.defaultOption},filter:d};a.onModelChange(c,{afterFloatingFilter:!0})}else s.parentFilterInstance(a=>{a?.onFloatingFilterChanged(n||null,r||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},u1=class extends M{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new qn),this.eTextInput=this.createManagedBean(new Vi),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),i=this.eTextInput.getGui();e.appendChild(t),e.appendChild(i),this.setupListeners(t,o=>this.onValueChanged(o)),this.setupListeners(i,o=>this.onValueChanged(o))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},fa=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],hu=class extends ca{constructor(){super(...arguments),this.filterTypeKeys=t1}conditionToString(e,t,i,o,s){const{filter:n,filterTo:r,type:a}=e;if(t){const l=c=>()=>Fi(this,"filterSummaryTextQuote",[c]),d=this.conditionForToolPanel(a,i,l(n),l(r),o,s);if(null!=d)return d}return i?`${n}-${r}`:null!=n?`${n}`:`${a}`}},p1=({filterOption:e,value:t,filterText:i})=>{if(null==i)return!1;switch(e){case"contains":return t.includes(i);case"notContains":return!t.includes(i);case"equals":return t===i;case"notEqual":return t!=i;case"startsWith":return 0===t.indexOf(i);case"endsWith":{const o=t.lastIndexOf(i);return o>=0&&o===t.length-i.length}default:return!1}},f1=e=>e,m1=e=>null==e?null:e.toString().toLowerCase(),R1={moduleName:"ClientSideRowModelFilter",version:G,rowModels:["clientSide"],beans:[class extends M{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=["excludeChildrenWhenTreeDataFiltering"]}wireBeans(e){this.filterManager=e.filterManager}execute(e){const{changedPath:t}=e;this.filter(t)}filter(e){const t=!!this.filterManager?.isChildFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){const i=(o,s)=>{o.childrenAfterFilter=o.hasChildren()&&e&&!s?o.childrenAfterGroup.filter(n=>{const r=n.childrenAfterFilter&&n.childrenAfterFilter.length>0,a=n.data&&this.filterManager.doesRowPassFilter({rowNode:n});return r||a}):o.childrenAfterGroup,Xc(o)};if(this.doingTreeDataFiltering()){const o=(n,r)=>{if(n.childrenAfterGroup)for(let a=0;a<n.childrenAfterGroup.length;a++){const l=n.childrenAfterGroup[a],d=r||this.filterManager.doesRowPassFilter({rowNode:l});l.childrenAfterGroup?o(n.childrenAfterGroup[a],d):i(l,d)}i(n,r)};t.executeFromRootNode(n=>o(n,!1))}else t.forEachChangedNodeDepthFirst(s=>i(s,!1),!0)}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}}]},ma={moduleName:"FilterCore",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:o})=>this.onAdvFilterEnabledChanged(o),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:i}=this;this.alwaysPassFilter=i.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=i.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return"function"==typeof e&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return"function"==typeof t&&t(e)}setFilterState(e,t,i="api"){this.isAdvFilterEnabled()||this.colFilter?.setState(e,t,i)}setFilterModel(e,t="api",i){this.isAdvFilterEnabled()?i||this.warnAdvFilters():this.colFilter?.setModel(e,t)}getFilterModel(){return this.colFilter?.getModel()??{}}getFilterState(){return this.colFilter?.getState()}isColumnFilterPresent(){return!!this.colFilter?.isFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){Rn(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:i,columns:o=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):Ne.resolve()).then(()=>{const s={source:t,type:"filterChanged",columns:o};i&&ft(s,i),this.eventSvc.dispatchEvent(s),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!Rn(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,colIdToSkip:e})}doesRowPassAggregateFilters(e){const{rowNode:t}=e;return!!this.alwaysPassFilter?.(t)||!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){const{rowNode:t}=e;return!!this.alwaysPassFilter?.(t)||!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterAllowed(e){return!this.isAdvFilterEnabled()&&!!this.colFilter?.isFilterAllowed(e)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){if(this.beans.dataTypeSvc?.isPendingInference)return void this.advFilterModelUpdateQueue.push(e);this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return!this.isAdvFilterEnabled()&&!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){I(68)}setupAdvFilterHeaderComp(e){this.advancedFilter?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(const e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setModelForColumn(e,t)??Promise.resolve()}}],apiFunctions:{isAnyFilterPresent:function Uy(e){return!!e.filterManager?.isAnyFilterPresent()},onFilterChanged:function $y(e,t="api"){e.filterManager?.onFilterChanged({source:t})}},css:[".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper,:where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}:where(.ag-floating-filter-full-body)>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}"],dependsOn:[R1]},gu={moduleName:"FilterValue",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,i){if(!t)return;const o=e.getColDef(),{selectableFilter:s,valueSvc:n}=this.beans,r=i??s?.getFilterValueGetter(e.getColId())??o.filterValueGetter;return r?this.executeFilterValueGetter(r,t.data,e,t,o):n.getValue(e,t)}executeFilterValueGetter(e,t,i,o,s){const{expressionSvc:n,valueSvc:r}=this.beans,a=ee(this.gos,{data:t,node:o,column:i,colDef:s,getValue:r.getValueCallback.bind(r,o)});return"function"==typeof e?e(a):n?.evaluate(e,a)}}]},an={moduleName:"ColumnFilter",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...od},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)});const e=this.gos,t={...e.get("initialState")?.filter?.filterModel??{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",i){const{colModel:o,dataTypeSvc:s,filterManager:n}=this.beans;if(s?.isPendingInference)return void this.modelUpdates.push({model:e,source:t});const r=[],a=this.getModel(!0);if(e){const l=new Set(Object.keys(e));this.allColumnFilters.forEach((d,c)=>{r.push(this.setModelOnFilterWrapper(d,e[c])),l.delete(c)}),l.forEach(d=>{const c=o.getColDefCol(d)||o.getCol(d);if(!c)return void I(62,{colId:d});if(!c.isFilterAllowed())return void I(63,{colId:d});const u=this.getOrCreateFilterWrapper(c,!0);u?r.push(this.setModelOnFilterWrapper(u,e[d],!0)):I(64,{colId:d})})}else this.model={},this.allColumnFilters.forEach(l=>{r.push(this.setModelOnFilterWrapper(l,null))});Ne.all(r).then(()=>{const l=this.getModel(!0),d=[];this.allColumnFilters.forEach((c,u)=>{Ce(a?a[u]:null,l?l[u]:null)||d.push(c.column)}),d.length>0?n?.onFilterChanged({columns:d,source:t}):i&&this.updateActive("filterChanged")})}getModel(e){const t={},{allColumnFilters:i,initialModel:o,beans:{colModel:s}}=this;if(i.forEach((n,r)=>{const a=this.getModelFromFilterWrapper(n);C(a)&&(t[r]=a)}),!e)for(const n of Object.keys(o)){const r=o[n];C(r)&&!i.has(n)&&s.getCol(n)?.isFilterAllowed()&&(t[n]=r)}return t}setState(e,t,i="api"){if(this.state.clear(),t)for(const o of Object.keys(t)){const s=t[o];this.state.set(o,{model:st(this.model,o),state:s})}this.setModel(e,i,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let i=!1;return e.forEach((o,s)=>{const n=o.state;null!=n&&(i=!0,t[s]=n)}),i?t:void 0}getModelFromFilterWrapper(e){const i=e.column.getColId();if(e.isHandler)return st(this.model,i);const o=e.filter;return o?"function"!=typeof o.getModel?(I(66),null):o.getModel():st(this.initialModel,i)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const{allColumnFilters:e}=this;return!!e.size&&(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0)}updateActiveFilters(){const{colModel:t,gos:i}=this.beans,o=!!Rn(i),n=[],r=[],a=(d,c,u)=>{c&&((d=>{if(!d.isPrimary())return!0;const u=!t.isPivotActive();return!(!d.isValueActive()||!u)&&(!!t.isPivotMode()||o)})(d)?n.push(u):r.push(u))},l=[];return this.allColumnFilters.forEach(d=>{const c=d.column,u=c.getColId();if(d.isHandler)l.push(Ne.resolve().then(()=>{a(c,this.isHandlerActive(c),{colId:u,isHandler:!0,handler:d.handler,handlerParams:d.handlerParams})}));else{const h=Ei(d);h&&l.push(h.then(g=>{a(c,(d=>!!d&&(d.isFilterActive?d.isFilterActive():(I(67),!1)))(g),{colId:u,isHandler:!1,comp:g})}))}}),Ne.all(l).then(()=>{this.activeAggregateFilters=n,this.activeColumnFilters=r})}updateFilterFlagInColumns(e,t){const i=[];return this.allColumnFilters.forEach(o=>{const s=o.column;if(o.isHandler)i.push(Ne.resolve().then(()=>{this.setColFilterActive(s,this.isHandlerActive(s),e,t)}));else{const n=Ei(o);n&&i.push(n.then(r=>{this.setColFilterActive(s,r.isFilterActive(),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),Ne.all(i)}doFiltersPass(e,t,i){const{data:o,aggData:s}=e,n=i?this.activeAggregateFilters:this.activeColumnFilters,r=i?s:o,a=this.model;for(let l=0;l<n.length;l++){const d=n[l],{colId:c,isHandler:u}=d;if(c!==t)if(u){const{handler:h,handlerParams:g}=d;if(!h.doesFilterPass({node:e,data:r,model:st(a,c),handlerParams:g}))return!1}else{const h=d.comp;if("function"!=typeof h.doesFilterPass){Me(91);continue}if(!h.doesFilterPass({node:e,data:r}))return!1}}return!0}getHandlerParams(e){const t=this.allColumnFilters.get(e.getColId());return t?.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:i}=this.beans,o=()=>{this.isAlive()&&i?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(o,0):o()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:i}=e,o=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",i).then(()=>{this.allColumnFilters.forEach(s=>{const{column:n,isHandler:r}=s;o!==n.getColId()&&(r&&s.handler.onAnyFilterChanged?.(),Ei(s,r)?.then(a=>{"function"==typeof a?.onAnyFilterChanged&&a.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!this.gos.get("allowShowChangeAfterFilter")&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach(i=>{const o=i.isHandler;o&&i.handler.onNewRowsLoaded?.();const s=Ei(i,o);s&&t.push(s.then(n=>{n.onNewRowsLoaded?.()}))}),Ne.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){const{filterValueSvc:i,colModel:o}=this.beans;return(s,n)=>{const r=n?o.getCol(n):e;return r?i.getValue(r,s,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t?.isHandler)return this.isHandlerActive(e);const i=t?.filter;return i?i.isFilterActive():null!=st(this.initialModel,e.getColId())}isHandlerActive(e){const t=C(st(this.model,e.getColId()));if(t)return t;const i=this.beans.groupFilter;return!!i?.isGroupFilter(e)&&i.isFilterActive(e)}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?Ei(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const i=Ei(t);return i?i.then(o=>({comp:o,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const i=this.getOrCreateFilterWrapper(e,t);return i?.isHandler?i.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let i=this.cachedFilter(e);return!i&&t&&(i=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,i)),i}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType(()=>this.beans.dataTypeSvc?.getBaseDataType(e),t)}getDefaultFilterFromDataType(e,t=!1){return function Th(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":function bf(e,t=!1){return(t?wf:vf)[e??"text"]}(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,i,o,s,n){const r=()=>{const d=this.createFilterCompParams(e,s,n),c=o(d,s);return function Ag(e,t,i,o){const s=t.filter;return El(s)&&(t={filter:s.component,filterParams:t.filterParams}),e.getCompDetails(t,Tn,o,i,!0)}(this.beans.userCompFactory,t,c,i)},a=r();return a?{compDetails:a,createFilterUi:d=>(d?r():a).newAgStackInstance()}:null}createFilterInstance(e,t,i,o){const s=this.beans.selectableFilter;s?.isSelectable(t)&&(t=s.getFilterDef(e,t));const{handler:n,handlerParams:r,handlerGenerator:a}=this.createHandler(e,t,i)??{},l=this.createFilterComp(e,t,i,o,!!n,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:n,handlerGenerator:a,handlerParams:r};const{compDetails:d,createFilterUi:c}=l;return this.isGlobalButtons&&(d.params?.buttons?.length||I(281,{colId:e.getColId()})),{compDetails:d,handler:n,handlerGenerator:a,handlerParams:r,createFilterUi:c}}createBaseFilterParams(e,t){const{filterManager:i,rowModel:o}=this.beans;return ee(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:s=>i?.doesRowPassOtherFilters(e.getColId(),s)??!0,rowModel:o})}createFilterCompParams(e,t,i,o){const s=this.filterChangedCallbackFactory(e),n=this.createBaseFilterParams(e,o);if(n.filterChangedCallback=s,n.filterModifiedCallback=o?()=>{}:r=>this.filterModified(e,r),t){const r=n,a=e.getColId(),l=st(this.model,a);r.model=l,r.state=this.state.get(a)??{model:l},r.onModelChange=(d,c)=>{this.updateStoredModel(a,d),this.refreshHandlerAndUi(e,d,"ui",!1,c).then(()=>{s({...c,source:"columnFilter"})})},r.onStateChange=d=>{this.updateState(e,d),this.updateOrRefreshFilterUi(e)},r.onAction=(d,c,u)=>{this.updateModel(e,d,c),this.dispatchLocalEvent({type:"filterAction",column:e,action:d,event:u})},r.getHandler=()=>this.getHandler(e,!0),r.onUiChange=d=>this.filterUiChanged(e,d),r.source=i}return n}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,i){const o=t(),s={created:!0,create:t,filterParams:e.params,compDetails:e,promise:o};return o.then(i),s}createFilterWrapper(e){const{compDetails:t,handler:i,handlerGenerator:o,handlerParams:s,createFilterUi:n}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),a=>a),r=e.getColId();if(i)return delete this.initialModel[r],i.init?.({...s,source:"init",model:st(this.model,r)}),{column:e,isHandler:!0,handler:i,handlerGenerator:o,handlerParams:s,filterUi:this.createFilterUiForHandler(t,n)};if(n){const a={column:e,filterUi:null,isHandler:!1};return a.filterUi=this.createFilterUiLegacy(t,n,l=>{a.filter=l??void 0}),a}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,i){const{gos:o,frameworkOverrides:s,registry:n}=this.beans;let r;const l=o.get("enableFilterHandlers"),d=l?(g=>{const p=g.filter;return El(p)?p.handler||(r=p.doesFilterPass,r?()=>({doesFilterPass:r}):void 0):"string"==typeof p?p:void 0})(t):void 0,c=g=>()=>this.createBean(n.createDynamicBean(g,!0));let u,h;if("string"==typeof d){const g=o.get("filterHandlers")?.[d];null!=g?u=g:df.has(d)&&(u=c(d),h=d)}else u=d;if(!u){let g;const{compName:p,jsComp:f,fwComp:m}=Tl(s,t);p?g=p:null==f&&null==m&&!0===t.filter&&(g=i),h=this.handlerMap[g],h&&(u=c(h))}return u?{filterHandler:u,handlerNameOrCallback:r??h}:l?(je(o)&&I(277,{colId:e.getColId()}),_y):void 0}createHandler(e,t,i){const o=this.createHandlerFunc(e,t,i);if(!o)return;const s=kn(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:n,filterHandler:r}=o,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,r,s);return{handler:a,handlerParams:l,handlerGenerator:n??r}}createHandlerFromFunc(e,t,i){const o=e.getColDef();return{handler:t(ee(this.gos,{column:e,colDef:o})),handlerParams:this.createHandlerParams(e,i)}}createHandlerParams(e,t){const i=e.getColDef(),o=e.getColId(),s=this.filterChangedCallbackFactory(e);return ee(this.gos,{colDef:i,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:n=>this.beans.filterManager?.doesRowPassOtherFilters(o,n)??!0,onModelChange:(n,r)=>{this.updateStoredModel(o,n),this.refreshHandlerAndUi(e,n,"handler",!1,r).then(()=>{s({...r,source:"columnFilter"})})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:i,groupFilter:o}=this.beans;this.allColumnFilters.forEach((n,r)=>{let a;a=n.column.isPrimary()?t.getColDefCol(r):t.getCol(r),(!a||a!==n.column)&&(e.push(n.column),this.disposeFilterWrapper(n,"columnChanged"),this.disposeColumnListener(r))});const s=o&&e.every(n=>o.isGroupFilter(n));e.length>0&&!s&&i?.onFilterChanged({columns:e,source:"api"})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const i=this.beans.groupFilter;return!i?.isGroupFilter(e)||i.isFilterAllowed(e)}getFloatingFilterCompDetails(e,t){const{userCompFactory:i,frameworkOverrides:o,selectableFilter:s}=this.beans,r=e.getColDef(),a=s?.isSelectable(r)?s.getFilterDef(e,r):r,l=function Ef(e,t,i){if(null==t)return null;let o=null;const{compName:s,jsComp:n,fwComp:r}=Tl(e,t);return s?o={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[s]:null==n&&null==r&&!0===t.filter&&(o=i()),o}(o,a,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",d=this.gos.get("enableFilterHandlers"),c=kn(i,a,this.createFilterCompParams(e,d,"init",!0)),u=ee(this.gos,{column:e,filterParams:c,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:h=>{const g=this.getOrCreateFilterUi(e);g?.then(p=>{h(Vo(p))})},showParentFilter:t});if(d){const h=u,g=e.getColId(),p=this.filterChangedCallbackFactory(e);h.onUiChange=f=>this.floatingFilterUiChanged(e,f),h.model=st(this.model,g),h.onModelChange=(f,m)=>{this.updateStoredModel(g,f),this.refreshHandlerAndUi(e,f,"floating",!0,m).then(()=>{p({...m,source:"columnFilter"})})},h.getHandler=()=>this.getHandler(e,!0),h.source="init"}return function Hg(e,t,i,o){return e.getCompDetails(t,vg,o,i)}(i,r,u,l)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,i,o){const s="paramsUpdated";if(e.isHandler){const n=t.getColId();delete this.initialModel[n],this.state.delete(n);const r=e.filterUi,a=this.createFilterUiForHandler(i,o);e.filterUi=a;const l=this.eventSvc;r?.created?r.promise.then(d=>{this.destroyBean(d),l.dispatchEvent({type:"filterDestroyed",source:s,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:s,column:t})}else this.destroyFilter(t,s)}destroyFilter(e,t="api"){const i=e.getColId(),o=this.allColumnFilters.get(i);this.disposeColumnListener(i),delete this.initialModel[i],o&&this.disposeFilterWrapper(o,t).then(s=>{s&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:"api"})})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let i=!1;const{column:o,isHandler:s,filterUi:n}=e,r=o.getColId();s&&(i=this.isHandlerActive(o),this.destroyBean(e.handler),delete this.model[r],this.state.delete(r));const a=()=>{this.setColFilterActive(o,!1,"filterDestroyed"),this.allColumnFilters.delete(r),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:o})};if(n){if(n.created)return n.promise.then(l=>(i=s?i:!!l?.isFilterActive(),this.destroyBean(l),a(),i));a()}return Ne.resolve(i)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:t?.source??"columnFilter"})}}filterParamsChanged(e,t="api"){const i=this.allColumnFilters.get(e);if(!i)return;const o=this.beans,s=i.column,n=s.getColDef(),r=s.isFilterAllowed(),a=this.getDefaultFilter(s),l=o.selectableFilter,d=l?.isSelectable(n)?l.getFilterDef(s,n):n,c=r?this.createHandlerFunc(s,d,this.getDefaultFilter(s)):void 0,u=!!c,h=i.isHandler;if(h!=u)return void this.destroyFilter(s,"paramsUpdated");const{compDetails:g,createFilterUi:p}=(r?this.createFilterComp(s,d,a,m=>m,u,"colDef"):null)??{compDetails:null,createFilterUi:null},f=g?.params??kn(o.userCompFactory,d,this.createFilterCompParams(s,u,"colDef"));if(h){const m=c?.handlerNameOrCallback??c?.filterHandler,w=st(this.model,e);if(i.handlerGenerator!=m){const b=i.handler,{handler:R,handlerParams:T}=this.createHandlerFromFunc(s,c.filterHandler,f);i.handler=R,i.handlerParams=T,i.handlerGenerator=m,delete this.model[e],R.init?.({...T,source:"init",model:null}),this.destroyBean(b),null!=w&&this.beans.filterManager?.onFilterChanged({columns:[s],source:t})}else{const b=this.createHandlerParams(s,g?.params);i.handlerParams=b,i.handler.refresh?.({...b,source:"colDef",model:w})}}!this.areFilterCompsDifferent(i.filterUi?.compDetails??null,g)&&i.filterUi&&g?(i.filterUi.filterParams=f,Ei(i,h)?.then(m=>{!1===(!m?.refresh||m.refresh(f))?this.destroyFilterUi(i,s,g,p):this.dispatchLocalEvent({type:"filterParamsChanged",column:s,params:f})})):this.destroyFilterUi(i,s,g,p)}refreshHandlerAndUi(e,t,i,o,s){const n=this.cachedFilter(e);if(!n)return o&&this.getOrCreateFilterWrapper(e,!0),Ne.resolve();if(!n.isHandler)return Ne.resolve();const{filterUi:r,handler:a,handlerParams:l}=n;return function cf(e,t,i,o,s,n,r){return t.refresh?.({...i,model:o,source:n,additionalEventAttributes:r}),e().then(a=>{if(a){const{filter:l,filterParams:d}=a;sd(l,d,o,s,n,r)}})}(()=>{if(r){const{created:d,filterParams:c}=r;if(d)return r.promise.then(u=>u?{filter:u,filterParams:c}:void 0);r.refreshed=!0}return Ne.resolve(void 0)},a,l,t,this.state.get(e.getColId())??{model:t},i,s)}setColumnFilterWrapper(e,t){const i=e.getColId();this.allColumnFilters.set(i,t),this.allColumnListeners.set(i,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(i)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:i}=e,{componentClass:o}=t;return!(i===o||i?.render&&o?.render&&i.render===o.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){const t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);const i=this.getOrCreateFilterUi(t);return i?new Promise(o=>{i.then(s=>{o(Vo(s))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:e,source:t})=>this.setModel(e,t)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:e,model:t,resolve:i})=>{this.setModelForColumn(e,t).then(()=>i())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:o,model:s}=this,n=e.getColId(),r=o.get(n);return r?r.model??null:st(s,n)}const i=this.cachedFilter(e);return i?this.getModelFromFilterWrapper(i):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let i=()=>{};const o=new Promise(s=>{i=s});return this.columnModelUpdates.push({key:e,model:t,resolve:i}),o}return new Promise(i=>{this.setModelForColumnLegacy(e,t).then(o=>i(o))})}getStateForColumn(e){return this.state.get(e)??{model:st(this.model,e)}}setModelForColumnLegacy(e,t){const i=this.beans.colModel.getColDefCol(e),o=i?this.getOrCreateFilterWrapper(i,!0):null;return o?this.setModelOnFilterWrapper(o,t):Ne.resolve()}setColDefPropsForDataType(e,t,i){const o=e.filter,s=!0===o?this.getDefaultFilterFromDataType(()=>t.baseDataType):o;if("string"!=typeof s)return;let n,r;const a=this.beans,{filterParams:l,filterValueGetter:d}=e;({filterParams:n,filterValueGetter:r}="agMultiColumnFilter"===s?a.multiFilter?.getParamsForDataType(l,d,t,i)??{}:function Cf(e,t,i,o,s,n,r){let a=t,l=i;const d="agSetColumnFilter"===e;!l&&"object"===o.baseDataType&&!d&&(l=({column:g,node:p})=>s({column:g,node:p,value:n.valueSvc.getValue(g,p)}));const h=(0,(d?dr:lr)[o.baseDataType])({dataTypeDefinition:o,formatValue:s,t:r});return a="object"==typeof t?{...h,...t}:h,{filterParams:a,filterValueGetter:l}}(s,l,d,t,i,a,this.getLocaleTextFunc())),e.filterParams=n,r&&(e.filterValueGetter=r)}setColFilterActive(e,t,i,o){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",i)),e.dispatchColEvent("filterChanged",i,o)}setModelOnFilterWrapper(e,t,i){return new Ne(o=>{if(e.isHandler){const n=e.column,r=n.getColId(),a=this.model[r];return this.updateStoredModel(r,t),i&&t===a?void o():void this.refreshHandlerAndUi(n,t,"api").then(()=>o())}const s=Ei(e);s?s.then(n=>{if("function"!=typeof n?.setModel)return I(65),void o();(n.setModel(t)||Ne.resolve()).then(()=>o())}):o()})}updateStoredModel(e,t){C(t)?this.model[e]=t:delete this.model[e];const i=this.state.get(e);this.state.set(e,{model:t,state:i?.state})}filterModified(e,t){this.getOrCreateFilterUi(e)?.then(i=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:i,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,i){const o=e.getColId(),s=this.cachedFilter(e),n=()=>s?.filterUi;rd(t,n,()=>st(this.model,o),()=>this.state.get(o),r=>this.updateState(e,r),r=>n()?.filterParams?.onModelChange(r,i),s?.isHandler?s.handler.processModelToApply?.bind(s.handler):void 0)}updateAllModels(e,t){const i=[];this.allColumnFilters.forEach((o,s)=>{const n=this.beans.colModel.getColDefCol(s);n&&rd(e,()=>o.filterUi,()=>st(this.model,s),()=>this.state.get(s),r=>this.updateState(n,r),r=>{this.updateStoredModel(s,r),this.dispatchLocalEvent({type:"filterAction",column:n,action:e}),i.push(this.refreshHandlerAndUi(n,r,"ui"))},o?.isHandler?o.handler.processModelToApply?.bind(o.handler):void 0)}),i.length&&Ne.all(i).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();nd(()=>this.cachedFilter(e)?.filterUi,()=>st(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){const{state:e,model:t,activeFilterComps:i}=this;for(const s of i)if("COLUMN_MENU"===s.source)return!1;let o=!1;for(const s of e.keys()){const n=e.get(s);if(!1===n.valid)return!1;(n.model??null)!==st(t,s)&&(o=!0)}return o}hasUnappliedModel(e){const{model:t,state:i}=this;return(i.get(e)?.model??null)!==st(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if("newFiltersToolPanel"===t)return!0;const i=this.beans.filterPanelSvc;return!!i?.isActive&&!!i.getState(e.getColId())}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}},class extends M{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,i,o){e&&!e.isColumn||this.showPopup(e,s=>{this.popupSvc?.positionPopupUnderMouseEvent({column:e,type:i,mouseEvent:t,ePopup:s})},i,t.target,Mt(this.gos),o)}showMenuAfterButtonClick(e,t,i,o){if(e&&!e.isColumn)return;let s=-1,n="left";const r=Mt(this.gos);!r&&this.gos.get("enableRtl")&&(s=1,n="right");const a=r?void 0:4*s,l=r?void 0:4;this.showPopup(e,d=>{this.popupSvc?.positionPopupByComponent({type:i,eventSource:t,ePopup:d,nudgeX:a,nudgeY:l,alignSide:n,keepWithinBounds:!0,position:"under",column:e})},i,t,r,o)}showPopup(e,t,i,o,s,n){const r=e?this.createBean(new ff(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!r?.hasFilter()||!e)return void Me(57);const a=Ye({tag:"div",cls:"ag-menu"+(s?"":" ag-filter-menu"),role:"presentation"});let l;[this.tabListener]=this.addManagedElementListeners(a,{keydown:f=>this.trapFocusWithin(f,a)}),a.appendChild(r?.getGui());const c=function kh(e){return!Mt(e)}(this.gos)?o??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,h=this.getLocaleTextFunc(),g=s&&"columnFilter"!==i?h("ariaLabelColumnMenu","Column Menu"):h("ariaLabelColumnFilter","Column Filter"),p=this.popupSvc?.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:f=>{Ad(e,!1,"contextMenu");const m=f instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),m&&o&&$e(o)&&Hl(o)?.focus({preventScroll:!0}),r?.afterGuiDetached(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,i,e),n?.()},positionCallback:()=>t(a),anchorToElement:c,ariaLabel:g});p&&(this.hidePopup=l=p.hideFunc),r.afterInit().then(()=>{t(a),r.afterGuiAttached({container:i,hidePopup:l})}),Ad(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,i,e)}trapFocusWithin(e,t){"Tab"!==e.key||e.defaultPrevented||Hi(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),Bi(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,i){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:i??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}}],dynamicBeans:{headerFilterCellCtrl:class extends Rr{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,i,o,s){this.comp=e;const n=Ho(this,this.beans.context,s);this.eButtonShowMainFilter=i,this.eFloatingFilterBody=o,this.setGui(t,n),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(n),this.setupLeft(n),this.setupHover(n),this.setupFocus(n),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(n),this.setupUi(),n.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(n);const r=()=>this.onColDefChanged(n);n.addManagedListeners(this.column,{colDefChanged:r}),n.addManagedEventListeners({filterSwitched:({column:a})=>{a===this.column&&r()}}),n.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this;return ee(t.gos,{colDef:e.colDef,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef();this.active=!!e.filter&&!!e.floatingFilter}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=Ot("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new lo(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.getLocaleTextFunc();Be(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(Fe(t)===this.eGui)return;const s=Hi(t,this.eGui,null,e.shiftKey);if(s)return t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),void s.focus();const n=this.findNextColumnWithFloatingFilter(e.shiftKey);n&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:n},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let i=this.column;do{if(i=e?t.getColBefore(i):t.getColAfter(i),!i)break}while(!i.getColDef().filter||!i.getColDef().floatingFilter);return i}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case P_UP:case P_DOWN:case P_LEFT:case P_RIGHT:if(t)return;zi(e);case"Enter":t&&Bi(this.eGui)&&e.preventDefault();break;case"Escape":t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const i=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),o=!!e.relatedTarget&&at(e.relatedTarget,"ag-floating-filter");if(i&&o&&e.target===this.eGui){const s=this.lastFocusEvent;s&&s&&"Tab"===s.key&&Bi(this.eGui,s.shiftKey)}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new yr(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!Mt(this.gos)}setupUserComp(){if(!this.active)return;const e=this.beans.colFilter?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.beans.menuSvc?.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{beans:{colFilter:t},column:i,gos:o}=this,s=n=>{if(!("filterDestroyed"!==n?.source||this.isAlive()&&t?.isAlive()))return;const r=this.comp.getFloatingFilterComp();r&&r.then(a=>{if(a){if(o.get("enableFilterHandlers")){const c=n;let u="filter";return c?.afterFloatingFilter?u="ui":c?.afterDataChange?u="dataChanged":"api"===n?.source&&(u="api"),void this.updateFloatingFilterParams(this.userCompDetails,u)}const l=t?.getCurrentFloatingFilterParentModel(i),d=n?{...n,columns:n.columns??[],source:"api"===n.source?"api":"columnFilter"}:null;a.onParentModelChanged(l,d)}})};[this.destroySyncListener]=e.addManagedListeners(i,{filterChanged:s}),t?.isFilterActive(i)&&s(null)}setupWidth(e){const t=()=>{const i=`${this.column.getActualWidth()}px`;this.comp.setWidth(i)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive();const i=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const o=this.beans.colFilter,s=this.active?o?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,n=this.comp.getFloatingFilterComp();n&&s?n.then(r=>{!r||o?.areFilterCompsDifferent(this.userCompDetails??null,s)?this.updateCompDetails(e,s,i):this.updateFloatingFilterParams(s,"colDef")}):this.updateCompDetails(e,s,i)}updateCompDetails(e,t,i){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),i&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){if(!e)return;let i=e.params;this.comp.getFloatingFilterComp()?.then(o=>{"function"==typeof o?.refresh&&(this.gos.get("enableFilterHandlers")&&(i={...i,model:st(this.beans.colFilter?.model??{},this.column.getColId()),source:t}),o.refresh(i))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}}},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:function ky(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()},getColumnFilterInstance:function Ay(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)},destroyFilter:function Iy(e,t){const i=e.colModel.getColDefCol(t);if(i)return e.colFilter?.destroyFilter(i,"api")},setFilterModel:function Ly(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))},getFilterModel:function Oy(e){return e.filterManager?.getFilterModel()??{}},getColumnFilterModel:function By(e,t,i){const{gos:o,colModel:s,colFilter:n}=e;i&&!o.get("enableFilterHandlers")&&(I(288),i=!1);const r=s.getColDefCol(t);return r?n?.getModelForColumn(r,i)??null:null},setColumnFilterModel:function Hy(e,t,i){return e.filterManager?.setColumnFilterModel(t,i)??Promise.resolve()},showColumnFilter:function Gy(e,t){const i=e.colModel.getCol(t);i?e.menuSvc?.showFilterMenu({column:i,containerType:"columnFilter",positionBy:"auto"}):Me(12,{colKey:t})},hideColumnFilter:function Vy(e){e.menuSvc?.hideFilterMenu()},getColumnFilterHandler:function Ny(e,t){const i=e.colModel.getCol(t);if(i)return e.colFilter?.getHandler(i,!0);Me(12,{colKey:t})},doFilterAction:function zy(e,t){const{colModel:i,colFilter:o,gos:s}=e;if(!s.get("enableFilterHandlers"))return void I(287);const{colId:n,action:r}=t;if(n){const a=i.getColById(n);a&&o?.updateModel(a,r)}else o?.updateAllModels(r)}},dependsOn:[ma,nn,gu,Dy]},x1={moduleName:"CustomFilter",version:G,userComponents:{agReadOnlyFloatingFilter:class extends Re{constructor(){super(Yy,[Es]),this.eFloatingFilterText=V}init(e){this.params=e;const t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){const i=e,o=i.getHandler();if(o.getModelAsString){const s=o.getModelAsString(i.model);this.eFloatingFilterText.setValue(s)}}}onParentModelChanged(e){null!=e?this.params.parentFilterInstance(t=>{if(t.getModelAsString){const i=t.getModelAsString(e);this.eFloatingFilterText.setValue(i)}}):this.eFloatingFilterText.setValue("")}refresh(e){this.init(e)}}},dependsOn:[an]},E1={moduleName:"TextFilter",version:G,dependsOn:[an],userComponents:{agTextColumnFilter:{classImp:class extends la{constructor(){super("textFilter",cu,fa),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),i={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(i.filter=o[0]),o.length>1&&(i.filterTo=o[1]),i}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:i}=this;return e>=t.length?[null,null]:[t[e],i[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(i,o,s,n)=>{o<n&&t.push(Ee(i.getValue()))}),t}createEValue(){const e=Ye({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:i}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,i,"to"),e}createFromToElement(e,t,i){const o=this.createManagedBean(new Vi);o.addCss(`ag-filter-${i}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui())}removeEValues(e,t){const i=n=>this.removeComponents(n,e,t),{eValuesFrom:o,eValuesTo:s}=this;i(o),i(s)}},params:{useForm:!0}},agTextColumnFloatingFilter:class extends uu{constructor(){super(...arguments),this.FilterModelFormatterClass=hu,this.filterType="text",this.defaultOptions=fa}createFloatingFilterInputService(){return this.createManagedBean(new du)}}},dynamicBeans:{agTextColumnFilterHandler:class extends iu{constructor(){super(cu,fa),this.filterType="text",this.FilterModelFormatterClass=hu}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??p1,this.formatter=t.textFormatter??(t.caseSensitive?f1:m1)}evaluateNullValue(e){return!!e&&["notEqual","notContains","blank"].indexOf(e)>=0}evaluateNonNullValue(e,t,i,o){const s=e.map(h=>this.formatter(h))||[],n=this.formatter(t),{api:r,colDef:a,column:l,context:d,filterParams:{textFormatter:c}}=this.params;if("blank"===i.type)return rn(t);if("notBlank"===i.type)return!rn(t);const u={api:r,colDef:a,column:l,context:d,node:o.node,data:o.data,filterOption:i.type,value:n,textFormatter:c};return s.some(h=>this.matcher({...u,filterText:h}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=i=>{const o={...i},{filter:s,filterTo:n}=i;return s&&(o.filter=pa(s)??null),n&&(o.filterTo=pa(n)??null),o};return gd(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}}}},F1={moduleName:"NumberFilter",version:G,dependsOn:[an],userComponents:{agNumberColumnFilter:{classImp:class extends la{constructor(){super("numberFilter",au,ua),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}setElementValue(e,t,i){const{numberFormatter:o}=this.params,s=!i&&o?o(t??null):t;super.setElementValue(e,s)}createEValue(){const e=ha(this.params),t=Ye({tag:"div",cls:"ag-filter-body",role:"presentation"});return this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}createFromToElement(e,t,i,o){const s=this.createManagedBean(o?new Vi({allowedCharPattern:o}):new qn);s.addCss(`ag-filter-${i}`),s.addCss("ag-filter-filter"),t.push(s),e.appendChild(s.getGui())}removeEValues(e,t){const i=o=>this.removeComponents(o,e,t);i(this.eValuesFrom),i(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(i,o,s,n)=>{o<n&&t.push(ga(this.stringToFloat(i.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}stringToFloat(e){if("number"==typeof e)return e;let t=Ee(e);null!=t&&""===t.trim()&&(t=null);const i=this.params.numberParser;return i?i(t):null==t||"-"===t.trim()?null:Number.parseFloat(t)}createCondition(e){const t=this.getConditionType(e),i={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(i.filter=o[0]),o.length>1&&(i.filterTo=o[1]),i}getInputs(e){const{eValuesFrom:t,eValuesTo:i}=this;return e>=t.length?[null,null]:[t[e],i[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{t.getInputElement().validity.valid||(e=!0)}),e}},params:{useForm:!0}},agNumberColumnFloatingFilter:class extends uu{constructor(){super(...arguments),this.FilterModelFormatterClass=lu,this.filterType="number",this.defaultOptions=ua}updateParams(e){ha(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=ha(e.filterParams),this.createManagedBean(this.allowedCharPattern?new du({config:{allowedCharPattern:this.allowedCharPattern}}):new u1)}convertValue(e){return e?Number(e):null}}},dynamicBeans:{agNumberColumnFilterHandler:class extends ou{constructor(){super(au,ua),this.filterType="number",this.FilterModelFormatterClass=lu}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}}}},P1={moduleName:"DateFilter",version:G,dependsOn:[an],userComponents:{agDateColumnFilter:{classImp:class extends la{constructor(){super("dateFilter",Jc,da),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=1e3,this.maxValidYear=tu,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e)}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(l,d)=>{const c=e[l];if(null!=c){if(!isNaN(c))return null==c?d:Number(c);I(82,{param:l})}return d},i=t("minValidYear",1e3),o=t("maxValidYear",tu);this.minValidYear=i,this.maxValidYear=o,i>o&&I(83);const{minValidDate:s,maxValidDate:n}=e,r=s instanceof Date?s:bt(s);this.minValidDate=r;const a=n instanceof Date?n:bt(n);this.maxValidDate=a,r&&a&&r>a&&I(84)}createDateCompWrapper(e){const{beans:{userCompFactory:t,context:i,gos:o},params:s}=this,n=new Zc(i,t,s.colDef,ee(o,{onDateChanged:()=>this.onUiChanged(),filterParams:s,location:"filter"}),e);return this.addDestroyFunc(()=>n.destroy()),n}setElementValue(e,t){e.setDate(t)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=Ye({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,i,o){const s=Ye({tag:"div",cls:`ag-filter-${o} ag-filter-date-${o}`});t.push(s),e.appendChild(s),i.push(this.createDateCompWrapper(s))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),es(this.eConditionPanelsFrom,e,t),es(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,i){const o=es(e,t,i);for(const s of o)s.destroy()}isValidDateValue(e){if(null===e)return!1;const{minValidDate:t,maxValidDate:i,minValidYear:o,maxValidYear:s}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<o)return!1;if(i){if(e>i)return!1}else if(e.getUTCFullYear()>s)return!1;return!0}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachInput((i,o,s,n)=>{s!==e||!t||o>=n||(t=t&&this.isValidDateValue(i.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),i={},o=this.getValues(e),s=this.params.useIsoSeparator?"T":" ";return o.length>0&&(i.dateFrom=Tt(o[0],!0,s)),o.length>1&&(i.dateTo=Tt(o[1],!0,s)),{dateFrom:null,dateTo:null,filterType:this.filterType,type:t,...i}}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),i=e("ariaFilterValue","Filter Value");this.forEachInput(o=>{o.setInputPlaceholder(t),o.setInputAriaLabel(i)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:i}=this;return e>=t.length?[null,null]:[t[e],i[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(i,o,s,n)=>{o<n&&t.push(i.getDate())}),t}translate(e){return super.translate("lessThan"===e?"before":"greaterThan"===e?"after":e)}},params:{useForm:!0}},agDateInput:class extends Re{constructor(){super(r1,[Es]),this.eDateInput=V,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply)return this.applyOnFocusOut=!e,void(e&&this.params.onDateChanged());e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}setParams(e){const t=this.eDateInput.getInputElement(),i=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=i&&yi();const{minValidYear:o,maxValidYear:s,minValidDate:n,maxValidDate:r,buttons:a,includeTime:l,colDef:d}=e.filterParams||{},c=this.beans.dataTypeSvc,u=l??c?.getDateIncludesTimeFlag?.(d.cellDataType)??!1;if(i?u?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text",n&&o&&I(85),r&&s&&I(86),n&&r){const[h,g]=[n,r].map(p=>p instanceof Date?p:bt(p));h&&g&&h.getTime()>g.getTime()&&I(87)}n?t.min=n instanceof Date?Un(n):n:o&&(t.min=`${o}-01-01`),r?t.max=r instanceof Date?Un(r):r:s&&(t.max=`${s}-12-31`),this.isApply="floatingFilter"===e.location&&!!a?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return bt(this.eDateInput.getValue())}setDate(e){const t=this.params.filterParams.colDef.cellDataType,i=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(t)??!1;this.eDateInput.setValue(Tt(e,i))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e?.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){return e?.filterParams?.browserDatePicker??!0}},agDateColumnFloatingFilter:class extends ru{constructor(){super(s1,[Es]),this.eReadOnlyText=V,this.eDateWrapper=V,this.FilterModelFormatterClass=nu,this.filterType="date",this.defaultOptions=da}setParams(e){super.setParams(e),this.createDateComponent();const t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){const i=e?bt(e.dateFrom):null;this.dateComp.setDate(i),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){ce(this.eDateWrapper,e),ce(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){const e=this.dateComp.getDate();if(this.reactive){const t=this.params;t.onUiChange();const i=t.model,o=Tt(e),s=null==o?null:{...i??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:o};t.onModelChange(s,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t?.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=ar(e,this.defaultDebounceMs);return ee(this.gos,{onDateChanged:it(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:i,params:o}=this;this.dateComp=new Zc(e,t,o.column.getColDef(),this.getDateComponentParams(),i,s=>{s.setInputAriaLabel(this.getAriaLabel(o))}),this.addDestroyFunc(()=>this.dateComp.destroy())}}},dynamicBeans:{agDateColumnFilterHandler:class extends ou{constructor(){super(Jc,da),this.filterType="date",this.FilterModelFormatterClass=nu}comparator(){return this.params.filterParams.comparator??i1}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}}}},D1={moduleName:"QuickFilterCore",version:G,rowModels:["clientSide"],beans:[class extends M{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",i=>this.setFilter(i.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){const{autoColSvc:e,colModel:t,gos:i,pivotResultCols:o}=this.beans,s=t.isPivotMode(),n=e?.getColumns(),r=t.getColDefCols();let a=(s&&!i.get("applyQuickFilterBeforePivotOrAgg")?o?.getPivotResultCols()?.list:r)??[];n&&(a=a.concat(n)),this.colsToUse=i.get("includeHiddenColumnsInQuickFilter")?a:a.filter(l=>l.isVisible()||l.isRowGroupActive())}isFilterPresent(){return null!==this.quickFilter}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(i=>t?this.doesRowPassCache(e,i):this.doesRowPassNoCache(e,i))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;this.quickFilterParts=e?t?t(e):e.split(" "):null}parseFilter(e){return C(e)?e.toUpperCase():null}setFilter(e){if(null!=e&&"string"!=typeof e)return void I(70,{newFilter:e});const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),i=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,i&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(i=>{const o=this.getTextForColumn(i,e);return C(o)&&o.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let i;e?(this.checkGenerateAggText(t),i=t.quickFilterAggregateText):i=this.getAggText(t);const{quickFilterParts:o,matcher:s}=this;return s(o,i)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let i=this.beans.filterValueSvc.getValue(e,t);const o=e.getColDef();if(o.getQuickFilterText){const s=ee(this.gos,{value:i,node:t,data:t.data,column:e,colDef:o});i=o.getQuickFilterText(s)}return C(i)?i.toString().toUpperCase():null}getAggText(e){const t=[];for(const i of this.colsToUse){const o=this.getTextForColumn(i,e);C(o)&&t.push(o)}return t.join("\n")}}],dependsOn:[ma,gu]},M1={moduleName:"QuickFilter",version:G,apiFunctions:{isQuickFilterPresent:function w1(e){return!!e.quickFilter?.isFilterPresent()},getQuickFilter:function b1(e){return e.quickFilter?.getText()},resetQuickFilter:function S1(e){e.quickFilter?.resetCache()}},dependsOn:[D1]},T1={moduleName:"ExternalFilter",version:G,dependsOn:[ma]},Ca=(e,t,i)=>{const{editModelSvc:o}=e,s=o?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,n=o?.getRowValidationModel().getRowValidation(t)?.errorMessages,r=s||n;return r?.length?r.join(i("tooltipValidationErrorSeparator",". ")):void 0},pu={moduleName:"Tooltip",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,i,o){e&&t.destroyBean(e);const s=this.gos,n=sn(s),{column:r,eGui:a}=t,l=r.getColDef();!o&&n&&!l.headerComponent&&(o=xo(()=>a.querySelector(".ag-header-cell-text")));const d="header",u=this.beans.colNames.getDisplayNameForColumn(r,"header",!0),h=i??u;let p=this.createTooltipFeature({getGui:()=>a,getLocation:()=>d,getTooltipValue:()=>i??l?.headerTooltipValueGetter?.(ee(s,{location:d,colDef:l,column:r,value:h,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:o,getAdditionalParams:()=>({column:r,colDef:r.getColDef()})});return p&&(p=t.createBean(p),t.setRefreshFunction("tooltip",()=>p.refreshTooltip())),p}setupHeaderGroupTooltip(e,t,i,o){e&&t.destroyBean(e);const s=this.gos,n=sn(s),{column:r,eGui:a}=t,l=r.getColGroupDef();!o&&n&&!l?.headerGroupComponent&&(o=xo(()=>a.querySelector(".ag-header-group-text")));const d="headerGroup",u=this.beans.colNames.getDisplayNameForColumnGroup(r,"header"),h=i??u,p=this.createTooltipFeature({getGui:()=>a,getLocation:()=>d,getTooltipValue:()=>i??l?.headerTooltipValueGetter?.(ee(s,{location:d,colDef:l,column:r,value:h,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:o,getAdditionalParams:()=>{const f={column:r};return l&&(f.colDef=l),f}});return p&&t.createBean(p)}enableCellTooltipFeature(e,t,i){const{beans:o}=this,{gos:s,editSvc:n}=o,{column:r,rowNode:a}=e;let l="cell";const c=sn(s);return i||(i=c&&!e.isCellRenderer()?()=>{const h=!!n?.isEditing(e);if(!h&&Ca(o,e,this.getLocaleTextFunc()))return!0;if(!r.isTooltipEnabled())return!1;const f=xo(()=>{const m=e.eGui;return 0===m.children.length?m:m.querySelector(".ag-cell-value")});return!h&&f()}:()=>!n?.isEditing(e)),this.createTooltipFeature({getGui:()=>e.eGui,getLocation:()=>l,getTooltipValue:null!=t?()=>t:()=>{const g=!n?.isEditing(e)&&Ca(o,e,this.getLocaleTextFunc());if(g)return l="cellEditor",g;l="cell";const p=r.getColDef(),f=a.data;if(p.tooltipField&&C(f))return qo(f,p.tooltipField,r.isTooltipFieldContainsDots());const m=p.tooltipValueGetter;return m?m(ee(s,{location:"cell",colDef:r.getColDef(),column:r,rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,value:e.value,valueFormatted:e.valueFormatted})):null},shouldDisplayTooltip:i,getAdditionalParams:()=>({column:r,colDef:r.getColDef(),rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,valueFormatted:e.valueFormatted})},o)}setupFullWidthRowTooltip(e,t,i,o){const s={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>i,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:o},n=this.beans,r=n.context;e&&t.destroyBean(e,r);const a=this.createTooltipFeature(s,n);if(a)return t.createBean(a,r)}setupCellEditorTooltip(e,t){const{beans:i}=this,{context:o}=i,s=t.getValidationElement?.(!0)||!t.isPopup?.()&&e.eGui;if(!s)return;const r=this.createTooltipFeature({getGui:()=>s,getTooltipValue:()=>Ca(i,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{const{editModelSvc:a}=i,l=a?.getRowValidationModel()?.getRowValidationMap(),d=a?.getCellValidationModel()?.getCellValidationMap();return!!l&&l.size>0||!!d&&d.size>0}},i);return r?e.createBean(r,o):void 0}initCol(e){const{colDef:t}=e;e.tooltipEnabled=C(t.tooltipField)||C(t.tooltipValueGetter)||C(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}}],dynamicBeans:{tooltipFeature:Yl,highlightTooltipFeature:class extends Yl{constructor(e,t,i){super(e,i),this.highlightTracker=t,this.onHighlight=this.onHighlight.bind(this)}postConstruct(){super.postConstruct(),this.wireHighlightListeners()}wireHighlightListeners(){this.addManagedPropertyListener("tooltipTrigger",({currentValue:e})=>{this.setTooltipMode(e)}),this.setTooltipMode(this.gos.get("tooltipTrigger")),this.highlightTracker.addEventListener("itemHighlighted",this.onHighlight)}onHighlight(e){1===this.tooltipMode&&(e.highlighted?this.attemptToShowTooltip():this.attemptToHideTooltip())}setTooltipMode(e="focus"){this.tooltipMode="focus"===e?1:0}destroy(){this.highlightTracker.removeEventListener("itemHighlighted",this.onHighlight),super.destroy()}},tooltipStateManager:class extends jp{createTooltipComp(e,t){(function Bg(e,t){return e.getCompDetails(t.colDef,Cg,"agTooltipComponent",t,!0)})(this.beans.userCompFactory,e)?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}}},userComponents:{agTooltipComponent:class extends An{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){const{value:t}=e,i=this.getGui();i.textContent=te(t);const o=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();i.classList.add(`ag-${o}-tooltip`)}}},dependsOn:[nn],css:[".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}"]},Co=class{constructor(e){this.cellValueChanges=e}},va=class extends Co{constructor(e,t,i,o){super(e),this.initialRange=t,this.finalRange=i,this.ranges=o}},fu=class{constructor(e){this.actionStack=[],this.maxStackSize=e||10,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},H1={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},ln=class extends zs{constructor(e){super(),this.cellEditorInput=e,this.eEditor=V}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:i}=this,{cellStartedEdit:o,eventKey:s,suppressPreventDefault:n}=e;i.getInputElement().setAttribute("title",""),t.init(i,e);let r,a=!0;o?(this.focusAfterAttached=!0,"Backspace"===s||"Delete"===s?r="":s&&1===s.length?n?a=!1:r=s:(r=t.getStartValue(),"F2"!==s&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),a&&null!=r&&i.setStartValue(r),this.addGuiEventListener("keydown",l=>{const{key:d}=l;("PageUp"===d||"PageDown"===d)&&l.preventDefault()})}afterGuiAttached(){const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;yi()||t.getFocusableElement().focus();const i=t.getInputElement();this.highlightAllOnFocus?i.select():this.cellEditorInput.setCaret?.()}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),i=e.getInputElement();t.focus(),i.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},V1={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},N1=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return V1}getAgComponents(){return[Vl]}init(e,t){this.eEditor=e,this.params=t;const{min:i,max:o,step:s,colDef:n}=t;null!=i&&e.setMin(i),null!=o&&e.setMax(o),null!=s&&e.setStep(s),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),null!=this.includeTime&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:i}=this,{min:o,max:s,getValidationErrors:n}=i;let r=[];const a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(o){const l=o instanceof Date?o:new Date(o);if(t<l){const d=l.toLocaleDateString();r.push(a("minDateValidation",`Date must be after ${d}`,[d]))}}if(s){const l=s instanceof Date?s:new Date(s);if(t>l){const d=l.toLocaleDateString();r.push(a("maxDateValidation",`Date must be before ${d}`,[d]))}}}return r.length||(r=null),n?n({value:t,cellEditorParams:i,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,i=e.getDate();return C(i)||C(t.value)?i??null:t.value}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return Tt(e,this.includeTime??!1)}},_1={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},W1=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return _1}getAgComponents(){return[Vl]}init(e,t){this.eEditor=e,this.params=t;const{min:i,max:o,step:s,colDef:n}=t;null!=i&&e.setMin(i),null!=o&&e.setMax(o),null!=s&&e.setStep(s),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),null!=this.includeTime&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,i=e.getInputElement().value,o=this.formatDate(this.parseDate(i??void 0)),{min:s,max:n,getValidationErrors:r}=t;let a=[];if(o){const l=new Date(o),d=this.getLocaleTextFunc();if(s){const c=new Date(s);if(l<c){const u=c.toLocaleDateString();a.push(d("minDateValidation",`Date must be after ${u}`,[u]))}}if(n){const c=new Date(n);if(l>c){const u=c.toLocaleDateString();a.push(d("maxDateValidation",`Date must be before ${u}`,[u]))}}}return a.length||(a=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,i=this.formatDate(t.getDate());return C(i)||C(e.value)?e.parseValue(i??""):e.value}getStartValue(){return Tt(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):bt(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):Tt(e??null,this.includeTime??!1)??void 0}},$1={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},K1={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},q1=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return K1}getAgComponents(){return[op]}init(e,t){this.eEditor=e,this.params=t;const{max:i,min:o,precision:s,step:n}=t;null!=i&&e.setMax(i),null!=o&&e.setMin(o),null!=s&&e.setPrecision(s),null!=n&&e.setStep(n);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:i,getValidationErrors:o}=e,n=this.eEditor.getInputElement().valueAsNumber,r=this.getLocaleTextFunc();let a=[];return"number"==typeof n&&(null!=t&&n<t&&a.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),null!=i&&n>i&&a.push(r("maxValueValidation",`Must be less than or equal to ${i}.`,[String(i)]))),a.length||(a=null),o?o({value:n,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===P_UP||e.key===P_DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,i=e.getValue();if(!C(i)&&!C(t.value))return t.value;let o=t.parseValue(i);if(null==o)return o;if("string"==typeof o){if(""===o)return null;o=Number(o)}return isNaN(o)?null:o}getStartValue(){return this.params.value}setCaret(){yi()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},Q1={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},Z1={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},J1=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return Z1}getAgComponents(){return[Es]}init(e,t){this.eEditor=e,this.params=t;const i=t.maxLength;null!=i&&e.setMaxLength(i)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:i}=e,o=this.getValue(),s=this.getLocaleTextFunc();let n=[];return null!=t&&"string"==typeof o&&o.length>t&&n.push(s("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),i?i({value:o,cellEditorParams:e,internalErrors:n}):n}getValue(){const{eEditor:e,params:t}=this,i=e.getValue();return C(i)||C(t.value)?t.parseValue(i):t.value}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){yi()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),i=C(t)&&t.length||0;i&&e.getInputElement().setSelectionRange(i,i)}},mu=class extends ln{constructor(){super(new J1(()=>this.getLocaleTextFunc()))}};function Cu(e,t,i="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,i),"ensureVisible")}function vu(e,t,i){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,i),"ensureVisible")}var g3={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},p3=class extends An{constructor(e){super(g3),this.params=e}postConstruct(){Li(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params;this.addManagedElementListeners(e,{keydown:o=>{fr(this.gos,o,t.node,t.column,!0)||t.onKeyDown(o)}})}};function wa(e,{rowNode:t,column:i},o="ui"){const s=i.getColDef().editable,n=e.editModelSvc;return i.isColumnFunc(t,s)||!!n&&n.hasEdits({rowNode:t,column:i},{withOpenEditor:!0})}var dn=(e,t=!1)=>{if(void 0!==e)return hi(e)||t&&"editing"===e.state};function wu(e,t,i=!1){return dn(e.editModelSvc?.getEdit(t),i)}var bu=(e,t,i)=>{if(e)for(let o=0,s=e.length;o<s;++o){const n=e[o];if(n.data&&(dn(t?.getEdit({rowNode:n,column:i}))||dn(t?.getEdit({rowNode:n.pinnedSibling,column:i})))||bu(n.childrenAfterGroup,t,i))return!0}};function Su(e,t){const{column:i,rowNode:o}=t;return!(e.gos.get("groupTotalRow")&&!o?.footer)&&bu(o?.childrenAfterGroup,e.editModelSvc,i)}function yu(e,{rowNode:t,column:i}){if(t=t.pinnedSibling)return dn(e.editModelSvc?.getEdit({rowNode:t,column:i}))}var v3=class extends M{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){const{cellCtrl:e,editSvc:t,beans:i}=this;if(t?.isBatchEditing()&&t.isEditing()){const s=wu(i,e)||Su(i,e)||yu(i,e);this.applyBatchingStyle(s)}else this.applyBatchingStyle(!1);const o=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss("ag-cell-editing-error",o)}applyBatchingStyle(e){this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&this.editSvc?.isBatchEditing())??!1)}},w3=class extends M{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){const{rowCtrl:e,editModelSvc:t,beans:i}=this;let o=e.rowNode,s=t?.getEditRow(o);const n=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:o});if(!s&&o.pinnedSibling&&(o=o.pinnedSibling,s=t?.getEditRow(o)),s){const r=Array.from(s.keys()).some(a=>{const l={rowNode:o,column:a};return wu(i,l,!0)||Su(i,l)||yu(i,l)});return void this.applyStyle(n,r)}this.applyStyle(n)}applyStyle(e=!1,t=!1){const i=this.editSvc?.isBatchEditing()??!1,o="fullRow"===this.gos.get("editType");this.rowCtrl?.forEachGui(void 0,({rowComp:s})=>{s.toggleCss("ag-row-editing",o&&t),s.toggleCss("ag-row-batch-edit",o&&t&&i),s.toggleCss("ag-row-inline-editing",t),s.toggleCss("ag-row-not-inline-editing",!t),s.toggleCss("ag-row-editing-invalid",o&&t&&e)})}},R3=new Set(["undo","redo","paste","bulk","rangeSvc"]),x3=new Set(["ui","api"]),Ru={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},E3=new Set(Object.keys(Ru)),F3=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),cn={cancel:!0,source:"api"},P3={cancel:!1,source:"api"},vo={checkSiblings:!0},is={force:!0,suppressFlash:!0};function M3(e){return{rowNodes:e?Array.from(e.keys()):void 0,columns:e?[...new Set(Array.from(e.values()).flatMap(t=>Array.from(t.keys())))]:void 0}}function xu(e,t){return t??e.get("editType")??"singleCell"}var Eu=class extends M{postConstruct(){this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:this.onCellFocusChanged?.bind(this),cellFocusCleared:this.onCellFocusChanged?.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const i=e.previousParams,{editSvc:o,beans:s}=this,n="cellFocused"===e.type?e.sourceEvent:null;i&&(t=Ge(s,i));const{gos:r,editModelSvc:a}=s,l="cellFocusCleared"===e.type;if(o.isEditing(void 0,{withOpenEditor:!0})){const{column:d,rowIndex:c,rowPinned:u}=e,h={column:d,rowNode:ui(s,{rowIndex:c,rowPinned:u})},g="block"===r.get("invalidEditValueMode");if(g)return;const p=!g,f=!!a?.getCellValidationModel().hasCellValidation(h);!i&&!l||o.stopEditing(void 0,{cancel:p&&f,source:l&&p?"api":void 0,event:n})||(o.isBatchEditing()?o.cleanupEditors():o.stopEditing(void 0,{source:"api"}))}t?.refreshCell({suppressFlash:!0,force:!0})}stop(e,t){const i=this.model.getEditPositions(),o={all:[],pass:[],fail:[]};for(const s of i)o.all.push(s),(this.model.getCellValidationModel().getCellValidation(s)?.errorMessages?.length??0)>0?o.fail.push(s):o.pass.push(s);if(e)for(const s of i)en(this.beans,s,{cancel:e}),this.model.stop(s);else{const s=this.processValidationResults(o);if(s.destroy.length>0)for(const n of s.destroy)en(this.beans,n,{event:t,cancel:e}),this.model.stop(n);if(s.keep.length>0)for(const n of s.keep){const r=Ge(this.beans,n);this.editSvc?.cellEditingInvalidCommitBlocks()||r&&this.editSvc.revertSingleCellEdit(r)}}return!0}cleanupEditors({rowNode:e}={},t){$i(this.beans,{persist:!1});const i=this.model.getEditPositions(),o=[];if(e)for(const s of i)s.rowNode!==e&&o.push(s);else for(const s of i)o.push(s);po(this.beans,o),Xr(this.beans,t)}setFocusOutOnEditor(e){e.comp?.getCellEditor()?.focusOut?.()}setFocusInOnEditor(e){const t=e.comp,i=t?.getCellEditor();if(i?.focusIn)i.focusIn();else{const o="fullRow"===this.beans.gos.get("editType");e.focusCell(o),e.onEditorAttachedFuncs.push(()=>t?.getCellEditor()?.focusIn?.())}}setupEditors(e){const{event:t,ignoreEventKey:i=!1,startedEdit:o,position:s,cells:n=this.model.getEditPositions()}=e,r=t instanceof KeyboardEvent&&!i&&t.key||void 0;!function Vb(e,t,i,o,s,n){0===t.length&&i?.rowNode&&i?.column&&go(e,i,{key:o,event:s,cellStartedEdit:n});const{valueSvc:r,editSvc:a,editModelSvc:l}=e,{rowNode:d,column:c}=i??{};for(const u of t){const{rowNode:h,column:g}=u,p=Ge(e,u);if(!p){if(h&&g){const m=r.getValue(g,h,void 0,"api"),R=(i?.rowNode===h&&i?.column===g&&o||void 0)??a?.getCellDataValue(u,!1)??r.getValueForDisplay(g,h)?.value??m??Ht;l?.setEdit(u,{pendingValue:R,sourceValue:m,state:"editing"})}continue}const f=n&&d===p.rowNode&&p.column===c;go(e,{rowNode:d,column:p.column},{key:f?o:null,event:f?s:null,cellStartedEdit:f&&n})}}(this.beans,n,s,r,t,o)}dispatchCellEvent(e,t,i,o){const s=Ge(this.beans,e);s&&this.eventSvc.dispatchEvent({...s.createEvent(t??null,i),...o})}dispatchRowEvent(e,t,i){if(i)return;const o=Yr(this.beans,e);o&&this.eventSvc.dispatchEvent(o.createRowEvent(t))}shouldStop(e,t,i="ui"){const o=this.editSvc.isBatchEditing();return!(!o||"api"!==i)||(!o||"ui"!==i&&"edit"!==i)&&("api"===i||(t instanceof KeyboardEvent&&!o?"Enter"===t.key:null))}shouldCancel(e,t,i="ui"){const o=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!o&&"Escape"===t.key||o&&"api"===i||"api"===i)}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const i=[];if(e.forEach((o,s)=>{o.forEach((n,r)=>{"editing"===n.state&&i.push({...n,rowNode:s,column:r})})}),t?.update&&(e=new Map([...this.model.getEditMap(),...e])),this.model?.setEditMap(e),i.length>0){const o=i.at(-1);this.start({position:o,event:new KeyboardEvent("keydown",{key:o.pendingValue===Ht?void 0:o.pendingValue}),source:"api"});const n=Ge(this.beans,o);n&&this.setFocusInOnEditor(n)}}destroy(){this.cleanupEditors(),super.destroy()}},Ti={moduleName:"EditCore",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new kc,this.rowValidations=new Ac,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;const i=this.getEditRow(e);t?i.delete(t):i.clear(),0===i.size&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits||0===this.edits.size)return;const i=e&&this.edits.get(e);if(i)return i;if(t.checkSiblings){const o=e.pinnedSibling;if(o)return this.getEditRow(o)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(!e||0===this.edits.size)return;const i=this.getEditRow(e),o=e.pinnedSibling,s=t&&o&&this.getEditRow(o);if(!i&&!s)return;const n=Object.assign({},e.data),r=(a,l)=>a.forEach(({pendingValue:d},c)=>{d!==Ht&&(l[c.getColId()]=d)});return i&&r(i,n),s&&r(s,n),n}getEdit(e,t){const i=this._getEdit(e);return t&&i?{...i}:i}_getEdit(e){if(!this.suspendEdits&&0!==this.edits.size)return e.rowNode&&e.column&&this.getEditRow(e.rowNode)?.get(e.column)}getEditMap(e=!0){if(this.suspendEdits||0===this.edits.size)return new Map;if(!e)return this.edits;const t=new Map;return this.edits.forEach((i,o)=>{const s=new Map;i.forEach(({editorState:n,...r},a)=>s.set(a,{...r})),t.set(o,s)}),t}setEditMap(e){this.edits.clear(),e.forEach((t,i)=>{const o=new Map;t.forEach((s,n)=>o.set(n,{...s})),this.edits.set(i,o)})}setEdit(e,t){(0===this.edits.size||!this.edits.has(e.rowNode))&&this.edits.set(e.rowNode,new Map);const i=this._getEdit(e),o=Object.assign({editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...i,...t});return this.getEditRow(e.rowNode).set(e.column,o),o}clearEditValue(e){const{rowNode:t,column:i}=e;if(t)if(i){const o=this._getEdit(e);o&&(o.editorValue=void 0,o.pendingValue=o.sourceValue,o.state="changed")}else this.getEditRow(t)?.forEach(o=>{o.editorValue=void 0,o.pendingValue=o.sourceValue,o.state="changed"})}getState(e){if(!this.suspendEdits)return this.getEdit(e)?.state}getEditPositions(e){if(this.suspendEdits||0===(e??this.edits).size)return[];const t=[];return(e??this.edits).forEach((i,o)=>{for(const s of i.keys()){const{editorState:n,...r}=i.get(s);t.push({rowNode:o,column:s,...r})}}),t}hasRowEdits(e,t){return!this.suspendEdits&&0!==this.edits.size&&!!this.getEditRow(e,t)}hasEdits(e={},t={}){if(this.suspendEdits||0===this.edits.size)return!1;const{rowNode:i,column:o}=e,{withOpenEditor:s}=t;if(i){const n=this.getEditRow(i,t);return!!n&&(o?s?"editing"===this.getEdit(e)?.state:n.has(o)??!1:0!==n.size&&(!s||Array.from(n.values()).some(({state:r})=>"editing"===r)))}return s?this.getEditPositions().some(({state:n})=>"editing"===n):this.edits.size>0}start(e){const t=this.getEditRow(e.rowNode)??new Map,{rowNode:i,column:o}=e;o&&!t.has(o)&&t.set(o,{editorValue:void 0,pendingValue:Ht,sourceValue:this.beans.valueSvc.getValue(o,i,!1,"api"),state:"editing",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}}),this.edits.set(i,t)}stop(e){this.hasEdits(e)&&(e?this.removeEdits(e):this.clear())}clear(){for(const e of this.edits.values())e.clear();this.edits.clear()}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(e){this.cellValidations=e}setRowValidationModel(e){this.rowValidations=e}destroy(){super.destroy(),this.clear()}},class extends M{constructor(){super(...arguments),this.beanName="editSvc",this.batch=!1,this.stopping=!1,this.committing=!1}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:o})=>{this.stopEditing(void 0,cn),this.createStrategy(o)});const t=(e=>()=>{const t=new Set(e.colModel.getCols()),i=e.editModelSvc.getEditMap(!0),o=new Set(i.keys());(({editModelSvc:e},t,i)=>{for(const o of t)e?.getEditRow(o)?.forEach((s,n)=>!i.has(n)&&e.removeEdits({rowNode:o,column:n}))})(e,(({rowModel:e,pinnedRowModel:t,editModelSvc:i},o)=>{const s=new Set;e.forEachNode(n=>o.has(n)&&s.add(n)),t?.forEachPinnedRow("top",n=>o.has(n)&&s.add(n)),t?.forEachPinnedRow("bottom",n=>o.has(n)&&s.add(n));for(const n of o)s.has(n)||i.removeEdits({rowNode:n});return s})(e,o),t)})(e),i=()=>{const o=this.model.getCellValidationModel().getCellValidationMap().size>0,s=this.model.getRowValidationModel().getRowValidationMap().size>0;return o||s?this.stopEditing(void 0,cn):this.isEditing()&&(this.isBatchEditing()?po(e,this.model.getEditPositions()):this.stopEditing(void 0,P3)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:i,filterChanged:i,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}setBatchEditing(e){e?(this.batch=!0,this.stopEditing(void 0,cn)):(this.stopEditing(void 0,cn),this.batch=!1)}createStrategy(e){const{beans:t,gos:i,strategy:o}=this,s=xu(i,e);if(o){if(o.beanName===s)return o;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(s,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,i,o="ui"){const s=function f3(e,{column:t},i,o,s="ui"){if(i instanceof KeyboardEvent&&("Tab"===i.key||"Enter"===i.key||"F2"===i.key||"Backspace"===i.key&&o))return!0;if(i?.shiftKey&&0!=e.rangeSvc?.getCellRanges().length)return!1;const r=t?.getColDef(),a=function m3(e,t){return!0===e.get("suppressClickEdit")?0:!0===e.get("singleClickEdit")||t?.singleClickEdit?1:2}(e.gos,r),l=i?.type;return"click"===l&&1===i?.detail&&1===a||"dblclick"===l&&2===i?.detail&&2===a||"api"===s&&(o??!1)}(this.beans,e,t,i,o);return s&&(this.strategy??(this.strategy=this.createStrategy())),s}shouldStopEditing(e,t,i="ui"){return this.strategy?.shouldStop(e,t,i)??null}shouldCancelEditing(e,t,i="ui"){return this.strategy?.shouldCancel(e,t,i)??null}validateEdit(){return function Wb(e){ji(e,!0);const t=e.editModelSvc?.getCellValidationModel().getCellValidationMap();if(!t)return null;const i=[];return t.forEach((o,s)=>{o.forEach(({errorMessages:n},r)=>{i.push({column:r,rowIndex:s.rowIndex,rowPinned:s.rowPinned,messages:n??null})})}),i}(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??vo)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){const{startedEdit:i=!0,event:o=null,source:s="ui",ignoreEventKey:n=!1,silent:r}=t;if(this.strategy??(this.strategy=this.createStrategy()),!this.isCellEditable(e,"api"))return;const a=Ge(this.beans,e);if(a&&!a.comp)return void a.onCompAttachedFuncs.push(()=>this.startEditing(e,t));const l=this.shouldStartEditing(e,o,i,s);!1!==l||"api"===s?(!this.batch&&this.shouldStopEditing(e,void 0,s)&&!t.continueEditing&&this.stopEditing(void 0,{source:s}),l&&this.isBatchEditing()&&this.dispatchBatchEvent("batchEditingStarted",new Map),this.strategy.start({position:e,event:o,source:s,ignoreEventKey:n,startedEdit:i,silent:r})):this.isEditing(e)&&this.stopEditing()}stopEditing(e,t){const{event:i,cancel:o,source:s="ui",forceCancel:n,forceStop:r}=t||{},{beans:a,model:l}=this;if(E3.has(s)&&this.isBatchEditing())return this.bulkRefresh(e),!1;const d=this.committing?Ru[s]:s;if(!(this.committing||this.isEditing(e)||this.isBatchEditing()&&l.hasEdits(e,vo))||!this.strategy||this.stopping)return!1;this.stopping=!0;const u=Ge(a,e);u&&(u.onEditorAttachedFuncs=[]);let h=l.getEditMap(!0),g=!1;const p=!o&&(!!this.shouldStopEditing(e,i,d)||this.committing&&!this.batch)||(r??!1),f=o&&!!this.shouldCancelEditing(e,i,d)||(n??!1);if(p||f){$i(a,{persist:!0,isCancelling:f||o,isStopping:p});const m=l.getEditMap(),w=this.processEdits(m,o,s);this.strategy?.stop(o,i);for(const b of w)l.clearEditValue(b);this.bulkRefresh(void 0,h);for(const b of l.getEditPositions(m)){const R=Ge(a,b),T=hi(b);R?.refreshCell({force:!0,suppressFlash:!T})}h=m,g||(g=p)}else if(i instanceof KeyboardEvent&&this.batch&&this.strategy?.midBatchInputsAllowed(e)&&this.isEditing(e,{withOpenEditor:!0})){const{key:m}=i,w="Enter"===m,b="Escape"===m,R="Tab"===m;(w||R||b)&&(w||R?$i(a,{persist:!0}):b&&this.revertSingleCellEdit(u),this.isBatchEditing()?this.strategy?.cleanupEditors():po(a,l.getEditPositions(),{event:i,cancel:b}),i.preventDefault(),this.bulkRefresh(e,h,{suppressFlash:!0}),h=l.getEditMap())}else $i(a,{persist:!0}),h=l.getEditMap();return g&&e&&this.model.removeEdits(e),this.navigateAfterEdit(t,u?.cellPosition),Xr(a),this.model.hasEdits()||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap()),this.bulkRefresh(),f&&this.beans.rowRenderer.refreshRows({rowNodes:Array.from(h.keys())}),this.isBatchEditing()&&(this.beans.rowRenderer.refreshRows({suppressFlash:!0,force:!0}),g&&p&&this.dispatchBatchEvent("batchEditingStopped",h)),this.stopping=!1,g}navigateAfterEdit(e,t){if(!e||!t)return;const{event:i,suppressNavigateAfterEdit:o}=e;if(!(i instanceof KeyboardEvent)||o)return;const{key:n,shiftKey:r}=i,a=this.gos.get("enterNavigatesVerticallyAfterEdit");if("Enter"!==n||!a)return;const l=r?P_UP:P_DOWN;this.beans.navigation?.navigateToNextCell(null,l,t,!1)}processEdits(e,t=!1,i){const o=Array.from(e.keys()),s=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,n=[];for(const r of o){const a=e.get(r);for(const l of a.keys()){const d=a.get(l),c={rowNode:r,column:l},u=hi(d);!t&&u&&!s&&(this.setNodeDataValue(r,l,d.pendingValue,void 0,i)||n.push(c))}}return n}setNodeDataValue(e,t,i,o,s="edit"){const{beans:n}=this,r=Ge(n,{rowNode:e,column:t}),a=x3.has(s)?"edit":s;r&&(r.suppressRefreshCell=!0),this.commitNextEdit();const l=e.setDataValue(t,i,a);return r&&(r.suppressRefreshCell=!1),o&&r?.refreshCell(is),l}setEditMap(e,t){this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(e,t),this.bulkRefresh();let i=is;t?.forceRefreshOfEditCellsOnly&&(i={...M3(e),...is}),this.beans.rowRenderer.refreshCells(i)}dispatchEditValuesChanged({rowNode:e,column:t},i={}){if(!e||!t||!i)return;const{pendingValue:o,sourceValue:s}=i,{rowIndex:n,rowPinned:r,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:n,rowPinned:r,column:t,source:"api",data:a,newValue:o,oldValue:s,value:o,colDef:t.getColDef()})}bulkRefresh(e={},t,i={}){const{beans:o,gos:s}=this,{editModelSvc:n}=o;je(s)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),i):t&&n?.getEditMap(!1)?.forEach((a,l)=>{for(const d of a.keys())this.refCell({rowNode:l,column:d},a.get(d),i)}))}refCell({rowNode:e,column:t},i,o={}){const{beans:s,gos:n}=this,r=new Set([e]),a=new Set,l=e.pinnedSibling;l&&r.add(l);const d=e.sibling;d&&a.add(d);let c=e.parent;for(;c;)c.sibling?.footer&&n.get("groupTotalRow")||!c.parent&&c.sibling&&n.get("grandTotalRow")?a.add(c.sibling):a.add(c),c=c.parent;for(const u of r)this.dispatchEditValuesChanged({rowNode:u,column:t},i);for(const u of r)Ge(s,{rowNode:u,column:t})?.refreshCell(o);for(const u of a)Ge(s,{rowNode:u,column:t})?.refreshCell(o)}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{rowNode:i}=e,{gos:o,beans:s}=this;if(i.group)if(o.get("treeData")){if(!i.data&&!o.get("enableGroupEdit"))return!1}else if(!o.get("enableGroupEdit"))return!1;const n="fullRow"===xu(o)?function C3(e,t,i="ui"){const o=wa(e,t,i);return!0===o||"ui"===i?o:e.colModel.getCols().some(n=>wa(e,{rowNode:t.rowNode,column:n},i))}(s,e,t):wa(s,e,t);return n&&(this.strategy??(this.strategy=this.createStrategy())),n}cellEditingInvalidCommitBlocks(){return"block"===this.gos.get("invalidEditValueMode")}checkNavWithValidation(e,t,i=!0){if(this.hasValidationErrors(e)){const o=Ge(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),i&&(!o?.hasBrowserFocus()&&o?.focusCell(),o?.comp?.getCellEditor()?.focusIn?.()),"block-stop"):(o&&this.revertSingleCellEdit(o),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){const i=Ge(this.beans,e);i?.comp?.getCellEditor()&&(po(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),go(this.beans,e,{silent:!0}),ji(this.beans),i?.refreshCell(is),t&&(i?.focusCell(),i?.comp?.getCellEditor()?.focusIn?.()))}hasValidationErrors(e){ji(this.beans);const t=Ge(this.beans,e);t&&(t.refreshCell(is),t.rowCtrl.rowEditStyleFeature?.applyRowStyles());let i=!1;return e?.rowNode?(i||(i=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(i||(i=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(i||(i=this.model.getCellValidationModel().getCellValidationMap().size>0),i||(i=this.model.getRowValidationModel().getRowValidationMap().size>0)),i}moveToNextCell(e,t,i,o="ui"){let s;const n=this.isEditing(),r=n&&"block-stop"===this.checkNavWithValidation(void 0,i);return e instanceof fo&&n&&(s=this.strategy?.moveToNextEditingCell(e,t,i,o,r)),null===s||(s=s||!!this.beans.focusSvc.focusedHeader,!1===s&&!r&&this.stopEditing()),s}getCellDataValue({rowNode:e,column:t},i=!0){if(!e||!t)return;let o=this.model.getEdit({rowNode:e,column:t});const s=e.pinnedSibling;if(s){const r=this.model.getEdit({rowNode:s,column:t});r&&(o=r)}const n=i?o?.editorValue??o?.pendingValue:o?.pendingValue;return n!==Ht&&o?n:o?.sourceValue??this.valueSvc.getValue(t,e,!1,"api")}addStopEditingWhenGridLosesFocus(e){!function Hb(e,t,i){const{gos:o,popupSvc:s}=t;if(!o.get("stopEditingWhenCellsLoseFocus"))return;const n=r=>{const a=r.relatedTarget;if(null===Nn(a))return void Ic(t);let l=i.some(d=>d.contains(a))&&o.isElementInThisInstance(a);l||(l=!!s&&(s.getActivePopups().some(d=>d.contains(a))||s.isElementWithinCustomPopup(a))),l||Ic(t)};for(const r of i)e.addManagedElementListeners(r,{focusout:n})}(this,this.beans,e)}createPopupEditorWrapper(e){return new p3(e)}commitNextEdit(){this.committing=!0}setDataValue(e,t,i){try{if((!this.isEditing()||this.committing)&&!F3.has(i))return;const{beans:o}=this;this.strategy??(this.strategy=this.createStrategy());const s=this.isBatchEditing()?"ui":this.committing?i??"api":"api";if(!i||R3.has(i))return Js(o,e,t,0,void 0,{persist:!0}),this.setNodeDataValue(e.rowNode,e.column,t,!0,i);const n=this.model.getEdit(e);if(n){if(n.pendingValue===t)return!1;if(n.sourceValue!==t)return Js(o,e,t,0,void 0,{persist:!0}),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0;if(n.sourceValue===t)return o.editModelSvc?.removeEdits(e),this.dispatchEditValuesChanged(e,{...n,pendingValue:t}),!0}return Js(o,e,t,0,void 0,{persist:!0}),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0}finally{this.committing=!1}}handleColDefChanged(e){!function Nb(e,t){const i=t.comp?.getCellEditor();if(!i?.refresh)return;const{eventKey:o,cellStartedEdit:s}=t.editCompDetails.params,{column:n}=t,r=Bc(e,t,o,s),a=n.getColDef(),l=Ml(e.userCompFactory,a,r);i.refresh(Hc(l.params,o))}(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){if(!this.batch||!this.model.hasRowEdits(e.rowNode,vo))return;const{rowNode:o,column:s}=e,{compDetails:n,valueToDisplay:r}=t;if(n){const{params:l}=n;return l.data=this.model.getEditRowDataValue(o,vo),{compDetails:n}}const a=this.model.getEditRow(e.rowNode,vo);return void 0!==r&&a?.has(s)?{valueToDisplay:this.valueSvc.getValue(s,o)}:void 0}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,i,o){this.strategy?.dispatchCellEvent(e,t,i,o)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return ee(this.gos,{type:e,..."batchEditingStopped"===e?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},i){if(!i||0===i.length)return;const{beans:o,rangeSvc:s,valueSvc:n}=this;$i(o,{persist:!0});const r=this.model.getEditMap(!0),a=r.get(e)?.get(t)?.pendingValue;this.batch||this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),i.forEach(d=>{if(s?.forEachRowInRange(d,c=>{const u=ui(o,c);if(void 0===u)return;const h=r.get(u)??new Map;for(const g of d.columns)if(g&&this.isCellEditable({rowNode:u,column:g},"api")){const p=n.getValue(g,u,!0,"api");let f=n.parseValue(g,u??null,a,p);Number.isNaN(f)&&(f=null),h.set(g,{editorValue:void 0,pendingValue:f,sourceValue:p,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}h.size>0&&r.set(u,h)}),this.setEditMap(r),this.batch)return this.cleanupEditors(),Xr(o),void this.bulkRefresh();this.commitNextEdit(),this.stopEditing(void 0,{source:"bulk"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(r)})}),this.bulkRefresh();const l=Ge(o,{rowNode:e,column:t});l&&l.focusCell(!0)}createCellStyleFeature(e,t){return new v3(e,t)}createRowStyleFeature(e,t){return new w3(e,t)}setEditingCells(e,t){const{beans:i}=this,{colModel:o,valueSvc:s}=i,n=new Map;for(let{colId:r,column:a,colKey:l,rowIndex:d,rowPinned:c,newValue:u,state:h}of e){const g=r?o.getCol(r):l?o.getCol(l):a;if(!g)continue;const p=ui(i,{rowIndex:d,rowPinned:c});if(!p)continue;const f=s.getValue(g,p,!0,"api");if(!t?.forceRefreshOfEditCellsOnly&&!hi({pendingValue:u,sourceValue:f})&&"editing"!==h)continue;let m=n.get(p);m||(m=new Map,n.set(p,m)),void 0===u&&(u=Ht),m.set(g,{editorValue:void 0,pendingValue:u,sourceValue:f,state:h??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(n,t)}onCellFocused(e){const t=Ge(this.beans,e);if(!t||!this.isEditing(t,vo))return;const i=this.model.getEdit(t);if(!i||!hi(i))return;const s=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(s,"pendingChange")}allowedFocusTargetOnValidation(e){return Ge(this.beans,e)}}],apiFunctions:{getEditingCells:function r3(e){const t=e.editModelSvc?.getEditMap(),i=[];return t?.forEach((o,s)=>{const{rowIndex:n,rowPinned:r}=s;o.forEach((a,l)=>{const{editorValue:d,pendingValue:c,sourceValue:u,state:h}=a,g=hi(a);let p=d??c;p===Ht&&(p=void 0);const f={newValue:p,oldValue:u,state:h,column:l,colId:l.getColId(),colKey:l.getColId(),rowIndex:n,rowPinned:r};("editing"===h||"changed"===h&&g)&&i.push(f)})}),i},getEditRowValues:function n3(e,t){return e.editModelSvc?.getEditRowDataValue(t,{checkSiblings:!0})},getCellEditorInstances:(e,t={})=>Lc(e,t).map(i=>i.editor),startEditingCell:function d3(e,t){const{key:i,colKey:o,rowIndex:s,rowPinned:n}=t,{editSvc:r,colModel:a}=e,l=a.getCol(o);if(!l)return void I(12,{colKey:o});const c=ui(e,{rowIndex:s,rowPinned:n||null,column:l});c?l.isCellEditable(c)&&(null==n&&vu(e,s),Cu(e,o),r?.startEditing({rowNode:c,column:l},{event:i?new KeyboardEvent("keydown",{key:i}):void 0,source:"api"})):I(290,{rowIndex:s,rowPinned:n})},stopEditing:function a3(e,t=!1){const{editSvc:i}=e;if(i?.isBatchEditing()){if(t)for(const o of e.editModelSvc?.getEditPositions()??[])"editing"===o.state&&i.revertSingleCellEdit(o);else $i(e,{persist:!0});po(e,void 0,{cancel:t})}else i?.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})},isEditing:function l3(e,t){const i=Ge(e,t);return e.editSvc?.isEditing(i)??!1},validateEdit:function c3(e){return e.editSvc?.validateEdit()||null}},dynamicBeans:{singleCell:class extends Eu{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,i="ui"){const o=super.shouldStop(e,t,i);if(null!==o)return o;const{rowNode:s,column:n}=e||{};return this.rowNode&&this.column||!s||!n?this.rowNode!==s||this.column!==n:null}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:i,event:o,ignoreEventKey:s}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:i,event:o,ignoreEventKey:s})}dispatchRowEvent(e,t,i){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){return super.stop(e,t),this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:i}=this.beans,{rowIndex:o,column:s,rowPinned:n}=e,r=ui(this.beans,{rowIndex:o,rowPinned:n}),a=Qr(s),l=t.getCol(a),d=e.previousParams;if(d){const c=Qr(d.column);if(d?.rowIndex===o&&c===a&&d?.rowPinned===n)return}i?.isEditing({rowNode:r,column:l},{withOpenEditor:!0})&&"cellFocused"===e.type||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,i,o="ui",s=!1){const n=this.beans.focusSvc.getFocusedCell();n&&(e=uo(this.beans,n)??e);const r=e.cellPosition;let a;const l="fullRow"===this.beans.gos.get("editType");l&&this.model.suspend(!0),s||(e.eGui.focus(),this.editSvc?.stopEditing(e,{source:this.editSvc?.isBatchEditing()?"ui":"api",event:i}));try{a=this.beans.navigation?.findNextCellToFocusOn(r,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(!1===a)return null;if(null==a)return!1;const d=a.cellPosition,c=e.isCellEditable(),u=a.isCellEditable(),h=d&&r.rowIndex===d.rowIndex&&r.rowPinned===d.rowPinned;c&&!s&&this.setFocusOutOnEditor(e);const g=this.gos.get("suppressStartEditOnTab");if(!h&&!s&&(super.cleanupEditors(a,!0),g?a.focusCell(!0,i):this.editSvc.startEditing(a,{startedEdit:!0,event:i,source:o,ignoreEventKey:!0})),u&&!s){if(a.focusCell(!1,i),g)a.focusCell(!0,i);else if(!a.comp?.getCellEditor()){const p=this.editSvc?.isEditing(a,{withOpenEditor:!0});go(this.beans,a,{event:i,cellStartedEdit:!0,silent:p}),this.setFocusInOnEditor(a),this.cleanupEditors(a)}}else u&&s&&this.setFocusInOnEditor(a),a.focusCell(!0,i);return e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},fullRow:class extends Eu{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}shouldStop(e,t,i="ui"){const{rowNode:o}=e||{};if(!Yr(this.beans,{rowNode:this.rowNode}))return!0;const n=super.shouldStop({rowNode:this.rowNode},t,i);return null!==n?n:!!this.rowNode&&o!==this.rowNode}midBatchInputsAllowed({rowNode:e}){return!!e&&this.model.hasEdits({rowNode:e})}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:i,startedEdit:o,event:s,ignoreEventKey:n}=e,{rowNode:r}=t;this.rowNode!==r&&super.cleanupEditors(t);const a=this.beans.visibleCols.allCols,l=[],d=[];for(const c of a)c.isCellEditable(r)&&d.push(c);if(0!=d.length){this.dispatchRowEvent({rowNode:r},"rowEditingStarted",i),this.startedRows.push(r);for(const c of d){const u={rowNode:r,column:c};l.push(u),this.model.hasEdits(u)||this.model.start(u)}this.rowNode=r,this.setupEditors({cells:l,position:t,startedEdit:o,event:s,ignoreEventKey:n})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){const{rowNode:i}=this;if(i&&!this.model.hasRowEdits(i))return!1;const o=[];if(e||this.model.getEditMap().forEach((s,n)=>{if(s&&0!==s.size)for(const r of s.values())if(hi(r)){o.push(n);break}}),ji(this.beans),!e&&"block-stop"===this.editSvc?.checkNavWithValidation({rowNode:i}))return!1;super.stop(e,t);for(const s of o)this.dispatchRowEvent({rowNode:s},"rowValueChanged");return this.cleanupEditors({rowNode:i},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,i=e.previousParams;if(i?.rowIndex===t||e.sourceEvent instanceof KeyboardEvent)return;const o=Ge(this.beans,i);"block"===this.gos.get("invalidEditValueMode")&&o&&(this.model.getCellValidationModel().getCellValidation(o)||this.model.getRowValidationModel().getRowValidation(o))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);for(const i of this.startedRows)this.dispatchRowEvent({rowNode:i},"rowEditingStopped");this.startedRows.length=0}moveToNextEditingCell(e,t,i,o="ui",s=!1){const n=e.cellPosition;let r;this.model.suspend(!0);try{r=this.beans.navigation?.findNextCellToFocusOn(n,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(!1===r)return null;if(null==r)return!1;const a=r.cellPosition,l=e.isCellEditable(),d=r.isCellEditable(),c=a&&n.rowIndex===a.rowIndex&&n.rowPinned===a.rowPinned;l&&this.setFocusOutOnEditor(e),this.restoreEditors();const u=this.gos.get("suppressStartEditOnTab");return d&&!s?u?r.focusCell(!0,i):(r.comp?.getCellEditor()||go(this.beans,r,{event:i,cellStartedEdit:!0}),this.setFocusInOnEditor(r),r.focusCell(!1,i)):(d&&s&&this.setFocusInOnEditor(r),r.focusCell(!0,i)),!c&&!s&&(this.editSvc?.stopEditing({rowNode:e.rowNode},{event:i}),this.cleanupEditors(r,!0),u?r.focusCell(!0,i):this.editSvc.startEditing(r,{startedEdit:!0,event:i,source:o,ignoreEventKey:!0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach((e,t)=>e.forEach(({state:i},o)=>{if("editing"!==i)return;const s=Ge(this.beans,{rowNode:t,column:o});s&&!s.comp?.getCellEditor()&&go(this.beans,s,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}}},dependsOn:[nn,pu],css:[".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}"]},A3={moduleName:"UndoRedoEdit",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},i=null!==this.activeCellEdit&&Qd(this.activeCellEdit,t),o=null!==this.activeRowEdit&&function KC(e,t){return!e&&!t||!(e&&!t||!e&&t)&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}(this.activeRowEdit,t);if(!(i||o||this.isPasting||this.isRangeInAction))return;const{rowPinned:n,rowIndex:r,column:a,oldValue:l,value:d}=e,c={rowPinned:n,rowIndex:r,columnId:a.getColId(),newValue:d,oldValue:l};this.cellValueChanges.push(c)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const i=e.get("undoRedoCellEditingLimit");if(i<=0)return;this.undoStack=new fu(i),this.redoStack=new fu(i),this.addListeners();const o=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:s=>{s.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:o,newColumnsLoaded:o,columnGroupOpened:o,columnRowGroupChanged:o,columnMoved:o,columnPinned:o,columnVisible:o,rowDragEnd:o}),t.whenReady(this,s=>{this.gridBodyCtrl=s.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){const{eventSvc:t,undoStack:i,redoStack:o}=this;t.dispatchEvent({type:"undoStarted",source:e});const s=this.undoRedo(i,o,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:s})}redo(e){const{eventSvc:t,undoStack:i,redoStack:o}=this;t.dispatchEvent({type:"redoStarted",source:e});const s=this.undoRedo(o,i,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:s})}undoRedo(e,t,i,o,s){if(!e)return!1;const n=e.pop();return!!n?.cellValueChanges&&(this.processAction(n,r=>r[o],s),n instanceof va?this.processRange(n.ranges||[n[i]]):this.processCell(n.cellValueChanges),t.push(n),!0)}processAction(e,t,i){for(const o of e.cellValueChanges){const{rowIndex:s,rowPinned:n,columnId:r}=o,l=ui(this.beans,{rowIndex:s,rowPinned:n});l.displayed&&l.setDataValue(r,t(o),i)}}processRange(e){let t;const i=this.beans.rangeSvc;i.removeAllCellRanges(!0),e.forEach((o,s)=>{if(!o)return;const n=o.startRow,r=o.endRow;s===e.length-1&&(t={rowPinned:n.rowPinned,rowIndex:n.rowIndex,columnId:o.startColumn.getColId()},this.setLastFocusedCell(t)),i.addCellRange({rowStartIndex:n.rowIndex,rowStartPinned:n.rowPinned,rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnStart:o.startColumn,columns:o.columns})})}processCell(e){const t=e[0],{rowIndex:i,rowPinned:o}=t,n=ui(this.beans,{rowIndex:i,rowPinned:o});this.setLastFocusedCell({rowPinned:t.rowPinned,rowIndex:n.rowIndex,columnId:t.columnId})}setLastFocusedCell(e){const{rowIndex:t,columnId:i,rowPinned:o}=e,{colModel:s,focusSvc:n,rangeSvc:r}=this.beans,a=s.getCol(i);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const d={rowIndex:t,column:a,rowPinned:o};n.setFocusedCell({...d,forceBrowserFocus:!0}),r?.setRangeToCell(d)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new Co(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const i=new Co(this.cellValueChanges);this.pushActionsToUndoStack(i)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new Co(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new va(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:i}=this.beans;e=t&&ni(i)?new va(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):new Co(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange("batchEditing"),batchEditingStopped:({changes:e})=>this.stopBigChange("batchEditing",e),bulkEditingStarted:()=>this.startBigChange("bulkEditing"),bulkEditingStopped:({changes:e})=>this.stopBigChange("bulkEditing",e)})}startBigChange(e){this.updateBigChange(e,!0)}updateBigChange(e,t){"bulkEditing"===e?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if("bulkEditing"===e&&!this.bulkEditing||"batchEditing"===e&&!this.batchEditing||(this.updateBigChange(e,!1),0===t?.length))return;const i=new Co(t??[]);this.pushActionsToUndoStack(i),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}}],apiFunctions:{undoCellEditing:function o3(e){e.undoRedo?.undo("api")},redoCellEditing:function s3(e){e.undoRedo?.redo("api")},getCurrentUndoSize:function u3(e){return e.undoRedo?.getCurrentUndoStackSize()??0},getCurrentRedoSize:function h3(e){return e.undoRedo?.getCurrentRedoStackSize()??0}},dependsOn:[Ti]},I3={moduleName:"TextEditor",version:G,userComponents:{agCellEditor:mu,agTextCellEditor:mu},dependsOn:[Ti]},L3={moduleName:"NumberEditor",version:G,userComponents:{agNumberCellEditor:{classImp:class extends ln{constructor(){super(new q1(()=>this.getLocaleTextFunc()))}}}},dependsOn:[Ti]},O3={moduleName:"DateEditor",version:G,userComponents:{agDateCellEditor:class extends ln{constructor(){super(new N1(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},agDateStringCellEditor:class extends ln{constructor(){super(new W1(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}}},dependsOn:[Ti]},B3={moduleName:"CheckboxEditor",version:G,userComponents:{agCheckboxCellEditor:class extends zs{constructor(){super(H1,[Kn]),this.eEditor=V}initialiseEditor(e){const t=e.value??void 0,i=this.eEditor;i.setValue(t),i.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(i,{fieldValueChanged:s=>this.setAriaLabel(s.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),i=oe(t,e),o=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${o} (${i})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,i=this.getValue();return t?t({value:i,internalErrors:null,cellEditorParams:e}):null}}},dependsOn:[Ti]},H3={moduleName:"SelectEditor",version:G,userComponents:{agSelectCellEditor:class extends zs{constructor(){super(Q1,[pp]),this.eEditor=V,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:i,gos:o}=this,{values:s,value:n,eventKey:r}=e;if(q(s))return void I(58);this.startedByEnter=null!=r&&"Enter"===r;let a=!1;s.forEach(u=>{const h={value:u},g=i.formatValue(e.column,null,u);h.text=null!=g?g:u,t.addOption(h),a=a||n===u}),a?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:d,valueListMaxHeight:c}=e;null!=l&&t.setPickerGap(l),null!=c&&t.setPickerMaxHeight(c),null!=d&&t.setPickerMaxWidth(d),"fullRow"!==o.get("editType")&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:i}=e,o=this.getValue();let s=[];if(t&&!t.includes(o)){const n=this.getLocaleTextFunc();s.push(n("invalidSelectionValidation","Invalid selection."))}else s=null;return i?i({value:o,internalErrors:s,cellEditorParams:e}):s}}},dependsOn:[Ti]},G3={moduleName:"LargeTextEditor",version:G,userComponents:{agLargeTextCellEditor:class extends zs{constructor(){super($1,[ip]),this.eEditor=V}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:i,eventKey:o,maxLength:s,cols:n,rows:r}=e;let a;this.focusAfterAttached=i,t.getInputElement().setAttribute("title",""),t.setMaxLength(s||200).setCols(n||60).setRows(r||10),i?(this.focusAfterAttached=!0,"Backspace"===o||"Delete"===o?a="":o&&1===o.length?a=o:(a=this.getStartValue(e),"F2"!==o&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=this.getStartValue(e)),null!=a&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return t?.toString()??t}onKeyDown(e){const t=e.key;(t===P_LEFT||t===P_UP||t===P_RIGHT||t===P_DOWN||e.shiftKey&&"Enter"===t)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:i}=this,o=this.getLocaleTextFunc();e.setInputAriaLabel(o("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),i&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:i}=t,o=e.getValue();return C(o)||C(i)?t.parseValue(o):i}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:i}=e,o=this.getLocaleTextFunc(),s=this.getValue();let n=[];return"string"==typeof s&&null!=t&&s.length>t&&n.push(o("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),i?i({value:s,internalErrors:n,cellEditorParams:e}):n}}},dependsOn:[Ti]},V3={moduleName:"CustomEditor",version:G,dependsOn:[Ti]};function wo(e){return $o(e)?e.pinnedSibling:e.footer?e.sibling:e}function Fu(e,t){return(0!==e||0!==t)&&(e>0&&t>0?void 0:e>0)}function Pu(e){const t=!1===e.isSelected(),i=e.childrenAfterFilter?.some(Pu)??!1;return t||i}var J3={moduleName:"SharedRowSelection",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,eo(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;null!=t&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),function zh(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}(e))}createColumns(e,t){const o=e.treeDepth,n=(this.columns?.treeDepth??-1)==o,r=this.generateSelectionCols();if(function Nh(e,t){return bi(e,t,(i,o)=>i.getColId()===o.getColId())}(r,this.columns?.list??[])&&n)return;(()=>{ms(this.beans,this.columns?.tree),this.columns=null})();const{colGroupSvc:l}=this.beans,d=l?.findDepth(e.tree)??0,c=l?.balanceTreeForAutoCols(r,d)??[];this.columns={list:r,tree:c,treeDepth:d,map:{}},t(h=>{if(!h)return null;const g=h.filter(p=>!ai(p));return[...r,...g]})}updateColumns(e){const t=eo(e.source);for(const i of this.columns?.list??[]){const o=this.createSelectionColDef(e.currentValue);i.setColDef(o,null,t),Nt(this.beans,{state:[{...o,colId:i.getColId()}]},t)}}getColumn(e){return this.columns?.list.find(t=>Bo(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,i=e.get("rowSelection");if("object"!=typeof i||!Ai(e))return!1;const o=(t.autoColSvc?.getColumns()?.length??0)>0;if("autoGroupColumn"===i.checkboxLocation&&o)return!1;const s=!!Ji(i),n=hs(i);return s||n}createSelectionColDef(e){const{gos:t}=this,i=e??t.get("selectionColumnDef"),o=t.get("enableRtl"),{rowSpan:s,spanRows:n,...r}=i??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:o?"right":"left",comparator(a,l,d,c){const u=d.isSelected();return u===c.isSelected()?0:u?1:-1},editable:!1,suppressFillHandle:!0,pinned:null,...r,colId:Pn,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const i=new wi(e,null,t,!1);return this.createBean(i),[i]}onSelectionOptionsChanged(e,t,i){const n=(t&&"string"!=typeof t?Ji(t):void 0)!==(e&&"string"!=typeof e?Ji(e):void 0),l=(t&&"string"!=typeof t?hs(t):void 0)!==(e&&"string"!=typeof e?hs(e):void 0),d=gs(e),c=gs(t);(n||l||d!==c)&&this.beans.colModel.refreshAll(i)}destroy(){ms(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e,t,i){if(!this.columns?.list.length)return;const o=e.length+t.length+i.length;if(0===o)return;const s=this.columns.list[0];s.isVisible()&&(this.beans.rowNumbersSvc?.getColumn(Dn)?2:1)===o&&(()=>{let l;switch(s.pinned){case"left":case!0:l=e;break;case"right":l=i;break;default:l=t}l&&Lt(l,s)})()}}],apiFunctions:{setNodesSelected:function z3(e,t){if(!t.nodes.every(r=>r.rowPinned&&!$o(r)?(I(59),!1):void 0!==r.id||(I(60),!1)))return;const{nodes:o,source:s,newValue:n}=t;e.selectionSvc?.setNodesSelected({nodes:o,source:s??"api",newValue:n})},selectAll:function _3(e,t,i="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:i,selectAll:t})},deselectAll:function W3(e,t,i="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:i,selectAll:t})},selectAllFiltered:function U3(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})},deselectAllFiltered:function $3(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})},selectAllOnCurrentPage:function j3(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})},deselectAllOnCurrentPage:function K3(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})},getSelectedNodes:function q3(e){return e.selectionSvc?.getSelectedNodes()??[]},getSelectedRows:function Y3(e){return e.selectionSvc?.getSelectedRows()??[]}}},eR={moduleName:"RowSelection",version:G,rowModels:["clientSide","infinite","viewport"],beans:[class extends Jm{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();const{gos:e}=this;this.mode=ps(e),this.groupSelectsDescendants=Io(e),this.groupSelectsFiltered="filteredDescendants"===fs(e),this.masterSelectsDetail="detail"===ol(e),this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=Io(e),i=ps(e),o="filteredDescendants"===fs(e);this.masterSelectsDetail="detail"===ol(e),(t!==this.groupSelectsDescendants||o!==this.groupSelectsFiltered||i!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=o,this.mode=i)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,i){if(this.isRowSelectionBlocked(t))return 0;const o=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,i);if(null==o)return 0;if(this.selectionCtx.selectAll=!1,"select"in o)return o.reset?this.resetNodes():this.selectRange(o.deselect,!1,i),this.selectRange(o.select,!0,i);{const s=o.checkFilteredNodes?Pu(o.node):o.newValue;return this.setNodesSelected({nodes:[o.node],newValue:s,clearSelection:o.clearSelection,keepDescendants:o.keepDescendants,event:e,source:i})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:i,nodes:o,event:s,source:n,keepDescendants:r=!1}){if(0===o.length)return 0;const{gos:a}=this;if(!Ai(a)&&e)return I(132),0;if(o.length>1&&!this.isMultiSelect())return I(130),0;let l=0;for(let d=0;d<o.length;d++){const u=wo(o[d]);!u.rowPinned||$o(u)?void 0!==u.id?(this.groupSelectsFiltered&&u.group&&!a.get("treeData")||this.selectRowNode(u,e,s,n)&&(this.detailSelection.delete(u.id),l++),this.groupSelectsDescendants&&u.childrenAfterGroup?.length&&(l+=this.selectChildren(u,e,n))):I(60):I(59)}return i||(1===o.length&&"api"===n&&this.selectionCtx.setRoot(wo(o[0])),e&&(t||!this.isMultiSelect())&&(l+=this.clearOtherNodes(wo(o[0]),r,n)),l>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n))),l}selectRange(e,t,i){let o=0;return e.forEach(s=>{const n=wo(s);n.group&&this.groupSelectsDescendants||this.selectRowNode(n,t,void 0,i)&&o++}),o>0&&(this.updateGroupsFromChildrenSelections(i),this.dispatchSelectionChanged(i)),o}selectChildren(e,t,i){const o=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return o?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:i,nodes:o}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((i,o)=>{e(i)&&t.set(o,i)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:i,rowModel:o}=this.beans;if(!je(i))return!1;const s=o.rootNode;if(!s)return!1;t||((t=new Ko(!0,s)).active=!1);let n=!1;return t.forEachChangedNodeDepthFirst(r=>{if(r!==s){const a=this.calculateSelectedFromChildren(r);n=this.selectRowNode(r,null!==a&&a,void 0,e)||n}}),n}clearOtherNodes(e,t,i){const o=new Map;let s=0;return this.selectedNodes.forEach(n=>{const r=n.id==e.id;if(!(t&&function Z3(e,t){let i=t.parent;for(;i;){if(i===e)return!0;i=i.parent}return!1}(e,n)||r)){const l=this.selectedNodes.get(n.id);s+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:i}),this.groupSelectsDescendants&&n.parent&&o.set(n.parent.id,n.parent)}}),o.forEach(n=>{const r=this.calculateSelectedFromChildren(n);this.selectRowNode(n,null!==r&&r,void 0,i)}),s}onRowSelected(e){const t=e.node;this.groupSelectsDescendants&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}createDaemonNode(e){if(!e.id)return;const t=new xi(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){t&&e.id!==t.id&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:e,rowModel:t}=this.beans;if(!je(e))return;const i=t.getTopLevelNodes();if(null===i)return;const o=[];return function s(n){for(let r=0,a=n.length;r<a;r++){const l=n[r];l.isSelected()?o.push(l):l.group&&l.childrenAfterGroup&&s(l.childrenAfterGroup)}}(i),o}isEmpty(){return 0===this.getSelectionCount()}deselectAllRowNodes({source:e,selectAll:t}){const i=je(this.gos);let o=!1;const s=n=>{const r=this.selectRowNode(wo(n),!1,void 0,e);o||(o=r)};if("currentPage"===t||"filtered"===t){if(!i)return void Me(102);this.getNodesToSelect(t).forEach(s)}else this.selectedNodes.forEach(s),this.reset(e);if(this.selectionCtx.selectAll=!1,i&&this.groupSelectsDescendants){const n=this.updateGroupsFromChildrenSelections(e);o||(o=n)}o&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,i=0;return this.getNodesToSelect(e).forEach(o=>{this.groupSelectsDescendants&&o.group||(o.isSelected()?t++:o.selectable&&i++)}),{selectedCount:t,notSelectedCount:i}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:i}=this.getSelectedCounts(e);return Fu(t,i)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],i=s=>t.push(s);if("currentPage"===e)return this.forEachNodeOnPage(s=>{if(s.group){if(!s.expanded&&!s.footer){const n=r=>{i(r),r.childrenAfterFilter?.forEach(n)};return void n(s)}this.groupSelectsDescendants||i(s)}else i(s)}),t;const o=this.beans.rowModel;return"filtered"===e?(o.forEachNodeAfterFilter(i),t):(o.forEachNode(i),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:i}=this.beans,o=t.getFirstRow(),s=t.getLastRow();for(let n=o;n<=s;n++){const r=i.getRow(n);r&&e(r)}}selectAllRowNodes(e){const{gos:t,selectionCtx:i}=this;if(!Ai(t))return void I(132);if(function Eh(e){return"string"!=typeof e.get("rowSelection")}(t)&&!Ao(t))return void I(130);if(!this.canSelectAll())return;const{source:o,selectAll:s}=e;let n=!1;if(this.getNodesToSelect(s).forEach(r=>{const a=this.selectRowNode(wo(r),!0,void 0,o);n||(n=a)}),i.selectAll=!0,je(t)&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(o);n||(n=r)}n&&this.dispatchSelectionChanged(o)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,i){if(e||(e=[]),!Array.isArray(e))return void Me(103);const o=new Set(e),s=[];this.beans.rowModel.forEachNode(n=>{o.has(n.id)&&s.push(n)}),i&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:s,source:t})}canSelectAll(){return je(this.beans.gos)}updateSelectable(e){const{gos:t,rowModel:i}=this.beans;if(!Ai(t))return;const o="selectableChanged",s=void 0!==e,n=je(t)&&this.groupSelectsDescendants,r=[],a=l=>{if(!s||l.group){if(n&&l.group){const c=l.childrenAfterGroup?.some(u=>u.selectable)??!1;return void this.setRowSelectable(l,c,!0)}!this.updateRowSelectable(l,!0)&&l.isSelected()&&r.push(l)}};if(n){if(void 0===e){const l=i.rootNode;e=l?new Ko(!1,l):void 0}e?.forEachChangedNodeDepthFirst(a,!s,!s)}else i.forEachNode(a);r.length&&this.setNodesSelected({nodes:r,newValue:!1,source:o}),!s&&n&&this.updateGroupsFromChildrenSelections?.(o)}updateSelectableAfterGrouping(e){this.updateSelectable(e),this.groupSelectsDescendants&&this.updateGroupsFromChildrenSelections?.("rowGroupChanged",e)&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail)return;const i=e.detailNode?.detailGridInfo?.api;if(!i)return;const o=function X3(e){let t=0,i=0;return e.forEachNode(o=>{o.isSelected()?t++:o.selectable&&i++}),Fu(t,i)}(i);if(e.isSelected()!==o&&this.selectRowNode(e,o,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!o){const n=this.detailSelection.get(e.id)??new Set;for(const r of i.getSelectedNodes())n.add(r.id);this.detailSelection.set(e.id,n)}}setDetailSelectionState(e,t,i){if(this.masterSelectsDetail){if(!Ao(t))return void I(269);switch(e.isSelected()){case!0:i.selectAll();break;case!1:i.deselectAll();break;case void 0:{const o=this.detailSelection.get(e.id);if(o){const s=[];for(const n of o){const r=i.getRowNode(n);r&&s.push(r)}i.setNodesSelected({nodes:s,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}}],dependsOn:[J3]};function Du(e){e.rowModel?.onRowHeightChanged()}function Mu(e){e.rowAutoHeight?.active?I(3):e.rowModel?.resetRowHeights()}var rR={moduleName:"CsrmSsrmSharedApi",version:G,apiFunctions:{expandAll:function tR(e){e.expansionSvc?.expandAll(!0)},collapseAll:function iR(e){e.expansionSvc?.expandAll(!1)}}},aR={moduleName:"RowModelSharedApi",version:G,apiFunctions:{onRowHeightChanged:Du,resetRowHeights:Mu}},lR={moduleName:"SsrmInfiniteSharedApi",version:G,apiFunctions:{setRowCount:function oR(e,t,i){const o=function sy(e){const t=e.rowModel;return"serverSide"===t.getType()?t:void 0}(e);if(o)return 0===e.rowGroupColsSvc?.columns.length?t<0?void Me(238):void o.setRowCount(t,i):void Me(28);on(e)?.setRowCount(t,i)},getCacheBlockState:function sR(e){return Qi(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}},isLastRowIndexKnown:function nR(e){return e.rowModel.isLastRowIndexKnown()}}},cR={moduleName:"AlignedGrids",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t="function"==typeof e;return"function"==typeof e&&(e=e()),e.map(o=>{if(!o)return Me(18),void(t||Me(20));if(this.isGridApi(o))return o;const s=o;return"current"in s?s.current?.api:(s.api||Me(19),s.api)}).filter(o=>!!o&&!o.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){if(!this.consuming)for(const t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){"horizontal"===e.direction&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const i=[];return e.columns?e.columns.forEach(o=>{i.push(t(o))}):e.column&&i.push(t(e.column)),i}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":this.processColumnEvent(e);break;case"columnGroupOpened":this.processGroupOpenedEvent(e);break;case"columnPivotChanged":I(21)}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;if(t)for(const i of e.columnGroups){let o=null;i&&(o=t.getProvidedColGroup(i.getGroupId())),(!i||o)&&t.setColumnGroupOpened(o,i.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){const t=e.column;let i=null;const o=this.beans,{colResize:s,ctrlsSvc:n,colModel:r}=o;if(t&&(i=r.getColDefCol(t.getColId())),t&&!i)return;const a=this.getMasterColumns(e);switch(e.type){case"columnMoved":Nt(o,{state:e.api.getColumnState().map(h=>({colId:h.colId})),applyOrder:!0},"alignedGridChanged");break;case"columnVisible":Nt(o,{state:e.api.getColumnState().map(h=>({colId:h.colId,hide:h.hide}))},"alignedGridChanged");break;case"columnPinned":Nt(o,{state:e.api.getColumnState().map(h=>({colId:h.colId,pinned:h.pinned}))},"alignedGridChanged");break;case"columnResized":{const c=e,u={};for(const h of a)u[h.getId()]={key:h.getColId(),newWidth:h.getActualWidth()};for(const h of c.flexColumns??[])u[h.getId()]&&delete u[h.getId()];s?.setColumnWidths(Object.values(u),!1,c.finished,"alignedGridChanged");break}}const d=n.getGridBodyCtrl().isVerticalScrollShowing();for(const c of this.getAlignedGridApis())c.setGridOption("alwaysShowVerticalScroll",d)}}],dependsOn:[hc]},uR=class extends M{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},Tu(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){const{selectionSvc:t,pinnedRowModel:i,groupStage:o}=this.beans;t?.reset("rowDataChanged"),i?.isManual()&&i.reset(),this.dispatchRowDataUpdateStarted(e),this.allNodesMap=Object.create(null),this.nextId=0;const s=Tu(this.rootNode),n=new Array(e.length);s._leafs=n;let r=0;const a=o?.getNestedDataGetter(),l=a?new Set:null,d=(c,u)=>{const h=c.level+1;for(let g=0,p=u.length;g<p;++g){const f=u[g];if(!f)continue;const m=this.createRowNode(f,h);if(m.sourceRowIndex=r,n[r++]=m,l&&!l.has(f)){l.add(f),m.treeParent=c;const w=a(f);w&&d(m,w)}}};d(s,e),n.length=r}setImmutableRowData(e,t){const{rootNode:i,gos:o}=this;this.dispatchRowDataUpdateStarted(t);const s=Zi(o),n=e.changedRowNodes,{adds:r,updates:a}=n,l=new Set,d=[],c=this.beans.groupStage?.getNestedDataGetter();let u=!!o.get("suppressMaintainUnsortedOrder")&&void 0,h=-1,g=!1;const p=(w,b)=>{if(!u&&void 0!==u){const R=w.sourceRowIndex;u=R<=h,h=R}w.data!==b&&(w.updateData(b),r.has(w)||a.add(w),!w.selectable&&w.isSelected()&&d.push(w))},f=(w,b,R)=>{for(let T=0,k=b.length;T<k;++T){const L=b[T];if(!L)continue;let H=this.getRowNode(s({data:L,level:R}));if(H?(p(H,L),g||(g=!!c&&H.treeParent!==w)):(H=this.createRowNode(L,R),r.add(H)),!c||l.has(H)){l.add(H);continue}l.add(H),H.treeParent=w;const ae=c(L);ae&&f(H,ae,R+1)}};f(i,t,0);const m=this.deleteUnusedNodes(l,n,d)||u||r.size>0;if(m){const w=i._leafs??(i._leafs=[]);void 0===u?mR(w,l,n):fR(w,l)&&(n.reordered=!0)}(m||g||a.size)&&(e.rowDataUpdated=!0,this.deselect(d))}deleteUnusedNodes(e,{removals:t},i){const o=this.rootNode._leafs;for(let s=0,n=o.length;s<n;s++){const r=o[s];e.has(r)||(t.add(r),r.isSelected()&&i.push(r),this.deleteNode(r))}return t.size>0}updateRowData(e,t){if(this.dispatchRowDataUpdateStarted(e.add),this.beans.groupStage?.getNestedDataGetter())return I(268),{remove:[],update:[],add:[]};const i=[],o=Zi(this.gos),s=this.executeRemove(o,e,t,i),n=this.executeUpdate(o,e,t,i),r=this.executeAdd(e,t);return this.deselect(i),{remove:s,update:n,add:r}}executeRemove(e,{remove:t},{adds:i,updates:o,removals:s},n){const r=this.rootNode._leafs,a=r?.length,l=t?.length;if(!l||!a)return[];let h,d=0,c=a,u=0;const g=new Array(l);for(let p=0;p<l;++p){const f=this.lookupNode(e,t[p]);if(!f)continue;const m=f.sourceRowIndex;m<c&&(c=m),m>u&&(u=m),f.isSelected()&&n.push(f),this.deleteNode(f),i.delete(f)?(h??(h=new Set),h.add(f)):(o.delete(f),s.add(f)),g[d++]=f}return g.length=d,d&&pR(r,c,u,s,h),g}executeUpdate(e,{update:t},{adds:i,updates:o},s){const n=t?.length;if(!n)return[];const r=new Array(n);let a=0;for(let l=0;l<n;l++){const d=t[l],c=this.lookupNode(e,d);c&&(c.updateData(d),!c.selectable&&c.isSelected()&&s.push(c),r[a++]=c,i.has(c)||o.add(c))}return r.length=a,r}executeAdd(e,t){var i;const o=(i=this.rootNode)._leafs??(i._leafs=[]),s=o.length,n=e.add,r=n?.length;if(!r)return[];const a=s+r;let l=this.sanitizeAddIndex(o,e.addIndex);if(l<s){for(let u=s-1,h=a-1;u>=l;--u){const g=o[u];g.sourceRowIndex=h,o[h--]=g}t.reordered=!0}o.length=a;const d=new Array(r),c=t.adds;for(let u=0;u<r;u++){const h=this.createRowNode(n[u],0);c.add(h),h.sourceRowIndex=l,o[l]=h,d[u]=h,l++}return d}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselect(e){const t="rowDataChanged",i=this.beans.selectionSvc;e.length&&i?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),i?.updateGroupsFromChildrenSelections?.(t),e.length&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:i?.getSelectedNodes()??null,serverSideState:null})}createRowNode(e,t){const i=new xi(this.beans);i.parent=this.rootNode,i.level=t,i.group=!1,i.expanded=!1,i.setDataAndId(e,String(this.nextId++));const o=i.id,s=this.allNodesMap;return s[o]&&I(2,{nodeId:o}),s[o]=i,i}deleteNode(e){e.clearRowTopAndRowIndex();const t=e.id,i=this.allNodesMap;i[t]===e&&delete i[t];const o=e.pinnedSibling;o&&this.beans.pinnedRowModel?.pinRow(o,null)}lookupNode(e,t){if(!e)return gR(this.rootNode._leafs,t);const i=e({data:t,level:0});return this.allNodesMap[i]||(Me(4,{id:i}),null)}sanitizeAddIndex(e,t){const i=e.length;if("number"!=typeof t||t<0||t>=i||Number.isNaN(t))return i;t=Math.ceil(t);const o=this.gos;return t>0&&o.get("treeData")&&o.get("getDataPath")&&(t=hR(e,t)),t}},hR=(e,t)=>{for(let i=0,o=e.length;i<o;i++)if(e[i]?.rowIndex==t-1)return i+1;return t},Tu=e=>{e.group=!0,e.level=-1,e.id="ROOT_NODE_ID",0!==e._leafs?.length&&(e._leafs=[]);const t=[],i=[],o=[],s=[];e.childrenAfterGroup=t,e.childrenAfterSort=i,e.childrenAfterAggFilter=o,e.childrenAfterFilter=s;const n=e.sibling;return n&&(n.childrenAfterGroup=t,n.childrenAfterSort=i,n.childrenAfterAggFilter=o,n.childrenAfterFilter=s,n.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},gR=(e,t)=>{if(e)for(let i=0,o=e.length;i<o;i++){const s=e[i];if(s.data===t)return s}return Me(5,{data:t}),null},pR=(e,t,i,o,s)=>{for(let n=t=Math.max(0,t),r=e.length;n<r;++n){const a=e[n];n<=i&&(o.has(a)||s?.has(a))||(a.sourceRowIndex=t,e[t++]=a)}e.length=t},fR=(e,t)=>{e.length=t.size;let o=0,s=!1,n=!1;for(const r of t){const a=r.sourceRowIndex;a===o?n||(n=s):(a>=0?n=!0:s=!0,r.sourceRowIndex=o,e[o]=r),++o}return n},mR=(e,t,{removals:i,adds:o})=>{const s=e.length;e.length=t.size;let n=0;for(let r=0;r<s;++r){const a=e[r];i.has(a)||(n!==r&&(a.sourceRowIndex=n,e[n]=a),++n)}for(const r of o)r.sourceRowIndex<0&&(r.sourceRowIndex=n,e[n++]=r);e.length=n},ku=e=>{const t=e.childrenAfterSort,i=e.sibling;if(i&&(i.childrenAfterSort=t),t)for(let o=0,s=t.length-1;o<=s;o++){const n=t[o],r=0===o,a=o===s;n.firstChild!==r&&(n.firstChild=r,n.dispatchRowEvent("firstChildChanged")),n.lastChild!==a&&(n.lastChild=a,n.dispatchRowEvent("lastChildChanged")),n.childIndex!==o&&(n.childIndex=o,n.dispatchRowEvent("childIndexChanged"))}},wR=(e,t,i,o)=>{let s=0,n=0;const r=i.length,a=o.length,l=new Array(r+a);let d=0;for(;s<r&&n<a;){const c=i[s],u=o[n];e.compareRowNodes(t,c,u)<0?(l[d++]=c.rowNode,++s):(l[d++]=u.rowNode,++n)}for(;s<r;)l[d++]=i[s++].rowNode;for(;n<a;)l[d++]=o[n++].rowNode;return l},Au=(e,t)=>{const i=t.childrenAfterGroup;if(i)for(let o=0,s=i.length;o<s;++o){const n=i[o];n.data&&e.push(n),n.group&&Au(e,n)}},AR={moduleName:"ClientSideRowModel",version:G,rowModels:["clientSide"],beans:[class extends M{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.rowDataUpdatedPending=!1,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingModel=!1,this.rowNodesCountReady=!1,this.stages=[],this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=it(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const t=new xi(this.beans);this.rootNode=t,this.nodeManager=this.createBean(new uR(t));const i=this.refreshModel.bind(this,{step:"group"}),o=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:o,columnRowGroupChanged:i,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:i,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:e,stagesRefreshProps:t}=this,i=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(o=>!!o);this.stages=i;for(let o=i.length-1;o>=0;--o)for(const s of i[o].refreshProps)t.set(s,o);this.addManagedPropertyListeners([...t.keys()],o=>{const s=o.changeSet?.properties;s&&this.onPropChange(s)}),this.addManagedPropertyListener("rowData",()=>this.onPropChange(["rowData"])),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,i,o){let s,n=!1;do{s=!1;const r=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(r,i),d=Math.min(a,o);for(let c=l;c<=d;c++){const u=this.getRow(c);if(u.rowHeightEstimated){const h=Ci(this.beans,u);u.setRowHeight(h.height),s=!0,n=!0}}s&&this.setRowTopAndRowIndex()}while(s);return n}onPropChange(e){const{nodeManager:t,gos:i,beans:o}=this,s=o.groupStage;if(!t)return;const n=new Set(e),r=s?.onPropChange(n);let a;n.has("rowData")?a=i.get("rowData"):r&&(a=s?.extractData()),a&&!Array.isArray(a)&&(a=null,I(1));const l={step:"nothing",changedProps:n};a&&(!r&&!this.isEmpty()&&a.length>0&&i.exists("getRowId")&&!i.get("resetRowDataOnUpdate")?(l.keepRenderedRows=!0,l.animate=!i.get("suppressAnimationFrame"),l.changedRowNodes=new Ws,t.setImmutableRowData(l,a)):(l.rowDataUpdated=!0,l.newData=!0,t.setNewRowData(a),this.rowNodesCountReady=!0));const d=l.rowDataUpdated?"group":this.getRefreshedStage(e);d&&(l.step=d,this.refreshModel(l))}getRefreshedStage(e){const{stages:t,stagesRefreshProps:i}=this,o=t.length;let s=o;for(let n=0,r=e.length;n<r&&s;++n)s=Math.min(s,i.get(e[n])??s);return s<o?t[s].step:null}setRowTopAndRowIndex(e){const{beans:t,rowsToDisplay:i}=this,o=t.environment.getDefaultRowHeight();let s=0;const n=nt(this.gos,"normal");for(let r=0,a=i.length;r<a;++r){const l=i[r],d=l.id;if(null!=d&&e?.add(d),null==l.rowHeight){const c=Ci(t,l,n,o);l.setRowHeight(c.height,c.estimated)}l.setRowTop(s),l.setRowIndex(r),s+=l.rowHeight}}clearRowTopAndRowIndex(e,t){const i=e.active,o=r=>{null!=r?.id&&!t.has(r.id)&&r.clearRowTopAndRowIndex()},s=r=>{o(r),o(r.detailNode),o(r.sibling);const a=r.childrenAfterGroup;if(r.hasChildren()&&a&&(!i||-1==r.level||r.expanded))for(let c=0,u=a.length;c<u;++c)s(a[c])},n=this.rootNode;n&&s(n)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){const{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;const o=e.sibling?.displayed?1:0;return(e.childrenAfterSort?.length??0)+o}getTopLevelRowDisplayedIndex(e){const{beans:t,rootNode:i,rowsToDisplay:o}=this;if(!i||!o.length||o[0]===i)return e;const n=i.childrenAfterSort,r=l=>{let d=n[l];if(this.gos.get("groupHideOpenParents"))for(;d.expanded&&d.childrenAfterSort&&d.childrenAfterSort.length>0;)d=d.childrenAfterSort[0];return d.rowIndex},a=t.footerSvc;return a?a?.getTopDisplayIndex(o,e,n,r):r(e)}getTopLevelIndexFromDisplayedIndex(e){const{rootNode:t,rowsToDisplay:i}=this;if(!t||!i.length||i[0]===t)return e;let s=this.getRow(e);s.footer&&(s=s.sibling);let n=s.parent;for(;n&&n!==t;)s=n,n=s.parent;const r=t.childrenAfterSort?.indexOf(s)??-1;return r>=0?r:e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:Xi(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){const o=0===t.length||t.some(s=>s.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:o,keepRenderedRows:!0,animate:Xi(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:Xi(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(e){const t=new Ko(!1,this.rootNode);return t.active=e,t}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:i,rowDataUpdated:o}=e;return!(!t||i||!o||t.removals.size||t.adds.size)}refreshModel(e){const{nodeManager:t,beans:i,eventSvc:o,started:s,refreshingModel:n}=this;if(!t)return;const r=!!e.rowDataUpdated,a=e.changedPath??(e.changedPath=this.createChangePath(!e.newData&&r));if(s&&r&&o.dispatchEvent({type:"rowDataUpdated"}),!s||n||i.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(e))return void(this.rowDataUpdatedPending||(this.rowDataUpdatedPending=r));switch(this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.refreshingModel=!0,i.masterDetailSvc?.refreshModel(e),r&&"group"!==e.step&&i.colFilter?.refreshModel(),e.step){case"group":this.doGrouping(e);case"filter":this.doFilter(a);case"pivot":this.doPivot(a);case"aggregate":this.doAggregate(a);case"filter_aggregates":this.doFilterAggregates(a);case"sort":this.doSort(e.changedRowNodes,a);case"map":this.doRowsToDisplay()}const l=new Set;this.setRowTopAndRowIndex(l),this.clearRowTopAndRowIndex(a,l),this.refreshingModel=!1,o.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}isEmpty(){return!this.rootNode?._leafs?.length||!this.beans.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let i=!1,o=!1;const s=[],n=Io(this.gos);return this.forEachNodeAfterFilterAndSort(r=>{if(!o)if(i&&(r===t||r===e)&&(o=!0,n&&r.group))Au(s,r);else{if(!i){if(r!==t&&r!==e)return;i=!0,t===e&&(o=!0)}(!r.group||!n)&&s.push(r)}}),s}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay,i=t.length;if(this.isEmpty()||0===i)return-1;let o=0,s=i-1;if(e<=0)return 0;if(t[s].rowTop<=e)return s;let r=-1,a=-1;for(;;){const l=Math.floor((o+s)/2),d=t[l];if(this.isRowInPixel(d,e)||(d.rowTop<e?o=l+1:d.rowTop>e&&(s=l-1),r===o&&a===s))return l;r=o,a=s}}isRowInPixel(e,t){const i=e.rowTop;return i<=t&&i+e.rowHeight>t}forEachLeafNode(e){const t=this.rootNode?._leafs;if(t)for(let i=0,o=t.length;i<o;++i)e(t[i],i)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){const t=this.rowsToDisplay;for(let i=0,o=t.length;i<o;++i)e(t[i],i)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,i=>i.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,i=>i.childrenAfterSort)}forEachPivotNode(e,t,i){const{colModel:o,rowGroupColsSvc:s}=this.beans;if(!o.isPivotMode())return;if(!s?.columns.length)return void e(this.rootNode,0);const n=i?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,r=>r.leafGroup?null:r[n])}depthFirstSearchRowNodes(e,t=!1,i=n=>n.childrenAfterGroup,o=this.rootNode,s=0){let n=s;if(!o)return n;const r=o===this.rootNode;if(r||e(o,n++),o.hasChildren()&&!o.footer){const a=i(o);if(a){const l=this.beans.footerSvc;n=l?.addTotalRows(n,o,e,t,r,"top")??n;for(const d of a)n=this.depthFirstSearchRowNodes(e,t,i,d,n);return l?.addTotalRows(n,o,e,t,r,"bottom")??n}}return n}doAggregate(e){const t=this.rootNode;t&&this.beans.aggStage?.execute({rowNode:t,changedPath:e})}doFilterAggregates(e){const t=this.rootNode,i=this.beans.filterAggStage;i?i.execute({rowNode:t,changedPath:e}):t.childrenAfterAggFilter=t.childrenAfterFilter}doSort(e,t){const i=this.beans.sortStage;i?i.execute({rowNode:this.rootNode,changedRowNodes:e,changedPath:t}):t.forEachChangedNodeDepthFirst(o=>{o.childrenAfterSort=o.childrenAfterAggFilter.slice(0),ku(o)})}doGrouping(e){const t=this.rootNode,o=this.beans.groupStage?.execute({rowNode:t,changedRowNodes:e.changedRowNodes,changedPath:e.changedPath,afterColumnsChanged:!!e.afterColumnsChanged});if(void 0===o){const s=t._leafs;t.childrenAfterGroup=s,t.updateHasChildren();const n=t.sibling;n&&(n.childrenAfterGroup=s)}(o||e.rowDataUpdated)&&this.beans.colFilter?.refreshModel(),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){const t=this.beans.filterStage;t?t.execute({rowNode:this.rootNode,changedPath:e}):e.forEachChangedNodeDepthFirst(i=>{i.childrenAfterFilter=i.childrenAfterGroup,Xc(i)},!0)}doPivot(e){this.beans.pivotStage?.execute({rowNode:this.rootNode,changedPath:e})}getRowNode(e){const t=this.nodeManager?.getRowNode(e);return"object"==typeof t?t:"string"==typeof e&&0===e.indexOf(sr)?this.beans.groupStage?.getNode(e):void 0}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const i=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),i)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){const e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){const{nodeManager:e,beans:t,eventSvc:i,asyncTransactions:o}=this;if(!e)return;t.valueCache?.onDataChanged();const s=[],n=[],r=new Ws;for(const{rowDataTransaction:a,callback:l}of o??[]){this.rowNodesCountReady=!0;const d=e.updateRowData(a,r);s.push(d),l&&n.push(l.bind(null,d))}this.commitTransactions(r),n.length>0&&setTimeout(()=>{for(let a=0,l=n.length;a<l;a++)n[a]()},0),s.length>0&&i.dispatchEvent({type:"asyncTransactionsFlushed",results:s}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){const t=this.nodeManager;if(!t)return null;this.beans.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const i=new Ws,o=t.updateRowData(e,i);return this.commitTransactions(i),o}commitTransactions(e){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:e,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{beans:e,rootNode:t}=this,i=e.flattenStage;if(i)return void(this.rowsToDisplay=i.execute({rowNode:t}));const o=this.rootNode.childrenAfterSort??[];for(const s of o)s.setUiLevel(0);this.rowsToDisplay=o}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);const i=e.sibling;i?.setRowHeight(i.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const i=t.detailNode;i?.setRowHeight(i.rowHeight,!0);const o=t.sibling;o?.setRowHeight(o.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){e.rowHeightChanged&&!this.beans.rowAutoHeight?.active&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},class extends M{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e){const t=this.beans.sortSvc.getSortOptions(),i=t.length>0&&!!e.changedRowNodes&&this.gos.get("deltaSort");this.sort(t,i,e.changedRowNodes,e.changedPath)}sort(e,t,i,o){const{gos:s,colModel:n,rowGroupColsSvc:r,rowNodeSorter:a,rowRenderer:l,showRowGroupCols:d}=this.beans,c=s.get("groupMaintainOrder"),u=n.getCols().some(b=>b.isRowGroupActive()),h=r?.columns,g=n.isPivotMode(),p=s.getCallback("postSortRows");let m,f=!1;if(o?.forEachChangedNodeDepthFirst(b=>{const R=g&&b.leafGroup;let T=c&&u&&!b.leafGroup;T&&(m??(m=this.shouldSortContainsGroupCols(e)),T&&(T=!m));let k=null;if(T){let L=!1;if(h){const H=b.level+1;H<h.length&&(L=null===h[H].getSort())}L||(k=(e=>{const t=e.childrenAfterSort,i=e.childrenAfterAggFilter,o=t?.length,s=i?.length;if(!o||!s)return null;const n=new Array(s),r=new Set;for(let l=0;l<s;++l)r.add(i[l]);let a=0;for(let l=0;l<o;++l){const d=t[l];r.delete(d)&&(n[a++]=d)}if(0===r.size&&a===o)return t;for(const l of r)n[a++]=l;return n.length=a,n})(b))}else!e.length||R||(k=t&&i?((e,t,i,o,s)=>{const n=t.childrenAfterAggFilter,r=t.childrenAfterSort;if(!r)return e.doFullSort(n,s);const a=new Set,l=[],{updates:d,adds:c}=i;for(let h=0,g=n.length;h<g;++h){const p=n[h];d.has(p)||c.has(p)||o&&!o.canSkip(p)?l.push({currentPos:l.length,rowNode:p}):a.add(p)}const u=r.filter(h=>a.has(h)).map((h,g)=>({currentPos:g,rowNode:h}));return l.sort((h,g)=>e.compareRowNodes(s,h,g)),wR(e,s,l,u)})(a,b,i,o,e):a.doFullSort(b.childrenAfterAggFilter,e));k||(k=b.childrenAfterAggFilter?.slice(0)??[]),f||(f=b.childrenAfterSort?.[0]!==k[0]),b.childrenAfterSort=k,ku(b),p&&p({nodes:b.childrenAfterSort})}),f&&s.get("groupHideOpenParents")){const b=d?.getShowRowGroupCols();b?.length&&l.refreshCells({columns:b,force:!0})}}shouldSortContainsGroupCols(e){const t=e.length;if(!t)return!1;if(qt(this.gos)){for(let i=0;i<t;++i){const o=e[i].column;if(o.isPrimary()&&o.isRowGroupActive())return!0}return!1}for(let i=0;i<t;++i)if(e[i].column.getColDef().showRowGroup)return!0;return!1}}],dependsOn:[Wc]},IR={moduleName:"ClientSideRowModelApi",version:G,apiFunctions:{onGroupExpandedOrCollapsed:function yR(e){e.expansionSvc?.onGroupExpandedOrCollapsed()},refreshClientSideRowModel:function RR(e,t){const i=Mi(e);i&&((!t||"everything"===t)&&(t="group"),i.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))},isRowDataEmpty:function xR(e){return Mi(e)?.isEmpty()??!0},forEachLeafNode:function ER(e,t){Mi(e)?.forEachLeafNode(t)},forEachNodeAfterFilter:function FR(e,t){Mi(e)?.forEachNodeAfterFilter(t)},forEachNodeAfterFilterAndSort:function PR(e,t){Mi(e)?.forEachNodeAfterFilterAndSort(t)},applyTransaction:function DR(e,t){return e.frameworkOverrides.wrapIncoming(()=>Mi(e)?.updateRowData(t))},applyTransactionAsync:function MR(e,t,i){e.frameworkOverrides.wrapIncoming(()=>Mi(e)?.batchUpdateRowData(t,i))},flushAsyncTransactions:function TR(e){e.frameworkOverrides.wrapIncoming(()=>Mi(e)?.flushAsyncTransactions())},getBestCostNodeSelection:function kR(e){return e.selectionSvc?.getBestCostNodeSelection()},resetRowHeights:Mu,onRowHeightChanged:Du},dependsOn:[rR,aR]},OR={moduleName:"SharedExport",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:i,columnKeys:o,skipRowGroups:s,exportRowNumbers:n}=t,r=this.getColumnsToExport({allColumns:i,skipRowGroups:s,columnKeys:o,exportRowNumbers:n});return[this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t)].reduce((a,l)=>l(a),e).parse()}processRow(e,t,i,o){const s=t.shouldRowBeSkipped||(()=>!1),r=null!=t.rowPositions||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!r,l=this.colModel.isPivotMode()?o.leafGroup:!o.group,d=!!o.footer,c=1===o.allChildrenCount&&1===o.childrenAfterGroup?.length&&function Rh(e,t){const i=e.get("groupHideParentOfSingleChild");return!!(!0===i||"leafGroupsOnly"===i&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}(this.gos,o);if(!l&&!d&&(t.skipRowGroups||c||a)||t.onlySelected&&!o.isSelected()||t.skipPinnedTop&&"top"===o.rowPinned||t.skipPinnedBottom&&"bottom"===o.rowPinned||o.stub||-1===o.level&&!l&&!d||s(ee(this.gos,{node:o})))return;const g=e.onNewBodyRow(o);if(i.forEach((p,f)=>{g.onColumn(p,f,o)}),t.getCustomContentBelowRow){const p=t.getCustomContentBelowRow(ee(this.gos,{node:o}));p&&e.addCustomContent(p)}}appendContent(e){return t=>{const i=e.appendContent;return i&&t.addCustomContent(i),t}}prependContent(e){return t=>{const i=e.prependContent;return i&&t.addCustomContent(i),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return i=>{if(!e.skipColumnGroupHeaders){const o=new yl,{colGroupSvc:s}=this.beans,n=s?s.createColumnGroups({columns:t,idCreator:o,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(n,i,e.processGroupHeaderCallback)}return i}}exportHeaders(e,t){return i=>{if(!e.skipColumnHeaders){const o=i.onNewHeaderRow();t.forEach((s,n)=>{o.onColumn(s,n,void 0)})}return i}}processPinnedTopRows(e,t){return i=>{const o=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(s=>"top"===s.rowPinned).sort((s,n)=>s.rowIndex-n.rowIndex).map(s=>this.pinnedRowModel?.getPinnedTopRow(s.rowIndex)).forEach(o):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("top",o),i}}processRows(e,t){return i=>{const o=this.rowModel,s=je(this.gos),n=Qi(this.gos),r=!s&&e.onlySelected,a=this.processRow.bind(this,i,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(d=>null==d.rowPinned).sort((d,c)=>d.rowIndex-c.rowIndex).map(d=>o.getRow(d.rowIndex)).forEach(a);else if(this.colModel.isPivotMode())s?o.forEachPivotNode(a,!0,"filteredAndSorted"===l):n?o.forEachNodeAfterFilterAndSort(a,!0):o.forEachNode(a);else if(e.onlySelectedAllPages||r){const d=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(d),d.forEach(a)}else"all"===l?o.forEachNode(a):s||n?o.forEachNodeAfterFilterAndSort(a,!0):o.forEachNode(a);return i}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:i}=this.beans;if(!t||!i)return;const o=t.getSortOptions(),s=(n,r)=>null!=n.rowIndex&&null!=r.rowIndex?n.rowIndex-r.rowIndex:n.level===r.level?n.parent?.id===r.parent?.id?i.compareRowNodes(o,{rowNode:n,currentPos:n.rowIndex??-1},{rowNode:r,currentPos:r.rowIndex??-1}):s(n.parent,r.parent):n.level>r.level?s(n.parent,r):s(n,r.parent);e.sort(s)}processPinnedBottomRows(e,t){return i=>{const o=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(s=>"bottom"===s.rowPinned).sort((s,n)=>s.rowIndex-n.rowIndex).map(s=>this.pinnedRowModel?.getPinnedBottomRow(s.rowIndex)).forEach(o):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("bottom",o),i}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:i=!1,exportRowNumbers:o=!1,columnKeys:s}=e,{colModel:n,gos:r,visibleCols:a}=this,l=n.isPivotMode(),d=h=>!ai(h)&&(!li(h)||o);if(s?.length)return n.getColsForKeys(s).filter(d);const c=r.get("treeData");let u=[];return u=t&&!l?n.getCols():a.allCols,u=u.filter(h=>d(h)&&(!(i&&!c)||!Mn(h))),u}recursivelyAddHeaderGroups(e,t,i){const o=[];for(const s of e){const n=s;if(n.getChildren)for(const r of n.getChildren()??[])o.push(r)}e.length>0&&qe(e[0])&&this.doAddHeaderHeader(t,e,i),o&&o.length>0&&this.recursivelyAddHeaderGroups(o,t,i)}doAddHeaderHeader(e,t,i){const o=e.onNewHeaderGroupingRow();let s=0;for(const n of t){const r=n;let a;a=i?i(ee(this.gos,{columnGroup:r})):this.beans.colNames.getDisplayNameForColumnGroup(r,"header");const d=(r.isExpandable()?r.getLeafColumns():[]).reduce((c,u,h,g)=>{let p=Ae(c);return"open"===u.getColumnGroupShow()?(!p||null!=p[1])&&(p=[h],c.push(p)):p&&null==p[1]&&(p[1]=h-1),h===g.length-1&&p&&null==p[1]&&(p[1]=h),c},[]);o.onColumn(r,a||"",s++,r.getLeafColumns().length-1,d)}}}]},BR=class extends cy{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:i}=e;this.suppressQuotes=t,this.columnSeparator=i}addCustomContent(e){e&&("string"==typeof e?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,"\r\n"),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((i,o)=>{0!==o&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(i.data.value||""),i.mergeAcross&&this.appendEmptyCells(i.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,i,o){0!=i&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(o)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,i){0!=t&&(this.result+=this.columnSeparator);const o=this.extractRowCellValue(e,t,t,"csv",i);this.result+=this.putInQuotes(o.valueFormatted??o.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(null==e)return'""';let t;return"string"==typeof e?t=e:"function"==typeof e.toString?t=e.toString():(I(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+="\r\n"),this.isFirstLine=!1}},NR={moduleName:"CsvExport",version:G,beans:[class extends dy{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed())return void I(51);const t=this.getMergedParams(e),i=this.getData(t),o=new Blob(["\ufeff",i],{type:"text/plain"}),s="function"==typeof t.fileName?t.fileName(ee(this.gos,{})):t.fileName;!function uy(e,t){const i=document.defaultView||window;if(!i)return void I(52);const o=document.createElement("a"),s=i.URL.createObjectURL(t);o.setAttribute("href",s),o.setAttribute("download",e),o.style.display="none",document.body.appendChild(o),o.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:i})),o.remove(),i.setTimeout(()=>{i.URL.revokeObjectURL(s)},0)}(this.getFileName(s),o)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const i=t?Object.assign({},e):this.getMergedParams(e);return this.getData(i)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:i,rowGroupColsSvc:o,valueSvc:s,gos:n}=this,{processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:d,suppressQuotes:c,columnSeparator:u}=e;return new BR({colModel:t,colNames:i,valueSvc:s,gos:n,processCellCallback:r||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:d||void 0,suppressQuotes:c||!1,columnSeparator:u||",",rowGroupColsSvc:o})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}}],apiFunctions:{getDataAsCsv:function GR(e,t){return e.csvCreator?.getDataAsCsv(t)},exportDataAsCsv:function VR(e,t){e.csvCreator?.exportDataAsCsv(t)}},dependsOn:[OR]},zR=class extends M{constructor(e,t,i){super(),this.id=e,this.parentCache=t,this.params=i,this.state="needsLoading",this.version=0,this.startRow=e*i.blockSize,this.endRow=this.startRow+i.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,i){this.successCommon(e,{rowData:t,rowCount:i})}isRequestMostRecentAndLive(e){const t=e===this.version,i=this.isAlive();return t&&i}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:i,beans:o,rowNodes:s}=this;for(let n=0;n<e;n++){const r=i+n,a=new xi(o);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(r),a.setRowTop(t*r),s.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:i,state:o}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:i,pageStatus:o}}}setDataAndId(e,t,i){C(t)?e.setDataAndId(t,i.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();q(this.params.datasource.getRows)?I(90):window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:i,params:{sortModel:o,filterModel:s},gos:n}=this;return{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,i),failCallback:this.pageLoadFailed.bind(this,i),sortModel:o,filterModel:s,context:ee(n,{}).context}}forEachNode(e,t,i){this.rowNodes.forEach((o,s)=>{this.startRow+s<i&&e(o,t.value++)})}getRow(e,t=!1){return t||(this.lastAccessed=this.params.lastAccessedSequence.value++),this.rowNodes[e-this.startRow]}processServerResult(e){const{rowNodes:t,beans:i}=this;t.forEach((s,n)=>{const r=e.rowData?e.rowData[n]:void 0;!s.id&&s.alreadyRendered&&r&&(t[n]=new xi(i),t[n].setRowIndex(s.rowIndex),t[n].setRowTop(s.rowTop),t[n].setRowHeight(s.rowHeight),s.clearRowTopAndRowIndex()),this.setDataAndId(t[n],r,this.startRow+n)}),this.parentCache.pageLoaded(this,null!=e.rowCount&&e.rowCount>=0?e.rowCount:void 0)}destroy(){for(const e of this.rowNodes)e.clearRowTopAndRowIndex();super.destroy()}},WR=class extends M{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const i=Math.floor(e/this.params.blockSize);let o=this.blocks[i];if(!o){if(t)return;o=this.createBlock(i)}return o.getRow(e)}createBlock(e){const t=this.params,i=this.createBean(new zR(e,this,t));return this.blocks[i.id]=i,this.blockCount++,this.purgeBlocksIfNeeded(i),t.rowNodeBlockLoader.addBlock(i),i}refreshCache(){if(0!=this.blockCount){for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}else this.purgeCache()}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(mi(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(r=>r!=e);t.sort((r,a)=>a.lastAccessed-r.lastAccessed);const o=this.params.maxBlocksInCache>0,s=o?this.params.maxBlocksInCache-1:null;t.forEach((r,a)=>{if("needsLoading"===r.state&&a>=1||o&&a>=s){if(this.isBlockCurrentlyDisplayed(r)||this.isBlockFocused(r))return;this.removeBlockFromCache(r)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||null!=t.rowPinned)return!1;const{startRow:i,endRow:o}=e;return t.rowIndex>=i&&t.rowIndex<o}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:i}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,i-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if("number"==typeof t&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:i,overflowSize:o}=this.params,n=(e.id+1)*i+o;this.rowCount<n&&(this.rowCount=n)}}setRowCount(e,t){this.rowCount=e,C(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const i of this.getBlocksInOrder())i.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){return Object.values(this.blocks).sort((i,o)=>i.id-o.id)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,0===this.rowCount&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const i=[];let o=-1,s=!1;const n={value:0};let r=!1;for(const l of this.getBlocksInOrder())if(!r){if(s&&o+1!==l.id){r=!0;continue}o=l.id,l.forEachNode(d=>{const c=d===e||d===t;(s||c)&&i.push(d),c&&(s=!s)},n,this.rowCount)}return r||s?[]:i}},YR={moduleName:"InfiniteRowModelCore",version:G,rowModels:["infinite"],beans:[class extends M{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if("infinite"!==this.gos.get("rowModelType"))return;const e=this.beans,t=new xi(e);this.rootNode=t,t.level=-1,this.rowHeight=Ii(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=Ii(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;e=!this.cacheParams||!Ce(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]),e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){this.datasource&&(null!=Zi(this.gos)||this.beans.selectionSvc?.reset("rowDataChanged"),this.resetCache())}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:i,rowNodeBlockLoader:o,eventSvc:s,gos:n}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:i?.getSortModel()??[],rowNodeBlockLoader:o,initialRowCount:n.get("infiniteInitialRowCount"),maxBlocksInCache:n.get("maxBlocksInCache"),rowHeight:Ii(e),overflowSize:n.get("cacheOverflowSize"),blockSize:n.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new WR(this.cacheParams)),s.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}forEachNode(e){this.infiniteCache?.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(0!==this.rowHeight){const t=Math.floor(e/this.rowHeight),i=this.getRowCount()-1;return t>i?i:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache?.refreshCache()}purgeCache(){this.infiniteCache?.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?.isLastRowIndexKnown()??!1}setRowCount(e,t){this.infiniteCache?.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}},class extends M{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=function xh(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=it(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){Lt(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),null!=this.maxConcurrentRequests&&this.activeBlockLoadsCount>=this.maxConcurrentRequests)return void mi(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");const e=null!=this.maxConcurrentRequests?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(i=>"needsLoading"===i.state).slice(0,e);this.activeBlockLoadsCount+=t.length;for(const i of t)i.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:i,state:o}=t.getBlockStateJson();e[i]=o}),e}printCacheStatus(){mi(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}}]},QR={moduleName:"InfiniteRowModel",version:G,apiFunctions:{refreshInfiniteCache:function $R(e){on(e)?.refreshCache()},purgeInfiniteCache:function jR(e){on(e)?.purgeCache()},getInfiniteRowCount:function KR(e){return on(e)?.getRowCount()}},dependsOn:[YR,lR]},JR={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},i2={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},r2={moduleName:"HighlightChanges",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,i=this.beans.gos.get("cellFlashDuration"),o=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];s.delete(e);const n=Date.now(),r=n+i;s.set(e,{phase:"flash",flashEndTime:r,fadeEndTime:n+i+o});const d=`ag-cell-${t}`,c=`${d}-animation`,{comp:u,eGui:{style:h}}=e;u.toggleCss(d,!0),u.toggleCss(c,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),i)}),this.nextAnimationTime=r)}advanceAnimations(){const e=Date.now();let t=null;for(const i of Object.keys(this.animations)){const o=this.animations[i],s=`ag-cell-${i}`,n=`${s}-animation`;for(const[r,a]of o){if(!r.isAlive()||!r.comp){o.delete(r);continue}const{phase:l,flashEndTime:d,fadeEndTime:c}=a,u="flash"===l?d:c;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:g,eGui:{style:p}}=r;switch(l){case"flash":g.toggleCss(s,!1),g.toggleCss(n,!0),p.transition=`background-color ${c-d}ms`,p.transitionDelay=d-e+"ms",t=Math.min(c,t??1/0),a.phase="fade";break;case"fade":g.toggleCss(s,!1),g.toggleCss(n,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),o.delete(r)}}}null==t?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const i=function $C(e){const{rowIndex:t,rowPinned:i,column:o}=e;return`${t}.${i??"null"}.${o.getId()}`}(e.cellPosition);t.cells[i]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t?.flashDuration,t?.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}}],userComponents:{agAnimateShowChangeCellRenderer:class extends Re{constructor(){super(JR),this.eValue=V,this.eDelta=V,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const i=Math.abs(t),o=e.formatValue(i),s=C(o)?o:i,n=t>=0,r=this.eDelta;r.textContent=n?"\u2191"+s:"\u2193"+s,r.classList.toggle("ag-value-change-delta-up",n),r.classList.toggle("ag-value-change-delta-down",!n)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),Ue(this.eDelta)}refresh(e,t=!1){const{value:i,valueFormatted:o}=e,{eValue:s,lastValue:n,beans:r}=this;if(i===n||(C(o)?s.textContent=o:C(i)?s.textContent=i:Ue(s),r.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=i&&"object"==typeof i&&"toNumber"in i?i.toNumber():i,l=n&&"object"==typeof n&&"toNumber"in n?n.toNumber():n;return a!==l&&("number"==typeof a&&"number"==typeof l&&this.showDelta(e,a-l),n&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=i,!0)}},agAnimateSlideCellRenderer:class extends Re{constructor(){super(i2),this.eCurrent=V,this.refreshCount=0,this.registerCSS(".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}")}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:i}=this,o=Ye({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=o,o.textContent=i.textContent,this.getGui().insertBefore(o,i),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.ePrevious?.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let i=e.value;if(q(i)&&(i=""),i===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=i;const o=this.eCurrent;return C(e.valueFormatted)?o.textContent=e.valueFormatted:C(e.value)?o.textContent=i:Ue(o),!0}}},apiFunctions:{flashCells:function n2(e,t={}){const{cellFlashSvc:i}=e;i&&e.frameworkOverrides.wrapIncoming(()=>{for(const o of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))i.flashCell(o,t)})}}};function Lu(e){return(e={...e}).version||(e.version="32.1.0"),"32.1.0"===e.version&&(e=function d2(e){return e.cellSelection=function c2(e,t){if(e&&"object"==typeof e)return e[t]}(e,"rangeSelection"),e}(e)),e.version=G,e}var h2={moduleName:"GridState",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=it(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=it(this,()=>{this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(this.updateCachedState("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowGroupExpansion",void 0)):(this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("ssrmRowGroupExpansion",void 0))},0),this.onRowSelectedDebounced=it(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:i}=this.beans;this.isClientSideRowModel=je(e);const o=Lu(e.get("initialState")??{}),s=o.partialColumnState;delete o.partialColumnState,this.cachedState=o;const n=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>n(()=>this.setupStateOnGridReady(o))),(o.columnOrder||o.columnVisibility||o.columnSizing||o.columnPinning||o.columnGroup)&&i?.hideColumns("columnState");const[r,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:d})=>{"gridInitializing"===d&&(r(),n(()=>{this.setupStateOnColumnsInitialised(o,!!s),i?.revealColumns("columnState")}))},rowCountReady:()=>{a?.(),n(()=>this.setupStateOnRowCountReady(o))},firstDataRendered:()=>{l?.(),n(()=>this.setupStateOnFirstDataRendered(o))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const i=Lu(e);delete i.partialColumnState,this.cachedState=i,this.startSuppressEvents();const o="api",s=t?new Set(t):void 0;this.setGridReadyState(i,o,s),this.setColumnsInitialisedState(i,o,!!s,s),this.setRowCountState(i,o,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(i,o,s),this.stopSuppressEvents(o)})}setGridReadyState(e,t,i){"api"===t&&!i?.has("sideBar")&&this.beans.sideBar?.comp?.setState(e.sideBar),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,i,o){this.setColumnState(e,t,i,o),this.setColumnGroupState(e,t,o),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const i=o=>()=>this.updateColumnState([o]);this.addManagedEventListeners({columnValueChanged:i("aggregation"),columnMoved:i("columnOrder"),columnPinned:i("columnPinning"),columnResized:i("columnSizing"),columnVisible:i("columnVisibility"),columnPivotChanged:i("pivot"),columnPivotModeChanged:i("pivot"),columnRowGroupChanged:i("rowGroup"),sortChanged:i("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,i){const{filter:o,rowGroupExpansion:s,ssrmRowGroupExpansion:n,rowSelection:r,pagination:a}=e,l=(c,u)=>!i?.has(c)&&(u||"api"===t);l("filter",o)&&this.setFilterState(o),l("rowGroupExpansion",s)&&this.setRowGroupExpansionState(n,s,t),l("rowSelection",r)&&this.setRowSelectionState(r,t),l("pagination",a)&&this.setPaginationState(a,t);const d=this.updateCachedState.bind(this);d("filter",this.getFilterState()),this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(d("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),d("rowGroupExpansion",void 0)):(d("rowGroupExpansion",this.getRowGroupExpansionState()),d("ssrmRowGroupExpansion",void 0)),d("rowSelection",this.getRowSelectionState()),d("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),i=()=>{this.updateRowGroupExpansionStateTimer=0,this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(t("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),t("rowGroupExpansion",void 0)):(t("rowGroupExpansion",this.getRowGroupExpansionState()),t("ssrmRowGroupExpansion",void 0))},o=()=>t("filter",this.getFilterState()),{gos:s,colFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:o,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:i,columnRowGroupChanged:i,rowDataUpdated:()=>{(0!==s.get("groupDefaultExpanded")||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(i)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:r=>{(r.newPage||r.newPageSize)&&t("pagination",this.getPaginationState())}}),n&&this.addManagedListeners(n,{filterStateChanged:o})}setFirstDataRenderedState(e,t,i){const{scroll:o,cellSelection:s,focusedCell:n,columnOrder:r,rowPinning:a}=e,l=(u,h)=>!i?.has(u)&&(h||"api"===t);l("focusedCell",n)&&this.setFocusedCellState(n),l("cellSelection",s)&&this.setCellSelectionState(s),l("scroll",o)&&this.setScrollState(o),l("rowPinning",a)&&this.setRowPinningState(a),this.setColumnPivotState(!!r?.orderedColIds,t);const d=this.updateCachedState.bind(this);d("sideBar",this.getSideBarState()),d("focusedCell",this.getFocusedCellState());const c=this.getRangeSelectionState();d("rangeSelection",c),d("cellSelection",c),d("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),i=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:i,cellFocusCleared:i,cellSelectionChanged:o=>{if(o.finished){const s=this.getRangeSelectionState();t("rangeSelection",s),t("cellSelection",s)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return function ry(e,t=!1){const i=[],o=[],s=[],n=[],r=[],a=[],l=[],d=[],c=[];let u=0;for(let h=0;h<e.length;h++){const{colId:g,sort:p,sortIndex:f,rowGroup:m,rowGroupIndex:w,aggFunc:b,pivot:R,pivotIndex:T,pinned:k,hide:L,width:H,flex:ae}=e[h];c.push(g),p&&(i[f??u++]={colId:g,sort:p}),m&&(o[w??0]=g),"string"==typeof b&&s.push({colId:g,aggFunc:b}),R&&(n[T??0]=g),k&&("right"===k?a:r).push(g),L&&l.push(g),(null!=ae||H)&&d.push({colId:g,flex:ae??void 0,width:H})}return{sort:i.length?{sortModel:ra(i)}:void 0,rowGroup:o.length?{groupColIds:ra(o)}:void 0,aggregation:s.length?{aggregationModel:s}:void 0,pivot:n.length||t?{pivotMode:t,pivotColIds:ra(n)}:void 0,columnPinning:r.length||a.length?{leftColIds:r,rightColIds:a}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:d.length?{columnSizingModel:d}:void 0,columnOrder:c.length?{orderedColIds:c}:void 0}}(ws(e),e.colModel.isPivotMode())}setColumnState(e,t,i,o){const{sort:s,rowGroup:n,aggregation:r,pivot:a,columnPinning:l,columnVisibility:d,columnSizing:c,columnOrder:u}=e;let h=!1;const g=(he,Ie)=>{const Ve=!(o?.has(he)||!Ie&&"api"!==t);return h||(h=Ve),Ve},p={},f=he=>{let Ie=p[he];return Ie||(Ie={colId:he},p[he]=Ie,Ie)},m={},w=g("sort",s);w&&s?.sortModel.forEach(({colId:he,sort:Ie},Ve)=>{const ct=f(he);ct.sort=Ie,ct.sortIndex=Ve}),(w||!i)&&(m.sort=null,m.sortIndex=null);const b=g("rowGroup",n);b&&n?.groupColIds.forEach((he,Ie)=>{const Ve=f(he);Ve.rowGroup=!0,Ve.rowGroupIndex=Ie}),(b||!i)&&(m.rowGroup=null,m.rowGroupIndex=null);const R=g("aggregation",r);R&&r?.aggregationModel.forEach(({colId:he,aggFunc:Ie})=>{f(he).aggFunc=Ie}),(R||!i)&&(m.aggFunc=null);const T=g("pivot",a);T&&(a?.pivotColIds.forEach((he,Ie)=>{const Ve=f(he);Ve.pivot=!0,Ve.pivotIndex=Ie}),this.gos.updateGridOptions({options:{pivotMode:!!a?.pivotMode},source:t})),(T||!i)&&(m.pivot=null,m.pivotIndex=null);const k=g("columnPinning",l);if(k){for(const he of l?.leftColIds??[])f(he).pinned="left";for(const he of l?.rightColIds??[])f(he).pinned="right"}(k||!i)&&(m.pinned=null);const L=g("columnVisibility",d);if(L)for(const he of d?.hiddenColIds??[])f(he).hide=!0;(L||!i)&&(m.hide=null);const H=g("columnSizing",c);if(H)for(const{colId:he,flex:Ie,width:Ve}of c?.columnSizingModel??[]){const ct=f(he);ct.flex=Ie??null,ct.width=Ve}(H||!i)&&(m.flex=null);const ae=u?.orderedColIds,ue=!!ae?.length&&!o?.has("columnOrder"),le=ue?ae.map(he=>f(he)):Object.values(p);(le.length||h)&&(this.columnStates=le,Nt(this.beans,{state:le,applyOrder:ue,defaultState:m},t))}setColumnPivotState(e,t){const i=this.columnStates;this.columnStates=void 0;const o=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:n,colGroupSvc:r}=s;if(n?.isPivotResultColsPresent()){if(i){const a=[];for(const l of i)n.getPivotResultCol(l.colId)&&a.push(l);Nt(s,{state:a,applyOrder:e},t)}o&&r?.setColumnGroupState(o,t)}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(e)return function Qc(e){const t=[];for(const{groupId:i,open:o}of e)o&&t.push(i);return t.length?{openColumnGroupIds:t}:void 0}(e.getColumnGroupState())}setColumnGroupState(e,t,i){const o=this.beans.colGroupSvc;if(!o||i?.has("columnGroup")||"api"!==t&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const s=new Set(e.columnGroup?.openColumnGroupIds),r=o.getColumnGroupState().map(({groupId:a})=>{const l=s.has(a);return l&&s.delete(a),{groupId:a,open:l}});for(const a of s)r.push({groupId:a,open:!0});r.length&&(this.columnGroupStates=r),o.setColumnGroupState(r,t)}getFilterState(){const e=this.beans.filterManager;let t=e?.getFilterModel();t&&0===Object.keys(t).length&&(t=void 0);const i=e?.getFilterState(),o=e?.getAdvFilterModel()??void 0;return t||o||i?{filterModel:t,columnFilterState:i,advancedFilterModel:o}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:i,columnFilterState:o,advancedFilterModel:s}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(void 0!==i||void 0!==o)&&t?.setFilterState(i??null,o??null,"columnFilter"),void 0!==s&&t?.setAdvFilterModel(s??null,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:i,type:o,startRow:s,endRow:n,columns:r,startColumn:a}=t;return{id:i,type:o,startRow:s,endRow:n,colIds:r.map(l=>l.getColId()),startColId:a.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:i,colModel:o,visibleCols:s}=this.beans;if(!ni(t)||!i)return;const n=[];for(const r of e?.cellRanges??[]){const a=[];for(const d of r.colIds){const c=o.getCol(d);c&&a.push(c)}if(!a.length)continue;let l=o.getCol(r.startColId);if(!l){const d=s.allCols,c=new Set(a);l=d.find(u=>c.has(u))}n.push({...r,columns:a,startColumn:l})}i.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:i}=e?.getVScrollPosition()??{top:0};return i||t?{top:i,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:i}=e??{top:0,left:0},{frameworkOverrides:o,rowRenderer:s,animationFrameSvc:n,ctrlsSvc:r}=this.beans;o.wrapIncoming(()=>{r.get("center").setCenterViewportScrollLeft(i),r.getScrollFeature()?.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),n?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:i,rowPinned:o}=e;return{colId:t.getColId(),rowIndex:i,rowPinned:o}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:i}=this.beans;if(!e)return void t.clearFocusedCell();const{colId:o,rowIndex:s,rowPinned:n}=e;t.setFocusedCell({column:i.getCol(o),rowIndex:s,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const i=e.getCurrentPage(),o=t.get("paginationAutoPageSize")?void 0:e.getPageSize();return i||o?{page:i,pageSize:o}:void 0}setPaginationState(e,t){const{pagination:i,gos:o}=this.beans;if(!i)return;const{pageSize:s,page:n}=e??{page:0,pageSize:o.get("paginationPageSize")},r="gridInitializing"===t;s&&!o.get("paginationAutoPageSize")&&i.setPageSize(s,r?"initialState":"pageSizeSelector"),"number"==typeof n&&(r?i.setPage(n):i.goToPage(n))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return t&&(Array.isArray(t)||!1!==t.selectAll&&!1!==t.selectAllChildren||t?.toggledNodes?.length)?t:void 0}setRowSelectionState(e,t){this.beans.selectionSvc?.setSelectionState(e,t,"api"===t)}getRowGroupExpansionState(){const{expansionSvc:e}=this.beans;if(e)return e.getExpansionState()}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,i){const o=this.beans.expansionSvc;o&&o.setExpansionState(t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]},i)}updateColumnState(e){const t=this.getColumnState();let i=!1;const o=this.cachedState;for(const s of Object.keys(t))Ce(t[s],o[s])||(i=!0);this.cachedState={...o,...t},i&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const i=this.cachedState[e];this.setCachedStateValue(e,t),Ce(t,i)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)"rowSelection"===t&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){this.suppressEvents=!0,this.beans.colAnimation?.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.beans.colAnimation?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}}],apiFunctions:{getState:function a2(e){return e.stateSvc?.getState()??{}},setState:function l2(e,t,i){return e.stateSvc?.setState(t,i)}}},os="paginationPageSizeSelector",x2={tag:"span",cls:"ag-paging-page-size"},F2={selector:"AG-PAGE-SIZE-SELECTOR",component:class extends Re{constructor(){super(x2),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(os,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&this.reloadPageSizesSelector()}reset(){Ue(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&!1!==this.gos.get(os)}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),i=!t||!e.includes(t);if(i){const s=this.gos.exists("paginationPageSize"),n=!0!==this.gos.get(os);I(94,{pageSizeSet:s,pageSizesSet:n,pageSizeOptions:e,paginationPageSizeOption:t}),n||I(95,{paginationPageSizeOption:t,paginationPageSizeSelector:os}),e.unshift("")}const o=String(i?"":t);this.selectPageSizeComp?(bi(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(o,!0)):this.createPageSizeSelectorComp(e,o),this.hasEmptyOption=i}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const i=this.getLocaleTextFunc(),o=i("pageSizeSelectorLabel","Page Size:"),s=i("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Yn).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(s).setLabel(o).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const t=this.gos.get(os);return Array.isArray(t)&&t?.length?[...t].sort((i,o)=>i-o):[20,50,100]}destroy(){this.toggleSelectDisplay(!1),super.destroy()}}},M2={selector:"AG-PAGINATION",component:class extends Wd{constructor(){super(),this.btFirst=V,this.btPrevious=V,this.btNext=V,this.btLast=V,this.lbRecordCount=V,this.lbFirstRowOnPage=V,this.lbLastRowOnPage=V,this.lbCurrent=V,this.lbTotal=V,this.pageSizeComp=V,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:var(--ag-pagination-panel-height);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}")}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[F2]);const{btFirst:t,btPrevious:i,btNext:o,btLast:s}=this;this.activateTabIndex([t,i,o,s]),t.insertAdjacentElement("afterbegin",Ot(e?"last":"first",this.beans)),i.insertAdjacentElement("afterbegin",Ot(e?"next":"previous",this.beans)),o.insertAdjacentElement("afterbegin",Ot(e?"previous":"next",this.beans)),s.insertAdjacentElement("afterbegin",Ot(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(n):function um(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}(this.beans,n),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}]){const{el:t,fn:i}=e;this.addManagedListeners(t,{click:i,keydown:o=>{("Enter"===o.key||" "===o.key)&&(o.preventDefault(),i())}})}(function cm(e,t,i){t.addManagedElementListeners(i,{keydown:o=>{if(!o.defaultPrevented&&"Tab"===o.key){const s=o.shiftKey;Hi(e,i,!1,s)||co(e,s)&&o.preventDefault()}}})})(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):function ly(e,t){if("number"!=typeof e)return"";const i=t(),o=i("thousandSeparator",","),s=i("decimalSeparator",".");return e.toString().replace(".",s).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${o}`)}(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),i=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=0===e,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const o=this.isZeroPagesToDisplay();this.nextButtonDisabled=e===i-1||o,this.lastButtonDisabled=!t||o||e===i-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){(function de(e,t){ke(e,"disabled",t)})(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&0===t}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),i=this.pagination.getMasterRowCount(),o=e?i:null,s=this.pagination.getCurrentPage(),n=this.pagination.getPageSize();let r,a;this.isZeroPagesToDisplay()?r=a=0:(r=n*s+1,a=r+n-1,e&&a>o&&(a=o));const d=!e&&i<r+n-1,c=this.formatNumber(r);let u;this.lbFirstRowOnPage.textContent=c;const h=this.getLocaleTextFunc();u=d?h("pageLastRowUnknown","?"):this.formatNumber(a),this.lbLastRowOnPage.textContent=u;const f=this.formatNumber(t>0?s+1:0);let m,w;if(this.lbCurrent.textContent=f,e)m=this.formatNumber(t),w=this.formatNumber(o);else{const b=h("more","more");m=b,w=b}this.lbTotal.textContent=m,this.lbRecordCount.textContent=w,this.announceAriaStatus(c,u,w,f,m)}announceAriaStatus(e,t,i,o,s){const n=this.getLocaleTextFunc(),r=n("page","Page"),a=n("to","to"),l=n("of","of"),d=`${e} ${a} ${t} ${l} ${i}`,c=`${r} ${o} ${l} ${s}`;d!==this.ariaRowStatus&&(this.ariaRowStatus=d,this.ariaAnnounce?.announceValue(d,"paginationRow")),c!==this.ariaPageStatus&&(this.ariaPageStatus=c,this.ariaAnnounce?.announceValue(c,"paginationPage"))}}},k2={moduleName:"Pagination",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return M2}isPaginateChildRows(){const e=this.gos;return!!(e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren"))||e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||"number"!=typeof t)return;const{editSvc:i}=this.beans;i?.isEditing()&&(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){if(!this.active)return;let t=e;this.paginateChildRows||(t=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(e)??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return!this.active||e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return C(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:C(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:C(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:C(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(void 0===this.pageSizeAutoCalculated)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const i=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,0!==this.currentPage&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,0!==this.currentPage&&this.goToFirstPage()}i!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0)return void this.setZeroRows();const i=this.pageSize,o=t-1;this.totalPages=Math.floor(o/i)+1,this.adjustCurrentPageIfInvalid();const s=this.currentPage;let r=i*(s+1)-1;if(r>o&&(r=o),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(i*s),r===o)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(r+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,0===e)return void this.setZeroRows();const{pageSize:t,currentPage:i}=this,o=e-1;this.totalPages=Math.floor(o/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*i,this.bottomDisplayedRowIndex=t*(i+1)-1,this.bottomDisplayedRowIndex>o&&(this.bottomDisplayedRowIndex=o)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:i=!1,newPageSize:o=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:i,newPageSize:o,keepRenderedRows:t})}},class extends M{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||null==this.centerRowsCtrl}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,i=()=>{const o=Math.max(Ii(t),1),s=Math.floor(e/o);t.pagination.setPageSize(s,"autoCalculated")};this.isBodyRendered?it(this,i,50)():(i(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}}],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:function g2(e){return e.rowModel.isLastRowIndexKnown()},paginationGetPageSize:function p2(e){return e.pagination?.getPageSize()??100},paginationGetCurrentPage:function f2(e){return e.pagination?.getCurrentPage()??0},paginationGetTotalPages:function m2(e){return e.pagination?.getTotalPages()??1},paginationGetRowCount:function C2(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()},paginationGoToNextPage:function v2(e){e.pagination?.goToNextPage()},paginationGoToPreviousPage:function w2(e){e.pagination?.goToPreviousPage()},paginationGoToFirstPage:function b2(e){e.pagination?.goToFirstPage()},paginationGoToLastPage:function S2(e){e.pagination?.goToLastPage()},paginationGoToPage:function y2(e,t){e.pagination?.goToPage(t)}},dependsOn:[nn]},z2={moduleName:"RowApi",version:G,apiFunctions:{redrawRows:function A2(e,t={}){const i=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(i))},setRowNodeExpanded:function Ou(e,t,i,o,s){t&&(o&&t.parent&&-1!==t.parent.level&&Ou(e,t.parent,i,o,s),t.setExpanded(i,void 0,s))},getRowNode:function I2(e,t){return e.rowModel.getRowNode(t)},addRenderedRowListener:function L2(e,t,i,o){e.rowRenderer.addRenderedRowListener(t,i,o)},getRenderedNodes:function O2(e){return e.rowRenderer.getRenderedNodes()},forEachNode:function B2(e,t,i){e.rowModel.forEachNode(t,i)},getFirstDisplayedRowIndex:function H2(e){return e.rowRenderer.firstRenderedRow},getLastDisplayedRowIndex:function G2(e){return e.rowRenderer.lastRenderedRow},getDisplayedRowAtIndex:function V2(e,t){return e.rowModel.getRow(t)},getDisplayedRowCount:function N2(e){return e.rowModel.getRowCount()}}},_2={moduleName:"ScrollApi",version:G,apiFunctions:{getVerticalPixelRange:function e3(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()},getHorizontalPixelRange:function t3(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()},ensureColumnVisible:Cu,ensureIndexVisible:vu,ensureNodeVisible:function i3(e,t,i=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,i),"ensureVisible")}}},Q2={moduleName:"RenderApi",version:G,apiFunctions:{setGridAriaProperty:function W2(e,t,i){if(!t)return;const o=e.ctrlsSvc.getGridBodyCtrl().eGridBody,s=`aria-${t}`;null===i?o.removeAttribute(s):o.setAttribute(s,i)},refreshCells:function U2(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))},refreshHeader:function $2(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})},isAnimationFrameQueueEmpty:function j2(e){return e.animationFrameSvc?.isQueueEmpty()??!0},flushAllAnimationFrames:function K2(e){e.animationFrameSvc?.flushAllFrames()},getSizesForCurrentTheme:function q2(e){return{rowHeight:Ii(e),headerHeight:_o(e)}},getCellRendererInstances:function Y2(e,t={}){const i=[];for(const n of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const r=n.getCellRenderer();null!=r&&i.push(Vo(r))}if(t.columns?.length)return i;const o=[],s=ta(t.rowNodes);for(const n of e.rowRenderer.getAllRowCtrls()){if(s&&!ia(n.rowNode,s)||!n.isFullWidth())continue;const r=n.getFullWidthCellRenderers();for(let a=0;a<r.length;a++){const l=r[a];null!=l&&o.push(Vo(l))}}return[...o,...i]}}};function Bu({colAutosize:e,visibleCols:t},i,o){Array.isArray(i)?e?.autoSizeCols({colKeys:i,skipHeader:o,source:"api"}):e?.autoSizeCols({...i,colKeys:i.colIds??t.allCols,source:"api"})}function ex(e,t,i={}){const o=i.minWidth??e.getMinWidth();t<o&&(t=o);const s=i.maxWidth??e.getMaxWidth();return t>s&&(t=s),t}function Hu({ctrlsSvc:e,scrollVisibleSvc:t}){const i=e.getGridBodyCtrl(),s=i.isVerticalScrollShowing()?t.getScrollbarWidth():0;return wt(i.eGridBody)-s}var tx={moduleName:"ColumnAutoSize",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let i=!1;const o=t.type;if("fitGridWidth"===o||"fitProvidedWidth"===o)i=!0;else if("fitCellContents"===o){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const s=e.get("rowData");i=null!=s&&s.length>0&&je(e)}i&&this.beans.colDelayRenderSvc?.hideColumns(o)}}autoSizeCols(e){const{eventSvc:t,visibleCols:i}=this.beans;this.innerAutoSizeCols(e).then(o=>{const s=d=>to(t,Array.from(d),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return s(o);const n=Hu(this.beans),l=e.colKeys.filter(d=>!(ai(d)||li(d)||(d=>i.leftCols.some(c=>Bo(c,d)))(d)||(d=>i.rightCols.some(c=>Bo(c,d)))(d)));this.sizeColumnsToFit(n,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:e.columnLimits?.map(d=>({...d,key:d.colId})),colKeys:l,onlyScaleUp:!0}),s(o)})}innerAutoSizeCols(e){return new Promise((t,i)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,i));const{colKeys:o,skipHeader:s,skipHeaderGroups:n,stopAtGroup:r,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:d=[],source:c="api"}=e,{animationFrameSvc:u,renderStatus:h,colModel:g,autoWidthCalc:p,visibleCols:f}=this.beans;if(u?.flushAllFrames(),this.timesDelayed<5&&h&&(!h.areHeaderCellsRendered()||!h.areCellsRendered()))return this.timesDelayed++,void setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,i)});this.timesDelayed=0;const m=new Set;let w=-1;const b=Object.fromEntries(d.map(({colId:k,...L})=>[k,L])),R=s??this.gos.get("skipHeaderOnAutoSize"),T=n??R;for(;0!==w;){w=0;const k=[];for(const L of o){if(!L||Vh(L))continue;const H=g.getCol(L);if(!H||m.has(H))continue;const ae=p.getPreferredWidthForColumn(H,R);if(ae>0){const ue=b[H.colId]??{};ue.minWidth??(ue.minWidth=l),ue.maxWidth??(ue.maxWidth=a);const le=ex(H,ae,ue);H.setActualWidth(le,c),m.add(H),w++}k.push(H)}k.length&&f.refresh(c)}T||this.autoSizeColumnGroupsByColumns(o,c,r),t(m)})}autoSizeColumn(e,t,i){this.autoSizeCols({colKeys:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){const{colModel:o,ctrlsSvc:s}=this.beans,n=new Set,r=o.getColsForKeys(e);for(const l of r){let d=l.getParent();for(;d&&d!=i;)d.isPadding()||n.add(d),d=d.getParent()}let a;for(const l of n){for(const d of s.getHeaderRowContainerCtrls())if(a=d.getHeaderCtrlForColumn(l),a)break;a?.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){this.shouldQueueResizeOperations?this.pushResizeOperation(()=>this.autoSizeAllColumns(e)):this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const i=this.gos.get("skipHeaderOnAutoSize"),o=()=>{this.autoSizeColumn(t,"uiColumnResized",i)};e.addEventListener("dblclick",o);const s=new Wi(e);return s.addEventListener("doubleTap",o),()=>{e.removeEventListener("dblclick",o),s.destroy()}}addColumnGroupResize(e,t,i){const o=this.gos.get("skipHeaderOnAutoSize"),s=()=>{const n=[],r=t.getDisplayedLeafColumns();for(const a of r)a.getColDef().suppressAutoSize||n.push(a.getColId());n.length>0&&this.autoSizeCols({colKeys:n,skipHeader:o,stopAtGroup:t,source:"uiColumnResized"}),i()};return e.addEventListener("dblclick",s),()=>e.removeEventListener("dblclick",s)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const i=Hu(this.beans);i>0?this.sizeColumnsToFit(i,"sizeColumnsToFit",!1,e):void 0===t?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):100===t?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):500===t?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):I(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",i,o){if(this.shouldQueueResizeOperations)return void this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,i,o));const s={};for(const{key:p,...f}of o?.columnLimits??[])s["string"==typeof p?p:p.getColId()]=f;const n=this.beans.visibleCols.allCols;if(e<=0||!n.length)return;const r=ri(n);if(o?.onlyScaleUp&&r>e||e===r&&n.every(f=>{if(f.colDef.suppressSizeToFit)return!0;const m=s?.[f.getId()],w=m?.minWidth??o?.defaultMinWidth,b=m?.maxWidth??o?.defaultMaxWidth,R=f.getActualWidth();return(null==w||R>=w)&&(null==b||R<=b)}))return;const l=[],d=[];for(const p of n){const f=o?.colKeys?.some(m=>Bo(p,m))??!0;p.getColDef().suppressSizeToFit||!f?d.push(p):l.push(p)}const c=l.slice(0);let u=!1;const h=p=>{Lt(l,p),d.push(p)};for(const p of l){p.resetActualWidth(t);const f=s?.[p.getId()],m=f?.minWidth??o?.defaultMinWidth,w=f?.maxWidth??o?.defaultMaxWidth,b=p.getActualWidth();"number"==typeof m&&b<m?p.setActualWidth(m,t,!0):"number"==typeof w&&b>w&&p.setActualWidth(w,t,!0)}for(;!u;){u=!0;const p=e-ri(d);if(p<=0)for(const f of l){const m=s?.[f.getId()]?.minWidth??o?.defaultMinWidth??f.minWidth;f.setActualWidth(m,t,!0)}else{const f=p/ri(l);let m=p;for(let w=l.length-1;w>=0;w--){const b=l[w],R=s?.[b.getId()],T=R?.minWidth??o?.defaultMinWidth,k=R?.maxWidth??o?.defaultMaxWidth,L=b.getMinWidth(),H=b.getMaxWidth(),ae="number"==typeof T&&T>L?T:L,ue="number"==typeof k&&k<H?k:H;let le=Math.round(b.getActualWidth()*f);le<ae?(le=ae,h(b),u=!1):le>ue?(le=ue,h(b),u=!1):0===w&&(le=m),b.setActualWidth(le,t,!0),m-=le}}}for(const p of c)p.fireColumnWidthChangedEvent(t);const g=this.beans.visibleCols;g.setLeftValues(t),g.updateBodyWidths(),!i&&to(this.eventSvc,c,!0,t)}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,i=e.get("autoSizeStrategy");"fitGridWidth"!==i?.type&&"fitProvidedWidth"!==i?.type||setTimeout(()=>{if(!this.isAlive())return;const o=i.type;if("fitGridWidth"===o){const{columnLimits:s,defaultMinWidth:n,defaultMaxWidth:r}=i,a=s?.map(({colId:l,minWidth:d,maxWidth:c})=>({key:l,minWidth:d,maxWidth:c}));this.sizeColumnsToFitGridBody({defaultMinWidth:n,defaultMaxWidth:r,columnLimits:a})}else"fitProvidedWidth"===o&&this.sizeColumnsToFit(i.width,"sizeColumnsToFit");t?.revealColumns(o)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{if(!this.isAlive())return;const i="autosizeColumns";e?this.autoSizeCols({...t,source:i,colKeys:e}):this.autoSizeAllColumns({...t,source:i}),this.beans.colDelayRenderSvc?.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}}],apiFunctions:{sizeColumnsToFit:function X2(e,t){"number"==typeof t?e.colAutosize?.sizeColumnsToFit(t,"api"):e.colAutosize?.sizeColumnsToFitGridBody(t)},autoSizeColumns:Bu,autoSizeAllColumns:function Z2(e,t){t&&"object"==typeof t?Bu(e,t):e.colAutosize?.autoSizeAllColumns({source:"api",skipHeader:t})}},dependsOn:[lc]},lx={moduleName:"PinnedRow",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,t=()=>{const i=e.get("enableRowPinning"),o=Za(e),n=!!i||"pinnedBottom"===o||"pinnedTop"===o,r=n?this.inner instanceof Nd:this.inner instanceof Hd;this.inner&&r&&this.destroyBean(this.inner),(r||!this.inner)&&(this.inner=this.createManagedBean(n?new Hd:new Nd))};this.addManagedPropertyListeners(["enableRowPinning","grandTotalRow"],t),t()}reset(){return this.inner.reset()}isEmpty(e){return this.inner.isEmpty(e)}isManual(){return this.inner.isManual()}isRowsToRender(e){return this.inner.isRowsToRender(e)}pinRow(e,t,i){return this.inner.pinRow(e,t,i)}ensureRowHeightsValid(){return this.inner.ensureRowHeightsValid()}getPinnedRowById(e,t){return this.inner.getPinnedRowById(e,t)}getPinnedTopTotalHeight(){return this.inner.getPinnedTopTotalHeight()}getPinnedBottomTotalHeight(){return this.inner.getPinnedBottomTotalHeight()}getPinnedTopRowCount(){return this.inner.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.inner.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.inner.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.inner.getPinnedBottomRow(e)}forEachPinnedRow(e,t){return this.inner.forEachPinnedRow(e,t)}getPinnedState(){return this.inner.getPinnedState()}setPinnedState(e){return this.inner.setPinnedState(e)}setGrandTotalPinned(e){return this.inner.setGrandTotalPinned(e)}getGrandTotalPinned(){return this.inner.getGrandTotalPinned()}}],css:[".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}"],apiFunctions:{getPinnedTopRowCount:function ox(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0},getPinnedBottomRowCount:function sx(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0},getPinnedTopRow:function nx(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)},getPinnedBottomRow:function rx(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)},forEachPinnedRow:function ax(e,t,i){return e.pinnedRowModel?.forEachPinnedRow(t,i)}},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},dx=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column===this.col&&e.rowPinned==this.firstNode.rowPinned&&this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){const e=this.firstNode.__autoHeights?.[this.col.getColId()];if(null==e)return;let t=0;for(const i of this.spannedNodes)i!==this.lastNode&&(t+=i.rowHeight);return e-t}},cx=class extends M{constructor(e){super(),this.column=e}buildCache(e){const{column:t,beans:{gos:i,pinnedRowModel:o,rowModel:s,valueSvc:n,pagination:r}}=this,{colDef:a}=t,l=this.getNodeMap(e),d=new Map,c=i.getCallback("isFullWidthRow"),u=a.equals,h=a.spanRows,g="function"==typeof h;let m,p=null,f=null;const w=(R,T)=>{p=R,f=null,m=T},b=R=>{const T=!(R.isExpandable()||R.group||R.detail||c&&c({rowNode:R}));if(null==R.rowIndex||!T)return void w(null,null);if(null==p||R.level!==p.level||R.footer||f&&R.rowIndex-1!==f?.getLastNode().rowIndex)return void w(R,n.getValue(t,R));const k=n.getValue(t,R);if(g){const L=ee(i,{valueA:m,nodeA:p,valueB:k,nodeB:R,column:t,colDef:a});if(!h(L))return void w(R,k)}else if(u?!u(m,k):m!==k)return void w(R,k);if(!f){const L=l?.get(p);L?.firstNode===p?(L.reset(),f=L):f=new dx(t,p),d.set(p,f)}f.addSpannedNode(R),d.set(R,f)};switch(e){case"center":s.forEachDisplayedNode?.(R=>{(!r||r.isRowInPage(R.rowIndex))&&b(R)}),this.centerValueNodeMap=d;break;case"top":o?.forEachPinnedRow("top",b),this.topValueNodeMap=d;break;case"bottom":o?.forEachPinnedRow("bottom",b),this.bottomValueNodeMap=d}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},hx=class extends fo{constructor(e,t,i){super(e.col,e.firstNode,i,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,i,o,s,n,r){this.eWrapper=i,super.setComp(e,t,i,o,s,n,r),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||null==t.rowIndex||A(e,t.rowIndex)}setAriaRowSpan(){!function re(e,t){z(e,"rowspan",t)}(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(Ns(t))return void(this.focusedCellPosition=void 0);const i=this.isCellFocused();i||(this.focusedCellPosition=void 0),e&&i&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},gx=class extends tn{onRowIndexChanged(){super.onRowIndexChanged();for(const e of this.getAllCellCtrls())e.refreshAriaRowIndex()}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){const t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(t&&t.firstNode===this.rowNode)return new hx(t,this,this.beans)}isCorrectCtrlForSpan(e){const t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!(!t||t.firstNode!==this.rowNode)&&e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},fx={moduleName:"CellSpan",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=it(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=it(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const i=this.createManagedBean(new cx(e));this.spanningColumns.set(e,i),i.buildCache("top"),i.buildCache("bottom"),i.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(null!=this.pinnedTimeout)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t?.createCtrls("top"),t?.createCtrls("bottom")},0)}else null==this.modelTimeout&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t?.createCtrls("center")},0))}buildModelCaches(){null!=this.modelTimeout&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){null!=this.pinnedTimeout&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const i=this.spanningColumns.get(e);return!!i&&i.isCellSpanning(t)}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:i}=this.beans,s=e.rowIndex,n=this.spanningColumns.get(e.column);if(!n)return;let r;switch(e.rowPinned){case"top":r=t?.getPinnedTopRow(s);break;case"bottom":r=t?.getPinnedBottomRow(s);break;default:r=i.getRow(s)}return r?n.getCellSpan(r):void 0}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const i=this.spanningColumns.get(e);if(i)return i.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[i,o]of this.spanningColumns)o.isCellSpanning(e)&&t(i,o.getCellSpan(e))}destroy(){super.destroy(),this.spanningColumns.clear()}},class extends M{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,i=this.getCtrlsMap(e),o=i.size,s=this.getAllRelevantRowControls(e),n=new Map;let r=!1;for(const l of s)l.isAlive()&&t?.forEachSpannedColumn(l.rowNode,(d,c)=>{if(n.has(c.firstNode))return;const u=i.get(c.firstNode);if(u)return n.set(c.firstNode,u),void i.delete(c.firstNode);r=!0;const h=new gx(c.firstNode,this.beans,!1,!1,!1);n.set(c.firstNode,h)});if(this.setCtrlsMap(e,n),r||n.size!==o){for(const l of i.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,i=t?.getCellSpanByPosition(e);if(!i)return;const o=this.getCtrlsMap(e.rowPinned).get(i.firstNode);return o?o.getAllCellCtrls().find(s=>s.column===e.column):void 0}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}}]},mx=class extends M{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,i=e.colDef,o=i.cellClassRules,s=this.getCellClassParams(e,i);Jr(this.beans.expressionSvc,o===this.cellClassRules?void 0:this.cellClassRules,o,s,n=>t.toggleCss(n,!0),n=>t.toggleCss(n,!1)),this.cellClassRules=o}applyUserStyles(){const e=this.column,t=e.colDef,i=t.cellStyle;if(!i)return;let o;o="function"==typeof i?i(this.getCellClassParams(e,t)):i,o&&this.cellComp.setUserStyles(o)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,i=e.colDef,o=this.getCellClassParams(e,i);for(const n of this.staticClasses)t.toggleCss(n,!1);const s=this.beans.cellStyles.getStaticCellClasses(i,o);this.staticClasses=s;for(const n of s)t.toggleCss(n,!0)}getCellClassParams(e,t){const{value:i,rowNode:o}=this.cellCtrl;return ee(this.beans.gos,{value:i,data:o.data,node:o,colDef:t,column:e,rowIndex:o.rowIndex})}},vx={moduleName:"CellStyle",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,i,o){Jr(this.beans.expressionSvc,void 0,e.cellClassRules,t,i,o),this.processStaticCellClasses(e,t,i)}getStaticCellClasses(e,t){const{cellClass:i}=e;if(!i)return[];let o;return o="function"==typeof i?i(t):i,"string"==typeof o&&(o=[o]),o||[]}createCellCustomStyleFeature(e,t){return new mx(e,t)}processStaticCellClasses(e,t,i){this.getStaticCellClasses(e,t).forEach(s=>{i(s)})}}]},wx={moduleName:"RowStyle",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const i=this.gos,o=r=>{if("string"==typeof r)e.push(r);else if(Array.isArray(r))for(const a of r)e.push(a)},s=i.get("rowClass");s&&o(s);const n=i.getCallback("getRowClass");n&&o(n({data:t.data,node:t,rowIndex:t.rowIndex}))}preProcessRowClassRules(e,t){this.processRowClassRules(t,i=>{e.push(i)},()=>{})}processRowClassRules(e,t,i){const{gos:o,expressionSvc:s}=this.beans,n=ee(o,{data:e.data,node:e,rowIndex:e.rowIndex});Jr(s,void 0,o.get("rowClassRules"),n,t,i)}processStylesFromGridOptions(e){const t=this.gos,i=t.get("rowStyle"),o=t.getCallback("getRowStyle");let s;if(o&&(s=o({data:e.data,node:e,rowIndex:e.rowIndex})),s||i)return Object.assign({},i,s)}}]},Sx=class extends M{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=i=>{const{beans:o,gos:s,element:n,columns:r}=this,a=o.colHover;if(i??s.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(n,{mouseover:a.setMouseOver.bind(a,r),mouseout:a.clearMouseOver.bind(a)});else{for(const d of this.destroyManagedListeners)d();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},xx={moduleName:"ColumnHover",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,i){const o=()=>{const s=this.isHovered(i);t.toggleCss("ag-column-hover",s)};e.addManagedEventListeners({columnHoverChanged:o}),o()}onCellColumnHover(e,t){if(!t)return;const i=this.isHovered(e);t.toggleCss("ag-column-hover",i)}addHeaderFilterColumnHoverListener(e,t,i,o){this.createHoverFeature(e,[i],o);const s=()=>{const n=this.isHovered(i);t.toggleCss("ag-column-hover",n)};e.addManagedEventListeners({columnHoverChanged:s}),s()}createHoverFeature(e,t,i){e.createManagedBean(new Sx(t,i))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}}],apiFunctions:{isColumnHovered:function bx(e,t){return!!e.colHover?.isHovered(t)}}},Tx={moduleName:"EventApi",version:G,apiFunctions:{addEventListener:function Fx(e,t,i){e.apiEventSvc?.addListener(t,i)},addGlobalListener:function Dx(e,t){e.apiEventSvc?.addGlobalListener(t)},removeEventListener:function Px(e,t,i){e.apiEventSvc?.removeListener(t,i)},removeGlobalListener:function Mx(e,t){e.apiEventSvc?.removeGlobalListener(t)}},beans:[class extends M{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addListener(e,t){const i=this.wrapSvc?.wrap(e,t)??t,o=!Zs.has(e),s=o?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(i),this.eventSvc.addListener(e,i,o)}removeListener(e,t){const i=this.wrapSvc?.unwrap(e,t)??t,s=!!this.asyncListeners.get(e)?.delete(i);s||this.syncListeners.get(e)?.delete(i),this.eventSvc.removeListener(e,i,s)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,i=(n,r)=>{Zs.has(n)&&t(n,r)},o=(n,r)=>{Zs.has(n)||t(n,r)};this.globalListenerPairs.set(e,{syncListener:i,asyncListener:o});const s=this.eventSvc;s.addGlobalListener(i,!1),s.addGlobalListener(o,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:i,globalListenerPairs:o}=this,s=i?.unwrapGlobal(e)??e;if(o.has(s)){const{syncListener:r,asyncListener:a}=o.get(s);t.removeGlobalListener(r,!1),t.removeGlobalListener(a,!0),o.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((i,o)=>{i.forEach(s=>this.eventSvc.removeListener(o,s,t)),i.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const i of e)this.eventSvc.removeGlobalListener(i,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:i,asyncListener:o})=>{t.removeGlobalListener(i,!1),t.removeGlobalListener(o,!0)}),e.clear()}}]},kx={moduleName:"Locale",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");return t?function eh(e){return(t,i,o)=>e({key:t,defaultValue:i,variableValues:o})}(t):function th(e){return(t,i,o)=>{let s=e?.[t];if(s&&o?.length){let n=0;for(;!(n>=o.length||-1===s.indexOf("${variable}"));)s=s.replace("${variable}",o[n++])}return s??i}}(e.get("localeText"))}}]},Ix={moduleName:"RowAutoHeight",version:G,beans:[class extends M{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=it(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const{visibleCols:e,rowModel:t,rowSpanSvc:i,pinnedRowModel:o}=this.beans,s=e.autoHeightCols;let n=!1;const r=a=>{const l=a.__autoHeights;let d=Ci(this.beans,a).height;for(const c of s){let u=l?.[c.getColId()];const h=i?.getCellSpan(c,a);if(h){if(h.getLastNode()!==a)continue;if(u=i?.getCellSpan(c,a)?.getLastNodeAutoHeight(),!u)return}if(null==u){if(this.colSpanSkipCell(c,a))continue;return}d=Math.max(u,d)}d!==a.rowHeight&&(a.setRowHeight(d),n=!0)};o?.forEachPinnedRow?.("top",r),o?.forEachPinnedRow?.("bottom",r),t.forEachDisplayedNode?.(r),n&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,i){if(e.__autoHeights??(e.__autoHeights={}),null==t)return void delete e.__autoHeights[i.getId()];const o=e.__autoHeights[i.getId()];e.__autoHeights[i.getId()]=t,o!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:i,colViewport:o,visibleCols:s}=this.beans;if(!i.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=s.getLeftColsForRow(t);break;case"right":n=s.getRightColsForRow(t);break;case null:n=o.getColsWithinViewport(t)}return!n.includes(e)}setupCellAutoHeight(e,t,i){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const o=t.parentElement,{rowNode:s,column:n}=e,r=this.beans,a=c=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!i.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:g,borderTopWidth:p}=Ft(o),w=t.offsetHeight+(u+h+g+p);!(c<5)||ve(r)?.contains(t)&&0!=w?this.setRowAutoHeight(s,w,n):window.setTimeout(()=>a(c+1),0)},l=()=>a(0);l();const d=pi(r,t,l);return i.addDestroyFunc(()=>{d(),this.setRowAutoHeight(s,void 0,n)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:i}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(i).filter(s=>s.isAutoHeight())),0!==t.length){if(!i.__autoHeights)return!1;for(const o of t){const s=i.__autoHeights[o.getColId()];if(!s||i.rowHeight<s)return!1}}return!0}}]},Lx={moduleName:"AllCommunity",version:G,dependsOn:[AR,NR,QR,Ry,I3,L3,O3,B3,H3,G3,V3,A3,E1,F1,P1,x1,M1,T1,h2,cR,k2,hc,z2,_2,Q2,tx,av,lx,eR,NS,vx,xx,wx,Tx,WS,r2,pu,kx,Ix,rv,IR,fx]}}}]);