@riab/illumis-components 1.0.15-beta.0 → 1.0.16-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -60,10 +60,10 @@ Your code probably called a grid API method while the grid was in the render sta
|
|
|
60
60
|
To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0).
|
|
61
61
|
To 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:()=>nF("IntegratedChartsModule"),258:()=>nF("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:n,gridId:i,rowModelType:o})=>tF({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:sl[t],gridId:i,gridScoped:n,rowModelType:o}),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 ${$a}/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:()=>Xx(),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.";break}return t},275:eF,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.`,293:()=>"The grid was initialised detached from the DOM and was then inserted into a Shadow Root. Theme styles are probably broken. Pass the themeStyleContainer grid option to let the grid know where in the document to insert theme CSS.",294:()=>"When using the `agRichSelectCellEditor` setting `filterListAsync = true` requires `allowTyping = true` and the `values()` callback must return a Promise of filtered values.",295:({blockedService:e})=>`colDef.allowFormula is not supported with ${e}. Formulas has been turned off.`,296:()=>"Since v35, `api.hideOverlay()` does not hide the overlay when `activeOverlay` is set. Set `activeOverlay=null` instead.",297:()=>'`api.hideOverlay()` does not hide the no matching rows overlay as it is only controlled by grid state. Set `suppressOverlays=["noMatchingRows"] to not show it.',298:()=>"Columns Tool Panel 'buttons' requires 'apply' to enable Deferred Updates."};function EW(e,t){const n=PW[e];if(!n)return[`Missing error text for error id ${e}!`];const i=n(t),r=`
|
|
62
62
|
See ${d0(e,t)}`;return Array.isArray(i)?i.concat(r):[i,r]}var DW={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},iF=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${e0}/${this.frameworkName}-data-grid`,lO(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?"/"+e:"")}},oF=new WeakMap,rF=new WeakMap;function TW(e,t,n){if(!t)return mt(11),{};const i=n;let o;if(!i?.setThemeOnGridDiv){const s=un({tag:"div"});s.style.height="100%",e.appendChild(s),e=s,o=()=>e.remove()}return new IW().create(e,t,s=>{const a=new zN(e);s.createBean(a)},void 0,n,o)}var AW=1,IW=class{create(e,t,n,i,o,r){const s=Dp.applyGlobalGridOptions(t),a=s.gridId??String(AW++),l=this.getRegisteredModules(o,a,s.rowModelType),u=this.createBeansList(s.rowModelType,l,a),h=this.createProvidedBeans(e,s,o);if(!u)return;const g={providedBeanInstances:h,beanClasses:u,id:a,beanInitComparator:g2,beanDestroyComparator:p2,derivedBeans:[h2],destroyCallback:()=>{rF.delete(v),oF.delete(e),nO(a),r?.()}},m=new d2(g);this.registerModuleFeatures(m,l),n(m),m.getBean("syncSvc").start(),i?.(m);const v=m.getBean("gridApi");return oF.set(e,v),rF.set(v,e),v}getRegisteredModules(e,t,n){return Ua(CW,void 0,!0),e?.modules?.forEach(i=>Ua(i,t)),iO(t,sF(n))}registerModuleFeatures(e,t){const n=e.getBean("registry"),i=e.getBean("apiFunctionSvc");for(const o of t){n.registerModule(o);const r=o.apiFunctions;if(r){const s=Object.keys(r);for(const a of s)i?.addFunction(a,r[a])}}}createProvidedBeans(e,t,n){let i=n?n.frameworkOverrides:null;Wt(i)&&(i=new iF);const o={gridOptions:t,eGridDiv:e,eRootDiv:e,globalListener:n?n.globalListener:null,globalSyncListener:n?n.globalSyncListener:null,frameworkOverrides:i,withinStudio:n?.withinStudio};return n?.providedBeanInstances&&Object.assign(o,n.providedBeanInstances),o}createBeansList(e,t,n){const i={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},o=sF(e),r=i[o];if(!r){Sc(201,{rowModelType:o},`Unknown rowModelType ${o}.`);return}if(!rO()){Sc(272,void 0,Xx());return}if(!e){const a=Object.entries(i).filter(([l,u])=>Tp(u,n,l));if(a.length==1){const[l,u]=a[0];if(l!==o){const h={moduleName:u,rowModelType:l};Sc(275,h,eF(h));return}}}if(!Tp(r,n,o)){const a=r0(),l=`rowModelType = '${o}'`,u=`Missing module ${r}Module for rowModelType ${o}.`;Sc(200,{reasonOrId:l,moduleName:r,gridScoped:Ap(),gridId:n,rowModelType:o,isUmd:a},u);return}const s=new Set;for(const a of t)for(const l of a.beans??[])s.add(l);return Array.from(s)}};function sF(e){return e??"clientSide"}function MW(e,t=!1){const n=[],i=[],o=[],r=[],s=[],a=[],l=[],u=[],h=[];let f=0;for(let g=0;g<e.length;g++){const{colId:m,sort:v,sortType:w,sortIndex:b,rowGroup:y,rowGroupIndex:R,aggFunc:S,pivot:P,pivotIndex:F,pinned:A,hide:k,width:L,flex:N}=e[g];h.push(m),v&&(n[b??f++]={colId:m,sort:v,type:w}),y&&(i[R??0]=m),typeof S=="string"&&o.push({colId:m,aggFunc:S}),P&&(r[F??0]=m),A&&(A==="right"?a:s).push(m),k&&l.push(m),(N!=null||L)&&u.push({colId:m,flex:N??void 0,width:L===null?void 0:L})}return{sort:n.length?{sortModel:sv(n)}:void 0,rowGroup:i.length?{groupColIds:sv(i)}:void 0,aggregation:o.length?{aggregationModel:o}:void 0,pivot:r.length||t?{pivotMode:t,pivotColIds:sv(r)}:void 0,columnPinning:s.length||a.length?{leftColIds:s,rightColIds:a}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:u.length?{columnSizingModel:u}:void 0,columnOrder:h.length?{orderedColIds:h}:void 0}}function sv(e){return e.filter(t=>t!=null)}function kW(e){const t=[];for(const{groupId:n,open:i}of e)i&&t.push(n);return t.length?{openColumnGroupIds:t}:void 0}var LW=class extends J{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(i=>{if(!i){mt(18),t||mt(20);return}if(this.isGridApi(i))return i;const o=i;return"current"in o?o.current?.api:(o.api||mt(19),o.api)}).filter(i=>!!i&&!i.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){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const n=[];return e.columns?e.columns.forEach(i=>{n.push(t(i))}):e.column&&n.push(t(e.column)),n}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":le(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;if(t)for(const n of e.columnGroups){let i=null;n&&(i=t.getProvidedColGroup(n.getGroupId())),!(n&&!i)&&t.setColumnGroupOpened(i,n.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){const t=e.column;let n=null;const i=this.beans,{colResize:o,ctrlsSvc:r,colModel:s}=i;if(t&&(n=s.getColDefCol(t.getColId())),t&&!n)return;const a=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const f=e.api.getColumnState().map(g=>({colId:g.colId}));oo(i,{state:f,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const f=e.api.getColumnState().map(g=>({colId:g.colId,hide:g.hide}));oo(i,{state:f},"alignedGridChanged")}break;case"columnPinned":{const f=e.api.getColumnState().map(g=>({colId:g.colId,pinned:g.pinned}));oo(i,{state:f},"alignedGridChanged")}break;case"columnResized":{const h=e,f={};for(const g of a)f[g.getId()]={key:g.getColId(),newWidth:g.getActualWidth()};for(const g of h.flexColumns??[])f[g.getId()]&&delete f[g.getId()];o?.setColumnWidths(Object.values(f),!1,h.finished,"alignedGridChanged");break}}const u=r.getGridBodyCtrl().isVerticalScrollShowing();for(const h of this.getAlignedGridApis())h.setGridOption("alwaysShowVerticalScroll",u)}},OW={moduleName:"AlignedGrids",version:Se,beans:[LW],dependsOn:[dx]};function _W(e,t={}){const n=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(n))}function aF(e,t,n,i,o){t&&(i&&t.parent&&t.parent.level!==-1&&aF(e,t.parent,n,i,o),t.setExpanded(n,void 0,o))}function NW(e,t){return e.rowModel.getRowNode(t)}function BW(e,t,n,i){e.rowRenderer.addRenderedRowListener(t,n,i)}function HW(e){return e.rowRenderer.getRenderedNodes()}function GW(e,t,n){e.rowModel.forEachNode(t,n)}function VW(e){return e.rowRenderer.firstRenderedRow}function WW(e){return e.rowRenderer.lastRenderedRow}function zW(e,t){return e.rowModel.getRow(t)}function UW(e){return e.rowModel.getRowCount()}function $W(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function jW(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function lF(e,t,n="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,n),"ensureVisible")}function cF(e,t,n){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,n),"ensureVisible")}function KW(e,t,n=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,n),"ensureVisible")}var uF={moduleName:"RowApi",version:Se,apiFunctions:{redrawRows:_W,setRowNodeExpanded:aF,getRowNode:NW,addRenderedRowListener:BW,getRenderedNodes:HW,forEachNode:GW,getFirstDisplayedRowIndex:VW,getLastDisplayedRowIndex:WW,getDisplayedRowAtIndex:zW,getDisplayedRowCount:UW}},qW={moduleName:"ScrollApi",version:Se,apiFunctions:{getVerticalPixelRange:$W,getHorizontalPixelRange:jW,ensureColumnVisible:lF,ensureIndexVisible:cF,ensureNodeVisible:KW}};function QW(e){e.expansionSvc?.expandAll(!0)}function YW(e){e.expansionSvc?.expandAll(!1)}function dF(e){e.rowModel?.onRowHeightChanged()}function hF(e){if(e.rowAutoHeight?.active){le(3);return}e.rowModel?.resetRowHeights()}function ZW(e){e.expansionSvc?.resetExpansion()}function JW(e,t,n){const i=Q_(e);if(i){if(e.rowGroupColsSvc?.columns.length===0){if(t<0){mt(238);return}i.setRowCount(t,n);return}mt(28);return}Xd(e)?.setRowCount(t,n)}function XW(e){return Rc(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}}function e4(e){return e.rowModel.isLastRowIndexKnown()}var t4={moduleName:"CsrmSsrmSharedApi",version:Se,apiFunctions:{expandAll:QW,collapseAll:YW,resetRowGroupExpansion:ZW}},n4={moduleName:"RowModelSharedApi",version:Se,apiFunctions:{onRowHeightChanged:dF,resetRowHeights:hF}},i4={moduleName:"SsrmInfiniteSharedApi",version:Se,apiFunctions:{setRowCount:JW,getCacheBlockState:XW,isLastRowIndexKnown:e4}},fF=(e,t)=>{for(let n=0,i=e.length;n<i;++n){const o=e[n],r=o.childrenAfterGroup;r!==null&&(fF(r,t),t(o))}},ia=(e,t,n,i)=>{if(n!=null){const r=n.getSortedRows();for(let s=0,a=r.length;s<a;++s){const l=r[s];l.childrenAfterGroup!==null&&!l.destroyed&&i(l)}return}if(e==null)return;const o=e.childrenAfterGroup;o!==null&&(t&&fF(o,i),i(e))},o4=class extends J{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},gF(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){this.dispatchRowDataUpdateStarted(e),this.destroyAllNodes();const t=gF(this.rootNode),n=new Array(e.length);t._leafs=n;let i=0;const o=this.beans.groupStage?.getNestedDataGetter(),r=o?new Set:null,s=(a,l)=>{const u=a.level+1;for(let h=0,f=l.length;h<f;++h){const g=l[h];if(!g)continue;const m=this.createRowNode(g,u,i);if(n[i++]=m,r&&!r.has(g)){r.add(g),m.treeParent=a;const v=o(g);v&&s(m,v)}}};s(t,e),n.length=i}destroyAllNodes(){const{selectionSvc:e,pinnedRowModel:t,groupStage:n}=this.beans;e?.reset("rowDataChanged"),t?.isManual()&&t.reset(),n?.clearNonLeafs();const i=this.rootNode._leafs;if(i)for(let o=0,r=i.length;o<r;++o)i[o]._destroy(!1);this.allNodesMap=Object.create(null),this.nextId=0}setImmutableRowData(e,t){const{rootNode:n,gos:i}=this;this.dispatchRowDataUpdateStarted(t);const o=Ka(i),r=e.changedRowNodes,{adds:s,updates:a}=r,l=new Set,u=[],h=this.beans.groupStage?.getNestedDataGetter();let f=i.get("suppressMaintainUnsortedOrder")?void 0:!1,g=-1,m=!1;const v=(y,R)=>{if(!f&&f!==void 0){const S=y.sourceRowIndex;f=S<=g,g=S}y.data!==R&&(y.updateData(R),s.has(y)||a.add(y),!y.selectable&&y.isSelected()&&u.push(y))},w=(y,R,S)=>{for(let P=0,F=R.length;P<F;++P){const A=R[P];if(!A)continue;let k=this.getRowNode(o({data:A,level:S}));if(k?(v(k,A),m||(m=!!h&&k.treeParent!==y)):(k=this.createRowNode(A,S),s.add(k)),!h||l.has(k)){l.add(k);continue}l.add(k),k.treeParent=y;const L=h(A);L&&w(k,L,S+1)}};w(n,t,0);const b=this.deleteUnusedNodes(l,r,u,!!e.animate)||f||s.size>0;if(b){const y=n._leafs??(n._leafs=[]);f===void 0?c4(y,l,r):l4(y,l)&&(r.reordered=!0)}(b||m||a.size)&&(e.rowDataUpdated=!0,this.deselect(u))}deleteUnusedNodes(e,{removals:t},n,i){const o=this.rootNode._leafs;for(let r=0,s=o.length;r<s;r++){const a=o[r];e.has(a)||this.destroyNode(a,i)&&(t.push(a),a.isSelected()&&n.push(a))}return t.length>0}updateRowData(e,t,n){if(this.dispatchRowDataUpdateStarted(e.add),this.beans.groupStage?.getNestedDataGetter())return le(268),{remove:[],update:[],add:[]};const i=[],o=Ka(this.gos),r=this.executeRemove(o,e,t,i,n),s=this.executeUpdate(o,e,t,i),a=this.executeAdd(e,t);return this.deselect(i),{remove:r,update:s,add:a}}executeRemove(e,{remove:t},{adds:n,updates:i,removals:o},r,s){const a=this.rootNode._leafs,l=a?.length,u=t?.length;if(!u||!l)return[];let h=0,f=l,g=0;const m=new Array(u);for(let v=0;v<u;++v){const w=this.lookupNode(e,t[v]);if(!w)continue;const b=w.sourceRowIndex;b<f&&(f=b),b>g&&(g=b),m[h++]=w,this.destroyNode(w,s)&&(w.isSelected()&&r.push(w),n.delete(w)||(i.delete(w),o.push(w)))}return m.length=h,h&&a4(a,f,g),m}executeUpdate(e,{update:t},{adds:n,updates:i},o){const r=t?.length;if(!r)return[];const s=new Array(r);let a=0;for(let l=0;l<r;l++){const u=t[l],h=this.lookupNode(e,u);h&&(h.updateData(u),!h.selectable&&h.isSelected()&&o.push(h),s[a++]=h,n.has(h)||i.add(h))}return s.length=a,s}executeAdd(e,t){var n;const i=(n=this.rootNode)._leafs??(n._leafs=[]),o=i.length,r=e.add,s=r?.length;if(!s)return[];const a=o+s;let l=this.sanitizeAddIndex(i,e.addIndex);if(l<o){for(let f=o-1,g=a-1;f>=l;--f){const m=i[f];m.sourceRowIndex=g,i[g--]=m}t.reordered=!0}i.length=a;const u=new Array(s),h=t.adds;for(let f=0;f<s;f++){const g=this.createRowNode(r[f],0,l);h.add(g),i[l]=g,u[f]=g,l++}return u}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselect(e){const t="rowDataChanged",n=this.beans.selectionSvc;e.length&&n?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),n?.updateGroupsFromChildrenSelections?.(t),e.length&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:n?.getSelectedNodes()??null,serverSideState:null})}createRowNode(e,t,n){const i=new jr(this.beans);i.parent=this.rootNode,i.level=t,i.group=!1,n!=null&&(i.sourceRowIndex=n),i.setDataAndId(e,String(this.nextId++));const o=i.id,r=this.allNodesMap;return r[o]&&le(2,{nodeId:o}),r[o]=i,i}destroyNode(e,t){if(!e._destroy(t))return!1;const n=e.id,i=this.allNodesMap;return i[n]===e&&delete i[n],!0}lookupNode(e,t){if(!e)return s4(this.rootNode._leafs,t);const n=e({data:t,level:0}),i=this.allNodesMap[n];return i||(mt(4,{id:n}),null)}sanitizeAddIndex(e,t){const n=e.length;if(typeof t!="number"||t<0||t>=n||Number.isNaN(t))return n;t=Math.ceil(t);const i=this.gos;return t>0&&i.get("treeData")&&i.get("getDataPath")&&(t=r4(e,t)),t}},r4=(e,t)=>{for(let n=0,i=e.length;n<i;n++)if(e[n]?.rowIndex==t-1)return n+1;return t},gF=e=>{e.group=!0,e.level=-1,e._expanded=!0,e.id="ROOT_NODE_ID",e._leafs?.length!==0&&(e._leafs=[]);const t=[],n=[],i=[],o=[];e.childrenAfterGroup=t,e.childrenAfterSort=n,e.childrenAfterAggFilter=i,e.childrenAfterFilter=o;const r=e.sibling;return r&&(r.childrenAfterGroup=t,r.childrenAfterSort=n,r.childrenAfterAggFilter=i,r.childrenAfterFilter=o,r.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},s4=(e,t)=>{if(e)for(let n=0,i=e.length;n<i;n++){const o=e[n];if(o.data===t)return o}return mt(5,{data:t}),null},a4=(e,t,n)=>{t=Math.max(0,t);for(let i=t,o=e.length;i<o;++i){const r=e[i];i<=n&&r.destroyed||(r.sourceRowIndex=t,e[t++]=r)}e.length=t},l4=(e,t)=>{const n=t.size;e.length=n;let i=0,o=!1,r=!1;for(const s of t){const a=s.sourceRowIndex;a===i?r||(r=o):(a>=0?r=!0:o=!0,s.sourceRowIndex=i,e[i]=s),++i}return r},c4=(e,t,{adds:n})=>{const i=e.length,o=t.size;o>i&&(e.length=o);let r=0;for(let s=0;s<i;++s){const a=e[s];a.destroyed||(r!==s&&(a.sourceRowIndex=r,e[r]=a),++r)}for(const s of n)s.sourceRowIndex<0&&(s.sourceRowIndex=r,e[r++]=s);e.length=r};function av(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var u4=class extends J{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=["excludeChildrenWhenTreeDataFiltering"]}wireBeans(e){this.filterManager=e.filterManager}execute(e){const t=!!this.filterManager?.isChildFilterPresent();this.beans.formula?.active?this.softFilter(t,e):this.filterNodes(t,e)}filterNodes(e,t){const n=(i,o)=>{i.hasChildren()&&e&&!o?i.childrenAfterFilter=i.childrenAfterGroup.filter(r=>{const s=r.childrenAfterFilter&&r.childrenAfterFilter.length>0,a=r.data&&this.filterManager.doesRowPassFilter({rowNode:r});return s||a}):i.childrenAfterFilter=i.childrenAfterGroup,av(i)};if(this.doingTreeDataFiltering()){const i=(o,r)=>{if(o.childrenAfterGroup)for(let s=0;s<o.childrenAfterGroup.length;s++){const a=o.childrenAfterGroup[s],l=r||this.filterManager.doesRowPassFilter({rowNode:a});a.childrenAfterGroup?i(o.childrenAfterGroup[s],l):n(a,l)}n(o,r)};i(this.beans.rowModel.rootNode,!1)}else{const i=o=>n(o,!1);ia(this.beans.rowModel.rootNode,this.beans.rowModel.hierarchical,t,i)}}softFilter(e,t){const n=o=>{if(o.childrenAfterFilter=o.childrenAfterGroup,o.hasChildren())for(const r of o.childrenAfterGroup)r.softFiltered=e&&!(r.data&&this.filterManager.doesRowPassFilter({rowNode:r}));av(o)},i=this.beans.rowModel;ia(i.rootNode,i.hierarchical,t,n)}doingTreeDataFiltering(){const{gos:e}=this;return!!this.beans.groupStage?.treeData&&!e.get("excludeChildrenWhenTreeDataFiltering")}},d4=4,h4=(e,t,n,i,o)=>{const r=t.childrenAfterSort,s=t.childrenAfterAggFilter;if(!s)return r&&r.length>0?r:[];const a=s.length;if(a<=1)return r?.length===a&&(a===0||r[0]===s[0])?r:s.slice();if(!r||a<=d4)return e.doFullSortInPlace(s.slice(),o);const l=new Map,{updates:u,adds:h}=n,f=[];for(let m=0;m<a;++m){const v=s[m];u.has(v)||h.has(v)||i?.hasRow(v)?(l.set(v,~m),f.push(v)):l.set(v,m)}const g=f.length;return g===0?a===r.length?r:g4(r,l,f):(f.sort((m,v)=>e.compareRowNodes(o,m,v)||~l.get(m)-~l.get(v)),g===a?f:f4(e,o,f,r,l,a))},f4=(e,t,n,i,o,r)=>{const s=new Array(r);let a=0,l=n[a],u,h=-1,f=0,g=0;const m=n.length,v=i.length;for(;;){if(h<0){if(f>=v)break;if(u=i[f++],h=o.get(u)??-1,h<0)continue}if((e.compareRowNodes(t,l,u)||~o.get(l)-h)<0){if(s[g++]=l,++a>=m)break;l=n[a]}else s[g++]=u,h=-1}for(;a<m;)s[g++]=n[a++];if(h<0)return s;for(s[g++]=u;f<v;){const w=i[f++];o.get(w)>=0&&(s[g++]=w)}return s},g4=(e,t,n)=>{let i=0;n.length=t.size;for(let o=0,r=e.length;o<r;++o){const s=e[o];t.has(s)&&(n[i++]=s)}return n.length=i,n},pF=e=>{const t=e.childrenAfterSort,n=e.sibling;if(n&&(n.childrenAfterSort=t),!!t)for(let i=0,o=t.length-1;i<=o;i++){const r=t[i],s=i===0,a=i===o;r.firstChild!==s&&(r.firstChild=s,r.dispatchRowEvent("firstChildChanged")),r.lastChild!==a&&(r.lastChild=a,r.dispatchRowEvent("lastChildChanged")),r.childIndex!==i&&(r.childIndex=i,r.dispatchRowEvent("childIndexChanged"))}},p4=class extends J{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e,t){const n=this.beans.sortSvc.getSortOptions(),i=n.length>0&&!!t&&this.gos.get("deltaSort"),{gos:o,colModel:r,rowGroupColsSvc:s,rowNodeSorter:a,rowRenderer:l,showRowGroupCols:u}=this.beans,h=o.get("groupMaintainOrder"),f=r.getCols().some(R=>R.isRowGroupActive()),g=s?.columns,m=r.isPivotMode(),v=o.getCallback("postSortRows");let w=!1,b;const y=R=>{const S=m&&R.leafGroup;let P=h&&f&&!R.leafGroup;P&&(b??(b=this.shouldSortContainsGroupCols(n)),P&&(P=!b));let F=null;if(P){let A=!1;if(g){const k=R.level+1;k<g.length&&(A=g[k].wasSortExplicitlyRemoved)}A||(F=m4(R))}else!n.length||S||(i&&t?F=h4(a,R,t,e,n):F=a.doFullSortInPlace(R.childrenAfterAggFilter.slice(),n));if(F||(F=R.childrenAfterAggFilter?.slice()??[]),w||(w=R.childrenAfterSort?.[0]!==F[0]),R.childrenAfterSort=F,pF(R),v){const A={nodes:R.childrenAfterSort};v(A)}};if(ia(this.beans.rowModel.rootNode,this.beans.rowModel.hierarchical,e,y),w&&o.get("groupHideOpenParents")){const R=u?.columns;R?.length&&l.refreshCells({columns:R,force:!0})}}shouldSortContainsGroupCols(e){const t=e.length;if(!t)return!1;if(or(this.gos)){for(let n=0;n<t;++n){const i=e[n].column;if(i.isPrimary()&&i.isRowGroupActive())return!0}return!1}for(let n=0;n<t;++n)if(e[n].column.getColDef().showRowGroup)return!0;return!1}},m4=e=>{const t=e.childrenAfterSort,n=e.childrenAfterAggFilter,i=t?.length,o=n?.length;if(!i||!o)return null;const r=new Array(o),s=new Set;for(let l=0;l<o;++l)s.add(n[l]);let a=0;for(let l=0;l<i;++l){const u=t[l];s.delete(u)&&(r[a++]=u)}if(s.size===0&&a===i)return t;for(const l of s)r[a++]=l;return r.length=a,r},v4=class extends J{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.hierarchical=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.formulaRows=[],this.stages=null,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingData=!1,this.rowDataUpdatedPending=!1,this.refreshingModel=!1,this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1,this.rowNodesCountReady=!1,this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=gn(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const e=this.beans,t=new jr(e);this.rootNode=t,this.nodeManager=this.createBean(new o4(t));const n=()=>{this.beans.groupStage?.invalidateGroupCols(),this.refreshModel({step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")})};this.addManagedEventListeners({newColumnsLoaded:n,columnRowGroupChanged:n,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:()=>this.refreshModel({step:"pivot"}),columnPivotModeChanged:()=>this.refreshModel({step:"group"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),stylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:e,stagesRefreshProps:t}=this,n=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(i=>!!i);this.stages=n;for(let i=n.length-1;i>=0;--i){const o=n[i];for(const r of o.refreshProps)t.set(r,i)}this.addManagedPropertyListeners([...t.keys(),"rowData"],i=>{const o=i.changeSet?.properties;o&&this.onPropChange(o)}),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,n,i){let o,r=!1;do{o=!1;const s=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(s,n),u=Math.min(a,i);for(let h=l;h<=u;h++){const f=this.getRow(h);if(f.rowHeightEstimated){const g=Gr(this.beans,f);f.setRowHeight(g.height),o=!0,r=!0}}o&&this.setRowTopAndRowIndex()}while(o);return r}onPropChange(e){const{nodeManager:t,gos:n,beans:i}=this,o=i.groupStage;if(!t)return;const r=new Set(e),s=o?.onPropChange(r);let a;r.has("rowData")?a=n.get("rowData"):s&&(a=o?.extractData()),a&&!Array.isArray(a)&&(a=null,le(1));const l={step:"nothing",changedProps:r};if(a){const h=!s&&!this.isEmpty()&&a.length>0&&n.exists("getRowId")&&!n.get("resetRowDataOnUpdate");this.refreshingData=!0,h?(l.keepRenderedRows=!0,l.animate=!n.get("suppressAnimationFrame"),l.changedRowNodes=new dh,t.setImmutableRowData(l,a)):(l.rowDataUpdated=!0,l.newData=!0,t.setNewRowData(a),this.rowNodesCountReady=!0)}const u=l.rowDataUpdated?"group":this.getRefreshedStage(e);u&&(l.step=u,this.refreshModel(l))}getRefreshedStage(e){const{stages:t,stagesRefreshProps:n}=this;if(!t)return null;const i=t.length;let o=i;for(let r=0,s=e.length;r<s&&o;++r)o=Math.min(o,n.get(e[r])??o);return o<i?t[o].step:null}setRowTopAndRowIndex(e){const{beans:t,rowsToDisplay:n}=this,i=t.environment.getDefaultRowHeight();let o=0;const r=Fn(this.gos,"normal");for(let s=0,a=n.length;s<a;++s){const l=n[s],u=l.id;if(u!=null&&e?.add(u),l.rowHeight==null){const h=Gr(t,l,r,i);l.setRowHeight(h.height,h.estimated)}l.setRowTop(o),l.setRowIndex(s),o+=l.rowHeight}if(this.beans.formula?.active){const s=this.formulaRows;for(let a=0,l=s.length;a<l;++a){const u=s[a];u.formulaRowIndex=a}}}clearRowTopAndRowIndex(e,t){const n=r=>{r?.id!=null&&!t.has(r.id)&&r.clearRowTopAndRowIndex()},i=r=>{n(r),n(r.detailNode),n(r.sibling);const s=r.childrenAfterGroup;if(!(!r.hasChildren()||!s)&&!(e&&r.level!==-1&&!r.expanded))for(let a=0,l=s.length;a<l;++a)i(s[a])},o=this.rootNode;o&&i(o)}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 i=e.sibling?.displayed?1:0;return(e.childrenAfterSort?.length??0)+i}getTopLevelRowDisplayedIndex(e){const{beans:t,rootNode:n,rowsToDisplay:i}=this;if(!n||!i.length||i[0]===n)return e;const r=n.childrenAfterSort,s=l=>{let u=r[l];if(this.gos.get("groupHideOpenParents"))for(;u.expanded&&u.childrenAfterSort&&u.childrenAfterSort.length>0;)u=u.childrenAfterSort[0];return u.rowIndex},a=t.footerSvc;return a?a?.getTopDisplayIndex(i,e,r,s):s(e)}getTopLevelIndexFromDisplayedIndex(e){const{rootNode:t,rowsToDisplay:n}=this;if(!t||!n.length||n[0]===t)return e;let o=this.getRow(e);o.footer&&(o=o.sibling);let r=o.parent;for(;r&&r!==t;)o=r,r=o.parent;const s=t.childrenAfterSort?.indexOf(o)??-1;return s>=0?s: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:ja(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){const i=t.length===0||t.some(o=>o.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:i,keepRenderedRows:!0,animate:ja(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:ja(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:n,rowDataUpdated:i}=e;return!(!t||n||!i||t.removals.length||t.adds.size)}reMapRows(){if(this.refreshingModel||this.refreshingData){this.noKeepRenderedRows=!0,this.noKeepUndoRedoStack=!0,this.noAnimate=!0;return}this.refreshModel({step:"map",keepRenderedRows:!1,keepUndoRedoStack:!1,animate:!1})}refreshModel(e){const{nodeManager:t,eventSvc:n,started:i}=this;if(!t)return;const o=!!e.rowDataUpdated;if(i&&o&&n.dispatchEvent({type:"rowDataUpdated"}),this.deferRefresh(e)){this.setPendingRefreshFlags(e),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=o);return}this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.updateRefreshParams(e);let r=!1;this.refreshingModel=!0;try{this.executeRefresh(e,o),r=!0}finally{this.refreshingData=!1,this.refreshingModel=!1,r||this.setPendingRefreshFlags(e)}this.clearPendingRefreshFlags(),n.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}executeRefresh(e,t){const{beans:n,rootNode:i}=this;n.masterDetailSvc?.refreshModel(e),t&&e.step!=="group"&&n.colFilter?.refreshModel();let o=e.changedPath;switch(o?.addRow(i),e.step==="group"&&(this.doGrouping(i,e),o??(o=e.changedPath)),o??(o=n.changedPathFactory?.ensureRowsPath(e,i)),e.step){case"group":case"filter":this.doFilter(o);case"pivot":this.doPivot(o)&&(o=void 0,e.changedPath=void 0);case"aggregate":this.doAggregate(o);case"filter_aggregates":this.doFilterAggregates(o);case"sort":this.doSort(o,e.changedRowNodes);case"map":this.doRowsToDisplay()}const r=new Set;this.setRowTopAndRowIndex(r),this.clearRowTopAndRowIndex(o,r),this.updateRefreshParams(e)}deferRefresh(e){return this.refreshingModel||this.beans.colModel.changeEventsDispatching?!0:this.isSuppressModelUpdateAfterUpdateTransaction(e)?(this.started&&(this.refreshingData=!1),!0):!this.started}setPendingRefreshFlags(e){this.pendingNewData||(this.pendingNewData=!!e.newData),this.noKeepRenderedRows||(this.noKeepRenderedRows=!e.keepRenderedRows),this.noKeepUndoRedoStack||(this.noKeepUndoRedoStack=!e.keepUndoRedoStack),this.noAnimate||(this.noAnimate=!e.animate)}clearPendingRefreshFlags(){this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1}updateRefreshParams(e){e.newData=this.pendingNewData||!!e.newData,e.keepRenderedRows=!this.noKeepRenderedRows&&!!e.keepRenderedRows,e.keepUndoRedoStack=!this.noKeepUndoRedoStack&&!!e.keepUndoRedoStack,e.animate=!this.noAnimate&&!!e.animate}isEmpty(){return!this.rootNode?._leafs?.length||!this.beans.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getOverlayType(){const{beans:e,gos:t}=this;if(this.rootNode?._leafs?.length){if(e.filterManager?.isAnyFilterPresent()&&this.getRowCount()===0)return"noMatchingRows"}else if(this.rowCountReady||(t.get("rowData")?.length??0)==0)return"noRows";return null}getNodesInRangeForSelection(e,t){let n=!1,i=!1;const o=[],r=Fc(this.gos);return this.forEachNodeAfterFilterAndSort(s=>{if(i)return;if(n&&(s===t||s===e)&&(i=!0,r&&s.group)){mF(o,s);return}if(!n){if(s!==t&&s!==e)return;n=!0,t===e&&(i=!0)}(!s.group||!r)&&o.push(s)}),o}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToDisplay[e]}getFormulaRow(e){return this.formulaRows[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay,n=t.length;if(this.isEmpty()||n===0)return-1;let i=0,o=n-1;if(e<=0)return 0;if(t[o].rowTop<=e)return o;let s=-1,a=-1;for(;;){const l=Math.floor((i+o)/2),u=t[l];if(this.isRowInPixel(u,e)||(u.rowTop<e?i=l+1:u.rowTop>e&&(o=l-1),s===i&&a===o))return l;s=i,a=o}}isRowInPixel(e,t){const n=e.rowTop,i=n+e.rowHeight;return n<=t&&i>t}forEachLeafNode(e){const t=this.rootNode?._leafs;if(t)for(let n=0,i=t.length;n<i;++n)e(t[n],n)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){const t=this.rowsToDisplay;for(let n=0,i=t.length;n<i;++n)e(t[n],n)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,n=>n.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,n=>n.childrenAfterSort)}forEachPivotNode(e,t,n){const{colModel:i,rowGroupColsSvc:o}=this.beans;if(!i.isPivotMode())return;if(!o?.columns.length){e(this.rootNode,0);return}const r=n?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,s=>s.leafGroup?null:s[r])}depthFirstSearchRowNodes(e,t=!1,n=r=>r.childrenAfterGroup,i=this.rootNode,o=0){let r=o;if(!i)return r;const s=i===this.rootNode;if(s||e(i,r++),i.hasChildren()&&!i.footer){const a=s||this.hierarchical?n(i):null;if(a){const l=this.beans.footerSvc;r=l?.addTotalRows(r,i,e,t,s,"top")??r;for(const u of a)r=this.depthFirstSearchRowNodes(e,t,n,u,r);return l?.addTotalRows(r,i,e,t,s,"bottom")??r}}return r}doAggregate(e){this.rootNode&&this.beans.aggStage?.execute(e)}doFilterAggregates(e){const t=this.rootNode,n=this.beans.filterAggStage;if(n&&this.hierarchical){n.execute(e);return}t.childrenAfterAggFilter=t.childrenAfterFilter;const i=t.sibling;i&&(i.childrenAfterAggFilter=t.childrenAfterFilter)}doSort(e,t){const n=this.beans.sortStage;if(n){n.execute(e,t);return}ia(this.rootNode,this.hierarchical,e,i=>{i.childrenAfterSort=i.childrenAfterAggFilter.slice(0),pF(i)})}doGrouping(e,t){const i=this.beans.groupStage?.execute(t);if(i===void 0){const o=e._leafs;e.childrenAfterGroup=o,e.updateHasChildren();const r=e.sibling;r&&(r.childrenAfterGroup=o)}(i||t.rowDataUpdated)&&this.beans.colFilter?.refreshModel(),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){const t=this.beans.filterStage;if(t){t.execute(e);return}ia(this.rootNode,this.hierarchical,e,n=>{n.childrenAfterFilter=n.childrenAfterGroup,av(n)})}doPivot(e){return this.beans.pivotStage?.execute(e)??!1}getRowNode(e){const t=this.nodeManager?.getRowNode(e);return typeof t=="object"?t:this.beans.groupStage?.getNonLeaf(e)}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const n=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),n)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){const e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){const{nodeManager:e,beans:t,eventSvc:n,asyncTransactions:i}=this;if(!e)return;t.valueCache?.onDataChanged();const o=[],r=[],s=new dh,a=!this.gos.get("suppressAnimationFrame");for(const{rowDataTransaction:l,callback:u}of i??[]){this.rowNodesCountReady=!0,this.refreshingData=!0;const h=e.updateRowData(l,s,a);o.push(h),u&&r.push(u.bind(null,h))}this.commitTransactions(s,a),r.length>0&&setTimeout(()=>{for(let l=0,u=r.length;l<u;l++)r[l]()},0),o.length>0&&n.dispatchEvent({type:"asyncTransactionsFlushed",results:o}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){const t=this.nodeManager;if(!t)return null;this.beans.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const n=new dh,i=!this.gos.get("suppressAnimationFrame");this.refreshingData=!0;const o=t.updateRowData(e,n,i);return this.commitTransactions(n,i),o}commitTransactions(e,t){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:t,changedRowNodes:e})}doRowsToDisplay(){const{rootNode:e,beans:t}=this;if(t.formula?.active){const o=e?.childrenAfterSort??[];this.formulaRows=o,this.rowsToDisplay=o.filter(r=>!r.softFiltered);for(const r of this.rowsToDisplay)r.setUiLevel(0);return}const n=t.flattenStage;if(n){this.rowsToDisplay=n.execute();return}const i=this.rootNode.childrenAfterSort??[];for(const o of i)o.setUiLevel(0);this.rowsToDisplay=i}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 n=e.sibling;n?.setRowHeight(n.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const n=t.detailNode;n?.setRowHeight(n.rowHeight,!0);const i=t.sibling;i?.setRowHeight(i.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,this.stages=null,this.stagesRefreshProps.clear(),clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},mF=(e,t)=>{const n=t.childrenAfterGroup;if(n)for(let i=0,o=n.length;i<o;++i){const r=n[i];r.data&&e.push(r),r.group&&mF(e,r)}};function C4(e){e.expansionSvc?.onGroupExpandedOrCollapsed()}function w4(e,t){const n=To(e);n&&((!t||t==="everything")&&(t="group"),n.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function b4(e){return To(e)?.isEmpty()??!0}function y4(e,t){To(e)?.forEachLeafNode(t)}function S4(e,t){To(e)?.forEachNodeAfterFilter(t)}function R4(e,t){To(e)?.forEachNodeAfterFilterAndSort(t)}function x4(e,t){return e.frameworkOverrides.wrapIncoming(()=>To(e)?.updateRowData(t))}function F4(e,t,n){e.frameworkOverrides.wrapIncoming(()=>To(e)?.batchUpdateRowData(t,n))}function P4(e){e.frameworkOverrides.wrapIncoming(()=>To(e)?.flushAsyncTransactions())}function E4(e){return e.selectionSvc?.getBestCostNodeSelection()}var D4={moduleName:"ClientSideRowModel",version:Se,rowModels:["clientSide"],beans:[v4,p4],dependsOn:[Yx]},T4={moduleName:"ClientSideRowModelApi",version:Se,apiFunctions:{onGroupExpandedOrCollapsed:C4,refreshClientSideRowModel:w4,isRowDataEmpty:b4,forEachLeafNode:y4,forEachNodeAfterFilter:S4,forEachNodeAfterFilterAndSort:R4,applyTransaction:x4,applyTransactionAsync:F4,flushAsyncTransactions:P4,getBestCostNodeSelection:E4,resetRowHeights:hF,onRowHeightChanged:dF},dependsOn:[t4,n4]},A4=":where(.ag-ltr) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,left .2s ease-in-out}}:where(.ag-rtl) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,right .2s ease-in-out}}";function I4(e,t){typeof t=="number"?e.colAutosize?.sizeColumnsToFit(t,"api"):e.colAutosize?.sizeColumnsToFitGridBody(t)}function vF({colAutosize:e,visibleCols:t},n,i){Array.isArray(n)?e?.autoSizeCols({colKeys:n,skipHeader:i,source:"api"}):e?.autoSizeCols({...n,colKeys:n.colIds??t.allCols,source:"api"})}function M4(e,t){t&&typeof t=="object"?vF(e,t):e.colAutosize?.autoSizeAllColumns({source:"api",skipHeader:t})}var k4=class extends J{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 n=!1;const i=t.type;if(i==="fitGridWidth"||i==="fitProvidedWidth")n=!0;else if(i==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const o=e.get("rowData");n=o!=null&&o.length>0&&en(e)}n&&this.beans.colDelayRenderSvc?.hideColumns(i)}}autoSizeCols(e){const{eventSvc:t,visibleCols:n,colModel:i}=this.beans;Wc(this.beans,!0),this.innerAutoSizeCols(e).then(o=>{const r=h=>ol(t,Array.from(h),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return Wc(this.beans,!1),r(o);const s=CF(this.beans),a=h=>n.leftCols.some(f=>Pc(f,h)),l=h=>n.rightCols.some(f=>Pc(f,h)),u=e.colKeys.filter(h=>!i.getCol(h)?.getColDef().suppressAutoSize&&!$n(h)&&!a(h)&&!l(h));this.sizeColumnsToFit(s,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:e.columnLimits?.map(h=>({...h,key:h.colId})),colKeys:u,onlyScaleUp:!0,animate:!1}),Wc(this.beans,!1),r(o)})}innerAutoSizeCols(e){return new Promise((t,n)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,n));const{colKeys:i,skipHeader:o,skipHeaderGroups:r,stopAtGroup:s,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:u=[],source:h="api"}=e,{animationFrameSvc:f,renderStatus:g,colModel:m,autoWidthCalc:v,visibleCols:w}=this.beans;if(f?.flushAllFrames(),this.timesDelayed<5&&g&&(!g.areHeaderCellsRendered()||!g.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,n)});return}this.timesDelayed=0;const b=new Set;let y=-1;const R=Object.fromEntries(u.map(({colId:F,...A})=>[F,A])),S=o??this.gos.get("skipHeaderOnAutoSize"),P=r??S;for(;y!==0;){y=0;const F=[];for(const A of i){if(!A||qO(A))continue;const k=m.getCol(A);if(!k||b.has(k)||k.getColDef().suppressAutoSize)continue;const L=v.getPreferredWidthForColumn(k,S);if(L>0){const N=R[k.colId]??{};N.minWidth??(N.minWidth=l),N.maxWidth??(N.maxWidth=a);const M=L4(k,L,N);k.setActualWidth(M,h),b.add(k),y++}F.push(k)}F.length&&w.refresh(h)}P||this.autoSizeColumnGroupsByColumns(i,h,s),t(b)})}autoSizeColumn(e,t,n){this.autoSizeCols({colKeys:[e],skipHeader:n,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,n){const{colModel:i,ctrlsSvc:o}=this.beans,r=new Set,s=i.getColsForKeys(e);for(const l of s){let u=l.getParent();for(;u&&u!=n;)u.isPadding()||r.add(u),u=u.getParent()}let a;for(const l of r){for(const u of o.getHeaderRowContainerCtrls())if(a=u.getHeaderCtrlForColumn(l),a)break;a?.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const n=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.autoSizeColumn(t,"uiColumnResized",n)};e.addEventListener("dblclick",i);const o=new qs(e);return o.addEventListener("doubleTap",i),()=>{e.removeEventListener("dblclick",i),o.destroy()}}addColumnGroupResize(e,t,n){const i=this.gos.get("skipHeaderOnAutoSize"),o=()=>{const r=[],s=t.getDisplayedLeafColumns();for(const a of s)a.getColDef().suppressAutoSize||r.push(a.getColId());r.length>0&&this.autoSizeCols({colKeys:r,skipHeader:i,stopAtGroup:t,source:"uiColumnResized"}),n()};return e.addEventListener("dblclick",o),()=>e.removeEventListener("dblclick",o)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const n=CF(this.beans);if(n>0){this.sizeColumnsToFit(n,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):le(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",n,i){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,n,i));return}const{beans:o}=this,r=i?.animate??!0;r&&Wc(o,!0);const s={};for(const{key:y,...R}of i?.columnLimits??[])s[typeof y=="string"?y:y.getColId()]=R;const a=o.visibleCols.allCols;if(e<=0||!a.length)return;const l=lr(a);if(i?.onlyScaleUp&&l>e||e===l&&a.every(R=>{if(R.colDef.suppressSizeToFit)return!0;const S=s?.[R.getId()],P=S?.minWidth??i?.defaultMinWidth,F=S?.maxWidth??i?.defaultMaxWidth,A=R.getActualWidth();return(P==null||A>=P)&&(F==null||A<=F)}))return;const h=[],f=[];for(const y of a){const R=i?.colKeys?.some(S=>Pc(y,S))??!0;y.getColDef().suppressSizeToFit||!R?f.push(y):h.push(y)}const g=h.slice(0);let m=!1;const v=y=>{Fo(h,y),f.push(y)},w={};for(const y of h){i?.onlyScaleUp&&(w[y.getColId()]=y.getActualWidth()),y.resetActualWidth(t);const R=s?.[y.getId()],S=R?.minWidth??i?.defaultMinWidth??-1/0,P=R?.maxWidth??i?.defaultMaxWidth??1/0,F=y.getActualWidth(),A=Math.max(Math.min(F,P),S);A!=F&&y.setActualWidth(A,t,!0)}for(;!m;){m=!0;const y=e-lr(f);if(y<=0)for(const R of h){const S=s?.[R.getId()]?.minWidth??i?.defaultMinWidth??R.minWidth;R.setActualWidth(S,t,!0)}else{const R=y/lr(h);let S=y;for(let P=h.length-1;P>=0;P--){const F=h[P],A=F.getColId(),k=w[A],L=s?.[A],N=L?.minWidth??i?.defaultMinWidth??k,M=L?.maxWidth??i?.defaultMaxWidth,E=Math.max(N??-1/0,F.getMinWidth()),I=Math.min(M??1/0,F.getMaxWidth());let B=Math.round(F.getActualWidth()*R);B<E?(B=E,v(F),m=!1):B>I?(B=I,v(F),m=!1):P===0&&(B=S),F.setActualWidth(B,t,!0),S-=B}}}for(const y of g)y.fireColumnWidthChangedEvent(t);const b=o.visibleCols;b.setLeftValues(t),b.updateBodyWidths(),!n&&(ol(this.eventSvc,g,!0,t),r&&Wc(o,!1))}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,n=e.get("autoSizeStrategy");n?.type!=="fitGridWidth"&&n?.type!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const i=n.type;if(i==="fitGridWidth"){const{columnLimits:o,defaultMinWidth:r,defaultMaxWidth:s}=n,a=o?.map(({colId:l,minWidth:u,maxWidth:h})=>({key:l,minWidth:u,maxWidth:h}));this.sizeColumnsToFitGridBody({defaultMinWidth:r,defaultMaxWidth:s,columnLimits:a})}else i==="fitProvidedWidth"&&this.sizeColumnsToFit(n.width,"sizeColumnsToFit");t?.revealColumns(i)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{if(!this.isAlive())return;const n="autosizeColumns";e?this.autoSizeCols({...t,source:n,colKeys:e}):this.autoSizeAllColumns({...t,source:n}),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()}};function L4(e,t,n={}){const i=n.minWidth??e.getMinWidth();t<i&&(t=i);const o=n.maxWidth??e.getMaxWidth();return t>o&&(t=o),t}function CF({ctrlsSvc:e,scrollVisibleSvc:t}){const n=e.getGridBodyCtrl(),o=n.isVerticalScrollShowing()?t.getScrollbarWidth():0;return mc(n.eGridBody)-o}var wF="ag-animate-autosize";function Wc({ctrlsSvc:e,gos:t},n){if(!t.get("animateColumnResizing")||t.get("enableRtl")||!e.isAlive())return;const i=e.getGridBodyCtrl().eGridBody.classList;n?i.add(wF):i.remove(wF)}var O4={moduleName:"ColumnAutoSize",version:Se,beans:[k4],apiFunctions:{sizeColumnsToFit:I4,autoSizeColumns:vF,autoSizeAllColumns:M4},dependsOn:[JR],css:[A4]};function _4(e,t){return!!e.colHover?.isHovered(t)}var N4=class extends J{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=n=>{const{beans:i,gos:o,element:r,columns:s}=this,a=i.colHover;if(n??!!o.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(r,{mouseover:a.setMouseOver.bind(a,s),mouseout:a.clearMouseOver.bind(a)});else{for(const u of this.destroyManagedListeners)u();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},B4="ag-column-hover",H4=class extends J{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,n){const i=()=>{const o=this.isHovered(n);t.toggleCss("ag-column-hover",o)};e.addManagedEventListeners({columnHoverChanged:i}),i()}onCellColumnHover(e,t){if(!t)return;const n=this.isHovered(e);t.toggleCss(B4,n)}addHeaderFilterColumnHoverListener(e,t,n,i){this.createHoverFeature(e,[n],i);const o=()=>{const r=this.isHovered(n);t.toggleCss("ag-column-hover",r)};e.addManagedEventListeners({columnHoverChanged:o}),o()}createHoverFeature(e,t,n){e.createManagedBean(new N4(t,n))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},G4={moduleName:"ColumnHover",version:Se,beans:[H4],apiFunctions:{isColumnHovered:_4}},V4=class extends J{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:n,columnKeys:i,skipRowGroups:o,exportRowNumbers:r}=t,s=this.getColumnsToExport({allColumns:n,skipRowGroups:o,columnKeys:i,exportRowNumbers:r});return[this.prepareSession(s),this.prependContent(t),this.exportColumnGroups(t,s),this.exportHeaders(t,s),this.processPinnedTopRows(t,s),this.processRows(t,s),this.processPinnedBottomRows(t,s),this.appendContent(t)].reduce((a,l)=>l(a),e).parse()}processRow(e,t,n,i){const o=t.shouldRowBeSkipped||(()=>!1),s=t.rowPositions!=null||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!s,l=this.colModel.isPivotMode()?i.leafGroup:!i.group,u=!!i.footer,h=i.allChildrenCount===1&&i.childrenAfterGroup?.length===1&&wO(this.gos,i);if(!l&&!u&&(t.skipRowGroups||h||a)||t.onlySelected&&!i.isSelected()||t.skipPinnedTop&&i.rowPinned==="top"||t.skipPinnedBottom&&i.rowPinned==="bottom"||i.stub||i.level===-1&&!l&&!u||o(Ue(this.gos,{node:i})))return;const m=e.onNewBodyRow(i);if(n.forEach((v,w)=>{m.onColumn(v,w,i)}),t.getCustomContentBelowRow){const v=t.getCustomContentBelowRow(Ue(this.gos,{node:i}));v&&e.addCustomContent(v)}}appendContent(e){return t=>{const n=e.appendContent;return n&&t.addCustomContent(n),t}}prependContent(e){return t=>{const n=e.prependContent;return n&&t.addCustomContent(n),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return n=>{if(!e.skipColumnGroupHeaders){const i=new tx,{colGroupSvc:o}=this.beans,r=o?o.createColumnGroups({columns:t,idCreator:i,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(r,n,e.processGroupHeaderCallback)}return n}}exportHeaders(e,t){return n=>{if(!e.skipColumnHeaders){const i=n.onNewHeaderRow();t.forEach((o,r)=>{i.onColumn(o,r,void 0)})}return n}}processPinnedTopRows(e,t){return n=>{const i=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(o=>o.rowPinned==="top").sort((o,r)=>o.rowIndex-r.rowIndex).map(o=>this.pinnedRowModel?.getPinnedTopRow(o.rowIndex)).forEach(i):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("top",i),n}}processRows(e,t){return n=>{const i=this.rowModel,o=en(this.gos),r=Rc(this.gos),s=!o&&e.onlySelected,a=this.processRow.bind(this,n,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(u=>u.rowPinned==null).sort((u,h)=>u.rowIndex-h.rowIndex).map(u=>i.getRow(u.rowIndex)).forEach(a);else if(this.colModel.isPivotMode())o?i.forEachPivotNode(a,!0,l==="filteredAndSorted"):r?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a);else if(e.onlySelectedAllPages||s){const u=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(u),u.forEach(a)}else l==="all"?i.forEachNode(a):o||r?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a);return n}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:n}=this.beans;if(!t||!n)return;const i=t.getSortOptions(),o=(r,s)=>r.rowIndex!=null&&s.rowIndex!=null?r.rowIndex-s.rowIndex:r.level===s.level?r.parent?.id===s.parent?.id?n.compareRowNodes(i,r,s)||(r.rowIndex??-1)-(s.rowIndex??-1):o(r.parent,s.parent):r.level>s.level?o(r.parent,s):o(r,s.parent);e.sort(o)}processPinnedBottomRows(e,t){return n=>{const i=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(o=>o.rowPinned==="bottom").sort((o,r)=>o.rowIndex-r.rowIndex).map(o=>this.pinnedRowModel?.getPinnedBottomRow(o.rowIndex)).forEach(i):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("bottom",i),n}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:n=!1,exportRowNumbers:i=!1,columnKeys:o}=e,{colModel:r,gos:s,visibleCols:a}=this,l=r.isPivotMode(),u=g=>zr(g)?!1:!$n(g)||i;if(o?.length)return r.getColsForKeys(o).filter(u);const h=s.get("treeData");let f=[];return t&&!l?f=r.getCols():f=a.allCols,f=f.filter(g=>u(g)&&(n&&!h?!Bp(g):!0)),f}recursivelyAddHeaderGroups(e,t,n){const i=[];for(const o of e){const r=o;if(r.getChildren)for(const s of r.getChildren()??[])i.push(s)}e.length>0&&tn(e[0])&&this.doAddHeaderHeader(t,e,n),i&&i.length>0&&this.recursivelyAddHeaderGroups(i,t,n)}doAddHeaderHeader(e,t,n){const i=e.onNewHeaderGroupingRow();let o=0;for(const r of t){const s=r;let a;n?a=n(Ue(this.gos,{columnGroup:s})):a=this.beans.colNames.getDisplayNameForColumnGroup(s,"header");const u=(s.isExpandable()?s.getLeafColumns():[]).reduce((h,f,g,m)=>{let v=At(h);return f.getColumnGroupShow()==="open"?(!v||v[1]!=null)&&(v=[g],h.push(v)):v&&v[1]==null&&(v[1]=g-1),g===m.length-1&&v&&v[1]==null&&(v[1]=g),h},[]);i.onColumn(s,a||"",o++,s.getLeafColumns().length-1,u)}}},W4={moduleName:"SharedExport",version:Se,beans:[V4]},z4=class extends J{getFileName(e){const t=this.getDefaultFileExtension();return e?.length||(e=this.getDefaultFileName()),e.includes(".")?e:`${e}.${t}`}getData(e){return this.beans.gridSerializer.serialize(this.createSerializingSession(e),e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}};function U4(e,t){const n=document.defaultView||window;if(!n){le(52);return}const i=document.createElement("a"),o=n.URL.createObjectURL(t);i.setAttribute("href",o),i.setAttribute("download",e),i.style.display="none",document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:n})),i.remove(),n.setTimeout(()=>{n.URL.revokeObjectURL(o)},0)}var $4=class{constructor(e){this.valueFrom="data";const{colModel:t,rowGroupColsSvc:n,colNames:i,valueSvc:o,gos:r,processCellCallback:s,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:u,valueFrom:h}=e;this.colModel=t,this.rowGroupColsSvc=n,this.colNames=i,this.valueSvc=o,this.gos=r,this.processCellCallback=s,this.processHeaderCallback=a,this.processGroupHeaderCallback=l,this.processRowGroupCallback=u,h&&(this.valueFrom=h)}prepare(e){}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e){const{column:t,node:n,currentColumnIndex:i,accumulatedRowIndex:o,type:r,useRawFormula:s}=e,a=i===0&&C0(this.gos,n,this.colModel.isPivotMode());if(this.processRowGroupCallback&&(this.gos.get("treeData")||n.group)&&(t.isRowGroupDisplayed(n.rowGroupColumn?.getColId()??"")||a))return{value:this.processRowGroupCallback(Ue(this.gos,{column:t,node:n}))??""};if(this.processCellCallback)return{value:this.processCellCallback(Ue(this.gos,{accumulatedRowIndex:o,column:t,node:n,value:this.valueSvc.getValueForDisplay({column:t,node:n,from:this.valueFrom}).value,type:r,parseValue:v=>this.valueSvc.parseValue(t,n,v,this.valueSvc.getValue(t,n,this.valueFrom)),formatValue:v=>this.valueSvc.formatValue(t,n,v)??v}))??""};const l=this.gos.get("treeData"),u=this.valueSvc,h=n.level===-1&&n.footer,f=t.colDef.showRowGroup===!0&&(n.group||l);if(!h&&(a||f)){let v="",w=n;for(;w&&w.level!==-1;){const{value:b,valueFormatted:y}=u.getValueForDisplay({column:a?void 0:t,node:w,includeValueFormatted:!0,exporting:!0,from:this.valueFrom});v=` -> ${y??b??""}${v}`,w=w.parent}return{value:v,valueFormatted:v}}const{value:g,valueFormatted:m}=u.getValueForDisplay({column:t,node:n,includeValueFormatted:!0,exporting:!0,useRawFormula:s,from:this.valueFrom});return{value:g??"",valueFormatted:m}}getHeaderName(e,t){return e?e(Ue(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}},bF=`\r
|
|
63
|
-
`,j4=class extends $4{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:n}=e;this.suppressQuotes=t,this.columnSeparator=n}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,bF),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((n,i)=>{i!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(n.data.value||""),n.mergeAcross&&this.appendEmptyCells(n.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,n,i){n!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(i)}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){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,n){t!=0&&(this.result+=this.columnSeparator);const i=this.extractRowCellValue({column:e,node:n,currentColumnIndex:t,accumulatedRowIndex:t,type:"csv",useRawFormula:!1});this.result+=this.putInQuotes(i.valueFormatted??i.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(le(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=bF),this.isFirstLine=!1}},K4=class extends z4{constructor(){super(...arguments),this.beanName="csvCreator"}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){le(51);return}const t=()=>{const i=this.getMergedParams(e),o=this.getData(i),r=new Blob(["\uFEFF",o],{type:"text/plain"}),s=i.fileName,a=typeof s=="function"?s(Ue(this.gos,{})):s;U4(this.getFileName(a),r)},{overlays:n}=this.beans;n?n.showExportOverlay(t):t()}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const n=t?Object.assign({},e):this.getMergedParams(e);return this.getData(n)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:n,rowGroupColsSvc:i,valueSvc:o,gos:r}=this.beans,{processCellCallback:s,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:u,suppressQuotes:h,columnSeparator:f,valueFrom:g}=e;return new j4({colModel:t,colNames:n,valueSvc:o,gos:r,processCellCallback:s||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:u||void 0,suppressQuotes:h||!1,columnSeparator:f||",",rowGroupColsSvc:i,valueFrom:g})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function q4(e,t){return e.csvCreator?.getDataAsCsv(t)}function Q4(e,t){e.csvCreator?.exportDataAsCsv(t)}var Y4={moduleName:"CsvExport",version:Se,beans:[K4],apiFunctions:{getDataAsCsv:q4,exportDataAsCsv:Q4},dependsOn:[W4]},yF=class extends zn{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const n="title",i=this.ctrl.getGui();i&&(e!=null&&(e!=""||t)?i.setAttribute(n,e):i.removeAttribute(n))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){if(this.tooltipManager==null){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()}},Z4=1e3,J4=1e3,SF=100,RF,Ph=!1,X4=class extends zn{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();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){return this.tooltipCtrl[`getTooltip${e}DelayOverride`]?.()??this.getGridOptionsTooltipDelay(`tooltip${e}Delay`)}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!zs()&&(Ph?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},SF):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){const t=e.relatedTarget,n=this.tooltipCtrl.getGui(),i=this.tooltipComp?.getGui();this.isInteractingWithTooltip||n.contains(t)||this.interactionEnabled&&i?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||Ph)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?this.getTooltipDelay("SwitchShow"):this.getTooltipDelay("Show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-RF<Z4}setToDoNothing(e){!e&&this.state===2&&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(!Pe(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const n=this.gos.addCommon({location:t.getLocation?.()??"UNKNOWN",value:e,hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()});this.state=2,this.tooltipInstanceCount++;const i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(n,i)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),RF=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");const o=this.getLocaleTextFunc(),r=this.popupSvc?.addPopup({eChild:i,ariaLabel:o("ariaLabelTooltip","Tooltip")});if(r&&(this.tooltipPopupDestroyFunc=r.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const s=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:s}),this.setEventHandlers(s)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(cn(this.beans),{keydown:s=>{i.contains(s?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:i,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=Ot(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,n=this.tooltipTrigger===0?J4:0;window.setTimeout(()=>{e(),this.destroyBean(t)},n),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(){Ph=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},SF)}unlockService(){Ph=!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()}},ez=class extends yF{constructor(e,t,n){super(e,n),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){this.tooltipMode===1&&(e.highlighted?this.attemptToShowTooltip():this.attemptToHideTooltip())}setTooltipMode(e="focus"){this.tooltipMode=e==="focus"?1:0}destroy(){this.highlightTracker.removeEventListener("itemHighlighted",this.onHighlight),super.destroy()}},tz=class extends Jp{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){const{value:t}=e,n=this.getGui();n.textContent=Ha(t);const i=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();n.classList.add(`ag-${i}-tooltip`)}},nz=".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),&:where(.ag-cell-formula-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}}",Eh=0,iz=200,oz=class extends zn{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.addManagedEventListeners({stylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:n,nudgeY:i,skipObserver:o}=e;this.positionPopup({ePopup:t,nudgeX:n,nudgeY:i,keepWithinBounds:!0,skipObserver:o,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,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:n,nudgeY:i,keepWithinBounds:o,eventSource:r,alignSide:s="left",position:a="over",type:l}=e,u=r.getBoundingClientRect(),h=this.getParentRect();this.setAlignedTo(r,t);const f=()=>{let g=u.left-h.left;s==="right"&&(g-=t.offsetWidth-u.width);let m;return a==="over"?(m=u.top-h.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,u,h,e.nudgeY||0)==="under"?m=u.top-h.top+u.height:m=u.top-t.offsetHeight-(i||0)*2-h.top),{x:g,y:m}};this.positionPopup({ePopup:t,nudgeX:n,nudgeY:i,keepWithinBounds:o,updatePosition:f,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,l,t,r,null)})}positionPopupForMenu(e){const{eventSource:t,ePopup:n,event:i}=e,o=t.getBoundingClientRect(),r=this.getParentRect();this.setAlignedTo(t,n);let s=!1;const a=()=>{const l=this.keepXYWithinBounds(n,o.top-r.top,0),u=n.clientWidth>0?n.clientWidth:200;s||(n.style.minWidth=`${u}px`,s=!0);const f=r.right-r.left-u;let g;return this.gos.get("enableRtl")?(g=v(),g<0&&(g=m(),this.setAlignedStyles(n,"left")),g>f&&(g=0,this.setAlignedStyles(n,"right"))):(g=m(),g>f&&(g=v(),this.setAlignedStyles(n,"right")),g<0&&(g=0,this.setAlignedStyles(n,"left"))),{x:g,y:l};function m(){return o.right-r.left-2}function v(){return o.left-r.left-u}};this.positionPopup({ePopup:n,keepWithinBounds:!0,updatePosition:a,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,"subMenu",n,t,i instanceof MouseEvent?i:void 0)})}shouldRenderUnderOrAbove(e,t,n,i){const o=n.bottom-t.bottom,r=t.top-n.top,s=e.offsetHeight+i;return o>s?"under":r>s||r>o?"above":"under"}setAlignedStyles(e,t){const n=this.getPopupIndex(e);if(n===-1)return;const i=this.popupList[n],{alignedToElement:o}=i;if(!o)return;const r=["right","left","over","above","under"];for(const s of r)o.classList.remove(`ag-has-popup-positioned-${s}`),e.classList.remove(`ag-popup-positioned-${s}`);t&&(o.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const n=this.getPopupIndex(t);if(n!==-1){const i=this.popupList[n];i.alignedToElement=e}}positionPopup(e){const{ePopup:t,keepWithinBounds:n,nudgeX:i,nudgeY:o,skipObserver:r,updatePosition:s}=e,a={width:0,height:0},l=(u=!1)=>{let{x:h,y:f}=s();u&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,i&&(h+=i),o&&(f+=o),n&&(h=this.keepXYWithinBounds(t,h,1),f=this.keepXYWithinBounds(t,f,0)),t.style.left=`${h}px`,t.style.top=`${f}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!r){const u=Nr(this.beans,t,()=>l(!0));setTimeout(()=>u(),iz)}}getParentRect(){const e=cn(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),WS(t)}keepXYWithinBounds(e,t,n){const i=n===0,o=i?"clientHeight":"clientWidth",r=i?"top":"left",s=i?"height":"width",a=i?"scrollTop":"scrollLeft",l=cn(this.beans),u=l.documentElement,h=this.getPopupParent(),f=e.getBoundingClientRect(),g=h.getBoundingClientRect(),m=l.documentElement.getBoundingClientRect(),v=h===l.body,w=Math.ceil(f[s]);let y=v?(i?VS:Dd)(u)+u[a]:h[o];v&&(y-=Math.abs(m[r]-g[r]));const R=y-w;return Math.min(Math.max(t,0),Math.max(R,0))}addPopup(e){const{eChild:t,ariaLabel:n,ariaOwns:i,alwaysOnTop:o,positionCallback:r,anchorToElement:s}=e,a=this.getPopupIndex(t);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(t);const l=this.createPopupWrapper(t,!!o,n,i),u=this.addEventListenersToPopup({...e,wrapperEl:l});return r&&r(),this.addPopupToPopupList(t,l,u,s),{hideFunc:u}}initialisePopupPosition(e){const n=this.getPopupParent().getBoundingClientRect();Pe(e.style.top)||(e.style.top=`${n.top*-1}px`),Pe(e.style.left)||(e.style.left=`${n.left*-1}px`)}createPopupWrapper(e,t,n,i){const o=this.getPopupParent(),{environment:r,gos:s}=this.beans,a=Bs({tag:"div"});return r.applyThemeClasses(a),a.classList.add("ag-popup"),e.classList.add(s.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||_r(e,"dialog"),n?Ga(e,n):i&&(e.id||(e.id=`popup-component-${Eh}`),HS(i,e.id)),a.appendChild(e),o.appendChild(a),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),a}addEventListenersToPopup(e){const t=this.beans,n=cn(t),{wrapperEl:i,eChild:o,closedCallback:r,afterGuiAttached:s,closeOnEsc:a,modal:l,ariaOwns:u}=e;let h=!1;const f=w=>{if(!i.contains(Ot(t)))return;w.key===K.ESCAPE&&!this.isStopPropagation(w)&&v({keyboardEvent:w})},g=w=>v({mouseEvent:w}),m=w=>v({touchEvent:w}),v=(w={})=>{const{mouseEvent:b,touchEvent:y,keyboardEvent:R,forceHide:S}=w;!S&&(this.isEventFromCurrentPopup({mouseEvent:b,touchEvent:y},o)||h)||(h=!0,i.remove(),n.removeEventListener("keydown",f),n.removeEventListener("mousedown",g),n.removeEventListener("touchstart",m),n.removeEventListener("contextmenu",g),this.eventSvc.removeListener("dragStarted",g),r&&r(b||y||R),this.removePopupFromPopupList(o,u))};return s&&s({hidePopup:v}),window.setTimeout(()=>{a&&n.addEventListener("keydown",f),l&&(n.addEventListener("mousedown",g),this.eventSvc.addListener("dragStarted",g),n.addEventListener("touchstart",m),n.addEventListener("contextmenu",g))},0),v}addPopupToPopupList(e,t,n,i){this.popupList.push({element:e,wrapper:t,hideFunc:n,instanceId:Eh,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),Eh=Eh+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const n=this.getPopupIndex(e);if(n===-1)return;const i=this.popupList[n];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then(r=>r&&r()),i.stopAnchoringPromise=void 0,i.isAnchored=!1,!t)return;const o=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:i.hideFunc});return i.stopAnchoringPromise=o,i.isAnchored=!0,o}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&HS(t,null),this.popupList=this.popupList.filter(n=>n.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),n=t.getBoundingClientRect(),{element:i,ePopup:o}=e,r=i.getBoundingClientRect(),s=f=>Number.parseInt(f.substring(0,f.length-1),10),a=(f,g)=>{const m=n[f]-r[f],v=s(o.style[f]);return{initialDiff:m,lastDiff:m,initial:v,last:v,direction:g}},l=a("top",0),u=a("left",1),h=this.beans.frameworkOverrides;return new _t(f=>{h.wrapIncoming(()=>{r_(()=>{const g=t.getBoundingClientRect(),m=i.getBoundingClientRect();if(m.top==0&&m.left==0&&m.height==0&&m.width==0){e.hidePopup();return}const w=(b,y)=>{const R=s(o.style[y]);b.last!==R&&(b.initial=R,b.last=R);const S=g[y]-m[y];if(S!=b.lastDiff){const P=this.keepXYWithinBounds(o,b.initial+b.initialDiff-S,b.direction);o.style[y]=`${P}px`,b.last=P}b.lastDiff=S};w(l,"top"),w(u,"left")},200).then(g=>{f(()=>{g!=null&&window.clearInterval(g)})})},"popupPositioning")})}isEventFromCurrentPopup(e,t){const{mouseEvent:n,touchEvent:i}=e,o=n||i;if(!o)return!1;const r=this.getPopupIndex(t);if(r===-1)return!1;for(let s=r;s<this.popupList.length;s++){const a=this.popupList[s];if(LL(a.element,o))return!0}return this.isElementWithinCustomPopup(o.target)}isElementWithinCustomPopup(e){const t=cn(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)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 n=this.getWrapper(e);n&&(n.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(n))}bringPopupToFront(e){const t=this.getPopupParent(),n=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),i=n.length,o=this.getWrapper(e);if(!o||i<=1||!t.contains(e))return;const r=[],s=[];for(const g of n)g!==o&&(g.classList.contains("ag-always-on-top")?s.push(g):r.push(g));const a=[],l=s.length,f=o.classList.contains("ag-always-on-top")||!l?[...r,...s,o]:[...r,o,...s];for(let g=0;g<=i;g++){const m=f[g];if(n[g]===f[g]||m===o)continue;const v=m.querySelectorAll("div");for(const w of v)w.scrollTop!==0&&a.push([w,w.scrollTop]);g===0?t.prepend(m):f[g-1].after(m)}for(;a.length;){const g=a.pop();g[0].scrollTop=g[1]}}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const n of this.popupList)t.applyThemeClasses(n.wrapper)}}},rz=class extends oz{getDefaultPopupParent(){return this.beans.ctrlsSvc.get("gridCtrl").getGui()}callPostProcessPopup(e,t,n,i,o){const r=this.gos.getCallback("postProcessPopup");if(r){const{column:s,rowNode:a}=e??{};r({column:s,rowNode:a,ePopup:n,type:t,eventSource:i,mouseEvent:o})}}getActivePopups(){return this.popupList.map(e=>e.element)}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return cr(e)}},Dh={moduleName:"Popup",version:Se,beans:[rz]};function lv(e){return e.get("tooltipShowMode")==="whenTruncated"}var sz=(e,t)=>{const n=e;return typeof n.getTranslatedMessage=="function"?n.getTranslatedMessage(t):e.message},cv=(e,t,n)=>{const{editModelSvc:i}=e,o=i?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,r=i?.getRowValidationModel().getRowValidation(t)?.errorMessages,s=o||r;return s?.length?s.join(n("tooltipValidationErrorSeparator",". ")):void 0},az=(e,t)=>{if(lv(e.gos)){if(t.isCellRenderer()){const i=t.column.getColDef();return!!i.showRowGroup||i.cellRenderer==="agGroupCellRenderer"?Cc(()=>{const r=t.eGui;return r.querySelector(".ag-group-value")||r.querySelector(".ag-cell-value")||r}):void 0}return Cc(()=>{const i=t.eGui;return i.children.length===0?i:i.querySelector(".ag-cell-value")})}},lz=(e,t,n)=>{const{editSvc:i}=e,{column:o}=t,r=az(e,t),s=()=>i?.isEditing(t)?!1:r?o.isTooltipEnabled()?r():!1:!0;return{shouldDisplayDefault:s,shouldDisplayColumnTooltip:s,shouldDisplayCustomTooltip:n??s}},cz=({beans:e,ctrl:t,value:n,displayFunctions:i,translate:o})=>{const{editSvc:r,formula:s,gos:a}=e,{column:l,rowNode:u}=t;if(s?.active&&l.isAllowFormula()){const b=s.getFormulaError(l,u);if(b)return{value:sz(b,o),location:"cellFormula",shouldDisplay:()=>!!s?.getFormulaError(l,u)}}if(!!!r?.isEditing(t)){const b=cv(e,t,o);if(b)return{value:b,location:"cellEditor",shouldDisplay:()=>!r?.isEditing(t)&&!!cv(e,t,o)}}const{shouldDisplayCustomTooltip:f,shouldDisplayColumnTooltip:g}=i;if(n!=null)return{value:n,location:"cell",shouldDisplay:f};const m=l.getColDef(),v=u.data;if(m.tooltipField&&Pe(v))return{value:_c(v,m.tooltipField,l.isTooltipFieldContainsDots()),location:"cell",shouldDisplay:g};const w=m.tooltipValueGetter;return w?{value:w(Ue(a,{location:"cell",colDef:l.getColDef(),column:l,rowIndex:t.cellPosition.rowIndex,node:u,data:u.data,value:t.value,valueFormatted:t.valueFormatted})),location:"cell",shouldDisplay:g}:null},uz=class extends J{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,n,i){e&&t.destroyBean(e);const o=this.gos,r=lv(o),{column:s,eGui:a}=t,l=s.getColDef();!i&&r&&!l.headerComponent&&(i=Cc(()=>a.querySelector(".ag-header-cell-text")));const u="header",f=this.beans.colNames.getDisplayNameForColumn(s,"header",!0),g=n??f,m={getGui:()=>a,getLocation:()=>u,getTooltipValue:()=>n??l?.headerTooltipValueGetter?.(Ue(o,{location:u,colDef:l,column:s,value:g,valueFormatted:f}))??l?.headerTooltip,shouldDisplayTooltip:i,getAdditionalParams:()=>({column:s,colDef:s.getColDef()})};let v=this.createTooltipFeature(m);return v&&(v=t.createBean(v),t.setRefreshFunction("tooltip",()=>v.refreshTooltip())),v}setupHeaderGroupTooltip(e,t,n,i){e&&t.destroyBean(e);const o=this.gos,r=lv(o),{column:s,eGui:a}=t,l=s.getColGroupDef();!i&&r&&!l?.headerGroupComponent&&(i=Cc(()=>a.querySelector(".ag-header-group-text")));const u="headerGroup",f=this.beans.colNames.getDisplayNameForColumnGroup(s,"header"),g=n??f,m={getGui:()=>a,getLocation:()=>u,getTooltipValue:()=>n??l?.headerTooltipValueGetter?.(Ue(o,{location:u,colDef:l,column:s,value:g,valueFormatted:f}))??l?.headerTooltip,shouldDisplayTooltip:i,getAdditionalParams:()=>{const w={column:s};return l&&(w.colDef=l),w}},v=this.createTooltipFeature(m);return v&&t.createBean(v)}enableCellTooltipFeature(e,t,n){const{beans:i}=this,{column:o,rowNode:r}=e,s=lz(i,e,n),a=this.getLocaleTextFunc();let l=null;const u=()=>(l=cz({beans:i,ctrl:e,value:t,displayFunctions:s,translate:a}),l),f={getGui:()=>e.eGui,getLocation:()=>l?.location??"cell",getTooltipValue:()=>u()?.value,shouldDisplayTooltip:()=>{const g=l??u();return g?g.shouldDisplay?g.shouldDisplay():!0:!1},getAdditionalParams:()=>({column:o,colDef:o.getColDef(),rowIndex:e.cellPosition.rowIndex,node:r,data:r.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(f,i)}setupFullWidthRowTooltip(e,t,n,i){const o={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>n,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},r=this.beans,s=r.context;e&&t.destroyBean(e,s);const a=this.createTooltipFeature(o,r);if(a)return t.createBean(a,s)}setupCellEditorTooltip(e,t){const{beans:n}=this,{context:i}=n,o=t.getValidationElement?.(!0)||!t.isPopup?.()&&e.eGui;if(!o)return;const r={getGui:()=>o,getTooltipValue:()=>cv(n,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{const{editModelSvc:a}=n,l=a?.getRowValidationModel()?.getRowValidationMap(),u=a?.getCellValidationModel()?.getCellValidationMap(),h=!!l&&l.size>0,f=!!u&&u.size>0;return h||f}},s=this.createTooltipFeature(r,n);if(s)return e.createBean(s,i)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=Pe(t.tooltipField)||Pe(t.tooltipValueGetter)||Pe(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},dz=class extends X4{createTooltipComp(e,t){O_(this.beans.userCompFactory,e)?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}},xF={moduleName:"Tooltip",version:Se,beans:[uz],dynamicBeans:{tooltipFeature:yF,highlightTooltipFeature:ez,tooltipStateManager:dz},userComponents:{agTooltipComponent:tz},dependsOn:[Dh],css:[nz]},dl=class{constructor(e){this.cellValueChanges=e}},uv=class extends dl{constructor(e,t,n,i){super(e),this.initialRange=t,this.finalRange=n,this.ranges=i}},hz=10,FF=class{constructor(e){this.actionStack=[],this.maxStackSize=e||hz,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}},fz=class extends J{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},n=this.activeCellEdit!==null&&sm(this.activeCellEdit,t),i=this.activeRowEdit!==null&&C2(this.activeRowEdit,t);if(!(n||i||this.isPasting||this.isRangeInAction))return;const{rowPinned:r,rowIndex:s,column:a,oldValue:l,value:u}=e,h={rowPinned:r,rowIndex:s,columnId:a.getColId(),newValue:u,oldValue:l};this.cellValueChanges.push(h)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const n=e.get("undoRedoCellEditingLimit");if(n<=0)return;this.undoStack=new FF(n),this.redoStack=new FF(n),this.addListeners();const i=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:o=>{o.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:i,newColumnsLoaded:i,columnGroupOpened:i,columnRowGroupChanged:i,columnMoved:i,columnPinned:i,columnVisible:i,rowDragEnd:i}),t.whenReady(this,o=>{this.gridBodyCtrl=o.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){const{eventSvc:t,undoStack:n,redoStack:i}=this;t.dispatchEvent({type:"undoStarted",source:e});const o=this.undoRedo(n,i,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:o})}redo(e){const{eventSvc:t,undoStack:n,redoStack:i}=this;t.dispatchEvent({type:"redoStarted",source:e});const o=this.undoRedo(i,n,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:o})}undoRedo(e,t,n,i,o){if(!e)return!1;const r=e.pop();return r?.cellValueChanges?(this.processAction(r,s=>s[i],o),r instanceof uv?this.processRange(r.ranges||[r[n]]):this.processCell(r.cellValueChanges),t.push(r),!0):!1}processAction(e,t,n){const{changeDetectionSvc:i}=this.beans;i?.beginDeferred();try{for(const o of e.cellValueChanges){const{rowIndex:r,rowPinned:s,columnId:a}=o,l={rowIndex:r,rowPinned:s},u=Ao(this.beans,l);u?.displayed&&u.setDataValue(a,t(o),n)}}finally{i?.endDeferred()}}processRange(e){let t;const n=this.beans.rangeSvc;n.removeAllCellRanges(!0),e.forEach((i,o)=>{if(!i)return;const r=i.startRow,s=i.endRow;o===e.length-1&&(t={rowPinned:r.rowPinned,rowIndex:r.rowIndex,columnId:i.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:s.rowIndex,rowEndPinned:s.rowPinned,columnStart:i.startColumn,columns:i.columns};n.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:n,rowPinned:i}=t,o={rowIndex:n,rowPinned:i},r=Ao(this.beans,o),s={rowPinned:t.rowPinned,rowIndex:r.rowIndex,columnId:t.columnId};this.setLastFocusedCell(s)}setLastFocusedCell(e){const{rowIndex:t,columnId:n,rowPinned:i}=e,{colModel:o,focusSvc:r,rangeSvc:s}=this.beans,a=o.getCol(n);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const u={rowIndex:t,column:a,rowPinned:i};r.setFocusedCell({...u,forceBrowserFocus:!0}),s?.setRangeToCell(u)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new dl(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 n=new dl(this.cellValueChanges);this.pushActionsToUndoStack(n)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new dl(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new uv(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:n}=this.beans;t&&rr(n)?e=new uv(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new dl(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){e==="bulkEditing"?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if(e==="bulkEditing"&&!this.bulkEditing||e==="batchEditing"&&!this.batchEditing||(this.updateBigChange(e,!1),t?.length===0))return;const n=new dl(t??[]);this.pushActionsToUndoStack(n),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},gz=".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) .ag-text-area-input{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}",pz={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},mz=class extends Jd{constructor(){super(pz,[km]),this.eEditor=ge}initialiseEditor(e){this.agSetEditValue(e.value),this.eEditor.getInputElement().setAttribute("tabindex","-1"),this.addManagedListeners(this.eEditor,{fieldValueChanged:n=>this.setAriaLabel(n.selected)})}agSetEditValue(e){this.params.value=e;const t=e??void 0;this.eEditor.setValue(t,!0),this.setAriaLabel(t)}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(),n=Ed(t,e),i=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${i} (${n})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,n=this.getValue();return t?t({value:n,internalErrors:null,cellEditorParams:e}):null}},ur=class extends Ys{constructor(e,t="ag-text-field",n="text"){super(e,t,n)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const n=this.eInput;return n.value!==e&&(n.value=Pe(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}setCustomValidity(e){const t=this.eInput,n=e.length>0;t.setCustomValidity(e),n&&t.reportValidity(),mp(t,n)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=n=>{xR(n)&&n.key&&!e.test(n.key)&&n.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:n=>{n.clipboardData?.getData("text")?.split("").some(o=>!e.test(o))&&n.preventDefault()}})}},Th={selector:"AG-INPUT-TEXT-FIELD",component:ur},vz=class extends ur{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=$r();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){Ot(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?jn(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,ii(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?jn(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,ii(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,ii(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return Kn(this.getValue())??void 0}setDate(e,t){this.setValue(jn(e??null,this.includeTime),t)}},PF={selector:"AG-INPUT-DATE-FIELD",component:vz},Ah=class extends Jd{constructor(e){super(),this.cellEditorInput=e,this.eEditor=ge}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:n}=this,{cellStartedEdit:i,eventKey:o,suppressPreventDefault:r}=e;n.getInputElement().setAttribute("title",""),t.init(n,e);let s,a=!0;i?(this.focusAfterAttached=!0,o===K.BACKSPACE||o===K.DELETE?s="":o&&o.length===1?r?a=!1:s=o:(s=t.getStartValue(),o!==K.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,s=t.getStartValue()),a&&s!=null&&n.setStartValue(s),this.addGuiEventListener("keydown",l=>{const{key:u}=l;(u===K.PAGE_UP||u===K.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;$r()||t.getFocusableElement().focus();const n=t.getInputElement();this.highlightAllOnFocus?n.select():this.cellEditorInput.setCaret?.()}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),n=e.getInputElement();t.focus(),n.select()}getValue(){return this.cellEditorInput.getValue()}agSetEditValue(e){this.params.value=e;const t=this.cellEditorInput.getStartValue();this.eEditor.setStartValue(t??null)}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},Cz={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},wz=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return Cz}getAgComponents(){return[PF]}init(e,t){this.eEditor=e,this.params=t;const{min:n,max:i,step:o,colDef:r}=t;n!=null&&e.setMin(n),i!=null&&e.setMax(i),o!=null&&e.setStep(o),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(r.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:n}=this,{min:i,max:o,getValidationErrors:r}=n;let s=[];const a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){const l=i instanceof Date?i:new Date(i);if(t<l){const u=l.toLocaleDateString();s.push(a("minDateValidation",`Date must be after ${u}`,[u]))}}if(o){const l=o instanceof Date?o:new Date(o);if(t>l){const u=l.toLocaleDateString();s.push(a("maxDateValidation",`Date must be before ${u}`,[u]))}}}return s.length||(s=null),r?r({value:t,cellEditorParams:n,internalErrors:s}):s}getValue(){const{eEditor:e,params:t}=this,n=e.getDate();return!Pe(n)&&!Pe(t.value)?t.value:n??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return jn(e,this.includeTime??!1)}},bz=class extends Ah{constructor(){super(new wz(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},yz={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},Sz=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return yz}getAgComponents(){return[PF]}init(e,t){this.eEditor=e,this.params=t;const{min:n,max:i,step:o,colDef:r}=t;n!=null&&e.setMin(n),i!=null&&e.setMax(i),o!=null&&e.setStep(o),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(r.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,n=e.getInputElement().value,i=this.formatDate(this.parseDate(n??void 0)),{min:o,max:r,getValidationErrors:s}=t;let a=[];if(i){const l=new Date(i),u=this.getLocaleTextFunc();if(o){const h=new Date(o);if(l<h){const f=h.toLocaleDateString();a.push(u("minDateValidation",`Date must be after ${f}`,[f]))}}if(r){const h=new Date(r);if(l>h){const f=h.toLocaleDateString();a.push(u("maxDateValidation",`Date must be before ${f}`,[f]))}}}return a.length||(a=null),s?s({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,n=this.formatDate(t.getDate());return!Pe(n)&&!Pe(e.value)?e.value:e.parseValue(n??"")}getStartValue(){return jn(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):Kn(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):jn(e??null,this.includeTime??!1)??void 0}},Rz=class extends Ah{constructor(){super(new Sz(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},xz=class extends Ys{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const n=super.setValue(e,t);return this.eInput.value=e,n}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},Fz={selector:"AG-INPUT-TEXT-AREA",component:xz},Pz={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},Ez=class extends Jd{constructor(){super(Pz,[Fz]),this.eEditor=ge}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:n,eventKey:i,maxLength:o,cols:r,rows:s}=e;this.focusAfterAttached=n,t.getInputElement().setAttribute("title",""),t.setMaxLength(o||200).setCols(r||60).setRows(s||10);let a;n?(this.focusAfterAttached=!0,i===K.BACKSPACE||i===K.DELETE?a="":i&&i.length===1?a=i:(a=this.getStartValue(e),i!==K.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=this.getStartValue(e)),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return t?.toString()??t}agSetEditValue(e){this.params.value=e;const t=this.getStartValue(this.params);this.eEditor.setValue(t??"",!0)}onKeyDown(e){const t=e.key;(t===K.LEFT||t===K.UP||t===K.RIGHT||t===K.DOWN||e.shiftKey&&t===K.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:n}=this,i=this.getLocaleTextFunc();e.setInputAriaLabel(i("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),n&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:n}=t,i=e.getValue();return!Pe(i)&&!Pe(n)?n:t.parseValue(i)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:n}=e,i=this.getLocaleTextFunc(),o=this.getValue();let r=[];return typeof o=="string"&&t!=null&&o.length>t&&r.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),r.length||(r=null),n?n({value:o,internalErrors:r,cellEditorParams:e}):r}},dv=class extends ur{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const r=Number.parseFloat(e.value),s=isNaN(r)?"":this.normalizeValue(r.toString());this.value!==s&&this.setValue(s)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:n,max:i,step:o}=this.config;typeof t=="number"&&this.setPrecision(t),typeof n=="number"&&this.setMin(n),typeof i=="number"&&this.setMax(i),typeof o=="number"&&this.setStep(o)}onWheel(e){Ot(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const n=this.precision;if(n==null)return e;if(t){const o=Number.parseFloat(e).toFixed(n);return Number.parseFloat(o).toString()}const i=String(e).split(".");if(i.length>1){if(i[1].length<=n)return e;if(n>0)return`${i[0]}.${i[1].slice(0,n)}`}return i[0]}setMin(e){return this.min===e?this:(this.min=e,ii(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,ii(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,ii(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(n=>super.setValue(n,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,n){if(Pe(n)){let i=this.isScientificNotation(n);if(i&&this.eInput.validity.valid)return e(n);if(!i){n=this.adjustPrecision(n);const o=this.normalizeValue(n);i=n!=o}if(i)return t(n)}return e(n)}getValue(e=!1){const t=this.eInput;if(!t.validity.valid&&!e)return;const n=t.value;return this.isScientificNotation(n)?this.adjustPrecision(n,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},Dz={selector:"AG-INPUT-NUMBER-FIELD",component:dv},Tz={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},Az=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return Tz}getAgComponents(){return[Dz]}init(e,t){this.eEditor=e,this.params=t;const{max:n,min:i,precision:o,step:r}=t;n!=null&&e.setMax(n),i!=null&&e.setMin(i),o!=null&&e.setPrecision(o),r!=null&&e.setStep(r);const s=e.getInputElement();t.preventStepping?e.addManagedElementListeners(s,{keydown:this.preventStepping}):t.showStepperButtons&&s.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:n,getValidationErrors:i}=e,r=this.eEditor.getInputElement().valueAsNumber,s=this.getLocaleTextFunc();let a=[];return typeof r=="number"&&(t!=null&&r<t&&a.push(s("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),n!=null&&r>n&&a.push(s("maxValueValidation",`Must be less than or equal to ${n}.`,[String(n)]))),a.length||(a=null),i?i({value:r,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===K.UP||e.key===K.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,n=e.getValue();if(!Pe(n)&&!Pe(t.value))return t.value;let i=t.parseValue(n);if(i==null)return i;if(typeof i=="string"){if(i==="")return null;i=Number(i)}return isNaN(i)?null:i}getStartValue(){return this.params.value}setCaret(){$r()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},Iz=class extends Ah{constructor(){super(new Az(()=>this.getLocaleTextFunc()))}},Mz=".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)}}",kz="ag-active-item",Lz=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",cls:`ag-list-item-text ag-${e}-list-item-text`,ref:"eText",children:t}]}),Oz=class extends Ja{constructor(e,t,n){super(Lz(e,t)),this.label=t,this.value=n,this.eText=ge}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(kz,e),BS(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const n=this.getGui();vL(n,e),mL(n,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>jS(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,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)}))}},_z=class extends Ja{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(Mz)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case K.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const n=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(n)}break;case K.DOWN:case K.UP:e.preventDefault(),this.navigate(t);break;case K.PAGE_DOWN:case K.PAGE_UP:case K.PAGE_HOME:case K.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:n}=e,i=n??t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();xn(this.getGui()),this.listItems=[],this.refreshAriaRole()}updateOptions(e){const t=this.options!==e;return t&&(this.clearOptions(),this.addOptions(e)),t}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const n=this.options.findIndex(i=>i.value===e);if(n!==-1){const i=this.options[n];this.value=i.value,this.displayValue=i.text,this.highlightItem(this.listItems[n]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!Mi(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const n=this.getGui(),{scrollTop:i,clientHeight:o}=n,{offsetTop:r,offsetHeight:s}=t;(r+s>i+o||r<i)&&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 n=new Oz(this.cssIdentifier,t,e);n.setParentComponent(this);const i=this.createManagedBean(n);this.listItems.push(i),this.getGui().appendChild(i.getGui())}navigate(e){const t=e===K.DOWN;let n;const{listItems:i,highlightedItem:o}=this;if(!o)n=t?i[0]:At(i);else{let s=i.indexOf(o)+(t?1:-1);s=Math.min(Math.max(s,0),i.length-1),n=i[s]}this.highlightItem(n)}navigateToPage(e){const{listItems:t,highlightedItem:n}=this;if(!n||t.length===0)return;const i=t.indexOf(n),o=this.options.length-1,r=t[0].getHeight(),s=Math.floor(this.getGui().clientHeight/r);let a=-1;e===K.PAGE_HOME?a=0:e===K.PAGE_END?a=o:e===K.PAGE_DOWN?a=Math.min(i+s,o):e===K.PAGE_UP&&(a=Math.max(i-s,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){_r(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((n,i)=>{n.setIndex(i+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},Nz=".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(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}}.ag-picker-field-wrapper:where(.ag-picker-has-focus),.ag-picker-field-wrapper: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)}}.ag-picker-field-wrapper:disabled{opacity:.5}",Bz={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"}}]}]},Hz=class extends rx{constructor(e){if(super(e,e?.template||Bz,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=ge,this.eWrapper=ge,this.eDisplayField=ge,this.eIcon=ge,this.registerCSS(Nz),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:n,variableWidth:i,minPickerWidth:o,maxPickerWidth:r}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,n!=null&&this.setPickerMaxHeight(n),o!=null&&this.setPickerMinWidth(o),r!=null&&this.setPickerMaxWidth(r)}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:n,inputWidth:i}=this.config;if(n){const o=this.beans.iconSvc.createIconNoSpan(n);o&&this.eIcon.appendChild(o)}i!=null&&this.setInputWidth(i)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),vp(e,!1),this.ariaRole&&_r(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case K.UP:case K.DOWN:case K.ENTER:case K.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case K.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:n,pickerAriaLabelValue:i,modalPicker:o=!0},maxPickerHeight:r,minPickerWidth:s,maxPickerWidth:a,variableWidth:l,beans:u,eWrapper:h}=this,f={modal:o,eChild:e,closeOnEsc:!0,closedCallback:()=>{const w=fp(u);this.beforeHidePicker(),w&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(n,i),anchorToElement:h};e.style.position="absolute";const g=u.popupSvc,m=g.addPopup(f);l?(s&&(e.style.minWidth=s),e.style.width=bp(Dd(h)),a&&(e.style.maxWidth=a)):Id(e,a??Dd(h));const v=r??`${Cp(g.getPopupParent())}px`;return e.style.setProperty("max-height",v),this.alignPickerToComponent(),m.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:n,gos:i},eWrapper:o,pickerComponent:r}=this,s=i.get("enableRtl")?"right":"left";n.positionPopupByComponent({type:t,eventSource:o,ePopup:r.getGui(),position:"under",alignSide:s,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();vp(t,e);const n=this.eWrapper.classList;n.toggle("ag-picker-expanded",e),n.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 Id(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},Gz=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}.ag-select:where(:not(.ag-cell-editor,.ag-label-align-top)){min-height:var(--ag-list-item-height)}:where(.ag-select){.ag-picker-field-wrapper{cursor:default;padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}.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(.ag-ltr) .ag-select-list-item{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-select-list-item{padding-right:var(--ag-spacing)}.ag-select-list-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",hv=class extends Hz{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(Gz)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Cc(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:n}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),n&&t==null&&(this.eDisplayField.textContent=n),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new _z("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),n=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",n),PL(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i?.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(t===K.TAB&&this.hidePicker(),t){case K.ENTER:case K.UP:case K.DOWN:case K.PAGE_UP:case K.PAGE_DOWN:case K.PAGE_HOME:case K.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case K.ESCAPE:super.onKeyDown(e);break;case K.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}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}updateOptions(e){return this.listComponent?.updateOptions(e)&&this.setValue(void 0,!0),this}setValue(e,t,n){const{listComponent:i,config:{placeholder:o},eDisplayField:r,tooltipFeature:s}=this;if(this.value===e||!i)return this;if(n||i.setValue(e,!0),i.getValue()===this.getValue())return this;let l=i.getDisplayValue();return l==null&&o&&(l=o),r.textContent=l,s?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},Vz={selector:"AG-SELECT",component:hv},Wz={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},zz=class extends Jd{constructor(){super(Wz,[Vz]),this.eEditor=ge,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:n,gos:i}=this,{values:o,value:r,eventKey:s}=e;if(Wt(o)){le(58);return}this.startedByEnter=s!=null?s===K.ENTER:!1;let a=!1;o.forEach(f=>{const g={value:f},m=n.formatValue(e.column,null,f),v=m!=null;g.text=v?m:f,t.addOption(g),a=a||r===f}),a?t.setValue(e.value??void 0,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:u,valueListMaxHeight:h}=e;l!=null&&t.setPickerGap(l),h!=null&&t.setPickerMaxHeight(h),u!=null&&t.setPickerMaxWidth(u),i.get("editType")!=="fullRow"&&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()}agSetEditValue(e){this.params.value=e,this.eEditor.setValue(e??void 0,!0)}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:n}=e,i=this.getValue();let o=[];if(t&&i!=null&&!t.includes(i)){const r=this.getLocaleTextFunc();o.push(r("invalidSelectionValidation","Invalid selection."))}else o=null;return n?n({value:i,internalErrors:o,cellEditorParams:e}):o}},Uz={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},$z=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return Uz}getAgComponents(){return[Th]}init(e,t){this.eEditor=e,this.params=t;const n=t.maxLength;n!=null&&e.setMaxLength(n)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:n}=e,i=this.getValue(),o=this.getLocaleTextFunc();let r=[];return t!=null&&typeof i=="string"&&i.length>t&&r.push(o("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),r.length||(r=null),n?n({value:i,cellEditorParams:e,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,n=e.getValue();return!Pe(n)&&!Pe(t.value)?t.value:t.parseValue(n)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){$r()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),n=Pe(t)&&t.length||0;n&&e.getInputElement().setSelectionRange(n,n)}},EF=class extends Ah{constructor(){super(new $z(()=>this.getLocaleTextFunc()))}};function jz(e){e.undoRedo?.undo("api")}function Kz(e){e.undoRedo?.redo("api")}function qz(e,t){return e.editModelSvc?.getEditRowDataValue(t,{checkSiblings:!0})}function Qz(e){const t=e.editModelSvc?.getEditMap(),n=[];return t?.forEach((i,o)=>{const{rowIndex:r,rowPinned:s}=o;i.forEach((a,l)=>{const{editorValue:u,pendingValue:h,sourceValue:f,state:g}=a,m=so(a);let v=u??h;v===pn&&(v=void 0);const w={newValue:v,oldValue:f,state:g,column:l,colId:l.getColId(),colKey:l.getColId(),rowIndex:r,rowPinned:s},b=g==="editing";(b||!b&&m)&&n.push(w)})}),n}function Yz(e,t=!1){const{editSvc:n}=e;if(n?.isBatchEditing()){if(t)for(const i of e.editModelSvc?.getEditPositions()??[])i.state==="editing"&&n.revertSingleCellEdit(i);else Zr(e,{persist:!0});Jr(e,void 0,{cancel:t})}else n?.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function Zz(e,t){const n=pt(e,t);return!!e.editSvc?.isEditing(n)}function Jz(e,t){const{key:n,colKey:i,rowIndex:o,rowPinned:r}=t,{editSvc:s,colModel:a}=e,l=a.getCol(i);if(!l){le(12,{colKey:i});return}const h=Ao(e,{rowIndex:o,rowPinned:r||null});if(!h){le(290,{rowIndex:o,rowPinned:r});return}if(!s?.isCellEditable({rowNode:h,column:l},"api"))return;r==null&&cF(e,o),lF(e,i),s?.startEditing({rowNode:h,column:l},{event:n?new KeyboardEvent("keydown",{key:n}):void 0,source:"api",editable:!0})}function Xz(e){return e.editSvc?.validateEdit()||null}function e6(e){return e.undoRedo?.getCurrentUndoStackSize()??0}function t6(e){return e.undoRedo?.getCurrentRedoStackSize()??0}var n6={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},i6=class extends Jp{constructor(e){super(n6),this.params=e}postConstruct(){Vs(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,n=i=>{wm(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:n})}};function o6(e,{column:t},n,i,o="ui"){if(n instanceof KeyboardEvent&&(n.key===K.TAB||n.key===K.ENTER||n.key===K.F2||n.key===K.BACKSPACE&&i))return!0;if(n?.shiftKey&&e.rangeSvc?.getCellRanges().length!=0)return!1;const s=t?.getColDef(),a=r6(e.gos,s),l=n?.type;return l==="click"&&n?.detail===1&&a===1||l==="dblclick"&&n?.detail===2&&a===2?!0:o==="api"?!!i:!1}function r6(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t?.singleClickEdit?1:2}function fv(e,t){return e.editModelSvc?.hasEdits(t,{withOpenEditor:!0})??!1}function gv(e,t){const n=t.column,i=t.rowNode,o=n.getColDef();if(!i)return fv(e,t);const r=o.editable;return i.group&&o.groupRowEditable!=null?e.rowGroupingEditValueSvc?.isGroupCellEditable(i,n)?!0:fv(e,t):n.isColumnFunc(i,r)?!0:fv(e,t)}function s6(e,t,n="ui"){const i=gv(e,t);if(i||n==="ui")return i;const{rowNode:o,column:r}=t;for(const s of e.colModel.getCols())if(s!==r&&gv(e,{rowNode:o,column:s}))return!0;return!1}var Ih=(e,t=!1)=>{if(e!==void 0)return so(e)||t&&e.state==="editing"};function DF(e,t,n=!1){return Ih(e.editModelSvc?.getEdit(t),n)}var TF=(e,t,n)=>{if(e)for(let i=0,o=e.length;i<o;++i){const r=e[i];if(r.data&&(Ih(t?.getEdit({rowNode:r,column:n}))||Ih(t?.getEdit({rowNode:r.pinnedSibling,column:n})))||TF(r.childrenAfterGroup,t,n))return!0}};function AF(e,t){const{column:n,rowNode:i}=t;return e.gos.get("groupTotalRow")&&!i?.footer?!1:TF(i?.childrenAfterGroup,e.editModelSvc,n)}function IF(e,{rowNode:t,column:n}){if(t=t.pinnedSibling,!!t)return Ih(e.editModelSvc?.getEdit({rowNode:t,column:n}))}var a6=class extends J{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:n}=this;if(t?.isBatchEditing()&&t.isEditing()){const o=DF(n,e)||AF(n,e)||IF(n,e);this.applyBatchingStyle(o)}else this.applyBatchingStyle(!1);const i=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss("ag-cell-editing-error",i)}applyBatchingStyle(e){this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&this.editSvc?.isBatchEditing())??!1)}},l6=class extends J{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:n}=this;let i=e.rowNode,o=t?.getEditRow(i);const r=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:i});if(!o&&i.pinnedSibling&&(i=i.pinnedSibling,o=t?.getEditRow(i)),o){const s=Array.from(o.keys()).some(a=>{const l={rowNode:i,column:a};return DF(n,l,!0)||AF(n,l)||IF(n,l)});this.applyStyle(r,s);return}this.applyStyle(r)}applyStyle(e=!1,t=!1){const n=!!this.editSvc?.isBatchEditing(),i=this.gos.get("editType")==="fullRow";this.rowCtrl?.forEachGui(void 0,({rowComp:o})=>{o.toggleCss("ag-row-editing",i&&t),o.toggleCss("ag-row-batch-edit",i&&t&&n),o.toggleCss("ag-row-inline-editing",t),o.toggleCss("ag-row-not-inline-editing",!t),o.toggleCss("ag-row-editing-invalid",i&&t&&e)})}},c6=({rowModel:e,pinnedRowModel:t,editModelSvc:n},i)=>{const o=new Set;e.forEachNode(r=>i.has(r)&&o.add(r)),t?.forEachPinnedRow("top",r=>i.has(r)&&o.add(r)),t?.forEachPinnedRow("bottom",r=>i.has(r)&&o.add(r));for(const r of i)o.has(r)||n.removeEdits({rowNode:r});return o},u6=({editModelSvc:e},t,n)=>{for(const i of t)e?.getEditRow(i)?.forEach((o,r)=>!n.has(r)&&e.removeEdits({rowNode:i,column:r}))},d6=e=>()=>{const t=new Set(e.colModel.getCols()),n=e.editModelSvc.getEditMap(!0),i=new Set(n.keys());u6(e,c6(e,i),t)},h6=new Set(["undo","redo","paste","bulk","rangeSvc"]),f6=new Set(["ui","api"]),MF={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},g6=new Set(Object.keys(MF)),p6=new Set(["paste","rangeSvc","cellClear","redo","undo"]),pv={cancel:!0,source:"api"},m6={cancel:!1,source:"api"},oa={checkSiblings:!0},es={force:!0,suppressFlash:!0},v6={force:!0},C6=class extends J{constructor(){super(...arguments),this.beanName="editSvc",this.committing=!1,this.batch=!1,this.batchStartDispatched=!1,this.stopping=!1,this.rangeSelectionWhileEditing=0}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:i})=>{this.stopEditing(void 0,pv),this.createStrategy(i)});const t=d6(e),n=()=>{const i=this.model.getCellValidationModel().getCellValidationMap().size>0,o=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||o?this.stopEditing(void 0,pv):this.isEditing()&&(this.batch?Jr(e,this.model.getEditPositions()):this.stopEditing(void 0,m6)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:n,filterChanged:n,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}startBatchEditing(){this.batch||(this.batch=!0,this.batchStartDispatched=!1,this.stopEditing(void 0,pv))}stopBatchEditing(e){this.batch&&(e&&this.stopEditing(void 0,e),this.batchStartDispatched&&this.dispatchBatchStopped(new Map,!1),this.batch=!1,this.batchStartDispatched=!1)}ensureBatchStarted(){!this.batch||this.batchStartDispatched||(this.batchStartDispatched=!0,this.dispatchBatchEvent("batchEditingStarted",new Map))}createStrategy(e){const{beans:t,gos:n,strategy:i}=this,o=kF(n,e);if(i){if(i.beanName===o)return i;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(o,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,n,i="ui"){const o=o6(this.beans,e,t,n,i);return o&&(this.strategy??(this.strategy=this.createStrategy())),o}shouldStopEditing(e,t,n="ui"){return this.strategy?.shouldStop(e,t,n)??null}shouldCancelEditing(e,t,n="ui"){return this.strategy?.shouldCancel(e,t,n)??null}validateEdit(){return e3(this.beans)}isEditing(e,t){return this.model.hasEdits(e??void 0,t??oa)}isRowEditing(e,t){return!!e&&this.model.hasRowEdits(e,t)}enableRangeSelectionWhileEditing(){this.beans.rangeSvc&&this.gos.get("cellSelection")&&this.rangeSelectionWhileEditing++}disableRangeSelectionWhileEditing(){this.rangeSelectionWhileEditing=Math.max(0,this.rangeSelectionWhileEditing-1)}isRangeSelectionEnabledWhileEditing(){return this.rangeSelectionWhileEditing>0}startEditing(e,t){const{startedEdit:n=!0,event:i=null,source:o="ui",ignoreEventKey:r=!1,silent:s}=t;if(this.strategy??(this.strategy=this.createStrategy()),!(t.editable??this.isCellEditable(e,"api")))return;const l=pt(this.beans,e);if(l&&!l.comp){t.editable=void 0,l.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const u=this.shouldStartEditing(e,i,n,o);if(u===!1&&o!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,o)&&!t.continueEditing&&this.stopEditing(void 0,{source:o}),u&&this.ensureBatchStarted(),this.strategy.start({position:e,event:i,source:o,ignoreEventKey:r,startedEdit:n,silent:s})}stopEditing(e,t){const n=this.prepareStopContext(e,t);if(!n)return!1;this.stopping=!0;let i=!1,{edits:o}=n;try{const r=this.processStopRequest(n);return i||(i=r.res),o=r.edits,this.finishStopEditing({...n,edits:o,params:t,position:e,res:i}),i}finally{this.rangeSelectionWhileEditing=0,this.stopping=!1}}prepareStopContext(e,t){const{event:n=null,cancel:i=!1,source:o="ui",forceCancel:r=!1,forceStop:s=!1,commit:a=!1}=t||{};if(g6.has(o)&&this.batch)return e?.rowNode&&e?.column&&this.bulkRefreshCell(e),null;const l=this.committing?MF[o]:o;if(!(this.committing||this.isEditing(e)||this.batch&&this.model.hasEdits(e,oa))||!this.strategy||this.stopping)return null;const h=pt(this.beans,e);h&&(h.onEditorAttachedFuncs=[]);const f=!i&&(!!this.shouldStopEditing(e,n,l)||(this.committing||o==="paste")&&!this.batch)||s,g=i&&!!this.shouldCancelEditing(e,n,l)||r;return{cancel:i,cellCtrl:h,edits:this.model.getEditMap(!0),event:n??null,forceCancel:r,forceStop:s,commit:a,position:e,source:o,treatAsSource:l,willCancel:g,willStop:f}}processStopRequest(e){const{event:t,position:n,willCancel:i,willStop:o}=e;return o||i?this.handleStopOrCancel(e):this.shouldHandleMidBatchKey(t,n)?{res:!1,edits:this.handleMidBatchKey(t,n,e)}:(Zr(this.beans,{persist:!0}),this.batch&&this.strategy?.cleanupEditors(n),{res:!1,edits:this.model.getEditMap()})}handleStopOrCancel(e){const{beans:t,model:n}=this,{cancel:i,commit:o,edits:r,event:s,source:a,willCancel:l,willStop:u}=e,h=!this.batch||!l;Zr(t,{persist:h,isCancelling:l||i,isStopping:u});const f=n.getEditMap(),m=!l&&(!this.batch||o)?this.processEdits(f,a):[];i?this.strategy?.stopCancelled(e.forceCancel):this.strategy?.stopCommitted(s,o),this.clearValidationIfNoOpenEditors();for(const v of m)n.clearEditValue(v);this.bulkRefreshMap(r);for(const v of n.getEditPositions(f)){const w=pt(t,v),b=so(v);w?.refreshCell({force:!0,suppressFlash:!b})}return{res:u,edits:f}}shouldHandleMidBatchKey(e,t){return e instanceof KeyboardEvent&&this.batch&&!!this.strategy?.midBatchInputsAllowed(t)&&this.isEditing(t,{withOpenEditor:!0})}handleMidBatchKey(e,t,n){const{beans:i,model:o}=this,{cellCtrl:r,edits:s}=n,{key:a}=e,l=a===K.ENTER,u=a===K.ESCAPE,h=a===K.TAB;if(l||h||u){if(l||h)Zr(i,{persist:!0});else if(u&&r){const{rowNode:f,column:g}=r;if(this.batch&&f&&g){const m={rowNode:f,column:g};Jr(i,[m],{silent:!0}),this.model.stop(m,!0,!0),pt(i,m)?.refreshCell(es)}else this.revertSingleCellEdit(r)}return this.batch?this.strategy?.cleanupEditors():Jr(i,o.getEditPositions(),{event:e,cancel:u}),e.preventDefault(),this.bulkRefreshMap(s,{suppressFlash:!0}),o.getEditMap()}return s}finishStopEditing({cellCtrl:e,edits:t,params:n,position:i,res:o,commit:r,forceCancel:s,willCancel:a,willStop:l}){const u=this.beans;o&&i&&(!this.batch||r)&&this.model.removeEdits(i),this.navigateAfterEdit(n,e?.cellPosition),Bc(u),this.clearValidationIfNoOpenEditors();const{rowRenderer:h,formula:f}=u;if(a&&h.refreshRows({rowNodes:Array.from(t.keys())}),this.batch){f?f.refreshFormulas(!0):h.refreshRows({suppressFlash:!0,force:!0});const g=l&&r;(g||a&&s)&&this.dispatchBatchStopped(t,g)}}dispatchBatchStopped(e,t){let n;t&&(n=j5(e),n.size>0&&this.ensureBatchStarted()),this.batchStartDispatched&&(this.batchStartDispatched=!1,this.dispatchBatchEvent("batchEditingStopped",n??new Map))}clearValidationIfNoOpenEditors(){this.model.hasEdits(void 0,{withOpenEditor:!0})||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap())}navigateAfterEdit(e,t){if(!e||!t)return;const{event:n,suppressNavigateAfterEdit:i}=e;if(!(n instanceof KeyboardEvent)||i)return;const{key:r,shiftKey:s}=n,a=this.gos.get("enterNavigatesVerticallyAfterEdit");if(r!==K.ENTER||!a)return;const l=s?K.UP:K.DOWN;this.beans.navigation?.navigateToNextCell(null,l,t,!1)}processEdits(e,t){const n=Array.from(e.keys()),i=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,o=[],{changeDetectionSvc:r}=this.beans;r?.beginDeferred();try{for(const s of n){const a=e.get(s);for(const l of a.keys()){const u=a.get(l),h={rowNode:s,column:l};if(so(u)&&!i){const f=pt(this.beans,h);this.setNodeDataValue(s,l,u.pendingValue,f,t)||o.push(h)}}}}finally{r?.endDeferred()}return o}setNodeDataValue(e,t,n,i,o="edit"){const r=f6.has(o)?"edit":o;i&&(i.suppressRefreshCell=!0),this.committing=!0;try{return e.setDataValue(t,n,r)}finally{this.committing=!1,i&&(i.suppressRefreshCell=!1)}}syncEditAfterCommit(e,t){const n=this.model.getEdit(e);n&&n.state!=="editing"&&(t?this.beans.editModelSvc?.setEdit(e,{sourceValue:n.pendingValue}):this.model.clearEditValue(e))}setEditMap(e,t){this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(e,t),this.bulkRefreshMap(e);let n=es;t?.forceRefreshOfEditCellsOnly&&(n={...w6(e),...es}),this.beans.rowRenderer.refreshCells(n)}dispatchEditValuesChanged({rowNode:e,column:t},n={}){if(!e||!t||!n)return;const{pendingValue:i,sourceValue:o}=n,{rowIndex:r,rowPinned:s,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:r,rowPinned:s,column:t,source:"api",data:a,newValue:i,oldValue:o,value:i,colDef:t.getColDef()})}bulkRefreshCell(e,t){en(this.gos,this.beans.rowModel)&&this.refCell(e,this.model.getEdit(e),t)}bulkRefreshMap(e,t){en(this.gos,this.beans.rowModel)&&e.forEach((n,i)=>{for(const o of n.keys())this.refCell({rowNode:i,column:o},n.get(o),t)})}refCell({rowNode:e,column:t},n,i={}){const{beans:o,gos:r}=this,s=new Set([e]),a=new Set,l=e.pinnedSibling;l&&s.add(l);const u=e.sibling;u&&a.add(u);let h=e.parent;for(;h;)h.sibling?.footer&&r.get("groupTotalRow")||!h.parent&&h.sibling&&r.get("grandTotalRow")?a.add(h.sibling):a.add(h),h=h.parent;for(const f of s)this.dispatchEditValuesChanged({rowNode:f,column:t},n);for(const f of s)pt(o,{rowNode:f,column:t})?.refreshCell(i);for(const f of a){const g=pt(o,{rowNode:f,column:t});g&&(g.refreshCell(i),!i.force&&this.batch&&g.editStyleFeature?.applyCellStyles?.())}}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{gos:n,beans:i}=this,o=e.rowNode;if(o.group&&e.column.getColDef().groupRowEditable==null){if(n.get("treeData")){if(!o.data&&!n.get("enableGroupEdit"))return!1}else if(!n.get("enableGroupEdit"))return!1}const r=kF(n)==="fullRow"?s6(i,e,t):gv(i,e);return r&&(this.strategy??(this.strategy=this.createStrategy())),r}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,n=!0){if(this.hasValidationErrors(e)){const i=pt(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),n&&(i&&!i.hasBrowserFocus()&&i.focusCell(),i?.comp?.getCellEditor()?.focusIn?.()),"block-stop"):(i&&this.revertSingleCellEdit(i),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){const n=pt(this.beans,e);n?.comp?.getCellEditor()&&(Jr(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),ea(this.beans,e,{silent:!0}),Xr(this.beans),n?.refreshCell(es),t&&(n?.focusCell(),n?.comp?.getCellEditor()?.focusIn?.()))}hasValidationErrors(e){Xr(this.beans);const t=pt(this.beans,e);t&&(t.refreshCell(es),t.rowCtrl.rowEditStyleFeature?.applyRowStyles());let n=!1;return e?.rowNode?(n||(n=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(n||(n=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(n||(n=this.model.getCellValidationModel().getCellValidationMap().size>0),n||(n=this.model.getRowValidationModel().getRowValidationMap().size>0)),n}moveToNextCell(e,t,n,i="ui"){let o;const r=this.isEditing(),s=r&&this.checkNavWithValidation(void 0,n)==="block-stop";return e instanceof cl&&r&&(o=this.strategy?.moveToNextEditingCell(e,t,n,i,s)),o===null||(o=o||!!this.beans.focusSvc.focusedHeader,o===!1&&!s&&this.stopEditing()),o}getPendingEditValue(e,t,n){if(n==="data"||n==="batch"&&!this.batch)return;const i=this.model.getEdit({rowNode:e,column:t},oa);if(!i||this.stopping&&!this.batch&&!i.editorState?.cellStartedEditing)return;if(n==="edit"){const r=i.editorValue;if(r!=null&&r!==pn)return r}const o=i.pendingValue;if(o!==pn)return o}getCellDataValue(e){const t=this.model.getEdit(e,oa);if(t){const n=t.pendingValue;if(n!==pn)return n;const i=t.sourceValue;if(i!=null)return i}return this.valueSvc.getValue(e.column,e.rowNode,"data")}addStopEditingWhenGridLosesFocus(e){z5(this,this.beans,e)}createPopupEditorWrapper(e){return new i6(e)}batchResetToSourceValue(e){if(!this.batch)return!1;const t=this.model.getEdit(e);if(!t)return!1;const{pendingValue:n,sourceValue:i,state:o}=t;return n===i||o==="editing"?!1:(this.dispatchEditValuesChanged(e,{...t,pendingValue:i}),this.beans.editModelSvc?.removeEdits(e),pt(this.beans,e)?.refreshCell(es),!0)}setDataValue(e,t,n){try{const i=this.batch,o=this.isEditing(i?void 0:e);if((!o||this.committing)&&!i&&!p6.has(n)||!o&&!i&&n==="paste"||n==="batch"&&!i)return;if(n==="edit"){if(o&&this.applyEditorValue(e,t))return!0;if(!i)return}if(this.strategy??(this.strategy=this.createStrategy()),n==="batch"||n==="edit")return this.applyDirectValue(e,t,n);const r=this.beans;let s;if(i?s="ui":this.committing?s=n??"api":s="api",!n||h6.has(n))return this.applyDirectValue(e,t,n);const a=this.applyExistingEdit(e,t,n,s);return a!==void 0?a:(al(r,e,t,n,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0)}finally{this.committing=!1}}applyExistingEdit(e,t,n,i){const o=this.model.getEdit(e);if(o)return o.pendingValue===t?!1:o.sourceValue!==t?(al(this.beans,e,t,n,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:i,suppressNavigateAfterEdit:!0}),!0):(this.beans.editModelSvc?.removeEdits(e),this.ensureBatchStarted(),this.dispatchEditValuesChanged(e,{...o,pendingValue:t}),!0)}applyEditorValue(e,t){const n=this.beans,i=pt(n,e),o=i?.comp?.getCellEditor();return!i||!o?!1:(al(n,e,t,"edit",void 0,{persist:!0}),i.editStyleFeature?.applyCellStyles?.(),"agSetEditValue"in o?(o.agSetEditValue(t),!0):o.refresh&&i.editCompDetails?(o.refresh({...i.editCompDetails.params,value:t}),!0):(i.hasBrowserFocus()&&i.onEditorAttachedFuncs.push(()=>{const s=pt(this.beans,e);s?.focusCell(!0),s?.comp?.getCellEditor()?.focusIn?.()}),Jr(n,[e],{silent:!0,cancel:!0}),ea(n,e,{silent:!0}),Xr(n),pt(n,e)?.refreshCell(es),!0))}applyDirectValue(e,t,n){const i=this.beans;if(this.batch){if(n==="batch"&&pt(i,e)?.comp?.getCellEditor()){const{editModelSvc:s,valueSvc:a}=i,{rowNode:l,column:u}=e;s?.getEdit(e)?.sourceValue===void 0&&s?.setEdit(e,{sourceValue:a.getValue(u,l,"data")}),s?.setEdit(e,{pendingValue:t})}else al(i,e,t,n,void 0,{persist:!0}),n!=="batch"&&this.cleanupEditors();return Bc(i),this.ensureBatchStarted(),this.bulkRefreshCell(e),!0}al(i,e,t,n,void 0,{persist:!0});const o=pt(i,e),r=this.setNodeDataValue(e.rowNode,e.column,t,o,n);return this.syncEditAfterCommit(e,r),Bc(i),pt(i,e)?.refreshCell(r?v6:es),r}handleColDefChanged(e){q5(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){const{model:n}=this;if(!this.batch||!n.hasRowEdits(e.rowNode,oa))return;const{rowNode:o}=e,{compDetails:r,valueToDisplay:s}=t;if(r){const{params:a}=r;return a.data=n.getEditRowDataValue(o,oa),{compDetails:r}}return{valueToDisplay:s}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,n,i){this.strategy?.dispatchCellEvent(e,t,n,i)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return Ue(this.gos,{type:e,...e==="batchEditingStopped"?{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},n){if(!n||n.length===0)return;const{beans:i,rangeSvc:o,valueSvc:r}=this,{formula:s}=i;Zr(i,{persist:!0});const a=this.model.getEditMap(!0);let l=a.get(e)?.get(t)?.pendingValue,u=!1;this.batch||(this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),u=!0);const h=s?.isFormula(l)??!1;n.forEach(g=>{const m=g.columns.some(v=>v?.isAllowFormula());if(o?.forEachRowInRange(g,v=>{const w=Ao(i,v);if(w===void 0)return;const b=a.get(w)??new Map;let y=l;for(const R of g.columns){if(!R)continue;const S=!!h&&R.isAllowFormula();if(this.isCellEditable({rowNode:w,column:R},"api")){const P=r.getValue(R,w,"data",!0);let F=r.parseValue(R,w??null,y,P);Number.isNaN(F)&&(F=null),b.set(R,{editorValue:void 0,pendingValue:F,sourceValue:P,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}S&&(y=s?.updateFormulaByOffset({value:y,columnDelta:1}))}b.size>0&&a.set(w,b),h&&m&&(l=s?.updateFormulaByOffset({value:l,rowDelta:1}))}),this.setEditMap(a),this.batch){this.cleanupEditors(),Bc(i),this.ensureBatchStarted();return}this.committing=!0;try{this.stopEditing(void 0,{source:"bulk"})}finally{this.committing=!1,u&&this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(a)})}});const f=pt(i,{rowNode:e,column:t});f&&f.focusCell(!0)}createCellStyleFeature(e){return new a6(e,this.beans)}createRowStyleFeature(e){return new l6(e,this.beans)}setEditingCells(e,t){const{beans:n}=this,{colModel:i,valueSvc:o}=n,r=new Map;for(let{colId:s,column:a,colKey:l,rowIndex:u,rowPinned:h,newValue:f,state:g}of e){const m=s?i.getCol(s):l?i.getCol(l):a;if(!m)continue;const v=Ao(n,{rowIndex:u,rowPinned:h});if(!v)continue;const w=o.getValue(m,v,"data",!0);if(!t?.forceRefreshOfEditCellsOnly&&!so({pendingValue:f,sourceValue:w})&&g!=="editing")continue;let b=r.get(v);b||(b=new Map,r.set(v,b)),f===void 0&&(f=pn),b.set(m,{editorValue:void 0,pendingValue:f,sourceValue:w,state:g??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(r,t)}onCellFocused(e){const t=pt(this.beans,e);if(!t||!this.isEditing(t,oa))return;const n=this.model.getEdit(t);if(!n||!so(n))return;const o=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(o,"pendingChange")}allowedFocusTargetOnValidation(e){return pt(this.beans,e)}};function w6(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 kF(e,t){return t??e.get("editType")??"singleCell"}var LF=class extends J{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 n=e.previousParams,{editSvc:i,beans:o}=this,r=e.type==="cellFocused"?e.sourceEvent:null;n&&(t=pt(o,n));const{gos:s,editModelSvc:a}=o,l=e.type==="cellFocusCleared";if(i.isEditing(void 0,{withOpenEditor:!0})){const{column:u,rowIndex:h,rowPinned:f}=e,g={column:u,rowNode:Ao(o,{rowIndex:h,rowPinned:f})},m=s.get("invalidEditValueMode")==="block";if(m)return;const v=!m,w=!!a?.getCellValidationModel().hasCellValidation(g),b=v&&w;!(n||l)||i.stopEditing(void 0,{cancel:b,source:l&&v?"api":void 0,event:r})||(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"}))}t?.refreshCell({suppressFlash:!0,force:!0})}stopCancelled(e){const t=this.editSvc.isBatchEditing()&&!e;for(const n of this.model.getEditPositions())Hc(this.beans,n,{cancel:!0},pt(this.beans,n)),this.model.stop(n,t,!0);return!0}stopCommitted(e,t){const n=this.model.getEditPositions(),i={all:[],pass:[],fail:[]};for(const s of n)i.all.push(s),(this.model.getCellValidationModel().getCellValidation(s)?.errorMessages?.length??0)>0?i.fail.push(s):i.pass.push(s);const o=this.processValidationResults(i),r=this.editSvc.isBatchEditing()&&!t;for(const s of o.destroy)Hc(this.beans,s,{event:e},pt(this.beans,s)),this.model.stop(s,r,!1);for(const s of o.keep){const a=pt(this.beans,s);!this.editSvc.cellEditingInvalidCommitBlocks()&&a&&this.editSvc.revertSingleCellEdit(a)}return!0}cleanupEditors({rowNode:e}={},t){Zr(this.beans,{persist:!1});const n=this.model.getEditPositions(),i=[];if(e)for(const o of n)o.rowNode!==e&&i.push(o);else for(const o of n)i.push(o);Jr(this.beans,i),Bc(this.beans,t)}setFocusOutOnEditor(e){e.comp?.getCellEditor()?.focusOut?.()}setFocusInOnEditor(e){const t=e.comp,n=t?.getCellEditor();if(n?.focusIn)n.focusIn();else{const i=this.beans.gos.get("editType")==="fullRow";e.focusCell(i),e.onEditorAttachedFuncs.push(()=>t?.getCellEditor()?.focusIn?.())}}setupEditors(e){const{event:t,ignoreEventKey:n=!1,startedEdit:i,position:o,cells:r=this.model.getEditPositions()}=e,s=t instanceof KeyboardEvent&&!n&&t.key||void 0;$5(this.beans,r,o,s,t,i)}dispatchCellEvent(e,t,n,i){const o=pt(this.beans,e);o&&this.eventSvc.dispatchEvent({...o.createEvent(t??null,n),...i})}dispatchRowEvent(e,t,n){if(n)return;const i=bh(this.beans,e);i&&this.eventSvc.dispatchEvent(i.createRowEvent(t))}shouldStop(e,t,n="ui"){const i=this.editSvc.isBatchEditing();return i&&n==="api"?!0:i&&(n==="ui"||n==="edit")?!1:n==="api"?!0:t instanceof KeyboardEvent&&!i?t.key===K.ENTER:null}shouldCancel(e,t,n="ui"){const i=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!i&&t.key===K.ESCAPE||i&&n==="api"||n==="api")}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const n=[];if(e.forEach((i,o)=>{i.forEach((r,s)=>{r.state==="editing"&&n.push({...r,rowNode:o,column:s})})}),t?.update&&(e=new Map([...this.model.getEditMap(),...e])),this.model?.setEditMap(e),n.length>0){const i=n.at(-1),o=i.pendingValue===pn?void 0:i.pendingValue;this.start({position:i,event:new KeyboardEvent("keydown",{key:o}),source:"api"});const r=pt(this.beans,i);r&&this.setFocusInOnEditor(r)}}destroy(){this.cleanupEditors(),super.destroy()}},b6=class extends LF{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=new Set}shouldStop(e,t,n="ui"){const{rowNode:i,beans:o}=this,{rowNode:r}=e||{};if(!bh(o,{rowNode:i}))return!0;const a=super.shouldStop({rowNode:i},t,n);return a!==null?a:i?r!==i:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:n,startedEdit:i,event:o,ignoreEventKey:r}=e,{rowNode:s}=t,{beans:a,model:l,startedRows:u}=this;this.rowNode!==s&&super.cleanupEditors(t);const h=a.visibleCols.allCols,f=[],g=[];for(const m of h)m.isCellEditable(s)&&g.push(m);if(g.length!=0){u.has(s)||(this.dispatchRowEvent({rowNode:s},"rowEditingStarted",n),u.add(s));for(const m of g){const v={rowNode:s,column:m};f.push(v),l.start(v)}this.rowNode=s,this.setupEditors({cells:f,position:t,startedEdit:i,event:o,ignoreEventKey:r})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){const{rowNode:t,model:n}=this;return t&&!n.hasRowEdits(t)?!1:(super.stopCancelled(e),this.cleanupEditors({rowNode:t},!0),this.rowNode=void 0,!0)}stopCommitted(e,t){const{rowNode:n,beans:i,model:o,editSvc:r}=this;if(n&&!o.hasRowEdits(n))return!1;const s=[];if(o.getEditMap().forEach((a,l)=>{if(!(!a||a.size===0)){for(const u of a.values())if(so(u)){s.push(l);break}}}),Xr(i),r.checkNavWithValidation({rowNode:n})==="block-stop")return!1;if(super.stopCommitted(e,t),t||!r.isBatchEditing())for(const a of s)this.dispatchRowEvent({rowNode:a},"rowValueChanged");return this.cleanupEditors({rowNode:n},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,n=e.previousParams;if(n?.rowIndex===t||e.sourceEvent instanceof KeyboardEvent)return;const{beans:i,gos:o,model:r}=this;if(i.editSvc?.isRangeSelectionEnabledWhileEditing())return;const s=pt(i,n);o.get("invalidEditValueMode")==="block"&&s&&(r.getCellValidationModel().getCellValidation(s)||r.getRowValidationModel().getRowValidation(s))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);const{startedRows:n}=this;for(const i of n)this.dispatchRowEvent({rowNode:i},"rowEditingStopped"),this.destroyEditorsForRow(i);n.clear()}destroyEditorsForRow(e){const t=bh(this.beans,{rowNode:e});if(!t)return;const n={};for(const i of t.getAllCellCtrls())i.comp?.getCellEditor()&&Hc(this.beans,i,n,i)}moveToNextEditingCell(e,t,n,i="ui",o=!1){const{beans:r,model:s,gos:a,editSvc:l}=this,u=e.cellPosition;let h;s.suspend(!0);try{h=r.navigation?.findNextCellToFocusOn(u,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{s.suspend(!1)}if(h===!1)return null;if(h==null)return!1;const f=h.cellPosition,g=e.isCellEditable(),m=h.isCellEditable(),v=f&&u.rowIndex===f.rowIndex&&u.rowPinned===f.rowPinned;g&&this.setFocusOutOnEditor(e),this.restoreEditors();const w=a.get("suppressStartEditOnTab");return m&&!o?w?h.focusCell(!0,n):(h.comp?.getCellEditor()||ea(r,h,{event:n,cellStartedEdit:!0}),this.setFocusInOnEditor(h),h.focusCell(!1,n)):(m&&o&&this.setFocusInOnEditor(h),h.focusCell(!0,n)),!v&&!o&&(l?.stopEditing({rowNode:e.rowNode},{event:n,forceStop:!0}),l?.isRowEditing(e.rowNode,{withOpenEditor:!0})&&this.cleanupEditors(h,!0),w?h.focusCell(!0,n):l.startEditing(h,{startedEdit:!0,event:n,source:i,ignoreEventKey:!0,editable:m||void 0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){const{beans:e,model:t}=this;t.getEditMap().forEach((n,i)=>n.forEach(({state:o},r)=>{if(o!=="editing")return;const s=pt(e,{rowNode:i,column:r});s&&!s.comp?.getCellEditor()&&ea(e,s,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.clear()}},y6=class extends LF{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,n="ui"){const i=super.shouldStop(e,t,n);if(i!==null)return i;const o=e?.rowNode,r=e?.column,s=this.rowNode,a=this.column;return(!s||!a)&&o&&r?null:s!==o||a!==r?!0:!s&&!a?this.model.hasEdits(void 0,{withOpenEditor:!0}):!1}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:n,event:i,ignoreEventKey:o}=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:n,event:i,ignoreEventKey:o})}dispatchRowEvent(e,t,n){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){return super.stopCancelled(e),this.clearPosition()}stopCommitted(e,t){return super.stopCommitted(e,t),this.clearPosition()}clearPosition(){return this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:n}=this.beans,{rowIndex:i,column:o,rowPinned:r}=e,s=Ao(this.beans,{rowIndex:i,rowPinned:r}),a=Ym(o),l=t.getCol(a),u=e.previousParams;if(u){const h=Ym(u.column);if(u?.rowIndex===i&&h===a&&u?.rowPinned===r)return}e.type=="cellFocused"&&(n?.isRangeSelectionEnabledWhileEditing()||n?.isEditing({rowNode:s,column:l},{withOpenEditor:!0}))||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,n,i="ui",o=!1){const r=this.beans.focusSvc.getFocusedCell();r&&(e=el(this.beans,r)??e);const s=e.cellPosition;let a;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),o||(e.eGui.focus(),this.editSvc?.stopEditing(e,{source:this.editSvc?.isBatchEditing()?"ui":"api",event:n}));try{a=this.beans.navigation?.findNextCellToFocusOn(s,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(a===!1)return null;if(a==null)return!1;const u=a.cellPosition,h=e.isCellEditable(),f=a.isCellEditable(),g=u&&s.rowIndex===u.rowIndex&&s.rowPinned===u.rowPinned;h&&!o&&this.setFocusOutOnEditor(e);const m=this.gos.get("suppressStartEditOnTab");let v=!1;if(!g&&!o&&(super.cleanupEditors(a,!0),m?a.focusCell(!0,n):(v=!0,this.editSvc.startEditing(a,{startedEdit:!0,event:n,source:i,ignoreEventKey:!0,editable:f}))),f&&!o){if(a.focusCell(!1,n),m)a.focusCell(!0,n);else if(!a.comp?.getCellEditor()){if(!v){const w=this.editSvc?.isEditing(a,{withOpenEditor:!0});ea(this.beans,a,{event:n,cellStartedEdit:!0,silent:w})}this.setFocusInOnEditor(a),this.cleanupEditors(a)}}else f&&o&&this.setFocusInOnEditor(a),a.focusCell(!0,n);return e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},ts={moduleName:"EditCore",version:Se,beans:[W5,C6],apiFunctions:{getEditingCells:Qz,getEditRowValues:qz,getCellEditorInstances:U5,startEditingCell:Jz,stopEditing:Yz,isEditing:Zz,validateEdit:Xz},dynamicBeans:{singleCell:y6,fullRow:b6},dependsOn:[Dh,xF],css:[gz]},S6={moduleName:"UndoRedoEdit",version:Se,beans:[fz],apiFunctions:{undoCellEditing:jz,redoCellEditing:Kz,getCurrentUndoSize:e6,getCurrentRedoSize:t6},dependsOn:[ts]},R6={moduleName:"TextEditor",version:Se,userComponents:{agCellEditor:EF,agTextCellEditor:EF},dependsOn:[ts]},x6={moduleName:"NumberEditor",version:Se,userComponents:{agNumberCellEditor:{classImp:Iz}},dependsOn:[ts]},F6={moduleName:"DateEditor",version:Se,userComponents:{agDateCellEditor:bz,agDateStringCellEditor:Rz},dependsOn:[ts]},P6={moduleName:"CheckboxEditor",version:Se,userComponents:{agCheckboxCellEditor:mz},dependsOn:[ts]},E6={moduleName:"SelectEditor",version:Se,userComponents:{agSelectCellEditor:zz},dependsOn:[ts]},D6={moduleName:"LargeTextEditor",version:Se,userComponents:{agLargeTextCellEditor:Ez},dependsOn:[ts]},T6={moduleName:"CustomEditor",version:Se,dependsOn:[ts]},OF={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agBigIntColumnFilter:"agBigIntColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},A6=new Set(Object.values(OF));function ns(e,t){const n=e.filterUi;if(!n)return null;if(n.created)return n.promise;if(t)return null;const i=n.create(n.refreshed),o=n;return o.created=!0,o.promise=i,i}function I6(e,t,n,i,o,r,s){return t.refresh?.({...n,model:i,source:r,additionalEventAttributes:s}),e().then(a=>{if(a){const{filter:l,filterParams:u}=a;_F(l,u,i,o,r,s)}})}function _F(e,t,n,i,o,r){e?.refresh?.({...t,model:n,state:i,source:o,additionalEventAttributes:r})}function NF(e,t,n,i){const o=e();o?.created&&o.promise.then(r=>{const s=t();_F(r,o.filterParams,s,n()??{model:s},"ui",i)})}function BF(e){let t,n=!1,i;const{action:o,filterParams:r,getFilterUi:s,getModel:a,getState:l,updateState:u,updateModel:h,processModelToApply:f}=e;switch(o){case"apply":{const g=l();i=g?.model??null,f&&(i=f(i)),t={state:g?.state,model:i},n=!0;break}case"clear":{t={model:null},r?.buttons?.includes("apply")||(n=!0,i=null);break}case"reset":{t={model:null},n=!0,i=null;break}case"cancel":{t={model:a()};break}}u(t),n?h(i):NF(s,a,l,{fromAction:o})}function mn(e,t){return e[t]??null}var M6=class extends hm{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,n,i,o){this.comp=e;const r=kc(this,this.beans.context,o);this.eButtonShowMainFilter=n,this.eFloatingFilterBody=i,this.setGui(t,r),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(r),this.setupLeft(r),this.setupHover(r),this.setupFocus(r),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(r),this.setupUi(),r.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(r);const s=()=>this.onColDefChanged(r);r.addManagedListeners(this.column,{colDefChanged:s}),r.addManagedEventListeners({filterSwitched:({column:a})=>{a===this.column&&s()}}),r.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,n=e.colDef;return Ue(t.gos,{colDef:n,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,n=!!e.floatingFilter;this.active=t&&n}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=ri("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new Dc(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();Ga(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(Ot(t)===this.eGui)return;const o=js(t,this.eGui,null,e.shiftKey);if(o){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),o.focus();return}const r=this.findNextColumnWithFloatingFilter(e.shiftKey);r&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:r},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let n=this.column;do if(n=e?t.getColBefore(n):t.getColAfter(n),!n)break;while(!n.getColDef().filter||!n.getColDef().floatingFilter);return n}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case K.UP:case K.DOWN:case K.LEFT:case K.RIGHT:if(t)return;Ks(e);case K.ENTER:t&&$s(this.eGui)&&e.preventDefault();break;case K.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const n=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&_s(e.relatedTarget,"ag-floating-filter");if(n&&i&&e.target===this.eGui){const o=this.lastFocusEvent,r=!!(o&&o.key===K.TAB);if(o&&r){const s=o.shiftKey;$s(this.eGui,s)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new dm(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!oi(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:n,gos:i}=this,o=r=>{if(r?.source==="filterDestroyed"&&(!this.isAlive()||!t?.isAlive()))return;const s=this.comp.getFloatingFilterComp();s&&s.then(a=>{if(a){if(i.get("enableFilterHandlers")){const h=r;let f="filter";h?.afterFloatingFilter?f="ui":h?.afterDataChange?f="dataChanged":r?.source==="api"&&(f="api"),this.updateFloatingFilterParams(this.userCompDetails,f);return}const l=t?.getCurrentFloatingFilterParentModel(n),u=r?{...r,columns:r.columns??[],source:r.source==="api"?"api":"columnFilter"}:null;a.onParentModelChanged(l,u)}})};[this.destroySyncListener]=e.addManagedListeners(n,{filterChanged:o}),t?.isFilterActive(n)&&o(null)}setupWidth(e){const t=()=>{const n=`${this.column.getActualWidth()}px`;this.comp.setWidth(n)};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 n=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const i=this.beans.colFilter,o=this.active?i?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,r=this.comp.getFloatingFilterComp();!r||!o?this.updateCompDetails(e,o,n):r.then(s=>{!s||i?.areFilterCompsDifferent(this.userCompDetails??null,o)?this.updateCompDetails(e,o,n):this.updateFloatingFilterParams(o,"colDef")})}updateCompDetails(e,t,n){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),n&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){if(!e)return;let n=e.params;this.comp.getFloatingFilterComp()?.then(i=>{typeof i?.refresh=="function"&&(this.gos.get("enableFilterHandlers")&&(n={...n,model:mn(this.beans.colFilter?.model??{},this.column.getColId()),source:t}),i.refresh(n))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function k6(e,t){const n=e.colModel.getCol(t);if(!n){mt(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:n,positionBy:"auto"})}function L6(e){e.menuSvc?.hidePopupMenu()}var O6=class extends J{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(GF(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,n){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,n)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}hideFilterMenu(){GF(this.beans)?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(oi(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&Vr(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(zs()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!oi(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!oi(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 oi(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,n,i){const{positionBy:o,onClosedCallback:r}=t,s=t.column;if(o==="button"){const{buttonElement:a}=t;e?.showMenuAfterButtonClick(s,a,n,r,i)}else if(o==="mouse"){const{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(s,a,n,r,i)}else if(s){const a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(s,"auto"),ir(a,()=>{const u=l.getHeaderRowContainerCtrl(s.getPinned())?.getHeaderCtrlForColumn(s);u&&e?.showMenuAfterButtonClick(s,u.getAnchorElementForMenu(i),n,r,i)})}}};function HF(e,t,n){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",n))}function GF(e){const{enterpriseMenuFactory:t,filterMenuFactory:n,gos:i}=e;return t&&oi(i)?t:n}var _6={moduleName:"SharedMenu",version:Se,beans:[O6],apiFunctions:{showColumnMenu:k6,hidePopupMenu:L6}},N6=".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;:where(.ag-set-filter-group-closed-icon),:where(.ag-set-filter-group-indeterminate-icon),:where(.ag-set-filter-group-opened-icon){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{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%}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>:where(.ag-date-floating-filter-wrapper),>:where(.ag-floating-filter-input),>:where(.ag-input-field){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(.ag-input-field-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;gap:var(--ag-widget-vertical-spacing);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:var(--ag-widget-container-vertical-padding);: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)}";function B6(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function H6(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function G6(e,t){const n=e.colModel.getColDefCol(t);if(n)return e.colFilter?.destroyFilter(n,"api")}function V6(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function W6(e){return e.filterManager?.getFilterModel()??{}}function z6(e,t,n){const{gos:i,colModel:o,colFilter:r}=e;n&&!i.get("enableFilterHandlers")&&(le(288),n=!1);const s=o.getColDefCol(t);return s?r?.getModelForColumn(s,n)??null:null}function U6(e,t,n){return e.filterManager?.setColumnFilterModel(t,n)??Promise.resolve()}function $6(e,t){const n=e.colModel.getCol(t);if(!n){mt(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:n,containerType:"columnFilter",positionBy:"auto"})}function j6(e){e.menuSvc?.hideFilterMenu()}function K6(e,t){const n=e.colModel.getCol(t);if(!n){mt(12,{colKey:t});return}return e.colFilter?.getHandler(n,!0)}function q6(e,t){const{colModel:n,colFilter:i,gos:o}=e;if(!o.get("enableFilterHandlers")){le(287);return}const{colId:r,action:s}=t;if(r){const a=n.getColById(r);a&&i?.updateModel(a,s)}else i?.updateAllModels(s)}var VF={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},WF=["january","february","march","april","may","june","july","august","september","october","november","december"];function Q6(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function Y6(e,t){if(e==null)return-1;if(t==null)return 1;const n=si(e),i=si(t);return n!=null&&i!=null?n===i?0:n>i?1:-1:String(e).localeCompare(String(t))}function zF(e){return e instanceof Date&&!isNaN(e.getTime())}var mv={number:()=>{},bigint:()=>{},boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>t===!1,numberOfInputs:0}]}),date:()=>({isValidDate:zF}),dateString:({dataTypeDefinition:e})=>({comparator:(t,n)=>{const i=e.dateParser(n);return n==null||i<t?-1:i>t?1:0},isValidDate:t=>typeof t=="string"&&zF(e.dateParser(t))}),dateTime:e=>mv.date(e),dateTimeString:e=>mv.dateString(e),object:()=>{},text:()=>{}},vv={number:()=>({comparator:Q6}),bigint:()=>({comparator:Y6}),boolean:({t:e})=>({valueFormatter:t=>Pe(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:n=>{const i=e(n);return Pe(i)?i:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(n,i)=>{if(n==="NaN")return t("invalidDate","Invalid Date");if(i===1&&n!=null){const o=WF[Number(n)-1];return t(o,VF[o])}return n??t("blanks","(Blanks)")},treeListPathGetter:n=>ph(n,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:n})=>({valueFormatter:i=>{const o=e(i);return Pe(o)?o:n("blanks","(Blanks)")},treeList:!0,treeListPathGetter:i=>ph(t.dateParser(i??void 0),!1),treeListFormatter:(i,o)=>{if(o===1&&i!=null){const r=WF[Number(i)-1];return n(r,VF[r])}return i??n("blanks","(Blanks)")}}),dateTime:e=>{const t=vv.date(e);return t.treeListPathGetter=ph,t},dateTimeString(e){const t=e.dataTypeDefinition.dateParser,n=vv.dateString(e);return n.treeListPathGetter=i=>ph(t(i??void 0)),n},object:({formatValue:e,t})=>({valueFormatter:n=>{const i=e(n);return Pe(i)?i:t("blanks","(Blanks)")}}),text:()=>{}};function Z6(e,t,n,i,o,r,s){let a=t,l=n;const u=e==="agSetColumnFilter";!l&&i.baseDataType==="object"&&!u&&(l=({column:m,node:v})=>o({column:m,node:v,value:r.valueSvc.getValue(m,v,"data")}));const f=(u?vv:mv)[i.baseDataType],g=f({dataTypeDefinition:i,formatValue:o,t:s});return a=typeof t=="object"?{...g,...t}:g,{filterParams:a,filterValueGetter:l}}var J6={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",bigint:"agBigIntColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},X6={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",bigint:"agBigIntColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};function e7(e,t=!1){return(t?X6:J6)[e??"text"]}function t7(e,t,n){if(t==null)return null;let i=null;const{compName:o,jsComp:r,fwComp:s}=N0(e,t);return o?i={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agBigIntColumnFilter:"agBigIntColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[o]:r==null&&s==null&&t.filter===!0&&(i=n()),i}var n7={filterHandler:()=>({doesFilterPass:()=>!0})};function UF(e,t,n,i){if(!e.isPrimary())return!0;const r=!n;return!e.isValueActive()||!r?!1:t?!0:i}var i7=class extends J{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={...OF},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.addManagedPropertyListener("pivotMode",this.onPivotModeChanged.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",n){const{colModel:i,dataTypeSvc:o,filterManager:r}=this.beans;if(o?.isPendingInference){this.modelUpdates.push({model:e,source:t});return}const s=[],a=this.getModel(!0);if(e){const l=new Set(Object.keys(e));this.allColumnFilters.forEach((u,h)=>{const f=e[h];s.push(this.setModelOnFilterWrapper(u,f)),l.delete(h)}),l.forEach(u=>{const h=i.getColDefCol(u)||i.getCol(u);if(!h){le(62,{colId:u});return}if(!h.isFilterAllowed()){le(63,{colId:u});return}const f=this.getOrCreateFilterWrapper(h,!0);if(!f){le(64,{colId:u});return}s.push(this.setModelOnFilterWrapper(f,e[u],!0))})}else this.model={},this.allColumnFilters.forEach(l=>{s.push(this.setModelOnFilterWrapper(l,null))});_t.all(s).then(()=>{const l=this.getModel(!0),u=[];this.allColumnFilters.forEach((h,f)=>{const g=a?a[f]:null,m=l?l[f]:null;uc(g,m)||u.push(h.column)}),u.length>0?r?.onFilterChanged({columns:u,source:t}):n&&this.updateActive("filterChanged")})}getModel(e){const t={},{allColumnFilters:n,initialModel:i,beans:{colModel:o}}=this;if(n.forEach((r,s)=>{const a=this.getModelFromFilterWrapper(r);Pe(a)&&(t[s]=a)}),!e)for(const r of Object.keys(i)){const s=i[r];Pe(s)&&!n.has(r)&&o.getCol(r)?.isFilterAllowed()&&(t[r]=s)}return t}setState(e,t,n="api"){if(this.state.clear(),t)for(const i of Object.keys(t)){const o=t[i];this.state.set(i,{model:mn(this.model,i),state:o})}this.setModel(e,n,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let n=!1;return e.forEach((i,o)=>{const r=i.state;r!=null&&(n=!0,t[o]=r)}),n?t:void 0}getModelFromFilterWrapper(e){const n=e.column.getColId();if(e.isHandler)return mn(this.model,n);const i=e.filter;return i?typeof i.getModel!="function"?(le(66),null):i.getModel():mn(this.initialModel,n)}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):!1}updateActiveFilters(){const e=l=>l?l.isFilterActive?l.isFilterActive():(le(67),!1):!1,{colModel:t,gos:n}=this.beans,i=!!Bd(n),o=[],r=[],s=(l,u,h)=>{u&&(UF(l,t.isPivotMode(),t.isPivotActive(),i)?o.push(h):r.push(h))},a=[];return this.allColumnFilters.forEach(l=>{const u=l.column,h=u.getColId();if(l.isHandler)a.push(_t.resolve().then(()=>{s(u,this.isHandlerActive(u),{colId:h,isHandler:!0,handler:l.handler,handlerParams:l.handlerParams})}));else{const f=ns(l);f&&a.push(f.then(g=>{s(u,e(g),{colId:h,isHandler:!1,comp:g})}))}}),_t.all(a).then(()=>{this.activeAggregateFilters=o,this.activeColumnFilters=r})}updateFilterFlagInColumns(e,t){const n=[];return this.allColumnFilters.forEach(i=>{const o=i.column;if(i.isHandler)n.push(_t.resolve().then(()=>{this.setColFilterActive(o,this.isHandlerActive(o),e,t)}));else{const r=ns(i);r&&n.push(r.then(s=>{this.setColFilterActive(o,s.isFilterActive(),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),_t.all(n)}doFiltersPass(e,t,n){const{data:i,aggData:o}=e,r=n?this.activeAggregateFilters:this.activeColumnFilters,s=n?o:i,a=this.model;for(let l=0;l<r.length;l++){const u=r[l],{colId:h,isHandler:f}=u;if(h!==t)if(f){const{handler:g,handlerParams:m}=u;if(!g.doesFilterPass({node:e,data:s,model:mn(a,h),handlerParams:m}))return!1}else{const g=u.comp;if(typeof g.doesFilterPass!="function"){mt(91);continue}if(!g.doesFilterPass({node:e,data:s}))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:n}=this.beans,i=()=>{this.isAlive()&&n?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(i,0):i()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:n}=e,i=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",n).then(()=>{this.allColumnFilters.forEach(o=>{const{column:r,isHandler:s}=o;i!==r.getColId()&&(s&&o.handler.onAnyFilterChanged?.(),ns(o,s)?.then(a=>{typeof a?.onAnyFilterChanged=="function"&&a.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach(n=>{const i=n.isHandler;i&&n.handler.onNewRowsLoaded?.();const o=ns(n,i);o&&t.push(o.then(r=>{r.onNewRowsLoaded?.()}))}),_t.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){const{filterValueSvc:n,colModel:i}=this.beans;return(o,r)=>{const s=r?i.getCol(r):e;return s?n.getValue(s,o,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t?.isHandler)return this.isHandlerActive(e);const n=t?.filter;return n?n.isFilterActive():mn(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=Pe(mn(this.model,e.getColId()));if(t)return t;const n=this.beans.groupFilter;return n?.isGroupFilter(e)?n.isFilterActive(e):!1}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?ns(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const n=ns(t);return n?n.then(i=>({comp:i,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const n=this.getOrCreateFilterWrapper(e,t);return n?.isHandler?n.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let n=this.cachedFilter(e);return!n&&t&&(n=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,n)),n}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 PO(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":e7(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,n,i,o,r){const s=()=>{const u=this.createFilterCompParams(e,o,r),h=i(u,o);return k_(this.beans.userCompFactory,t,h,n)},a=s();return a?{compDetails:a,createFilterUi:u=>(u?s():a).newAgStackInstance()}:null}createFilterInstance(e,t,n,i){const o=this.beans.selectableFilter;o?.isSelectable(t)&&(t=o.getFilterDef(e,t));const{handler:r,handlerParams:s,handlerGenerator:a}=this.createHandler(e,t,n)??{},l=this.createFilterComp(e,t,n,i,!!r,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:r,handlerGenerator:a,handlerParams:s};const{compDetails:u,createFilterUi:h}=l;return this.isGlobalButtons&&(u.params?.buttons?.length||le(281,{colId:e.getColId()})),{compDetails:u,handler:r,handlerGenerator:a,handlerParams:s,createFilterUi:h}}createBaseFilterParams(e,t){const{filterManager:n,rowModel:i}=this.beans;return Ue(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:o=>n?.doesRowPassOtherFilters(e.getColId(),o)??!0,rowModel:i})}createFilterCompParams(e,t,n,i){const o=this.filterChangedCallbackFactory(e),r=this.createBaseFilterParams(e,i);if(r.filterChangedCallback=o,r.filterModifiedCallback=i?()=>{}:s=>this.filterModified(e,s),t){const s=r,a=e.getColId(),l=mn(this.model,a);s.model=l,s.state=this.state.get(a)??{model:l},s.onModelChange=(u,h)=>{this.updateStoredModel(a,u),this.refreshHandlerAndUi(e,u,"ui",!1,h).then(()=>{o({...h,source:"columnFilter"})})},s.onStateChange=u=>{this.updateState(e,u),this.updateOrRefreshFilterUi(e)},s.onAction=(u,h,f)=>{this.updateModel(e,u,h),this.dispatchLocalEvent({type:"filterAction",column:e,action:u,event:f})},s.getHandler=()=>this.getHandler(e,!0),s.onUiChange=u=>this.filterUiChanged(e,u),s.source=n}return r}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,n){const i=t(),o={created:!0,create:t,filterParams:e.params,compDetails:e,promise:i};return i.then(n),o}createFilterWrapper(e){const{compDetails:t,handler:n,handlerGenerator:i,handlerParams:o,createFilterUi:r}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),a=>a),s=e.getColId();if(n)return delete this.initialModel[s],n.init?.({...o,source:"init",model:mn(this.model,s)}),{column:e,isHandler:!0,handler:n,handlerGenerator:i,handlerParams:o,filterUi:this.createFilterUiForHandler(t,r)};if(r){const a={column:e,filterUi:null,isHandler:!1};return a.filterUi=this.createFilterUiLegacy(t,r,l=>{a.filter=l??void 0}),a}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,n){const{gos:i,frameworkOverrides:o,registry:r}=this.beans;let s;const a=m=>{const v=m.filter;if(M0(v)){const w=v.handler;return w||(s=v.doesFilterPass,s?()=>({doesFilterPass:s}):void 0)}return typeof v=="string"?v:void 0},l=i.get("enableFilterHandlers"),u=l?a(t):void 0,h=m=>()=>this.createBean(r.createDynamicBean(m,!0));let f,g;if(typeof u=="string"){const m=i.get("filterHandlers")?.[u];m!=null?f=m:A6.has(u)&&(f=h(u),g=u)}else f=u;if(!f){let m;const{compName:v,jsComp:w,fwComp:b}=N0(o,t);v?m=v:w==null&&b==null&&t.filter===!0&&(m=n),g=this.handlerMap[m],g&&(f=h(g))}return f?{filterHandler:f,handlerNameOrCallback:s??g}:l?(en(i)&&le(277,{colId:e.getColId()}),n7):void 0}createHandler(e,t,n){const i=this.createHandlerFunc(e,t,n);if(!i)return;const o=Gp(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:r,filterHandler:s}=i,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,s,o);return{handler:a,handlerParams:l,handlerGenerator:r??s}}createHandlerFromFunc(e,t,n){const i=e.getColDef(),o=t(Ue(this.gos,{column:e,colDef:i})),r=this.createHandlerParams(e,n);return{handler:o,handlerParams:r}}createHandlerParams(e,t){const n=e.getColDef(),i=e.getColId(),o=this.filterChangedCallbackFactory(e);return Ue(this.gos,{colDef:n,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:r=>this.beans.filterManager?.doesRowPassOtherFilters(i,r)??!0,onModelChange:(r,s)=>{this.updateStoredModel(i,r),this.refreshHandlerAndUi(e,r,"handler",!1,s).then(()=>{o({...s,source:"columnFilter"})})},onModelAsStringChange:()=>{e.dispatchColEvent("filterChanged","filterChanged"),this.dispatchLocalEvent({type:"filterModelAsStringChanged",column:e})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:n,groupFilter:i}=this.beans;this.allColumnFilters.forEach((r,s)=>{let a;r.column.isPrimary()?a=t.getColDefCol(s):a=t.getCol(s),!(a&&a===r.column)&&(e.push(r.column),this.disposeFilterWrapper(r,"columnChanged"),this.disposeColumnListener(s))});const o=i&&e.every(r=>i.isGroupFilter(r));e.length>0&&!o&&n?.onFilterChanged({columns:e,source:"api"})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const n=this.beans.groupFilter;return n?.isGroupFilter(e)?n.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){const{userCompFactory:n,frameworkOverrides:i,selectableFilter:o,gos:r}=this.beans,s=m=>{this.getOrCreateFilterUi(e)?.then(w=>{m(Xs(w))})},a=e.getColDef(),l=o?.isSelectable(a)?o.getFilterDef(e,a):a,u=t7(i,l,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",h=r.get("enableFilterHandlers"),f=Gp(n,l,this.createFilterCompParams(e,h,"init",!0)),g=Ue(r,{column:e,filterParams:f,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:s,showParentFilter:t});if(h){const m=g,v=e.getColId(),w=this.filterChangedCallbackFactory(e);m.onUiChange=b=>this.floatingFilterUiChanged(e,b),m.model=mn(this.model,v),m.onModelChange=(b,y)=>{this.updateStoredModel(v,b),this.refreshHandlerAndUi(e,b,"floating",!0,y).then(()=>{w({...y,source:"columnFilter"})})},m.getHandler=()=>this.getHandler(e,!0),m.source="init"}return __(n,a,g,u)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,n,i){const o="paramsUpdated";if(e.isHandler){const r=t.getColId();delete this.initialModel[r],this.state.delete(r);const s=e.filterUi,a=this.createFilterUiForHandler(n,i);e.filterUi=a;const l=this.eventSvc;s?.created?s.promise.then(u=>{this.destroyBean(u),l.dispatchEvent({type:"filterDestroyed",source:o,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:o,column:t})}else this.destroyFilter(t,o)}destroyFilter(e,t="api"){const n=e.getColId(),i=this.allColumnFilters.get(n);this.disposeColumnListener(n),delete this.initialModel[n],i&&this.disposeFilterWrapper(i,t).then(o=>{o&&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 n=!1;const{column:i,isHandler:o,filterUi:r}=e,s=i.getColId();o&&(n=this.isHandlerActive(i),this.destroyBean(e.handler),delete this.model[s],this.state.delete(s));const a=()=>{this.setColFilterActive(i,!1,"filterDestroyed"),this.allColumnFilters.delete(s),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:i})};if(r){if(r.created)return r.promise.then(l=>(n=o?n:!!l?.isFilterActive(),this.destroyBean(l),a(),n));a()}return _t.resolve(n)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:t?.source??"columnFilter"})}}filterParamsChanged(e,t="api"){const n=this.allColumnFilters.get(e);if(!n)return;const i=this.beans,o=n.column,r=o.getColDef(),s=o.isFilterAllowed(),a=this.getDefaultFilter(o),l=i.selectableFilter,u=l?.isSelectable(r)?l.getFilterDef(o,r):r,h=s?this.createHandlerFunc(o,u,this.getDefaultFilter(o)):void 0,f=!!h,g=n.isHandler;if(g!=f){this.destroyFilter(o,"paramsUpdated");return}const{compDetails:m,createFilterUi:v}=(s?this.createFilterComp(o,u,a,b=>b,f,"colDef"):null)??{compDetails:null,createFilterUi:null},w=m?.params??Gp(i.userCompFactory,u,this.createFilterCompParams(o,f,"colDef"));if(g){const b=h?.handlerNameOrCallback??h?.filterHandler,y=mn(this.model,e);if(n.handlerGenerator!=b){const R=n.handler,{handler:S,handlerParams:P}=this.createHandlerFromFunc(o,h.filterHandler,w);n.handler=S,n.handlerParams=P,n.handlerGenerator=b,delete this.model[e],S.init?.({...P,source:"init",model:null}),this.destroyBean(R),y!=null&&this.beans.filterManager?.onFilterChanged({columns:[o],source:t})}else{const R=this.createHandlerParams(o,m?.params);n.handlerParams=R,n.handler.refresh?.({...R,source:"colDef",model:y})}}if(this.areFilterCompsDifferent(n.filterUi?.compDetails??null,m)||!n.filterUi||!m){this.destroyFilterUi(n,o,m,v);return}n.filterUi.filterParams=w,ns(n,g)?.then(b=>{(b?.refresh?b.refresh(w):!0)===!1?this.destroyFilterUi(n,o,m,v):this.dispatchLocalEvent({type:"filterParamsChanged",column:o,params:w})})}refreshHandlerAndUi(e,t,n,i,o){const r=this.cachedFilter(e);if(!r)return i&&this.getOrCreateFilterWrapper(e,!0),_t.resolve();if(!r.isHandler)return _t.resolve();const{filterUi:s,handler:a,handlerParams:l}=r;return I6(()=>{if(s){const{created:u,filterParams:h}=s;if(u)return s.promise.then(f=>f?{filter:f,filterParams:h}:void 0);s.refreshed=!0}return _t.resolve(void 0)},a,l,t,this.state.get(e.getColId())??{model:t},n,o)}setColumnFilterWrapper(e,t){const n=e.getColId();this.allColumnFilters.set(n,t),this.allColumnListeners.set(n,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(n)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:n}=e,{componentClass:i}=t;return!(n===i||n?.render&&i?.render&&n.render===i.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 n=this.getOrCreateFilterUi(t);return n?new Promise(i=>{n.then(o=>{i(Xs(o))})}):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:n})=>{this.setModelForColumn(e,t).then(()=>n())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:i,model:o}=this,r=e.getColId(),s=i.get(r);return s?s.model??null:mn(o,r)}const n=this.cachedFilter(e);return n?this.getModelFromFilterWrapper(n):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let n=()=>{};const i=new Promise(o=>{n=o});return this.columnModelUpdates.push({key:e,model:t,resolve:n}),i}return new Promise(n=>{this.setModelForColumnLegacy(e,t).then(i=>n(i))})}getStateForColumn(e){return this.state.get(e)??{model:mn(this.model,e)}}setModelForColumnLegacy(e,t){const n=this.beans.colModel.getColDefCol(e),i=n?this.getOrCreateFilterWrapper(n,!0):null;return i?this.setModelOnFilterWrapper(i,t):_t.resolve()}setColDefPropsForDataType(e,t,n){const i=e.filter,o=i===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):i;if(typeof o!="string")return;let r,s;const a=this.beans,{filterParams:l,filterValueGetter:u}=e;o==="agMultiColumnFilter"?{filterParams:r,filterValueGetter:s}=a.multiFilter?.getParamsForDataType(l,u,t,n)??{}:{filterParams:r,filterValueGetter:s}=Z6(o,l,u,t,n,a,this.getLocaleTextFunc()),e.filterParams=r,s&&(e.filterValueGetter=s)}setColFilterActive(e,t,n,i){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",n)),e.dispatchColEvent("filterChanged",n,i)}setModelOnFilterWrapper(e,t,n){return new _t(i=>{if(e.isHandler){const r=e.column,s=r.getColId(),a=this.model[s];if(this.updateStoredModel(s,t),n&&t===a){i();return}this.refreshHandlerAndUi(r,t,"api").then(()=>i());return}const o=ns(e);if(o){o.then(r=>{if(typeof r?.setModel!="function"){le(65),i();return}(r.setModel(t)||_t.resolve()).then(()=>i())});return}i()})}updateStoredModel(e,t){Pe(t)?this.model[e]=t:delete this.model[e];const n=this.state.get(e),i={model:t,state:n?.state};this.state.set(e,i)}filterModified(e,t){this.getOrCreateFilterUi(e)?.then(n=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:n,...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,n){const i=e.getColId(),o=this.cachedFilter(e),r=()=>o?.filterUi;BF({action:t,filterParams:o?.filterUi?.filterParams,getFilterUi:r,getModel:()=>mn(this.model,i),getState:()=>this.state.get(i),updateState:s=>this.updateState(e,s),updateModel:s=>r()?.filterParams?.onModelChange(s,{...n,fromAction:t}),processModelToApply:o?.isHandler?o.handler.processModelToApply?.bind(o.handler):void 0})}updateAllModels(e,t){const n=[];this.allColumnFilters.forEach((i,o)=>{const r=this.beans.colModel.getColDefCol(o);r&&BF({action:e,filterParams:i.filterUi?.filterParams,getFilterUi:()=>i.filterUi,getModel:()=>mn(this.model,o),getState:()=>this.state.get(o),updateState:s=>this.updateState(r,s),updateModel:s=>{this.updateStoredModel(o,s),this.dispatchLocalEvent({type:"filterAction",column:r,action:e}),n.push(this.refreshHandlerAndUi(r,s,"ui"))},processModelToApply:i?.isHandler?i.handler.processModelToApply?.bind(i.handler):void 0})}),n.length&&_t.all(n).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();NF(()=>this.cachedFilter(e)?.filterUi,()=>mn(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:n}=this;for(const o of n)if(o.source==="COLUMN_MENU")return!1;let i=!1;for(const o of e.keys()){const r=e.get(o);if(r.valid===!1)return!1;(r.model??null)!==mn(t,o)&&(i=!0)}return i}hasUnappliedModel(e){const{model:t,state:n}=this;return(n.get(e)?.model??null)!==mn(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;const n=this.beans.filterPanelSvc;return n?.isActive?!!n.getState(e.getColId()):!1}onPivotModeChanged(e){const{colModel:t,pivotColsSvc:n}=this.beans,i=!!Bd(this.gos),o=e.currentValue,r=o?this.activeColumnFilters:this.activeAggregateFilters,s=o?this.activeAggregateFilters:this.activeColumnFilters,a=[];for(const l of r){const u=t.getColById(l.colId),h=o&&!!n?.columns.length;u&&o===UF(u,o,h,i)&&(s.push(l),a.push(l))}oL(r,a)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function o7(e){return!!e.filterManager?.isAnyFilterPresent()}function r7(e,t="api"){e.filterManager?.onFilterChanged({source:t})}var s7=class extends J{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:i})=>this.onAdvFilterEnabledChanged(i),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:n}=this;this.alwaysPassFilter=n.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=n.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,n="api"){this.isAdvFilterEnabled()||this.colFilter?.setState(e,t,n)}setFilterModel(e,t="api",n){if(this.isAdvFilterEnabled()){n||this.warnAdvFilters();return}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(){Bd(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:n,columns:i=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):_t.resolve()).then(()=>{const o={source:t,type:"filterChanged",columns:i};n&&Un(o,n),this.eventSvc.dispatchEvent(o),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!Bd(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)?!0:!(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)?!0:!(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()?!1:!!this.colFilter?.isFilterAllowed(e)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){if(this.beans.dataTypeSvc?.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}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()?!1:!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){le(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()}};function a7(e){return{tag:"div",cls:e}}var l7=class extends Pt{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super(a7(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){const n=this.buttons;if(this.buttons=e,n===e)return;const i=this.getGui();xn(i);let o;this.destroyListeners();const r=document.createDocumentFragment(),s=this.className,a=({type:u,label:h})=>{const f=y=>{this.dispatchLocalEvent({type:u,event:y})};["apply","clear","reset","cancel"].includes(u)||le(75);const g=u==="apply",v=un({tag:"button",attrs:{type:g&&t?"submit":"button"},ref:`${u}FilterButton`,cls:`ag-button ag-standard-button ${s}-button${g?" "+s+"-apply-button":""}`,children:h});this.activateTabIndex([v]),g&&(o=v);const w=y=>{y.key===K.ENTER&&(y.preventDefault(),f(y))},b=this.listeners;v.addEventListener("click",f),b.push(()=>v.removeEventListener("click",f)),v.addEventListener("keydown",w),b.push(()=>v.removeEventListener("keydown",w)),r.append(v)};for(const u of e)a(u);this.eApply=o;const l=this.validationTooltipFeature;o&&!l?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!o&&l&&(this.validationTooltipFeature=this.destroyBean(l)),i.append(r)}getApplyButton(){return this.eApply}updateValidity(e,t=null){const n=this.eApply;n&&(pc(n,!e),this.validationMessage=t,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(const e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},c7=class extends Pt{constructor(e,t,n,i,o,r){super(),this.column=e,this.wrapper=t,this.eventParent=n,this.updateModel=i,this.isGlobalButtons=o,this.enableGlobalButtonCheck=r,this.hidePopup=null,this.applyActive=!1}postConstruct(){const{comp:e,params:t}=this.wrapper,n=t,i=n.useForm,o=i?"form":"div";this.setTemplate({tag:o,cls:"ag-filter-wrapper"}),i&&this.addManagedElementListeners(this.getGui(),{submit:r=>{r?.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=n,this.resetButtonsPanel(n),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:r,params:s})=>{r===this.column&&this.resetButtonsPanel(s,this.params)},filterStateChanged:({column:r,state:s})=>{r===this.column&&this.eButtons?.updateValidity(s.valid!==!1)},filterAction:({column:r,action:s,event:a})=>{r===this.column&&this.afterAction(s,a)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:r})=>{if(r!==this.isGlobalButtons){this.isGlobalButtons=r;const s=this.params;this.resetButtonsPanel(s,s,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,n){const{buttons:i,readOnly:o}=t??{},{buttons:r,readOnly:s,useForm:a}=e;if(!n&&o===s&&uc(i,r))return;const l=r&&r.length>0&&!e.readOnly&&!this.isGlobalButtons;let u=this.eButtons;if(l){const h=r.map(f=>{const g=`${f}Filter`;return{type:f,label:to(this,g)}});if(this.applyActive=Zd(this.params),!u){u=this.createBean(new l7),this.appendChild(u.getGui());const f=this.column,g=m=>({event:v})=>{this.updateModel(f,m,{fromButtons:!0}),this.afterAction(m,v)};u?.addManagedListeners(u,{apply:g("apply"),clear:g("clear"),reset:g("reset"),cancel:g("cancel")}),this.eButtons=u}u.updateButtons(h,a)}else this.applyActive=!1,u&&(Ii(u.getGui()),this.eButtons=this.destroyBean(u))}close(e){const t=this.hidePopup;if(!t)return;const n=e,i=n?.key;let o;(i===K.ENTER||i===K.SPACE)&&(o={keyboardEvent:n}),t(o),this.hidePopup=null}afterAction(e,t){const{params:n,applyActive:i}=this,o=n?.closeOnApply;switch(e){case"apply":{t?.preventDefault(),o&&i&&this.close(t);break}case"reset":{o&&i&&this.close();break}case"cancel":{o&&this.close(t);break}}}handleKeyDown(e){!e.defaultPrevented&&e.key===K.ENTER&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},u7=":where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}",d7={tag:"div",cls:"ag-filter"},h7=class extends Pt{constructor(e,t,n){super(d7),this.column=e,this.source=t,this.enableGlobalButtonCheck=n,this.wrapper=null}postConstruct(){this.beans.colFilter?.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return this.wrapper!=null}getFilter(){return this.wrapper?.then(e=>e.comp)??null}afterInit(){return this.wrapper?.then(()=>{})??_t.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:n,beans:{colFilter:i}}=this,o=i.getFilterUiForDisplay(t)??null;this.wrapper=o,o?.then(r=>{if(!r)return;const{isHandler:s,comp:a}=r;let l;if(s){const u=!!this.enableGlobalButtonCheck,h=this.createBean(new c7(t,r,i,i.updateModel.bind(i),u&&i.isGlobalButtons,u));this.comp=h,l=h.getGui()}else this.registerCSS(u7),l=a.getGui(),Pe(l)||le(69,{guiFromFilter:l});this.appendChild(l),e?this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:n,eGui:this.getGui()}):a.afterGuiAttached?.(this.afterGuiAttachedParams)})}onFilterDestroyed(e){const{source:t,column:n}=e;(t==="api"||t==="paramsUpdated")&&n.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(xn(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()}},f7=class extends J{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,n,i){e&&!e.isColumn||this.showPopup(e,o=>{this.popupSvc?.positionPopupUnderMouseEvent({additionalParams:{column:e},type:n,mouseEvent:t,ePopup:o})},n,t.target,oi(this.gos),i)}showMenuAfterButtonClick(e,t,n,i){if(e&&!e.isColumn)return;let o=-1,r="left";const s=oi(this.gos);!s&&this.gos.get("enableRtl")&&(o=1,r="right");const a=s?void 0:4*o,l=s?void 0:4;this.showPopup(e,u=>{this.popupSvc?.positionPopupByComponent({type:n,eventSource:t,ePopup:u,nudgeX:a,nudgeY:l,alignSide:r,keepWithinBounds:!0,position:"under",additionalParams:{column:e}})},n,t,s,i)}showPopup(e,t,n,i,o,r){const s=e?this.createBean(new h7(e,"COLUMN_MENU")):void 0;if(this.activeMenu=s,!s?.hasFilter()||!e){mt(57);return}const a=un({tag:"div",cls:`ag-menu${o?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:w=>this.trapFocusWithin(w,a)}),a.appendChild(s?.getGui());let l;const u=()=>s?.afterGuiDetached(),h=EO(this.gos)?i??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,f=w=>{HF(e,!1,"contextMenu");const b=w instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),b&&i&&Mi(i)&&K0(i)?.focus({preventScroll:!0}),u(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,n,e),r?.()},g=this.getLocaleTextFunc(),m=o&&n!=="columnFilter"?g("ariaLabelColumnMenu","Column Menu"):g("ariaLabelColumnFilter","Column Filter"),v=this.popupSvc?.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:f,positionCallback:()=>t(a),anchorToElement:h,ariaLabel:m});v&&(this.hidePopup=l=v.hideFunc),s.afterInit().then(()=>{t(a),s.afterGuiAttached({container:n,hidePopup:l})}),HF(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,n,e)}trapFocusWithin(e,t){e.key!==K.TAB||e.defaultPrevented||js(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),$s(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,n){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:n??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},g7=class extends J{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,n){if(!t)return;const i=e.getColDef(),{selectableFilter:o,valueSvc:r,formula:s}=this.beans,a=n??o?.getFilterValueGetter(e.getColId())??i.filterValueGetter;if(a)return this.executeFilterValueGetter(a,t.data,e,t,i);const l=r.getValue(e,t,"data");return e.isAllowFormula()&&s?.isFormula(l)?s.resolveValue(e,t):l}executeFilterValueGetter(e,t,n,i,o){const{expressionSvc:r,valueSvc:s}=this.beans,a=Ue(this.gos,{data:t,node:i,column:n,colDef:o,getValue:s.getValueCallback.bind(s,i)});return typeof e=="function"?e(a):r?.evaluate(e,a)}},p7={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},m7=class extends Pt{constructor(){super(p7,[Th]),this.eFloatingFilterText=ge}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 n=e,i=n.getHandler();if(i.getModelAsString){const o=i.getModelAsString(n.model);this.eFloatingFilterText.setValue(o)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const n=t.getModelAsString(e);this.eFloatingFilterText.setValue(n)}})}refresh(e){this.init(e)}},v7=class extends Mm{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)}},Cv=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){const n=e.filterOptions??t;this.filterOptions!==n&&(this.filterOptions=n,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){const{filterOptions:e}=this;if(e)for(const t of e){if(typeof t=="string")continue;const n=[["displayKey"],["displayName"],["predicate","test"]],i=o=>o.some(r=>t[r]!=null)?!0:(le(72,{keys:o}),!1);if(!n.every(i)){this.filterOptions=e.filter(o=>o===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}getDefaultItem(e){const{filterOptions:t}=this;if(e)return e;if(t.length>=1){const n=t[0];if(typeof n=="string")return n;if(n.displayKey)return n.displayKey;le(73)}else le(74)}getCustomOption(e){return this.customFilterOptions[e]}};function zc(e,t,n){return n==null?e.splice(t):e.splice(t,n)}function Mh(e){return e==null||typeof e=="string"&&e.trim().length===0}function C7(e){return e==="AND"||e==="OR"?e:"AND"}function w7(e,t,n){if(e==null)return;const{predicate:i}=e;if(i!=null&&!t.some(o=>o==null))return i(t,n)}function b7(e,t){let n=e.length;return n>t&&(e.splice(t),le(78),n=t),n}var y7=new Set(["empty","notBlank","blank","today","yesterday","tomorrow","thisWeek","lastWeek","nextWeek","thisMonth","lastMonth","nextMonth","thisQuarter","lastQuarter","nextQuarter","thisYear","lastYear","nextYear","yearToDate","last7Days","last30Days","last90Days","last6Months","last12Months","last24Months"]);function is(e,t){const n=t.getCustomOption(e);if(n){const{numberOfInputs:i}=n;return i??1}return e&&y7.has(e)?0:e==="inRange"?2:1}var kh=class extends q_{constructor(e,t,n){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=n,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 Cv;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=C7(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions(),ii(this.getGui(),"tabindex",this.isReadOnly()?"-1":null)}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,n)=>{const i=n===0?e:this.optionsFactory.defaultOption;t.setValue(i,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?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 e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){const n=!e.operator,i=!t.operator;if(!n&&i||n&&!i)return!1;let r;if(n){const s=e,a=t;r=this.areSimpleModelsEqual(s,a)}else{const s=e,a=t;r=s.operator===a.operator&&Or(s.conditions,a.conditions,(l,u)=>this.areSimpleModelsEqual(l,u))}return r}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),_t.resolve();if(e.operator){const i=e;let o=i.conditions;o==null&&(o=[],le(77));const r=b7(o,this.maxNumConditions),s=this.getNumConditions();if(r<s)this.removeConditionsAndOperators(r);else if(r>s)for(let l=s;l<r;l++)this.createJoinOperatorPanel(),this.createOption();const a=i.operator==="OR";this.eJoinAnds.forEach(l=>l.setValue(!a,!0)),this.eJoinOrs.forEach(l=>l.setValue(a,!0)),o.forEach((l,u)=>{this.eTypes[u].setValue(l.type,!0),this.setConditionIntoUi(l,u)})}else{const i=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(i.type,!0),this.setConditionIntoUi(i,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),_t.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(le(79),t=1),this.maxNumConditions=t;let n=e.numAlwaysVisibleConditions??1;n<1&&(le(80),n=1),n>t&&(le(81),n=t),this.numAlwaysVisibleConditions=n}createOption(){const e=this.getGui(),t=this.createManagedBean(new hv);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const n=this.createEValue();this.eConditionBodies.push(n),e.appendChild(n),this.putOptionsIntoDropdown(t),this.resetType(t);const i=this.getNumConditions()-1;this.forEachPositionInput(i,o=>this.resetInput(o)),this.addChangedListeners(t,i)}createJoinOperatorPanel(){const e=un({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),n=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const i=this.eJoinPanels.length-1,o=this.joinOperatorId++;this.resetJoinOperatorAnd(t,i,o),this.resetJoinOperatorOr(n,i,o),this.isReadOnly()||(t.onValueChange(this.listener),n.onValueChange(this.listener))}createJoinOperator(e,t,n){const i=this.createManagedBean(new v7);e.push(i);const o="ag-filter-condition-operator";return i.addCss(o),i.addCss(`${o}-${n}`),t.appendChild(i.getGui()),i}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const n of t)e.addOption(n);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,n=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:n?this.getLocaleTextFunc()(n.displayKey,n.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 n=0;n<this.getNumConditions();n++)this.isConditionUiComplete(n)?e=n:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const n=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<n){this.removeConditionsAndOperators(n+1);const i=e+1,o=n-i;o>0&&this.removeConditionsAndOperators(i,o),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((i,o)=>{const r=this.isConditionDisabled(o,e);i.setDisabled(r||this.filterListOptions.length<=1),o===1&&(pc(this.eJoinPanels[0],r),this.eJoinAnds[0].setDisabled(r),this.eJoinOrs[0].setDisabled(r))}),this.eConditionBodies.forEach((i,o)=>{Ft(i,this.isConditionBodyVisible(o))});const n=(t??this.getJoinOperator())==="OR";for(const i of this.eJoinAnds)i.setValue(!n,!0);for(const i of this.eJoinOrs)i.setValue(n,!0);this.forEachInput((i,o,r,s)=>{this.setElementDisplayed(i,o<s),this.setElementDisabled(i,this.isConditionDisabled(r,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:n,eConditionBodies:i,eJoinPanels:o,eJoinAnds:r,eJoinOrs:s}=this;this.removeComponents(n,e,t),this.removeElements(i,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(o,a,t),this.removeComponents(r,a,t),this.removeComponents(s,a,t)}removeElements(e,t,n){const i=zc(e,t,n);for(const o of i)Ii(o)}removeComponents(e,t,n){const i=zc(e,t,n);for(const o of i)Ii(o.getGui()),this.destroyBean(o)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let t;if(!this.isReadOnly()){const n=this.getInputs(0)[0];n instanceof Ys&&this.isConditionBodyVisible(0)?t=n.getInputElement():t=this.eTypes[0]?.getFocusableElement()}(t??this.getGui()).focus({preventScroll:!0})}}shouldKeepInvalidInputState(){return!1}afterGuiDetached(){super.afterGuiDetached();const e=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(e.column)||this.shouldKeepInvalidInputState())return;e.onStateChange({model:e.model});let t=-1,n=-1,i=!1;const o=this.getJoinOperator();for(let s=this.getNumConditions()-1;s>=0;s--)if(this.isConditionUiComplete(s))t===-1&&(t=s,n=s);else{const a=s>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(s-1),l=s<t;(a||l)&&(this.removeConditionsAndOperators(s,1),i=!0,l&&n--)}let r=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),r=!0),this.shouldAddNewConditionAtEnd(n===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),r=!0),r&&this.updateConditionStatusesAndValues(n,o),i&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=n}getModelAsString(e){return this.params.getHandler()?.getModelAsString?.(e)??""}resetPlaceholder(){const e=this.getLocaleTextFunc(),{filterPlaceholder:t,eTypes:n}=this;this.forEachInput((i,o,r,s)=>{if(!(i instanceof Ys))return;const a=o===0&&s>1?"inRangeStart":o===0?"filterOoo":"inRangeEnd",l=o===0&&s>1?e("ariaFilterFromValue","Filter from value"):o===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value"),u=n[r].getValue(),h=Z0(this,t,a,u);i.setInputPlaceholder(h),i.setInputAriaLabel(l)})}setElementValue(e,t,n){e instanceof Ys&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){G0(e)&&Ft(e.getGui(),t)}setElementDisabled(e,t){G0(e)&&pc(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Ys&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,n)=>{this.forEachPositionTypeInput(n,t,e)})}forEachPositionInput(e,t){const n=this.getConditionType(e);this.forEachPositionTypeInput(e,n,t)}forEachPositionTypeInput(e,t,n){const i=is(t,this.optionsFactory),o=this.getInputs(e);for(let r=0;r<o.length;r++){const s=o[r];s!=null&&n(s,r,e,i)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return is(t,this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(n=>n==null)||this.positionHasInvalidInputs(e))}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,n)=>this.resetJoinOperatorAnd(t,n,this.joinOperatorId+n)),this.eJoinOrs.forEach((t,n)=>this.resetJoinOperatorOr(t,n,this.joinOperatorId+n)),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 n=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(n).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,n){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),n)}resetJoinOperatorOr(e,t,n){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),n)}resetJoinOperator(e,t,n,i,o){this.updateJoinOperatorDisabled(e.setValue(n,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${o}`).setLabel(i),t)}updateJoinOperatorsDisabled(){const e=(t,n)=>this.updateJoinOperatorDisabled(t,n);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 n=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((i,o,r)=>{r===t&&this.setElementValue(i,n[o]!=null?n[o]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,n,i)=>{this.setElementValue(t,n===0&&i===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,n=>{this.attachElementOnChange(n,this.listener)}))}hasInvalidInputs(){return!1}positionHasInvalidInputs(e){return!1}isReadOnly(){return!!this.params.readOnly}},wv=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function bv(e){return e?.allowedCharPattern??null}function $F(e,t){const{filter:n,filterTo:i,type:o}=e||{};return[si(n),si(i)].slice(0,is(o,t))}var S7=class extends kh{constructor(){super("bigintFilter",$F,wv),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="bigint",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Xa()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){const t=this.eValuesFrom[e],n=this.eValuesTo[e];this.refreshInputPairValidation(t,n)}}refreshInputPairValidation(e,t,n=!1){const{bigintParser:i}=this.params,o=this.getParsedValue(e,i),r=this.getParsedValue(t,i),s=this.isInvalidValue(e,o),a=this.isInvalidValue(t,r),l=n?e:t,u=n?t:e,h=n?s:a,f=n?a:s;let g="";if(h)g=this.getLocaleTextFunc()("invalidBigInt","Invalid BigInt");else if(!s&&!a){const m=R7(o,r,n);m&&(g=this.translate(m,[String(n?t.getValue():e.getValue())]))}l.setCustomValidity(g),f||u.setCustomValidity(""),g.length>0&&this.beans.ariaAnnounce.announceValue(g,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:n,additionalEventAttributes:i}=e,o=this.state,r=i?.fromAction;return(r&&r!="apply"||n.model!==o.model||!this.areStatesEqual(n.state,o.state))&&this.refreshInputValidation(),t}setElementValue(e,t,n){super.setElementValue(e,t,n),t===null&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:n}=this,i=bv(e),o=un({tag:"div",cls:"ag-filter-body",role:"presentation"}),r=this.createFromToElement(o,t,"from",i),s=this.createFromToElement(o,n,"to",i),a=(h,f,g)=>()=>this.refreshInputPairValidation(h,f,g),l=a(r,s,!0);r.onValueChange(l),r.addGuiEventListener("focusin",l);const u=a(r,s,!1);return s.onValueChange(u),s.addGuiEventListener("focusin",u),o}createFromToElement(e,t,n,i){const o=this.createManagedBean(i?new ur({allowedCharPattern:i}):new ur);return o.addCss(`ag-filter-${n}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui()),o}removeEValues(e,t){const n=i=>this.removeComponents(i,e,t);n(this.eValuesFrom),n(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(n,i,o,r)=>{i<r&&t.push(si(n.getValue()??null))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(n.filter=String(i[0])),i.length>1&&(n.filterTo=String(i[1])),n}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,n=>t||(t=!n.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}getParsedValue(e,t){const n=e.getValue();return n==null||typeof n=="string"&&n.trim()===""?null:t?t(n):si(n)}isInvalidValue(e,t){const n=e.getValue();return n!=null&&String(n).trim()!==""&&t===null}};function R7(e,t,n){return e!=null&&t!=null&&e>=t?`strict${n?"Max":"Min"}ValueValidation`:null}var jF=class extends J{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,n=new Cv;this.optionsFactory=n,n.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(n,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if(e.source==="colDef"){const t=e.filterParams,n=this.optionsFactory;n.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:n,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(t==null)return!0;const{operator:n}=t,i=[];if(n){const s=t;i.push(...s.conditions??[])}else i.push(t);const o=n&&n==="OR"?"some":"every",r=this.params.getValue(e.node);return i[o](s=>this.individualConditionPasses(e,s,r))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:n,maxNumConditions:i}}=e;if(t==null)return;let r=B0(t)?t.conditions:[t];const s=n?.map(h=>typeof h=="string"?h:h.displayKey)??this.defaultOptions;if(!(!r||r.every(h=>s.find(f=>f===h.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let l=!1;const u=this.filterType;if((r&&!r.every(h=>h.filterType===u)||t.filterType!==u)&&(r=r.map(h=>({...h,filterType:u})),l=!0),typeof i=="number"&&r&&r.length>i&&(r=r.slice(0,i),l=!0),l){const h=r.length>1?{...t,filterType:u,conditions:r}:{...r[0],filterType:u};this.params={...e,model:h},e.onModelChange(h)}}individualConditionPasses(e,t,n){const i=this.optionsFactory,o=this.mapValuesFromModel(t,i),r=i.getCustomOption(t.type),s=w7(r,o,n);return s??(n==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(o,n,t,e))}},yv=class extends jF{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:n,includeBlanksInGreaterThan:i,includeBlanksInLessThan:o,includeBlanksInRange:r}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(n)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(i)return!0;break;case"lessThan":case"lessThanOrEqual":if(o)return!0;break;case"inRange":if(r)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,n){const i=n.type;if(!this.isValid(t))return i==="notEqual"||i==="notBlank";const o=this.comparator(),r=e[0]!=null?o(e[0],t):0;switch(i){case"equals":return r===0;case"notEqual":return r!==0;case"greaterThan":return r>0;case"greaterThanOrEqual":return r>=0;case"lessThan":return r<0;case"lessThanOrEqual":return r<=0;case"inRange":{const s=o(e[1],t);return this.params.filterParams.inRangeInclusive?r>=0&&s<=0:r>0&&s<0}case"blank":return Mh(t);case"notBlank":return!Mh(t);default:return le(76,{filterModelType:i}),!0}}},Sv={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},x7={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},Lh=class extends J{constructor(e,t,n){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=n}getModelAsString(e,t){const n=this.getLocaleTextFunc(),i=t==="filterToolPanel";if(!e)return i?to(this,"filterSummaryInactive"):null;if(e.operator!=null){const r=e,a=(r.conditions??[]).map(u=>this.getModelAsString(u,t)),l=r.operator==="AND"?"andCondition":"orCondition";return a.join(` ${to(this,l)} `)}else{if(e.type==="blank"||e.type==="notBlank")return i?to(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):n(e.type,e.type);{const r=e,s=this.optionsFactory.getCustomOption(r.type),{displayKey:a,displayName:l,numberOfInputs:u}=s||{};return a&&l&&u===0?n(a,l):this.conditionToString(r,i,r.type==="inRange"||u===2,a,l)}}}updateParams(e){const{optionsFactory:t,filterParams:n}=e;this.optionsFactory=t,this.filterParams=n}conditionForToolPanel(e,t,n,i,o,r){let s;const a=this.getTypeKey(e);return a&&(s=to(this,a)),o&&r&&(s=this.getLocaleTextFunc()(o,r)),s!=null?t?`${s} ${to(this,"filterSummaryInRangeValues",[n(),i()])}`:`${s} ${n()}`: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)}},KF=class extends Lh{constructor(e,t){super(e,t,t.bigintFormatter),this.filterTypeKeys=Sv}conditionToString(e,t,n,i,o){const{filter:r,filterTo:s,type:a}=e,l=this.formatValue.bind(this),u=si(r),h=si(s);if(t){const f=this.conditionForToolPanel(a,n,()=>l(u),()=>l(h),i,o);if(f!=null)return f}return n?`${l(u)}-${l(h)}`:r!=null?l(u):`${a}`}},F7=class extends yv{constructor(){super($F,wv),this.filterType="bigint",this.FilterModelFormatterClass=KF}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return si(e)!==null}},Rv=class extends J{constructor(e){super(),this.params=e,this.eInput=ge,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new ur(this.params?.config));const t=this.eInput.getGui();e.appendChild(t);const n=i=>this.onValueChanged(i);this.addManagedListeners(t,{input:n,keydown:n})}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,placeholder:n}){const{eInput:i}=this;i.setInputAriaLabel(e),t!==void 0&&i.setAutoComplete(t),i.toggleCss("ag-floating-filter-search-icon",!!n),i.setInputPlaceholder(n)}};function xv(e){const t=e?.trim();return t===""?e:t}function qF(e,t){const{filter:n,filterTo:i,type:o}=e||{};return[n||null,i||null].slice(0,is(o,t))}var QF=class extends Pt{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}const t=e.operator;let n;t?n=e.conditions[0]:n=e,this.lastType=n.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const n=e;return this.isTypeEditable(n.type)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){const n=e;this.onModelUpdated(n.model)}}setParams(e){const t=new Cv;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 n=this.optionsFactory.defaultOption;t||(this.lastType=n),this.readOnly=!!e.filterParams.readOnly;const i=this.isTypeEditable(n);this.setEditable(i)}refresh(e){this.params=e;const t=e,n=this.reactive;if((!n||t.source==="colDef")&&this.updateParams(e),n){const{source:i,model:o}=t;if(i==="dataChanged"||i==="ui")return;this.onModelUpdated(o)}}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)}isTypeEditable(e){return!!e&&!this.readOnly&&is(e,this.optionsFactory)===1}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},P7={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},Fv=class extends QF{constructor(){super(...arguments),this.eFloatingFilterInputContainer=ge,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(P7)}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{inputSvc:t,defaultDebounceMs:n,readOnly:i}=this,{filterPlaceholder:o,column:r,browserAutoComplete:s,filterParams:a}=e,l=this.lastType??this.optionsFactory.defaultOption,u=e.filterParams.filterPlaceholder,h=o===!0?Z0(this,u,"filterOoo",l):o||void 0;if(t.setParams({ariaLabel:this.getAriaLabel(r),autoComplete:s??!1,placeholder:h}),this.applyActive=Zd(a),!i){const f=Zp(a,n);t.setValueChangedListener(gn(this,this.syncUpWithParentFilter.bind(this),f))}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,n=t.getValue();xn(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(n,!0)}syncUpWithParentFilter(e){const t=e.key===K.ENTER,n=this.reactive;if(n&&this.params.onUiChange(),this.applyActive&&!t)return;const{inputSvc:i,params:o,lastType:r}=this;let s=i.getValue();if(o.filterParams.trimInput&&(s=xv(s),i.setValue(s,!0)),n){const a=o,l=a.model,u=this.convertValue(s),h=u==null?null:{...l??{filterType:this.filterType,type:r??this.optionsFactory.defaultOption},filter:u};a.onModelChange(h,{afterFloatingFilter:!0})}else o.parentFilterInstance(a=>{a?.onFloatingFilterChanged(r||null,s||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},E7=class extends Fv{constructor(){super(...arguments),this.FilterModelFormatterClass=KF,this.filterType="bigint",this.defaultOptions=wv}updateParams(e){const t=e.filterParams;bv(t)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),this.bigintParser=t?.bigintParser,super.updateParams(e)}createFloatingFilterInputService(e){const t=e.filterParams;this.allowedCharPattern=bv(t),this.bigintParser=t?.bigintParser;const n=this.allowedCharPattern?{allowedCharPattern:this.allowedCharPattern}:void 0;return this.createManagedBean(new Rv({config:n}))}convertValue(e){return e==null||e===""?null:this.bigintParser?this.bigintParser(e):si(e)}},YF=".ag-input-field-input",ZF=class{constructor(e,t,n,i,o,r){this.context=e,this.eParent=o,this.alive=!0,this.debouncedReport=gn({isAlive:()=>this.alive},JF,500),this.timeoutHandle=null,L_(t,n,i)?.newAgStackInstance().then(a=>{if(!this.alive){e.destroyBean(a);return}if(this.dateComp=a,!a)return;o.appendChild(a.getGui()),a?.afterGuiAttached?.();const{tempValue:l,disabled:u}=this;l&&a.setDate(l),u!=null&&a.setDisabled?.(u),r?.(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){Ft(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)}setCustomValidity(e,t=!1){const n=this.dateComp?.getGui().querySelector(YF);if(n&&"setCustomValidity"in n){const i=e.length>0;n.setCustomValidity(e),i?t?this.timeoutHandle=this.debouncedReport(n):JF(n):this.timeoutHandle&&window.clearTimeout(this.timeoutHandle),mp(n,i)}}getValidity(){return this.dateComp?.getGui().querySelector(YF)?.validity}};function JF(e){e.reportValidity()}var Pv=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function XF(e,t){const{dateFrom:n,dateTo:i,type:o}=e||{};return[n&&Kn(n,void 0,!0)||null,i&&Kn(i,void 0,!0)||null].slice(0,is(o,t))}var e1=1e3,t1=1/0,D7=class extends kh{constructor(){super("dateFilter",XF,Pv),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=e1,this.maxValidYear=t1,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Xa()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(l,u)=>{const h=e[l];if(h!=null)if(isNaN(h))le(82,{param:l});else return h==null?u:Number(h);return u},n=t("minValidYear",e1),i=t("maxValidYear",t1);this.minValidYear=n,this.maxValidYear=i,n>i&&le(83);const{minValidDate:o,maxValidDate:r}=e,s=o instanceof Date?o:Kn(o);this.minValidDate=s;const a=r instanceof Date?r:Kn(r);this.maxValidDate=a,s&&a&&s>a&&le(84)}refreshInputValidation(){for(let e=0;e<this.dateConditionFromComps.length;e++)this.refreshInputPairValidation(e,!1,!0)}refreshInputPairValidation(e,t=!1,n=!1){const{dateConditionFromComps:i,dateConditionToComps:o,beans:r}=this,s=i[e],a=o[e],l=is(this.getConditionType(e),this.optionsFactory),u=s.getDate(),h=a.getDate(),f=l>=2?T7(u,h,t):null,g=f?this.translate(f,[String(t?h:u)]):"",m=!Xa()&&!n;(t?s:a).setCustomValidity(g,m),(t?a:s).setCustomValidity("",m),g.length>0&&r.ariaAnnounce.announceValue(g,"dateFilter")}createDateCompWrapper(e,t,n){const{beans:{userCompFactory:i,context:o,gos:r},params:s}=this,a=n==="from",l=new ZF(o,i,s.colDef,Ue(r,{onDateChanged:()=>{this.refreshInputPairValidation(t,a),this.onUiChanged()},onFocusIn:()=>this.refreshInputPairValidation(t,a),filterParams:s,location:"filter"}),e);return this.addDestroyFunc(()=>l.destroy()),l}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}setElementValue(e,t){e.setDate(t),t||e.setCustomValidity("")}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=un({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,n,i){const o=un({tag:"div",cls:`ag-filter-${i} ag-filter-date-${i}`});t.push(o),e.appendChild(o),n.push(this.createDateCompWrapper(o,t.length-1,i))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),zc(this.eConditionPanelsFrom,e,t),zc(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,n){const i=zc(e,t,n);for(const o of i)o.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:n,minValidYear:i,maxValidYear:o}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<i)return!1;if(n){if(e>n)return!1}else if(e.getUTCFullYear()>o)return!1;return!0}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=t.getDate()!=null&&!(t.getValidity()?.valid??!0))),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,n=>t||(t=!(n.getValidity()?.valid??!0))),t}canApply(e){return!this.hasInvalidInputs()}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachPositionInput(e,(n,i,o,r)=>{!t||i>=r||t&&(t=this.isValidDateValue(n.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),n={},{params:i,filterType:o}=this,r=this.getValues(e),s=i.useIsoSeparator?"T":" ";return r.length>0&&(n.dateFrom=jn(r[0],!0,s)),r.length>1&&(n.dateTo=jn(r[1],!0,s)),{dateFrom:null,dateTo:null,filterType:o,type:t,...n}}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),n=e("ariaFilterValue","Filter Value");this.forEachInput(i=>{i.setInputPlaceholder(t),i.setInputAriaLabel(n)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(n,i,o,r)=>{i<r&&t.push(n.getDate())}),t}translate(e,t){let n=e;return e==="lessThan"?n="before":e==="greaterThan"&&(n="after"),super.translate(n,t)}};function T7(e,t,n){return e!=null&&t!=null&&e>=t?`${n?"max":"min"}DateValidation`:null}var n1=class extends Lh{constructor(e,t){super(e,t,n=>{const{dataTypeSvc:i,valueSvc:o}=this.beans,r=t.column,s=i?.getDateFormatterFunction(r),a=s?s(n??void 0):n;return o.formatValue(r,null,a)}),this.filterTypeKeys=Sv}conditionToString(e,t,n,i,o){const{type:r}=e,s=Kn(e.dateFrom),a=Kn(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,u=t?this.formatValue.bind(this):g=>uG(g,l),h=()=>s!==null?u(s):"null",f=()=>a!==null?u(a):"null";if(s==null&&a==null)return to(this,r);if(t){const g=this.conditionForToolPanel(r,n,h,f,i,o);if(g!=null)return g}return n?`${h()}-${f()}`:s!=null?u(s):`${r}`}};function A7(e,t){const n=t;return n<e?-1:n>e?1:0}var I7=class extends yv{constructor(){super(XF,Pv),this.filterType="date",this.FilterModelFormatterClass=n1,this.filterTypeToRangeCache=new Map}getOrRefreshRangeCacheItem(e,t){const{filterTypeToRangeCache:n}=this,i=Date.now();let o=n.get(e);if(o&&o.expires<i&&(o=void 0),!o){const[r,s]=t(new Date(i),new Date(i));o={from:r,to:s,expires:Bi(new Date(i)).getTime()-i},n.set(e,o)}return o}comparator(){return this.params.filterParams.comparator??A7}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}evaluateNonNullValue(e,t,n){const i=n.type,o=this.comparator();if(!this.isValid(t))return i==="notEqual"||i==="notBlank";const r=i,s=Z7[r];if(s){const{from:a,to:l}=this.getOrRefreshRangeCacheItem(r,s);return o(a,t)>=0&&o(l,t)<0}return super.evaluateNonNullValue(e,t,n)}},M7=1,Oh=null,k7=()=>{if(Oh!=null)return Oh;let e;const t=typeof navigator>"u"?void 0:navigator.languages?.[0]??navigator.language;if(t&&typeof Intl<"u"&&typeof Intl.Locale=="function")try{e=new Intl.Locale(t).getWeekInfo?.()?.firstDay}catch{e=void 0}return Oh=e==null?M7:e%7,Oh},mi=e=>(e.setHours(0,0,0,0),e),_h=e=>{const t=e.getDay(),n=k7(),i=(t-n+7)%7;return e.setDate(e.getDate()-i),mi(e)},Nh=(e,t=1)=>(e.setDate(e.getDate()-t),e),Bi=e=>(e.setDate(e.getDate()+1),mi(e)),i1=e=>(_h(e),e.setDate(e.getDate()+6),Bi(e)),Bh=e=>(e.setDate(1),mi(e)),Ev=e=>(e.setDate(1),e.setMonth(e.getMonth()+1),mi(e)),Dv=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3),Bh(e)},o1=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3+2),Ev(e)},Tv=e=>(e.setMonth(0,1),mi(e)),r1=e=>(e.setMonth(12,0),Bi(e)),hl=e=>Nh(e),Av=e=>hl(_h(e)),Iv=e=>hl(Bh(e)),Mv=e=>hl(Dv(e)),kv=(e,t)=>[mi(e),Bi(t)],L7=(e,t)=>kv(hl(e),hl(t)),Lv=(e,t)=>[_h(e),i1(t)],O7=(e,t)=>Lv(Av(e),Av(t)),Ov=(e,t)=>[Bh(e),Ev(t)],_7=(e,t)=>Ov(Iv(e),Iv(t)),_v=(e,t)=>[Dv(e),o1(t)],N7=(e,t)=>_v(Mv(e),Mv(t)),Nv=(e,t)=>[Tv(e),r1(t)],B7=(e,t)=>[Tv(e),Bi(t)],H7=(e,t)=>[mi(Nh(e,7)),Bi(t)],G7=(e,t)=>[mi(Nh(e,30)),Bi(t)],V7=(e,t)=>[mi(Nh(e,90)),Bi(t)],W7=(e,t)=>(e.setFullYear(e.getFullYear()-1),e.setMonth(e.getMonth()+6),[mi(e),Bi(t)]),z7=(e,t)=>(e.setFullYear(e.getFullYear()-1),[mi(e),Bi(t)]),U7=(e,t)=>(e.setFullYear(e.getFullYear()-2),[mi(e),Bi(t)]),$7=(e,t)=>(e.setFullYear(e.getFullYear()-1),t.setFullYear(t.getFullYear()-1),Nv(e,t)),j7=(e,t)=>(e.setFullYear(e.getFullYear()+1),t.setFullYear(t.getFullYear()+1),Nv(e,t)),K7=(e,t)=>(e.setMonth(e.getMonth()+3),t.setMonth(t.getMonth()+3),_v(e,t)),q7=(e,t)=>(e.setMonth(e.getMonth()+1),t.setMonth(t.getMonth()+1),Ov(e,t)),Q7=(e,t)=>(e.setDate(e.getDate()+7),t.setDate(t.getDate()+7),Lv(e,t)),Y7=(e,t)=>(e.setDate(e.getDate()+1),t.setDate(t.getDate()+1),kv(e,t)),Z7={today:kv,yesterday:L7,tomorrow:Y7,thisWeek:Lv,lastWeek:O7,nextWeek:Q7,thisMonth:Ov,lastMonth:_7,nextMonth:q7,thisQuarter:_v,lastQuarter:N7,nextQuarter:K7,thisYear:Nv,lastYear:$7,nextYear:j7,yearToDate:B7,last7Days:H7,last30Days:G7,last90Days:V7,last6Months:W7,last12Months:z7,last24Months:U7,setStartOfDay:mi,setStartOfWeek:_h,setStartOfNextDay:Bi,setStartOfNextWeek:i1,setStartOfMonth:Bh,setStartOfNextMonth:Ev,setStartOfQuarter:Dv,setStartOfNextQuarter:o1,setStartOfYear:Tv,setStartOfNextYear:r1,setPreviousDay:hl,setPreviousWeek:Av,setPreviousMonth:Iv,setPreviousQuarter:Mv},J7={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"}]},X7=class extends QF{constructor(){super(J7,[Th]),this.eReadOnlyText=ge,this.eDateWrapper=ge,this.FilterModelFormatterClass=n1,this.filterType="date",this.defaultOptions=Pv}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 n=e?Kn(e.dateFrom):null;this.dateComp.setDate(n),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){Ft(this.eDateWrapper,e),Ft(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 n=t.model,i=jn(e),o=i==null?null:{...n??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:i};t.onModelChange(o,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t?.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=Zp(e,this.defaultDebounceMs);return Ue(this.gos,{onDateChanged:gn(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:n,params:{column:i}}=this;this.dateComp=new ZF(e,t,i.getColDef(),this.getDateComponentParams(),n,o=>{o.setInputAriaLabel(this.getAriaLabel(i))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},e8={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},t8=class extends Pt{constructor(){super(e8,[Th]),this.eDateInput=ge,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),focusin:this.handleFocusIn.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}handleFocusIn(){this.params.onFocusIn?.()}setParams(e){const t=this.eDateInput.getInputElement(),n=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=n&&$r();const{minValidYear:i,maxValidYear:o,minValidDate:r,maxValidDate:s,buttons:a,includeTime:l,colDef:u}=e.filterParams||{},h=this.beans.dataTypeSvc,f=l??h?.getDateIncludesTimeFlag?.(u.cellDataType)??!1;n?f?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text";const g=s1(r,i,!0),m=s1(s,o,!1);g&&m&&g.getTime()>m.getTime()&&le(87),g&&(t.min=jn(g,f)),m&&(t.max=jn(m,f)),this.isApply=e.location==="floatingFilter"&&!!a?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return Kn(this.eDateInput.getValue())}setDate(e){const t=this.params.filterParams.colDef.cellDataType,n=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(t)??!1;this.eDateInput.setValue(jn(e,n))}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}};function s1(e,t,n){return e&&t&&le(n?85:86),e instanceof Date?e:e?Kn(e):t?Kn(`${t}-${n?"01-01":"12-31"}`):null}var Bv=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function Hv(e){return e?.allowedCharPattern??null}function Hh(e){return e==null||isNaN(e)?null:e}function a1(e,t){const{filter:n,filterTo:i,type:o}=e||{};return[Hh(n),Hh(i)].slice(0,is(o,t))}var n8=class extends kh{constructor(){super("numberFilter",a1,Bv),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Xa()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){const t=this.eValuesFrom[e],n=this.eValuesTo[e];this.refreshInputPairValidation(t,n)}}refreshInputPairValidation(e,t,n=!1){const i=this.params.numberParser,o=c1(i,e),r=c1(i,t),s=i8(o,r,n),a=s?this.translate(s,[String(n?r:o)]):"";(n?e:t).setCustomValidity(a),(n?t:e).setCustomValidity(""),a.length>0&&this.beans.ariaAnnounce.announceValue(a,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:n,additionalEventAttributes:i}=e,o=this.state,r=i?.fromAction;return(r&&r!="apply"||n.model!==o.model||!this.areStatesEqual(n.state,o.state))&&this.refreshInputValidation(),t}setElementValue(e,t,n){const{numberFormatter:i}=this.params,o=!n&&i?i(t??null):t;super.setElementValue(e,o),o===null&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:n}=this,i=Hv(e),o=un({tag:"div",cls:"ag-filter-body",role:"presentation"}),r=this.createFromToElement(o,t,"from",i),s=this.createFromToElement(o,n,"to",i),a=(h,f,g)=>()=>this.refreshInputPairValidation(h,f,g),l=a(r,s,!0);r.onValueChange(l),r.addGuiEventListener("focusin",l);const u=a(r,s,!1);return s.onValueChange(u),s.addGuiEventListener("focusin",u),o}createFromToElement(e,t,n,i){const o=this.createManagedBean(i?new ur({allowedCharPattern:i}):new dv);return o.addCss(`ag-filter-${n}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui()),o}removeEValues(e,t){const n=i=>this.removeComponents(i,e,t);n(this.eValuesFrom),n(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(n,i,o,r)=>{i<r&&t.push(Hh(l1(this.params.numberParser,n.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(n.filter=i[0]),i.length>1&&(n.filterTo=i[1]),n}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,n=>t||(t=!n.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}};function l1(e,t){if(typeof t=="number")return t;let n=nr(t);return n!=null&&n.trim()===""&&(n=null),e?e(n):n==null||n.trim()==="-"?null:Number.parseFloat(n)}function c1(e,t){return Hh(l1(e,t.getValue(!0)))}function i8(e,t,n){return e!=null&&t!=null&&e>=t?`strict${n?"Max":"Min"}ValueValidation`:null}var u1=class extends Lh{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=Sv}conditionToString(e,t,n,i,o){const{filter:r,filterTo:s,type:a}=e,l=this.formatValue.bind(this);if(t){const u=this.conditionForToolPanel(a,n,()=>l(r),()=>l(s),i,o);if(u!=null)return u}return n?`${l(r)}-${l(s)}`:r!=null?l(r):`${a}`}},o8=class extends yv{constructor(){super(a1,Bv),this.filterType="number",this.FilterModelFormatterClass=u1}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},r8=class extends J{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new dv),this.eTextInput=this.createManagedBean(new ur),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),n=this.eTextInput.getGui();e.appendChild(t),e.appendChild(n),this.setupListeners(t,i=>this.onValueChanged(i)),this.setupListeners(n,i=>this.onValueChanged(i))}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({ariaLabel:e,autoComplete:t,placeholder:n}){this.setAriaLabel(e),t!==void 0&&this.setAutoComplete(t),this.setPlaceholder(this.eNumberInput,n),this.setPlaceholder(this.eTextInput,n)}setPlaceholder(e,t){e.toggleCss("ag-floating-filter-search-icon",!!t),e.setInputPlaceholder(t)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},s8=class extends Fv{constructor(){super(...arguments),this.FilterModelFormatterClass=u1,this.filterType="number",this.defaultOptions=Bv}updateParams(e){Hv(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=Hv(e.filterParams),this.allowedCharPattern?this.createManagedBean(new Rv({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new r8)}convertValue(e){return e?Number(e):null}},Gv=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],a8=class extends kh{constructor(){super("textFilter",qF,Gv),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(n.filter=i[0]),i.length>1&&(n.filterTo=i[1]),n}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(n,i,o,r)=>{i<r&&t.push(nr(n.getValue()))}),t}createEValue(){const e=un({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:n}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,n,"to"),e}createFromToElement(e,t,n){const i=this.createManagedBean(new ur);i.addCss(`ag-filter-${n}`),i.addCss("ag-filter-filter"),t.push(i),e.appendChild(i.getGui())}removeEValues(e,t){const n=r=>this.removeComponents(r,e,t),{eValuesFrom:i,eValuesTo:o}=this;n(i),n(o)}},d1=class extends Lh{constructor(){super(...arguments),this.filterTypeKeys=x7}conditionToString(e,t,n,i,o){const{filter:r,filterTo:s,type:a}=e;if(t){const l=h=>()=>to(this,"filterSummaryTextQuote",[h]),u=this.conditionForToolPanel(a,n,l(r),l(s),i,o);if(u!=null)return u}return n?`${r}-${s}`:r!=null?`${r}`:`${a}`}},l8=({filterOption:e,value:t,filterText:n})=>{if(n==null)return!1;switch(e){case"contains":return t.includes(n);case"notContains":return!t.includes(n);case"equals":return t===n;case"notEqual":return t!=n;case"startsWith":return t.indexOf(n)===0;case"endsWith":{const i=t.lastIndexOf(n);return i>=0&&i===t.length-n.length}default:return!1}},c8=e=>e,u8=e=>e==null?null:e.toString().toLowerCase(),d8=class extends jF{constructor(){super(qF,Gv),this.filterType="text",this.FilterModelFormatterClass=d1}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??l8,this.formatter=t.textFormatter??(t.caseSensitive?c8:u8)}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,n,i){const o=e.map(g=>this.formatter(g))||[],r=this.formatter(t),{api:s,colDef:a,column:l,context:u,filterParams:{textFormatter:h}}=this.params;if(n.type==="blank")return Mh(t);if(n.type==="notBlank")return!Mh(t);const f={api:s,colDef:a,column:l,context:u,node:i.node,data:i.data,filterOption:n.type,value:r,textFormatter:h};return o.some(g=>this.matcher({...f,filterText:g}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=n=>{const i={...n},{filter:o,filterTo:r}=n;return o&&(i.filter=xv(o)??null),r&&(i.filterTo=xv(r)??null),i};return B0(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},h8=class extends Fv{constructor(){super(...arguments),this.FilterModelFormatterClass=d1,this.filterType="text",this.defaultOptions=Gv}createFloatingFilterInputService(){return this.createManagedBean(new Rv)}};function f8(e){return!!e.quickFilter?.isFilterPresent()}function g8(e){return e.quickFilter?.getText()}function p8(e){e.quickFilter?.resetCache()}var m8=class extends J{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",n=>this.setFilter(n.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:n,pivotResultCols:i}=this.beans,o=t.isPivotMode(),r=e?.getColumns(),s=t.getColDefCols();let a=(o&&!n.get("applyQuickFilterBeforePivotOrAgg")?i?.getPivotResultCols()?.list:s)??[];r&&(a=a.concat(r)),this.colsToUse=n.get("includeHiddenColumnsInQuickFilter")?a:a.filter(l=>l.isVisible()||l.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(n=>t?this.doesRowPassCache(e,n):this.doesRowPassNoCache(e,n))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return Pe(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){le(70,{newFilter:e});return}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"),n=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,n&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(n=>{const i=this.getTextForColumn(n,e);return Pe(i)&&i.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let n;e?(this.checkGenerateAggText(t),n=t.quickFilterAggregateText):n=this.getAggText(t);const{quickFilterParts:i,matcher:o}=this;return o(i,n)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let n=this.beans.filterValueSvc.getValue(e,t);const i=e.getColDef();if(i.getQuickFilterText){const o=Ue(this.gos,{value:n,node:t,data:t.data,column:e,colDef:i});n=i.getQuickFilterText(o)}return Pe(n)?n.toString().toUpperCase():null}getAggText(e){const t=[];for(const n of this.colsToUse){const i=this.getTextForColumn(n,e);Pe(i)&&t.push(i)}return t.join(`
|
|
64
|
-
`)}},v8={moduleName:"ClientSideRowModelFilter",version:Se,rowModels:["clientSide"],beans:[u4]},Vv={moduleName:"FilterCore",version:Se,beans:[s7],apiFunctions:{isAnyFilterPresent:o7,onFilterChanged:r7},css:[N6],dependsOn:[v8]},h1={moduleName:"FilterValue",version:Se,beans:[g7]},Uc={moduleName:"ColumnFilter",version:Se,beans:[i7,f7],dynamicBeans:{headerFilterCellCtrl:M6},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:B6,getColumnFilterInstance:H6,destroyFilter:G6,setFilterModel:V6,getFilterModel:W6,getColumnFilterModel:z6,setColumnFilterModel:U6,showColumnFilter:$6,hideColumnFilter:j6,getColumnFilterHandler:K6,doFilterAction:q6},dependsOn:[Vv,Dh,h1,_6]},C8={moduleName:"CustomFilter",version:Se,userComponents:{agReadOnlyFloatingFilter:m7},dependsOn:[Uc]},w8={moduleName:"TextFilter",version:Se,dependsOn:[Uc],userComponents:{agTextColumnFilter:{classImp:a8,params:{useForm:!0}},agTextColumnFloatingFilter:h8},dynamicBeans:{agTextColumnFilterHandler:d8}},b8={moduleName:"NumberFilter",version:Se,dependsOn:[Uc],userComponents:{agNumberColumnFilter:{classImp:n8,params:{useForm:!0}},agNumberColumnFloatingFilter:s8},dynamicBeans:{agNumberColumnFilterHandler:o8}},y8={moduleName:"BigIntFilter",version:Se,dependsOn:[Uc],userComponents:{agBigIntColumnFilter:{classImp:S7,params:{useForm:!0}},agBigIntColumnFloatingFilter:E7},dynamicBeans:{agBigIntColumnFilterHandler:F7}},S8={moduleName:"DateFilter",version:Se,dependsOn:[Uc],userComponents:{agDateColumnFilter:{classImp:D7,params:{useForm:!0}},agDateInput:t8,agDateColumnFloatingFilter:X7},dynamicBeans:{agDateColumnFilterHandler:I7}},R8={moduleName:"QuickFilterCore",version:Se,rowModels:["clientSide"],beans:[m8],dependsOn:[Vv,h1]},x8={moduleName:"QuickFilter",version:Se,apiFunctions:{isQuickFilterPresent:f8,getQuickFilter:g8,resetQuickFilter:p8},dependsOn:[R8]},F8={moduleName:"ExternalFilter",version:Se,dependsOn:[Vv]},P8=class extends J{constructor(e,t,n){super(),this.id=e,this.parentCache=t,this.params=n,this.state="needsLoading",this.version=0,this.startRow=e*n.blockSize,this.endRow=this.startRow+n.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,n){this.successCommon(e,{rowData:t,rowCount:n})}isRequestMostRecentAndLive(e){const t=e===this.version,n=this.isAlive();return t&&n}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:n,beans:i,rowNodes:o}=this;for(let r=0;r<e;r++){const s=n+r,a=new jr(i);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(s),a.setRowTop(t*s),o.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:n,state:i}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:n,pageStatus:i}}}setDataAndId(e,t,n){Pe(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(Wt(this.params.datasource.getRows)){le(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:n,params:{sortModel:i,filterModel:o},gos:r}=this;return Ue(r,{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,n),failCallback:this.pageLoadFailed.bind(this,n),sortModel:i,filterModel:o})}forEachNode(e,t,n){this.rowNodes.forEach((i,o)=>{this.startRow+o<n&&e(i,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const n=e-this.startRow;return this.rowNodes[n]}processServerResult(e){const{rowNodes:t,beans:n}=this;t.forEach((o,r)=>{const s=e.rowData?e.rowData[r]:void 0;!o.id&&o.alreadyRendered&&s&&(t[r]=new jr(n),t[r].setRowIndex(o.rowIndex),t[r].setRowTop(o.rowTop),t[r].setRowHeight(o.rowHeight),o._destroy(!0)),this.setDataAndId(t[r],s,this.startRow+r)});const i=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,i)}destroy(){const e=this.rowNodes;for(let t=0,n=e.length;t<n;t++)e[t]._destroy(!1);e.length=0,super.destroy()}},E8=2,D8=class extends J{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const n=Math.floor(e/this.params.blockSize);let i=this.blocks[n];if(!i){if(t)return;i=this.createBlock(n)}return i.getRow(e)}createBlock(e){const t=this.params,n=this.createBean(new P8(e,this,t));return this.blocks[n.id]=n,this.blockCount++,this.purgeBlocksIfNeeded(n),t.rowNodeBlockLoader.addBlock(n),n}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}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()&&(Hr(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(s=>s!=e),n=(s,a)=>a.lastAccessed-s.lastAccessed;t.sort(n);const i=this.params.maxBlocksInCache>0,o=i?this.params.maxBlocksInCache-1:null,r=E8-1;t.forEach((s,a)=>{const l=s.state==="needsLoading"&&a>=r,u=i?a>=o:!1;if(l||u){if(this.isBlockCurrentlyDisplayed(s)||this.isBlockFocused(s))return;this.removeBlockFromCache(s)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:n,endRow:i}=e;return t.rowIndex>=n&&t.rowIndex<i}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:n}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,n-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:n,overflowSize:i}=this.params,r=(e.id+1)*n+i;this.rowCount<r&&(this.rowCount=r)}}setRowCount(e,t){this.rowCount=e,Pe(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const n of this.getBlocksInOrder())n.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(n,i)=>n.id-i.id;return Object.values(this.blocks).sort(e)}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,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const n=[];let i=-1,o=!1;const r={value:0};let s=!1;for(const l of this.getBlocksInOrder())if(!s){if(o&&i+1!==l.id){s=!0;continue}i=l.id,l.forEachNode(u=>{const h=u===e||u===t;(o||h)&&n.push(u),h&&(o=!o)},r,this.rowCount)}return s||o?[]:n}},T8=class extends J{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.hierarchical=!1}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new jr(e);this.rootNode=t,t.level=-1,this.rowHeight=Gs(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=Gs(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;this.cacheParams?e=!uc(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getOverlayType(){return this.infiniteCache?.getRowCount()===0?this.beans.filterManager?.isAnyFilterPresent()?"noMatchingRows":"noRows":null}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){if(!this.datasource)return;Ka(this.gos)!=null||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:n,rowNodeBlockLoader:i,eventSvc:o,gos:r}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:n?.getSortModel()??[],rowNodeBlockLoader:i,initialRowCount:r.get("infiniteInitialRowCount"),maxBlocksInCache:r.get("maxBlocksInCache"),rowHeight:Gs(e),overflowSize:r.get("cacheOverflowSize"),blockSize:r.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new D8(this.cacheParams)),o.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(n=>{n.id===e&&(t=n)}),t}forEachNode(e){this.infiniteCache?.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),n=this.getRowCount()-1;return t>n?n: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(){}};function A8(e){Xd(e)?.refreshCache()}function I8(e){Xd(e)?.purgeCache()}function M8(e){return Xd(e)?.getRowCount()}var k8=class extends J{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=bO(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=gn(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){Fo(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(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){Hr(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(n=>n.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const n of t)n.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:n,state:i}=t.getBlockStateJson();e[n]=i}),e}printCacheStatus(){Hr(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},L8={moduleName:"InfiniteRowModelCore",version:Se,rowModels:["infinite"],beans:[T8,k8]},O8={moduleName:"InfiniteRowModel",version:Se,apiFunctions:{refreshInfiniteCache:A8,purgeInfiniteCache:I8,getInfiniteRowCount:M8},dependsOn:[L8,i4]},_8=class extends J{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 n=this.wrapSvc?.wrap(e,t)??t,i=!Nc.has(e),o=i?this.asyncListeners:this.syncListeners;o.has(e)||o.set(e,new Set),o.get(e).add(n),this.eventSvc.addListener(e,n,i)}removeListener(e,t){const n=this.wrapSvc?.unwrap(e,t)??t,o=!!this.asyncListeners.get(e)?.delete(n);o||this.syncListeners.get(e)?.delete(n),this.eventSvc.removeListener(e,n,o)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,n=(r,s)=>{Nc.has(r)&&t(r,s)},i=(r,s)=>{Nc.has(r)||t(r,s)};this.globalListenerPairs.set(e,{syncListener:n,asyncListener:i});const o=this.eventSvc;o.addGlobalListener(n,!1),o.addGlobalListener(i,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:n,globalListenerPairs:i}=this,o=n?.unwrapGlobal(e)??e;if(i.has(o)){const{syncListener:s,asyncListener:a}=i.get(o);t.removeGlobalListener(s,!1),t.removeGlobalListener(a,!0),i.delete(e)}else this.syncGlobalListeners.delete(o),t.removeGlobalListener(o,!1)}destroyEventListeners(e,t){e.forEach((n,i)=>{n.forEach(o=>this.eventSvc.removeListener(i,o,t)),n.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const n of e)this.eventSvc.removeGlobalListener(n,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:n,asyncListener:i})=>{t.removeGlobalListener(n,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function N8(e,t,n){e.apiEventSvc?.addListener(t,n)}function B8(e,t,n){e.apiEventSvc?.removeListener(t,n)}function H8(e,t){e.apiEventSvc?.addGlobalListener(t)}function G8(e,t){e.apiEventSvc?.removeGlobalListener(t)}var V8={moduleName:"EventApi",version:Se,apiFunctions:{addEventListener:N8,addGlobalListener:H8,removeEventListener:B8,removeGlobalListener:G8},beans:[_8]},W8=class extends J{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");return t?WL(t):zL(e.get("localeText"))}},z8={moduleName:"Locale",version:Se,beans:[W8]};function U8(e){return e.stateSvc?.getState()??{}}function $8(e,t,n){return e.stateSvc?.setState(t,n)}function f1(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=j8(e)),e.version=Se,e}function j8(e){return e.cellSelection=K8(e,"rangeSelection"),e}function K8(e,t){if(e&&typeof e=="object")return e[t]}var q8=class extends J{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=gn(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=gn(this,()=>this.updateGroupExpansionState(),0),this.onRowSelectedDebounced=gn(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:n}=this.beans;this.isClientSideRowModel=en(e);const i=f1(e.get("initialState")??{}),o=i.partialColumnState;delete i.partialColumnState,this.cachedState=i;const r=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>r(()=>this.setupStateOnGridReady(i))),(i.columnOrder||i.columnVisibility||i.columnSizing||i.columnPinning||i.columnGroup)&&n?.hideColumns("columnState");const[s,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:u})=>{u==="gridInitializing"&&(s(),r(()=>{this.setupStateOnColumnsInitialised(i,!!o),n?.revealColumns("columnState")}))},rowCountReady:()=>{a?.(),r(()=>this.setupStateOnRowCountReady(i))},firstDataRendered:()=>{l?.(),r(()=>this.setupStateOnFirstDataRendered(i))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const n=f1(e);delete n.partialColumnState,this.cachedState=n,this.startSuppressEvents();const i="api",o=t?new Set(t):void 0;this.setGridReadyState(n,i,o),this.setColumnsInitialisedState(n,i,!!o,o),this.setRowCountState(n,i,o),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(n,i,o),this.stopSuppressEvents(i)})}setGridReadyState(e,t,n){t==="api"&&!n?.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,n,i){this.setColumnState(e,t,n,i),this.setColumnGroupState(e,t,i),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const n=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:n("aggregation"),columnMoved:n("columnOrder"),columnPinned:n("columnPinning"),columnResized:n("columnSizing"),columnVisible:n("columnVisibility"),columnPivotChanged:n("pivot"),columnPivotModeChanged:n("pivot"),columnRowGroupChanged:n("rowGroup"),sortChanged:n("sort"),newColumnsLoaded:({source:i})=>{this.updateColumnAndGroupState(),i!=="gridInitializing"&&this.isClientSideRowModel&&this.onRowGroupOpenedDebounced()},columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,n){const{filter:i,rowGroupExpansion:o,ssrmRowGroupExpansion:r,rowSelection:s,pagination:a,rowPinning:l}=e,u=(f,g)=>!n?.has(f)&&(g||t==="api");u("filter",i)&&this.setFilterState(i),(u("rowGroupExpansion",o)||u("ssrmRowGroupExpansion",r))&&this.setRowGroupExpansionState(r,o,t),u("rowSelection",s)&&this.setRowSelectionState(s,t),u("pagination",a)&&this.setPaginationState(a,t),u("rowPinning",l)&&this.setRowPinningState(l);const h=this.updateCachedState.bind(this);h("filter",this.getFilterState()),this.updateGroupExpansionState(),h("rowSelection",this.getRowSelectionState()),h("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>{this.updateRowGroupExpansionStateTimer=0,this.updateGroupExpansionState()},i=()=>t("filter",this.getFilterState()),{gos:o,colFilter:r,selectableFilter:s}=this.beans;this.addManagedEventListeners({filterChanged:i,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:n,columnRowGroupChanged:n,rowDataUpdated:()=>{(o.get("groupDefaultExpanded")!==0||o.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(n)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:a=>{(a.newPage||a.newPageSize)&&t("pagination",this.getPaginationState())},pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())}),r&&this.addManagedListeners(r,{filterStateChanged:i}),s&&this.addManagedListeners(s,{selectedFilterChanged:i})}setFirstDataRenderedState(e,t,n){const{scroll:i,cellSelection:o,focusedCell:r,columnOrder:s}=e,a=(h,f)=>!n?.has(h)&&(f||t==="api");a("focusedCell",r)&&this.setFocusedCellState(r),a("cellSelection",o)&&this.setCellSelectionState(o),a("scroll",i)&&this.setScrollState(i),this.setColumnPivotState(!!s?.orderedColIds,t);const l=this.updateCachedState.bind(this);l("sideBar",this.getSideBarState()),l("focusedCell",this.getFocusedCellState());const u=this.getRangeSelectionState();l("rangeSelection",u),l("cellSelection",u),l("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:n,cellFocusCleared:n,cellSelectionChanged:i=>{if(i.finished){const o=this.getRangeSelectionState();t("rangeSelection",o),t("cellSelection",o)}},bodyScrollEnd:()=>t("scroll",this.getScrollState())})}getColumnState(){const e=this.beans;return MW(gh(e),e.colModel.isPivotMode())}setColumnState(e,t,n,i){const{sort:o,rowGroup:r,aggregation:s,pivot:a,columnPinning:l,columnVisibility:u,columnSizing:h,columnOrder:f}=e;let g=!1;const m=(E,I)=>{const B=!i?.has(E)&&!!(I||t==="api");return g||(g=B),B},v={},w=E=>{let I=v[E];return I||(I={colId:E},v[E]=I,I)},b={},y=m("sort",o);y&&o?.sortModel.forEach(({colId:E,sort:I,type:B},W)=>{const X=w(E);X.sort=I,X.sortIndex=W,X.sortType=B}),(y||!n)&&(b.sort=null,b.sortIndex=null);const R=m("rowGroup",r);R&&r?.groupColIds.forEach((E,I)=>{const B=w(E);B.rowGroup=!0,B.rowGroupIndex=I}),(R||!n)&&(b.rowGroup=null,b.rowGroupIndex=null);const S=m("aggregation",s);S&&s?.aggregationModel.forEach(({colId:E,aggFunc:I})=>{w(E).aggFunc=I}),(S||!n)&&(b.aggFunc=null);const P=m("pivot",a);P&&(a?.pivotColIds.forEach((E,I)=>{const B=w(E);B.pivot=!0,B.pivotIndex=I}),this.gos.updateGridOptions({options:{pivotMode:!!a?.pivotMode},source:t})),(P||!n)&&(b.pivot=null,b.pivotIndex=null);const F=m("columnPinning",l);if(F){for(const E of l?.leftColIds??[])w(E).pinned="left";for(const E of l?.rightColIds??[])w(E).pinned="right"}(F||!n)&&(b.pinned=null);const A=m("columnVisibility",u);if(A)for(const E of u?.hiddenColIds??[])w(E).hide=!0;(A||!n)&&(b.hide=null);const k=m("columnSizing",h);if(k)for(const{colId:E,flex:I,width:B}of h?.columnSizingModel??[]){const W=w(E);W.flex=I??null,W.width=B}(k||!n)&&(b.flex=null);const L=f?.orderedColIds,N=!!L?.length&&!i?.has("columnOrder"),M=N?L.map(E=>w(E)):Object.values(v);(M.length||g)&&(this.columnStates=M,oo(this.beans,{state:M,applyOrder:N,defaultState:b},t))}setColumnPivotState(e,t){const n=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;this.columnGroupStates=void 0;const o=this.beans,{pivotResultCols:r,colGroupSvc:s}=o;if(r?.isPivotResultColsPresent()){if(n){const a=[];for(const l of n)r.getPivotResultCol(l.colId)&&a.push(l);oo(o,{state:a,applyOrder:e},t)}i&&s?.setColumnGroupState(i,t)}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return kW(t)}setColumnGroupState(e,t,n){const i=this.beans.colGroupSvc;if(!i||n?.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const o=new Set(e.columnGroup?.openColumnGroupIds),s=i.getColumnGroupState().map(({groupId:a})=>{const l=o.has(a);return l&&o.delete(a),{groupId:a,open:l}});for(const a of o)s.push({groupId:a,open:!0});s.length&&(this.columnGroupStates=s),i.setColumnGroupState(s,t)}getFilterState(){const{filterManager:e,selectableFilter:t}=this.beans;let n=e?.getFilterModel();n&&Object.keys(n).length===0&&(n=void 0);const i=e?.getFilterState(),o=e?.getAdvFilterModel()??void 0,r=t?.getState();return n||o||i||r?{filterModel:n,columnFilterState:i,advancedFilterModel:o,selectableFilters:r}:void 0}setFilterState(e){const{filterManager:t,selectableFilter:n}=this.beans,{filterModel:i,columnFilterState:o,advancedFilterModel:r,selectableFilters:s}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};s!==void 0&&n?.setState(s??{}),(i!==void 0||o!==void 0)&&t?.setFilterState(i??null,o??null,"columnFilter"),r!==void 0&&t?.setAdvFilterModel(r??null,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:n,type:i,startRow:o,endRow:r,columns:s,startColumn:a}=t;return{id:n,type:i,startRow:o,endRow:r,colIds:s.map(l=>l.getColId()),startColId:a.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:n,colModel:i,visibleCols:o}=this.beans;if(!rr(t)||!n)return;const r=[];for(const s of e?.cellRanges??[]){const a=[];for(const u of s.colIds){const h=i.getCol(u);h&&a.push(h)}if(!a.length)continue;let l=i.getCol(s.startColId);if(!l){const u=o.allCols,h=new Set(a);l=u.find(f=>h.has(f))}r.push({...s,columns:a,startColumn:l})}n.setCellRanges(r)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:n}=e?.getVScrollPosition()??{top:0};return n||t?{top:n,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:n}=e??{top:0,left:0},{frameworkOverrides:i,rowRenderer:o,animationFrameSvc:r,ctrlsSvc:s}=this.beans;i.wrapIncoming(()=>{s.get("center").setCenterViewportScrollLeft(n),s.getScrollFeature()?.setVerticalScrollPosition(t),o.redraw({afterScroll:!0}),r?.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:n,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:n,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:n}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:i,rowIndex:o,rowPinned:r}=e;t.setFocusedCell({column:n.getCol(i),rowIndex:o,rowPinned:r,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const n=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!n&&!i))return{page:n,pageSize:i}}setPaginationState(e,t){const{pagination:n,gos:i}=this.beans;if(!n)return;const{pageSize:o,page:r}=e??{page:0,pageSize:i.get("paginationPageSize")},s=t==="gridInitializing";o&&!i.get("paginationAutoPageSize")&&n.setPageSize(o,s?"initialState":"pageSizeSelector"),typeof r=="number"&&(s?n.setPage(r):n.goToPage(r))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e,t){this.beans.selectionSvc?.setSelectionState(e,t,t==="api")}updateGroupExpansionState(){const{expansionSvc:e,gos:t}=this.beans,n=e?.getExpansionState(),i=t.get("ssrmExpandAllAffectsAllRows");this.updateCachedState("ssrmRowGroupExpansion",i?n:void 0),this.updateCachedState("rowGroupExpansion",i?void 0:n)}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,n){const i=e??t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};this.beans.expansionSvc?.setExpansionState(i,n)}updateColumnState(e){const t=this.getColumnState();let n=!1;const i=this.cachedState;for(const o of Object.keys(t)){const r=t[o];uc(r,i[o])||(n=!0)}this.cachedState={...i,...t},n&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const n=this.cachedState[e];this.setCachedStateValue(e,t),uc(t,n)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&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")}},Q8={moduleName:"GridState",version:Se,beans:[q8],apiFunctions:{getState:U8,setState:$8}};function Y8(e){return e.rowModel.isLastRowIndexKnown()}function Z8(e){return e.pagination?.getPageSize()??100}function J8(e){return e.pagination?.getCurrentPage()??0}function X8(e){return e.pagination?.getTotalPages()??1}function e9(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function t9(e){e.pagination?.goToNextPage()}function n9(e){e.pagination?.goToPreviousPage()}function i9(e){e.pagination?.goToFirstPage()}function o9(e){e.pagination?.goToLastPage()}function r9(e,t){e.pagination?.goToPage(t)}var s9=class extends J{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")||this.centerRowsCtrl==null}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,n=()=>{const i=Math.max(Gs(t),1),o=Math.floor(e/i);t.pagination.setPageSize(o,"autoCalculated")};this.isBodyRendered?gn(this,n,50)():(n(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};function a9(e,t){if(typeof e!="number")return"";const n=t(),i=n("thousandSeparator",","),o=n("decimalSeparator",".");return e.toString().replace(".",o).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${i}`)}var $c="paginationPageSizeSelector",l9={tag:"span",cls:"ag-paging-page-size"},c9=class extends Pt{constructor(){super(l9),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($c,()=>{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(),this.selectPageSizeComp)}reset(){xn(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")&&this.gos.get($c)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),n=!t||!e.includes(t);if(n){const o=this.gos.exists("paginationPageSize"),r=this.gos.get($c)!==!0;le(94,{pageSizeSet:o,pageSizesSet:r,pageSizeOptions:e,paginationPageSizeOption:t}),r||le(95,{paginationPageSizeOption:t,paginationPageSizeSelector:$c}),e.unshift("")}const i=String(n?"":t);this.selectPageSizeComp?(Or(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(i,!0)):this.createPageSizeSelectorComp(e,i),this.hasEmptyOption=n}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const n=this.getLocaleTextFunc(),i=n("pageSizeSelectorLabel","Page Size:"),o=n("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new hv).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(o).setLabel(i).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get($c);return!Array.isArray(t)||!t?.length?e:[...t].sort((n,i)=>n-i)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},u9={selector:"AG-PAGE-SIZE-SELECTOR",component:c9},d9=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;flex-wrap:wrap-reverse;gap:calc(var(--ag-spacing)*4);justify-content:flex-end;min-height:var(--ag-pagination-panel-height);padding:calc(var(--ag-spacing)*.5) var(--ag-cell-horizontal-padding);row-gap:calc(var(--ag-spacing)*.5);@container (width < 600px){justify-content:center}}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel,.ag-paging-row-summary-panel{margin:calc(var(--ag-spacing)*.5)}.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}.ag-paging-description{line-height:0}",h9=class extends MR{constructor(){super(),this.btFirst=ge,this.btPrevious=ge,this.btNext=ge,this.btLast=ge,this.lbRecordCount=ge,this.lbFirstRowOnPage=ge,this.lbLastRowOnPage=ge,this.lbCurrent=ge,this.lbTotal=ge,this.pageSizeComp=ge,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(d9)}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(),[u9]);const{btFirst:t,btPrevious:n,btNext:i,btLast:o}=this;this.activateTabIndex([t,n,i,o]),t.insertAdjacentElement("afterbegin",ri(e?"last":"first",this.beans)),n.insertAdjacentElement("afterbegin",ri(e?"next":"previous",this.beans)),i.insertAdjacentElement("afterbegin",ri(e?"previous":"next",this.beans)),o.insertAdjacentElement("afterbegin",ri(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:r=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(r):S2(this.beans,r),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}getFocusableContainerName(){return"pagination"}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:n}=e;this.addManagedListeners(t,{click:n,keydown:i=>{(i.key===K.ENTER||i.key===K.SPACE)&&(i.preventDefault(),n())}})}y2(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}):a9(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(),n=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const i=this.isZeroPagesToDisplay(),o=e===n-1;this.nextButtonDisabled=o||i,this.lastButtonDisabled=!t||i||e===n-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){pL(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),n=this.pagination.getMasterRowCount(),i=e?n:null,o=this.pagination.getCurrentPage(),r=this.pagination.getPageSize();let s,a;this.isZeroPagesToDisplay()?s=a=0:(s=r*o+1,a=s+r-1,e&&a>i&&(a=i));const l=s+r-1,u=!e&&n<l,h=this.formatNumber(s);this.lbFirstRowOnPage.textContent=h;let f;const g=this.getLocaleTextFunc();u?f=g("pageLastRowUnknown","?"):f=this.formatNumber(a),this.lbLastRowOnPage.textContent=f;const v=t>0?o+1:0,w=this.formatNumber(v);this.lbCurrent.textContent=w;let b,y;if(e)b=this.formatNumber(t),y=this.formatNumber(i);else{const R=g("more","more");b=R,y=R}this.lbTotal.textContent=b,this.lbRecordCount.textContent=y,this.announceAriaStatus(h,f,y,w,b)}announceAriaStatus(e,t,n,i,o){const r=this.getLocaleTextFunc(),s=r("page","Page"),a=r("to","to"),l=r("of","of"),u=`${e} ${a} ${t} ${l} ${n}`,h=`${s} ${i} ${l} ${o}`;u!==this.ariaRowStatus&&(this.ariaRowStatus=u,this.ariaAnnounce?.announceValue(u,"paginationRow")),h!==this.ariaPageStatus&&(this.ariaPageStatus=h,this.ariaAnnounce?.announceValue(h,"paginationPage"))}},f9={selector:"AG-PAGINATION",component:h9},g9=100,p9=class extends J{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 f9}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0: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||typeof t!="number")return;const{editSvc:n}=this.beans;n?.isEditing()&&(n.isBatchEditing()?n.cleanupEditors():n.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:!0}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 Pe(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:Pe(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:Pe(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:Pe(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:g9}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const n=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}n!==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){this.setZeroRows();return}const n=this.pageSize,i=t-1;this.totalPages=Math.floor(i/n)+1,this.adjustCurrentPageIfInvalid();const o=this.currentPage,r=n*o;let s=n*(o+1)-1;if(s>i&&(s=i),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(r),s===i)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(s+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:n}=this,i=e-1;this.totalPages=Math.floor(i/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*n,this.bottomDisplayedRowIndex=t*(n+1)-1,this.bottomDisplayedRowIndex>i&&(this.bottomDisplayedRowIndex=i)}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:n=!1,newPageSize:i=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:n,newPageSize:i,keepRenderedRows:t})}},m9={moduleName:"Pagination",version:Se,beans:[p9,s9],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:Y8,paginationGetPageSize:Z8,paginationGetCurrentPage:J8,paginationGetTotalPages:X8,paginationGetRowCount:e9,paginationGoToNextPage:t9,paginationGoToPreviousPage:n9,paginationGoToFirstPage:i9,paginationGoToLastPage:o9,paginationGoToPage:r9},dependsOn:[Dh]},v9=".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)}";function C9(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function w9(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function b9(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function y9(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function S9(e,t,n){return e.pinnedRowModel?.forEachPinnedRow(t,n)}var R9={moduleName:"PinnedRow",version:Se,beans:[s2],css:[v9],apiFunctions:{getPinnedTopRowCount:C9,getPinnedBottomRowCount:w9,getPinnedTopRow:b9,getPinnedBottomRow:y9,forEachPinnedRow:S9},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},x9="↑",F9="↓",P9={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},E9=class extends Pt{constructor(){super(P9),this.eValue=ge,this.eDelta=ge,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const n=Math.abs(t),i=e.formatValue(n),o=Pe(i)?i:n,r=t>=0,s=this.eDelta;r?s.textContent=x9+o:s.textContent=F9+o,s.classList.toggle("ag-value-change-delta-up",r),s.classList.toggle("ag-value-change-delta-down",!r)}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"),xn(this.eDelta)}refresh(e,t=!1){const{value:n,valueFormatted:i}=e,{eValue:o,lastValue:r,beans:s}=this;if(n===r||(Pe(i)?o.textContent=i:Pe(n)?o.textContent=n:xn(o),s.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n,l=r&&typeof r=="object"&&"toNumber"in r?r.toNumber():r;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const u=a-l;this.showDelta(e,u)}return r&&o.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=n,!0}},D9=".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}",T9={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},A9=class extends Pt{constructor(){super(T9),this.eCurrent=ge,this.refreshCount=0,this.registerCSS(D9)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:n}=this,i=un({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=i,i.textContent=n.textContent,this.getGui().insertBefore(i,n),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 n=e.value;if(Wt(n)&&(n=""),n===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=n;const i=this.eCurrent;return Pe(e.valueFormatted)?i.textContent=e.valueFormatted:Pe(e.value)?i.textContent=n:xn(i),!0}},I9=class extends J{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,n=this.beans.gos.get("cellFlashDuration"),i=this.beans.gos.get("cellFadeDuration")){const o=this.animations[t];o.delete(e);const r=Date.now(),s=r+n,a=r+n+i,l={phase:"flash",flashEndTime:s,fadeEndTime:a};o.set(e,l);const u=`ag-cell-${t}`,h=`${u}-animation`,{comp:f,eGui:{style:g}}=e;f.toggleCss(u,!0),f.toggleCss(h,!1),g.removeProperty("transition"),g.removeProperty("transition-delay"),this.nextAnimationTime&&s+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),n)}),this.nextAnimationTime=s)}advanceAnimations(){const e=Date.now();let t=null;for(const n of Object.keys(this.animations)){const i=this.animations[n],o=`ag-cell-${n}`,r=`${o}-animation`;for(const[s,a]of i){if(!s.isAlive()||!s.comp){i.delete(s);continue}const{phase:l,flashEndTime:u,fadeEndTime:h}=a,f=l==="flash"?u:h;if(!(e+15>=f)){t=Math.min(f,t??1/0);continue}const{comp:m,eGui:{style:v}}=s;switch(l){case"flash":m.toggleCss(o,!1),m.toggleCss(r,!0),v.transition=`background-color ${h-u}ms`,v.transitionDelay=`${u-e}ms`,t=Math.min(h,t??1/0),a.phase="fade";break;case"fade":m.toggleCss(o,!1),m.toggleCss(r,!1),v.removeProperty("transition"),v.removeProperty("transition-delay"),i.delete(s);break}}}t==null?(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 n=m2(e.cellPosition);t.cells[n]&&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()}};function M9(e,t={}){const{cellFlashSvc:n}=e;n&&e.frameworkOverrides.wrapIncoming(()=>{for(const i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))n.flashCell(i,t)})}var k9={moduleName:"HighlightChanges",version:Se,beans:[I9],userComponents:{agAnimateShowChangeCellRenderer:E9,agAnimateSlideCellRenderer:A9},apiFunctions:{flashCells:M9}};function L9(e,t,n){if(!t)return;const i=e.ctrlsSvc.getGridBodyCtrl().eGridBody,o=`aria-${t}`;n===null?i.removeAttribute(o):i.setAttribute(o,n)}function O9(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function _9(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function N9(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function B9(e){e.animationFrameSvc?.flushAllFrames()}function H9(e){return{rowHeight:Gs(e),headerHeight:Mc(e)}}function G9(e,t={}){const n=[];for(const r of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const s=r.getCellRenderer();s!=null&&n.push(Xs(s))}if(t.columns?.length)return n;const i=[],o=tv(t.rowNodes);for(const r of e.rowRenderer.getAllRowCtrls()){if(o&&!nv(r.rowNode,o)||!r.isFullWidth())continue;const s=r.getFullWidthCellRenderers();for(let a=0;a<s.length;a++){const l=s[a];l!=null&&i.push(Xs(l))}}return[...i,...n]}var V9={moduleName:"RenderApi",version:Se,apiFunctions:{setGridAriaProperty:L9,refreshCells:O9,refreshHeader:_9,isAnimationFrameQueueEmpty:N9,flushAllAnimationFrames:B9,getSizesForCurrentTheme:H9,getCellRendererInstances:G9}},W9=class extends J{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=gn(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const{visibleCols:e,rowModel:t,rowSpanSvc:n,pinnedRowModel:i}=this.beans,o=e.autoHeightCols;let r=!1;const s=a=>{const l=a.__autoHeights;let u=Gr(this.beans,a).height;for(const h of o){let f=l?.[h.getColId()];const g=n?.getCellSpan(h,a);if(g){if(g.getLastNode()!==a)continue;if(f=n?.getCellSpan(h,a)?.getLastNodeAutoHeight(),!f)return}if(f==null){if(this.colSpanSkipCell(h,a))continue;return}u=Math.max(f,u)}u!==a.rowHeight&&(a.setRowHeight(u),r=!0)};i?.forEachPinnedRow?.("top",s),i?.forEachPinnedRow?.("bottom",s),t.forEachDisplayedNode?.(s),r&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,n){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[n.getId()];return}const i=e.__autoHeights[n.getId()];e.__autoHeights[n.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:n,colViewport:i,visibleCols:o}=this.beans;if(!n.colSpanActive)return!1;let r=[];switch(e.getPinned()){case"left":r=o.getLeftColsForRow(t);break;case"right":r=o.getRightColsForRow(t);break;case null:r=i.getColsWithinViewport(t);break}return!r.includes(e)}setupCellAutoHeight(e,t,n){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const i=t.parentElement,{rowNode:o,column:r}=e,s=this.beans,a=h=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!n.isAlive())return;const{paddingTop:f,paddingBottom:g,borderBottomWidth:m,borderTopWidth:v}=Ns(i),w=f+g+m+v,y=t.offsetHeight+w;if(h<5){const S=!cn(s)?.contains(t),P=y==0;if(S||P){window.setTimeout(()=>a(h+1),0);return}}this.setRowAutoHeight(o,y,r)},l=()=>a(0);l();const u=Nr(s,t,l);return n.addDestroyFunc(()=>{u(),this.setRowAutoHeight(o,void 0,r)}),!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:n}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(n).filter(o=>o.isAutoHeight())),t.length!==0){if(!n.__autoHeights)return!1;for(const i of t){const o=n.__autoHeights[i.getColId()];if(!o||n.rowHeight<o)return!1}}return!0}},z9={moduleName:"RowAutoHeight",version:Se,beans:[W9]},U9=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?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){const e=this.firstNode.__autoHeights?.[this.col.getColId()];if(e==null)return;let t=0;for(const n of this.spannedNodes)n!==this.lastNode&&(t+=n.rowHeight);return e-t}},$9=class extends J{constructor(e){super(),this.column=e}buildCache(e){const{column:t,beans:{gos:n,pinnedRowModel:i,rowModel:o,valueSvc:r,pagination:s}}=this,{colDef:a}=t,l=this.getNodeMap(e),u=new Map,h=n.getCallback("isFullWidthRow"),f=a.equals,g=a.spanRows,m=typeof g=="function";let v=null,w=null,b;const y=(S,P)=>{v=S,w=null,b=P},R=S=>{const P=!S.isExpandable()&&!S.group&&!S.detail&&(h?!h({rowNode:S}):!0);if(S.rowIndex==null||!P){y(null,null);return}if(v==null||S.level!==v.level||S.footer||w&&S.rowIndex-1!==w?.getLastNode().rowIndex){y(S,r.getValue(t,S,"data"));return}const F=r.getValue(t,S,"data");if(m){const A=Ue(n,{valueA:b,nodeA:v,valueB:F,nodeB:S,column:t,colDef:a});if(!g(A)){y(S,F);return}}else if(f?!f(b,F):b!==F){y(S,F);return}if(!w){const A=l?.get(v);A?.firstNode===v?(A.reset(),w=A):w=new U9(t,v),u.set(v,w)}w.addSpannedNode(S),u.set(S,w)};switch(e){case"center":o.forEachDisplayedNode?.(S=>{(!s||s.isRowInPage(S.rowIndex))&&R(S)}),this.centerValueNodeMap=u;break;case"top":i?.forEachPinnedRow("top",R),this.topValueNodeMap=u;break;case"bottom":i?.forEachPinnedRow("bottom",R),this.bottomValueNodeMap=u;break}}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}}},j9=class extends J{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=gn(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=gn(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 n=this.createManagedBean(new $9(e));this.spanningColumns.set(e,n),n.buildCache("top"),n.buildCache("bottom"),n.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(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t?.createCtrls("top"),t?.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t?.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const n=this.spanningColumns.get(e);return n?n.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:n}=this.beans,i=e.column,o=e.rowIndex,r=this.spanningColumns.get(i);if(!r)return;let s;switch(e.rowPinned){case"top":s=t?.getPinnedTopRow(o);break;case"bottom":s=t?.getPinnedBottomRow(o);break;default:s=n.getRow(o)}if(s)return r.getCellSpan(s)}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 n=this.spanningColumns.get(e);if(n)return n.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[n,i]of this.spanningColumns)if(i.isCellSpanning(e)){const o=i.getCellSpan(e);t(n,o)}}destroy(){super.destroy(),this.spanningColumns.clear()}},K9=class extends cl{constructor(e,t,n){super(e.col,e.firstNode,n,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,n,i,o,r,s){this.eWrapper=n,super.setComp(e,t,n,i,o,r,s),this.setAriaRowSpan()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||fc(e,t.rowIndex)}setAriaRowSpan(){bL(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(Ic(t)){this.focusedCellPosition=void 0;return}const n=this.isCellFocused();n||(this.focusedCellPosition=void 0),e&&n&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},q9=class extends Sh{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 K9(t,this,this.beans)}isCorrectCtrlForSpan(e){const t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},Q9=class extends J{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,n=this.getCtrlsMap(e),i=n.size,o=this.getAllRelevantRowControls(e),r=new Map;let s=!1;for(const l of o)l.isAlive()&&t?.forEachSpannedColumn(l.rowNode,(u,h)=>{if(r.has(h.firstNode))return;const f=n.get(h.firstNode);if(f){r.set(h.firstNode,f),n.delete(h.firstNode);return}s=!0;const g=new q9(h.firstNode,this.beans,!1,!1,!1);r.set(h.firstNode,g)});this.setCtrlsMap(e,r);const a=r.size===i;if(!(!s&&a)){for(const l of n.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,n=t?.getCellSpanByPosition(e);if(!n)return;const i=this.getCtrlsMap(e.rowPinned).get(n.firstNode);if(i)return i.getAllCellCtrls().find(o=>o.column===e.column)}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;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},Y9={moduleName:"CellSpan",version:Se,beans:[j9,Q9]},Z9=class extends J{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,Za(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),YO(e))}createColumns(e,t){const n=()=>{Kd(this.beans,this.columns?.tree),this.columns=null},i=e.treeDepth,r=(this.columns?.treeDepth??-1)==i,s=this.generateSelectionCols();if(QO(s,this.columns?.list??[])&&r)return;n();const{colGroupSvc:l}=this.beans,u=l?.findDepth(e.tree)??0,h=l?.balanceTreeForAutoCols(s,u)??[];this.columns={list:s,tree:h,treeDepth:u,map:{}},t(g=>{if(!g)return null;const m=g.filter(v=>!zr(v));return[...s,...m]})}updateColumns(e){const t=Za(e.source),{beans:n}=this;for(const i of this.columns?.list??[]){const o=this.createSelectionColDef(e.currentValue);i.setColDef(o,null,t),oo(n,{state:[JO(o,i.colId)]},t)}}getColumn(e){return this.columns?.list.find(t=>Pc(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,n=e.get("rowSelection");if(typeof n!="object"||!Hs(e))return!1;const i=(t.autoColSvc?.getColumns()?.length??0)>0;if(n.checkboxLocation==="autoGroupColumn"&&i)return!1;const o=!!qa(n),r=Hd(n);return o||r}createSelectionColDef(e){const{gos:t}=this,n=e??t.get("selectionColumnDef"),i=t.get("enableRtl"),{rowSpan:o,spanRows:r,...s}=n??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:i?"right":"left",comparator(a,l,u,h){const f=u.isSelected(),g=h.isSelected();return f===g?0:f?1:-1},editable:!1,suppressFillHandle:!0,suppressAutoSize:!0,pinned:null,...s,colId:P0,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const n=new Ws(e,null,t,!1);return this.createBean(n),[n]}onSelectionOptionsChanged(e,t,n){const i=t&&typeof t!="string"?qa(t):void 0,o=e&&typeof e!="string"?qa(e):void 0,r=i!==o,s=t&&typeof t!="string"?Hd(t):void 0,a=e&&typeof e!="string"?Hd(e):void 0,l=s!==a,u=Gd(e),h=Gd(t);(r||l||u!==h)&&this.beans.colModel.refreshAll(n)}destroy(){Kd(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e,t,n){if(!this.columns?.list.length)return;const i=e.length+t.length+n.length;if(i===0)return;const o=this.columns.list[0];if(!o.isVisible())return;const r=()=>{let l;switch(o.pinned){case"left":case!0:l=e;break;case"right":l=n;break;default:l=t}l&&Fo(l,o)};(this.beans.rowNumbersSvc?.getColumn(E0)?2:1)===i&&r()}},J9=':where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:before{content:"";cursor:pointer;inset:-8px;position:absolute}';function X9(e,t){if(!t.nodes.every(s=>s.rowPinned&&!yh(s)?(le(59),!1):s.id===void 0?(le(60),!1):!0))return;const{nodes:i,source:o,newValue:r}=t;e.selectionSvc?.setNodesSelected({nodes:i,source:o??"api",newValue:r})}function eU(e,t,n="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:n,selectAll:t})}function tU(e,t,n="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:n,selectAll:t})}function nU(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function iU(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function oU(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function rU(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function sU(e){return e.selectionSvc?.getSelectedNodes()??[]}function aU(e){return e.selectionSvc?.getSelectedRows()??[]}var lU={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},cU=class extends Pt{constructor(){super(lU,[km]),this.eCheckbox=ge}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:n}=this,i=t.isSelected(),o=Ed(e,i),[r,s]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(r,s);n.setValue(i,!0),n.setInputAriaLabel(`${a} (${o})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getWrapperElement(),{dblclick:Ks,click:i=>{Ks(i),!this.eCheckbox.isDisabled()&&this.beans.selectionSvc?.handleSelectionEvent(i,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:i,previousValue:o})=>{const r=typeof i=="object"?Lp(i):void 0,s=typeof o=="object"?Lp(o):void 0;r!==s&&this.onSelectableChanged()}),Op(this.gos)||typeof this.getIsVisible()=="function"){const i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:n,gos:i}=this,o=t.selectable,r=this.getIsVisible();let s;if(typeof r=="function"){const f=n?.callbackParams;if(!e)s=r({...f,node:t,data:t.data});else{const g=e.createColumnFunctionCallbackParams(t);s=r({...f,...g})}}else s=r??!1;const a=o&&!s||!o&&s,l=o||s,u=i.get("rowSelection"),h=u&&typeof u!="string"?!Lp(u):!!e?.getColDef().showDisabledCheckboxes;this.setVisible(l&&(a?h:!0)),this.setDisplayed(l&&(a?h:!0)),l&&this.eCheckbox.setDisabled(a),n?.removeHidden&&this.setDisplayed(l)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?qa(t):this.column?.getColDef()?.checkboxSelection}},uU=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(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){if(this.rootId)return this.getRowNode(this.rootId);if(e)return this.setRoot(e),e}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(e){let t;const{rowModel:n,pinnedRowModel:i}=this;return t??(t=n.getRowNode(e)),i?.isManual()&&(t??(t=i.getPinnedRowById(e,"top")),t??(t=i.getPinnedRowById(e,"bottom"))),t}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const n=t[0].id===this.rootId,i=t.findIndex(o=>o.id===e.id);if(i>-1){const o=t.slice(0,i),r=t.slice(i+1);return this.setEndRange(e),n?{keep:o,discard:r}:{keep:r,discard:o}}else return{keep:t,discard:[]}}extend(e,t=!1){const n=this.getRoot();if(n==null){const o=this.getRange().slice();return t&&e.depthFirstSearch(r=>!r.group&&o.push(r)),o.push(e),this.setRoot(e),{keep:o,discard:[]}}const i=this.getNodesInRange(n,e);if(!i)return this.setRoot(e),{keep:[e],discard:[]};if(i.find(o=>o.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const o=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:o}}}getNodesInRange(e,t){const{pinnedRowModel:n,rowModel:i}=this;if(!n?.isManual())return i.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&!t.rowPinned)return Ni(n,"top",e,void 0).concat(i.getNodesInRangeForSelection(i.getRow(0),t)??[]);if(e.rowPinned==="bottom"&&!t.rowPinned){const o=Ni(n,"bottom",void 0,e),r=i.getRowCount(),s=i.getRow(r-1);return(i.getNodesInRangeForSelection(t,s)??[]).concat(o)}if(!e.rowPinned&&!t.rowPinned)return i.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&t.rowPinned==="top")return Ni(n,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){const o=Ni(n,"top",t,void 0),r=Ni(n,"bottom",void 0,e),s=i.getRow(0),a=i.getRow(i.getRowCount()-1);return o.concat(i.getNodesInRangeForSelection(s,a)??[]).concat(r)}if(!e.rowPinned&&t.rowPinned==="top")return Ni(n,"top",t,void 0).concat(i.getNodesInRangeForSelection(i.getRow(0),e)??[]);if(e.rowPinned==="top"&&t.rowPinned==="bottom"){const o=Ni(n,"top",e,void 0),r=Ni(n,"bottom",void 0,t),s=i.getRow(0),a=i.getRow(i.getRowCount()-1);return o.concat(i.getNodesInRangeForSelection(s,a)??[]).concat(r)}if(e.rowPinned==="bottom"&&t.rowPinned==="bottom")return Ni(n,"bottom",e,t);if(!e.rowPinned&&t.rowPinned==="bottom"){const o=Ni(n,"bottom",void 0,t),r=i.getRow(i.getRowCount());return(i.getNodesInRangeForSelection(e,r)??[]).concat(o)}return null}},dU=class extends J{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(Ot(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new Mm);this.cbSelectAll=t,t.addCss("ag-header-select-all"),_r(t.getGui(),"presentation"),this.showOrHideSelectAll();const n=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:n,paginationChanged:n,modelUpdated:n}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:o})=>{const r=s=>typeof s=="string"||!s||s.mode==="singleRow"?void 0:s.selectAll;r(i)!==r(o)&&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(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,n=this.cbSelectAll,i=t.getSelectAllState(e);n.setValue(i);const o=t.hasNodesToSelect(e);n.setDisabled(!o),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:n,cbSelectAll:i,cbSelectAllVisible:o}=this,r=i.getValue(),s=Ed(t,r),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");n.setAriaDescriptionProperty("selectAll",o?`${a} (${s})`:null),i.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||n.announceAriaDescription()}checkSelectionType(e){return xc(this.gos)?!0:(le(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:n}=this.beans;return en(t)||Rc(t)?!0:(le(129,{feature:e,rowModel:n.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let n="uiSelectAll";t==="currentPage"?n="uiSelectAllCurrentPage":t==="filtered"&&(n="uiSelectAllFiltered");const i={source:n,selectAll:t},o=this.beans.selectionSvc;e?o.selectAllRowNodes(i):o.deselectAllRowNodes(i)}isCheckboxSelection(){const{column:e,gos:t,beans:n}=this,r=typeof t.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return g1(n,e)&&this.checkRightRowModelType(r)&&this.checkSelectionType(r)}getSelectAllMode(){const e=b0(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:n}=this.column.getColDef();return t?"currentPage":n?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}};function g1({gos:e,selectionColSvc:t},n){const i=e.get("rowSelection"),o=n.getColDef(),{headerCheckboxSelection:r}=o;let s=!1;if(typeof i=="object"){const l=zr(n),u=Bp(n);(Gd(i)==="autoGroupColumn"&&u||l&&t?.isSelectionColumnEnabled())&&(s=Hd(i))}else typeof r=="function"?s=r(Ue(e,{column:n,colDef:o})):s=!!r;return s}var hU=class extends J{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new uU(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const n=Op(e);n!==this.isRowSelectable&&(this.isRowSelectable=n,this.updateSelectable())}),this.isRowSelectable=Op(e),this.addManagedEventListeners({cellValueChanged:n=>this.updateRowSelectable(n.node),rowNodeDataChanged:n=>this.updateRowSelectable(n.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new cU}createSelectAllFeature(e){if(g1(this.beans,e))return new dU(e)}isMultiSelect(){return xc(this.gos)}onRowCtrlSelected(e,t,n){const i=!!e.rowNode.isSelected();e.forEachGui(n,o=>{o.rowComp.toggleCss("ag-row-selected",i);const r=o.element;BS(r,i),r.contains(Ot(this.beans))&&t(o)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected(),n=this.beans.editSvc?.isEditing({rowNode:e});if(!e.selectable||n)return;const o=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(o,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!yh(e)||!Hs(this.gos)}updateRowSelectable(e,t){const n=e.rowPinned&&e.pinnedSibling?e.pinnedSibling.selectable:this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,n,t),n}setRowSelectable(e,t,n){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),n)return;if(Fc(this.gos)){const o=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:o??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,n=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let i=0;i<e.childrenAfterGroup.length;i++){const o=e.childrenAfterGroup[i];let r=o.isSelected();if(!o.selectable){const s=this.calculateSelectedFromChildren(o);if(s===null)continue;r=s}switch(r){case!0:t=!0;break;case!1:n=!0;break;default:return}}if(!(t&&n))return t?!0:n?!1:e.selectable?e.__selected:null}selectRowNode(e,t,n,i="api"){if(t&&e.destroyed)return!1;const o=!e.selectable&&t,r=e.__selected===t;if(o||r)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const s=e.sibling;s&&s.footer&&s.__localEventService&&s.dispatchRowEvent("rowSelected");const a=e.pinnedSibling;return a?.rowPinned&&a.__localEventService&&a.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...Z_(e,this.gos,"rowSelected"),event:n||null,source:i}),!0}isCellCheckboxSelection(e,t){const n=this.gos.get("rowSelection");if(n&&typeof n!="string"){const i=zr(e)&&qa(n);return e.isColumnFunc(t,i)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,n,i){const{gos:o,selectionCtx:r}=this,s=e.isSelected(),a=Fc(o),l=SO(o),u=RO(o),h=this.isMultiSelect(),f=i==="rowClicked";if(f&&!(l||u))return null;if(t&&n&&h){const g=r.getRoot();if(g)if(g.isSelected()){const m=r.isInRange(e)?r.truncate(e):r.extend(e,a);return{deselect:m.discard,select:m.keep,reset:!1}}else{const m=r.extend(e,a);return{select:[],deselect:m.keep,reset:!1}}else return null}else if(t&&h){const g=r.selectAll?this.beans.rowModel.getRow(0):void 0,m=r.getRoot(g),v=r.isInRange(e)?r.truncate(e):r.extend(e,a);return{select:v.keep,deselect:v.discard,reset:r.selectAll||!!(m&&!m.isSelected())}}else if(n){if(f){const g=!s;return g&&!l||!g&&!u?null:(r.setRoot(e),{node:e,newValue:g,clearSelection:!1})}return r.setRoot(e),{node:e,newValue:!s,clearSelection:!h}}else{r.setRoot(e);const g=xO(o),m=Wd(o)==="filteredDescendants",v=f&&(!g||!l);if(m&&s===void 0&&en(o))return{node:e,newValue:!1,checkFilteredNodes:!0,clearSelection:!h||v};if(f){const w=s?!g:l;return w===s&&!v||w&&!l||!w&&!u?null:{node:e,newValue:w,clearSelection:!h||v,keepDescendants:e.group&&a}}return{node:e,newValue:!s,clearSelection:!h||v}}}},fU=class extends hU{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=Vd(e),this.groupSelectsDescendants=Fc(e),this.groupSelectsFiltered=Wd(e)==="filteredDescendants",this.masterSelectsDetail=y0(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=Fc(e),n=Vd(e),i=Wd(e)==="filteredDescendants";this.masterSelectsDetail=y0(e)==="detail",(t!==this.groupSelectsDescendants||i!==this.groupSelectsFiltered||n!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=i,this.mode=n)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,n){if(this.isRowSelectionBlocked(t))return 0;const i=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,n);if(i==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in i)return i.reset?this.resetNodes():this.selectRange(i.deselect,!1,n),this.selectRange(i.select,!0,n);{const o=i.checkFilteredNodes?m1(i.node):i.newValue;return this.setNodesSelected({nodes:[i.node],newValue:o,clearSelection:i.clearSelection,keepDescendants:i.keepDescendants,event:e,source:n})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:n,nodes:i,event:o,source:r,keepDescendants:s=!1}){if(i.length===0)return 0;const{gos:a}=this;if(!Hs(a)&&e)return le(132),0;if(i.length>1&&!this.isMultiSelect())return le(130),0;let l=0;for(let u=0;u<i.length;u++){const h=i[u],f=h.primaryRow;if(f.rowPinned&&!yh(f)){le(59);continue}if(f.id===void 0){le(60);continue}if(e&&h.destroyed)continue;this.groupSelectsFiltered&&f.group&&!a.get("treeData")||this.selectRowNode(f,e,o,r)&&(this.detailSelection.delete(f.id),l++),this.groupSelectsDescendants&&f.childrenAfterGroup?.length&&(l+=this.selectChildren(f,e,r))}return n||(i.length===1&&r==="api"&&this.selectionCtx.setRoot(i[0].primaryRow),e&&(t||!this.isMultiSelect())&&(l+=this.clearOtherNodes(i[0].primaryRow,s,r)),l>0&&(this.updateGroupsFromChildrenSelections(r),this.dispatchSelectionChanged(r))),l}selectRange(e,t,n){let i=0;return e.forEach(o=>{const r=o.primaryRow;if(r.group&&this.groupSelectsDescendants)return;this.selectRowNode(r,t,void 0,n)&&i++}),i>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n)),i}selectChildren(e,t,n){const i=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return i?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:n,nodes:i}):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((n,i)=>{e(n)&&t.set(i,n)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:n,rowModel:i}=this.beans;if(!en(n))return!1;const o=i.rootNode;if(!o)return!1;let r=!1;const s=a=>{if(a!==o){const l=this.calculateSelectedFromChildren(a);r=this.selectRowNode(a,l===null?!1:l,void 0,e)||r}};return ia(o,this.beans.rowModel.hierarchical,t,s),r}clearOtherNodes(e,t,n){const i=new Map;let o=0;return this.selectedNodes.forEach(r=>{const s=r.id==e.id;if((t?!pU(e,r):!0)&&!s){const l=this.selectedNodes.get(r.id);o+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:n}),this.groupSelectsDescendants&&r.parent&&i.set(r.parent.id,r.parent)}}),i.forEach(r=>{const s=this.calculateSelectedFromChildren(r);this.selectRowNode(r,s===null?!1:s,void 0,n)}),o}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 jr(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(!en(e))return;const n=t.getTopLevelNodes();if(n===null)return;const i=[];function o(r){for(let s=0,a=r.length;s<a;s++){const l=r[s];l.isSelected()?i.push(l):l.group&&l.childrenAfterGroup&&o(l.childrenAfterGroup)}}return o(n),i}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){const n=en(this.gos);let i=!1;const o=r=>{const s=this.selectRowNode(r.primaryRow,!1,void 0,e);i||(i=s)};if(t==="currentPage"||t==="filtered"){if(!n){mt(102);return}this.getNodesToSelect(t).forEach(o)}else this.selectedNodes.forEach(o),this.reset(e);if(this.selectionCtx.selectAll=!1,n&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(e);i||(i=r)}i&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,n=0;return this.getNodesToSelect(e).forEach(i=>{this.groupSelectsDescendants&&i.group||(i.isSelected()?t++:i.selectable&&n++)}),{selectedCount:t,notSelectedCount:n}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:n}=this.getSelectedCounts(e);return p1(t,n)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],n=o=>t.push(o);if(e==="currentPage")return this.forEachNodeOnPage(o=>{if(!o.group){n(o);return}if(!o.footer&&!o.expanded){const r=s=>{n(s);const a=s.childrenAfterFilter;if(a)for(let l=0,u=a.length;l<u;++l)r(a[l])};r(o);return}this.groupSelectsDescendants||n(o)}),t;const i=this.beans.rowModel;return e==="filtered"?(i.forEachNodeAfterFilter(n),t):(i.forEachNode(n),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:n}=this.beans,i=t.getFirstRow(),o=t.getLastRow();for(let r=i;r<=o;r++){const s=n.getRow(r);s&&e(s)}}selectAllRowNodes(e){const{gos:t,selectionCtx:n}=this;if(!Hs(t)){le(132);return}if(yO(t)&&!xc(t)){le(130);return}if(!this.canSelectAll())return;const{source:i,selectAll:o}=e;let r=!1;if(this.getNodesToSelect(o).forEach(s=>{const a=this.selectRowNode(s.primaryRow,!0,void 0,i);r||(r=a)}),n.selectAll=!0,en(t)&&this.groupSelectsDescendants){const s=this.updateGroupsFromChildrenSelections(i);r||(r=s)}r&&this.dispatchSelectionChanged(i)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,n){if(e||(e=[]),!Array.isArray(e)){mt(103);return}const i=new Set(e),o=[];this.beans.rowModel.forEachNode(r=>{i.has(r.id)&&o.push(r)}),n&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:o,source:t})}canSelectAll(){return en(this.beans.gos)}updateSelectable(e){const{gos:t,rowModel:n}=this.beans;if(!Hs(t))return;const i="selectableChanged",o=en(t)&&this.groupSelectsDescendants,r=[];if(o){const s=n.rootNode;s&&ia(s,n.hierarchical,e,a=>{let l=!1;for(const u of a.childrenAfterGroup)l||(l=u.selectable),!u.group&&!this.updateRowSelectable(u,!0)&&u.isSelected()&&r.push(u);this.setRowSelectable(a,l,!0)})}else n.forEachNode(s=>{!this.updateRowSelectable(s,!0)&&s.isSelected()&&r.push(s)});r.length&&this.setNodesSelected({nodes:r,newValue:!1,source:i}),!e&&o&&this.updateGroupsFromChildrenSelections?.(i)}updateSelectableAfterGrouping(e){this.updateSelectable(e),this.groupSelectsDescendants&&this.updateGroupsFromChildrenSelections?.("rowGroupChanged",e)&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail)return;const n=e.detailNode?.detailGridInfo?.api;if(!n)return;const i=gU(n);e.isSelected()!==i&&this.selectRowNode(e,i,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),i||this.detailSelection.set(e.id,new Set(n.getSelectedNodes().map(r=>r.id)))}setDetailSelectionState(e,t,n){if(this.masterSelectsDetail){if(!xc(t)){le(269);return}switch(e.isSelected()){case!0:{n.selectAll();break}case!1:{n.deselectAll();break}case void 0:{const i=this.detailSelection.get(e.id);if(i){const o=[];for(const r of i){const s=n.getRowNode(r);s&&o.push(s)}n.setNodesSelected({nodes:o,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function gU(e){let t=0,n=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&n++}),p1(t,n)}function p1(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function pU(e,t){let n=t.parent;for(;n;){if(n===e)return!0;n=n.parent}return!1}function m1(e){const t=e.isSelected()===!1,n=e.childrenAfterFilter?.some(m1)??!1;return t||n}var mU={moduleName:"SharedRowSelection",version:Se,beans:[Z9],css:[J9],apiFunctions:{setNodesSelected:X9,selectAll:eU,deselectAll:tU,selectAllFiltered:nU,deselectAllFiltered:iU,selectAllOnCurrentPage:oU,deselectAllOnCurrentPage:rU,getSelectedNodes:sU,getSelectedRows:aU}},vU={moduleName:"RowSelection",version:Se,rowModels:["clientSide","infinite","viewport"],beans:[fU],dependsOn:[mU]},CU=class extends J{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,n=e.colDef,i=n.cellClassRules,o=this.getCellClassParams(e,n);Jm(this.beans.expressionSvc,i===this.cellClassRules?void 0:this.cellClassRules,i,o,r=>t.toggleCss(r,!0),r=>t.toggleCss(r,!1)),this.cellClassRules=i}applyUserStyles(){const e=this.column,t=e.colDef,n=t.cellStyle;if(!n)return;let i;if(typeof n=="function"){const o=this.getCellClassParams(e,t);i=n(o)}else i=n;i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,n=e.colDef,i=this.getCellClassParams(e,n);for(const r of this.staticClasses)t.toggleCss(r,!1);const o=this.beans.cellStyles.getStaticCellClasses(n,i);this.staticClasses=o;for(const r of o)t.toggleCss(r,!0)}getCellClassParams(e,t){const{value:n,rowNode:i}=this.cellCtrl;return Ue(this.beans.gos,{value:n,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},wU=class extends J{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,n,i){Jm(this.beans.expressionSvc,void 0,e.cellClassRules,t,n,i),this.processStaticCellClasses(e,t,n)}getStaticCellClasses(e,t){const{cellClass:n}=e;if(!n)return[];let i;return typeof n=="function"?i=n(t):i=n,typeof i=="string"&&(i=[i]),i||[]}createCellCustomStyleFeature(e){return new CU(e,this.beans)}processStaticCellClasses(e,t,n){this.getStaticCellClasses(e,t).forEach(o=>{n(o)})}},bU={moduleName:"CellStyle",version:Se,beans:[wU]},yU={moduleName:"RowStyle",version:Se,beans:[p3]},SU={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,overlayComponent:!0,suppressOverlays:!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},ai="clientSide",_n="serverSide",fl="infinite",RU={onGroupExpandedOrCollapsed:[ai],refreshClientSideRowModel:[ai],isRowDataEmpty:[ai],forEachLeafNode:[ai],forEachNodeAfterFilter:[ai],forEachNodeAfterFilterAndSort:[ai],resetRowHeights:[ai,_n],applyTransaction:[ai],applyTransactionAsync:[ai],flushAsyncTransactions:[ai],getBestCostNodeSelection:[ai],getServerSideSelectionState:[_n],setServerSideSelectionState:[_n],applyServerSideTransaction:[_n],applyServerSideTransactionAsync:[_n],applyServerSideRowData:[_n],retryServerSideLoads:[_n],flushServerSideAsyncTransactions:[_n],refreshServerSide:[_n],getServerSideGroupLevelState:[_n],refreshInfiniteCache:[fl],purgeInfiniteCache:[fl],getInfiniteRowCount:[fl],isLastRowIndexKnown:[fl,_n],expandAll:[ai,_n],collapseAll:[ai,_n],onRowHeightChanged:[ai,_n],setRowCount:[fl,_n],getCacheBlockState:[fl,_n]},xU={showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"},selectAllFiltered:{version:"v33",old:"selectAllFiltered()",new:'selectAll("filtered")'},deselectAllFiltered:{version:"v33",old:"deselectAllFiltered()",new:'deselectAll("filtered")'},selectAllOnCurrentPage:{version:"v33",old:"selectAllOnCurrentPage()",new:'selectAll("currentPage")'},deselectAllOnCurrentPage:{version:"v33",old:"deselectAllOnCurrentPage()",new:'deselectAll("currentPage")'}};function FU(e,t,n){const i=xU[e];if(i){const{version:r,new:s,old:a,message:l}=i,u=a??e;return(...h)=>{const f=s?`Please use ${s} instead. `:"";return yc(`Since ${r} api.${u} is deprecated. ${f}${l??""}`),t.apply(t,h)}}const o=RU[e];return o?(...r)=>{const s=n.rowModel.getType();if(!o.includes(s)){Wa(`api.${e} can only be called when gridOptions.rowModelType is ${o.join(" or ")}`);return}return t.apply(t,r)}:t}var PU={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",agBigIntColumnFilterHandler:"BigIntFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},EU={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,aasc:1,adesc: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},DU={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",overlayLoading:"Overlay",overlayExporting:"Overlay",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",richSelectLoading:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortAbsoluteAscending:["MenuCore","Sort"],sortAbsoluteDescending:["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"},TU=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),AU=class extends J{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,aO(EW)}warnOnInitialPropertyUpdate(e,t){e==="api"&&SU[t]&&le(22,{key:t})}processGridOptions(e){this.processOptions(e,m5())}validateApiFunction(e,t){return FU(e,t,this.beans)}missingUserComponent(e,t,n,i){const o=sl[t];o?this.gos.assertModuleRegistered(o,`AG Grid '${e}' component: ${t}`):le(101,{propertyName:e,componentName:t,agGridDefaults:n,jsComps:i})}missingDynamicBean(e){const t=PU[e];return t?Do(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){MU.has(e)&&le(10,{eventType:e})}validateIcon(e){if(TU.has(e)&&le(43,{iconName:e}),EU[e])return;const t=DU[e];if(t){mt(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:Ap(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}le(134,{iconName:e})}isProvidedUserComp(e){return!!sl[e]}validateColDef(e){this.processOptions(e,l5())}processOptions(e,t){const{validations:n,deprecations:i,allProperties:o,propertyExceptions:r,objectName:s,docsUrl:a}=t;o&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...r??[],...Object.keys(i)],o,s,a);const l=new Set;if(Object.keys(e).forEach(h=>{const f=i[h];if(f){const{message:R,version:S}=f;l.add(`As of v${S}, ${String(h)} is deprecated. ${R??""}`)}const g=e[h];if(g==null||g===!1)return;const m=n[h];if(!m)return;const{dependencies:v,validate:w,supportedRowModels:b,expectedType:y}=m;if(y){const R=typeof g;if(R!==y){l.add(`${String(h)} should be of type '${y}' but received '${R}' (${g}).`);return}}if(b){const R=this.gridOptions.rowModelType??"clientSide";if(!b.includes(R)){l.add(`${String(h)} is not supported with the '${R}' row model. It is only valid with: ${b.join(", ")}.`);return}}if(v){const R=this.checkForRequiredDependencies(h,v,e);if(R){l.add(R);return}}if(w){const R=w(e,this.gridOptions,this.beans);if(R){l.add(R);return}}}),l.size>0)for(const h of l)yc(h)}checkForRequiredDependencies(e,t,n){const o=Object.entries(t).filter(([r,s])=>{const a=n[r];return!s.required.includes(a)});return o.length===0?null:o.map(([r,s])=>`'${String(e)}' requires '${r}' to be one of [${s.required.map(a=>a===null?"null":a===void 0?"undefined":a).join(", ")}]. ${s.reason??""}`).join(`
|
|
63
|
+
`,j4=class extends $4{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:n}=e;this.suppressQuotes=t,this.columnSeparator=n}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,bF),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((n,i)=>{i!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(n.data.value||""),n.mergeAcross&&this.appendEmptyCells(n.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,n,i){n!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(i)}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){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,n){t!=0&&(this.result+=this.columnSeparator);const i=this.extractRowCellValue({column:e,node:n,currentColumnIndex:t,accumulatedRowIndex:t,type:"csv",useRawFormula:!1});this.result+=this.putInQuotes(i.valueFormatted??i.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(le(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=bF),this.isFirstLine=!1}},K4=class extends z4{constructor(){super(...arguments),this.beanName="csvCreator"}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){le(51);return}const t=()=>{const i=this.getMergedParams(e),o=this.getData(i),r=new Blob(["\uFEFF",o],{type:"text/plain"}),s=i.fileName,a=typeof s=="function"?s(Ue(this.gos,{})):s;U4(this.getFileName(a),r)},{overlays:n}=this.beans;n?n.showExportOverlay(t):t()}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const n=t?Object.assign({},e):this.getMergedParams(e);return this.getData(n)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:n,rowGroupColsSvc:i,valueSvc:o,gos:r}=this.beans,{processCellCallback:s,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:u,suppressQuotes:h,columnSeparator:f,valueFrom:g}=e;return new j4({colModel:t,colNames:n,valueSvc:o,gos:r,processCellCallback:s||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:u||void 0,suppressQuotes:h||!1,columnSeparator:f||",",rowGroupColsSvc:i,valueFrom:g})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function q4(e,t){return e.csvCreator?.getDataAsCsv(t)}function Q4(e,t){e.csvCreator?.exportDataAsCsv(t)}var Y4={moduleName:"CsvExport",version:Se,beans:[K4],apiFunctions:{getDataAsCsv:q4,exportDataAsCsv:Q4},dependsOn:[W4]},yF=class extends zn{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const n="title",i=this.ctrl.getGui();i&&(e!=null&&(e!=""||t)?i.setAttribute(n,e):i.removeAttribute(n))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){if(this.tooltipManager==null){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()}},Z4=1e3,J4=1e3,SF=100,RF,Ph=!1,X4=class extends zn{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();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){return this.tooltipCtrl[`getTooltip${e}DelayOverride`]?.()??this.getGridOptionsTooltipDelay(`tooltip${e}Delay`)}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!zs()&&(Ph?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},SF):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){const t=e.relatedTarget,n=this.tooltipCtrl.getGui(),i=this.tooltipComp?.getGui();this.isInteractingWithTooltip||n.contains(t)||this.interactionEnabled&&i?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||Ph)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?this.getTooltipDelay("SwitchShow"):this.getTooltipDelay("Show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-RF<Z4}setToDoNothing(e){!e&&this.state===2&&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(!Pe(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const n=this.gos.addCommon({location:t.getLocation?.()??"UNKNOWN",value:e,hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()});this.state=2,this.tooltipInstanceCount++;const i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(n,i)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),RF=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");const o=this.getLocaleTextFunc(),r=this.popupSvc?.addPopup({eChild:i,ariaLabel:o("ariaLabelTooltip","Tooltip")});if(r&&(this.tooltipPopupDestroyFunc=r.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const s=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:s}),this.setEventHandlers(s)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(cn(this.beans),{keydown:s=>{i.contains(s?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:i,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=Ot(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,n=this.tooltipTrigger===0?J4:0;window.setTimeout(()=>{e(),this.destroyBean(t)},n),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(){Ph=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},SF)}unlockService(){Ph=!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()}},ez=class extends yF{constructor(e,t,n){super(e,n),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){this.tooltipMode===1&&(e.highlighted?this.attemptToShowTooltip():this.attemptToHideTooltip())}setTooltipMode(e="focus"){this.tooltipMode=e==="focus"?1:0}destroy(){this.highlightTracker.removeEventListener("itemHighlighted",this.onHighlight),super.destroy()}},tz=class extends Jp{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){const{value:t}=e,n=this.getGui();n.textContent=Ha(t);const i=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();n.classList.add(`ag-${i}-tooltip`)}},nz=".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),&:where(.ag-cell-formula-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}}",Eh=0,iz=200,oz=class extends zn{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.addManagedEventListeners({stylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:n,nudgeY:i,skipObserver:o}=e;this.positionPopup({ePopup:t,nudgeX:n,nudgeY:i,keepWithinBounds:!0,skipObserver:o,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,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:n,nudgeY:i,keepWithinBounds:o,eventSource:r,alignSide:s="left",position:a="over",type:l}=e,u=r.getBoundingClientRect(),h=this.getParentRect();this.setAlignedTo(r,t);const f=()=>{let g=u.left-h.left;s==="right"&&(g-=t.offsetWidth-u.width);let m;return a==="over"?(m=u.top-h.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,u,h,e.nudgeY||0)==="under"?m=u.top-h.top+u.height:m=u.top-t.offsetHeight-(i||0)*2-h.top),{x:g,y:m}};this.positionPopup({ePopup:t,nudgeX:n,nudgeY:i,keepWithinBounds:o,updatePosition:f,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,l,t,r,null)})}positionPopupForMenu(e){const{eventSource:t,ePopup:n,event:i}=e,o=t.getBoundingClientRect(),r=this.getParentRect();this.setAlignedTo(t,n);let s=!1;const a=()=>{const l=this.keepXYWithinBounds(n,o.top-r.top,0),u=n.clientWidth>0?n.clientWidth:200;s||(n.style.minWidth=`${u}px`,s=!0);const f=r.right-r.left-u;let g;return this.gos.get("enableRtl")?(g=v(),g<0&&(g=m(),this.setAlignedStyles(n,"left")),g>f&&(g=0,this.setAlignedStyles(n,"right"))):(g=m(),g>f&&(g=v(),this.setAlignedStyles(n,"right")),g<0&&(g=0,this.setAlignedStyles(n,"left"))),{x:g,y:l};function m(){return o.right-r.left-2}function v(){return o.left-r.left-u}};this.positionPopup({ePopup:n,keepWithinBounds:!0,updatePosition:a,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,"subMenu",n,t,i instanceof MouseEvent?i:void 0)})}shouldRenderUnderOrAbove(e,t,n,i){const o=n.bottom-t.bottom,r=t.top-n.top,s=e.offsetHeight+i;return o>s?"under":r>s||r>o?"above":"under"}setAlignedStyles(e,t){const n=this.getPopupIndex(e);if(n===-1)return;const i=this.popupList[n],{alignedToElement:o}=i;if(!o)return;const r=["right","left","over","above","under"];for(const s of r)o.classList.remove(`ag-has-popup-positioned-${s}`),e.classList.remove(`ag-popup-positioned-${s}`);t&&(o.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const n=this.getPopupIndex(t);if(n!==-1){const i=this.popupList[n];i.alignedToElement=e}}positionPopup(e){const{ePopup:t,keepWithinBounds:n,nudgeX:i,nudgeY:o,skipObserver:r,updatePosition:s}=e,a={width:0,height:0},l=(u=!1)=>{let{x:h,y:f}=s();u&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,i&&(h+=i),o&&(f+=o),n&&(h=this.keepXYWithinBounds(t,h,1),f=this.keepXYWithinBounds(t,f,0)),t.style.left=`${h}px`,t.style.top=`${f}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!r){const u=Nr(this.beans,t,()=>l(!0));setTimeout(()=>u(),iz)}}getParentRect(){const e=cn(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),WS(t)}keepXYWithinBounds(e,t,n){const i=n===0,o=i?"clientHeight":"clientWidth",r=i?"top":"left",s=i?"height":"width",a=i?"scrollTop":"scrollLeft",l=cn(this.beans),u=l.documentElement,h=this.getPopupParent(),f=e.getBoundingClientRect(),g=h.getBoundingClientRect(),m=l.documentElement.getBoundingClientRect(),v=h===l.body,w=Math.ceil(f[s]);let y=v?(i?VS:Dd)(u)+u[a]:h[o];v&&(y-=Math.abs(m[r]-g[r]));const R=y-w;return Math.min(Math.max(t,0),Math.max(R,0))}addPopup(e){const{eChild:t,ariaLabel:n,ariaOwns:i,alwaysOnTop:o,positionCallback:r,anchorToElement:s}=e,a=this.getPopupIndex(t);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(t);const l=this.createPopupWrapper(t,!!o,n,i),u=this.addEventListenersToPopup({...e,wrapperEl:l});return r&&r(),this.addPopupToPopupList(t,l,u,s),{hideFunc:u}}initialisePopupPosition(e){const n=this.getPopupParent().getBoundingClientRect();Pe(e.style.top)||(e.style.top=`${n.top*-1}px`),Pe(e.style.left)||(e.style.left=`${n.left*-1}px`)}createPopupWrapper(e,t,n,i){const o=this.getPopupParent(),{environment:r,gos:s}=this.beans,a=Bs({tag:"div"});return r.applyThemeClasses(a),a.classList.add("ag-popup"),e.classList.add(s.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||_r(e,"dialog"),n?Ga(e,n):i&&(e.id||(e.id=`popup-component-${Eh}`),HS(i,e.id)),a.appendChild(e),o.appendChild(a),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),a}addEventListenersToPopup(e){const t=this.beans,n=cn(t),{wrapperEl:i,eChild:o,closedCallback:r,afterGuiAttached:s,closeOnEsc:a,modal:l,ariaOwns:u}=e;let h=!1;const f=w=>{if(!i.contains(Ot(t)))return;w.key===K.ESCAPE&&!this.isStopPropagation(w)&&v({keyboardEvent:w})},g=w=>v({mouseEvent:w}),m=w=>v({touchEvent:w}),v=(w={})=>{const{mouseEvent:b,touchEvent:y,keyboardEvent:R,forceHide:S}=w;!S&&(this.isEventFromCurrentPopup({mouseEvent:b,touchEvent:y},o)||h)||(h=!0,i.remove(),n.removeEventListener("keydown",f),n.removeEventListener("mousedown",g),n.removeEventListener("touchstart",m),n.removeEventListener("contextmenu",g),this.eventSvc.removeListener("dragStarted",g),r&&r(b||y||R),this.removePopupFromPopupList(o,u))};return s&&s({hidePopup:v}),window.setTimeout(()=>{a&&n.addEventListener("keydown",f),l&&(n.addEventListener("mousedown",g),this.eventSvc.addListener("dragStarted",g),n.addEventListener("touchstart",m),n.addEventListener("contextmenu",g))},0),v}addPopupToPopupList(e,t,n,i){this.popupList.push({element:e,wrapper:t,hideFunc:n,instanceId:Eh,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),Eh=Eh+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const n=this.getPopupIndex(e);if(n===-1)return;const i=this.popupList[n];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then(r=>r&&r()),i.stopAnchoringPromise=void 0,i.isAnchored=!1,!t)return;const o=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:i.hideFunc});return i.stopAnchoringPromise=o,i.isAnchored=!0,o}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&HS(t,null),this.popupList=this.popupList.filter(n=>n.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),n=t.getBoundingClientRect(),{element:i,ePopup:o}=e,r=i.getBoundingClientRect(),s=f=>Number.parseInt(f.substring(0,f.length-1),10),a=(f,g)=>{const m=n[f]-r[f],v=s(o.style[f]);return{initialDiff:m,lastDiff:m,initial:v,last:v,direction:g}},l=a("top",0),u=a("left",1),h=this.beans.frameworkOverrides;return new _t(f=>{h.wrapIncoming(()=>{r_(()=>{const g=t.getBoundingClientRect(),m=i.getBoundingClientRect();if(m.top==0&&m.left==0&&m.height==0&&m.width==0){e.hidePopup();return}const w=(b,y)=>{const R=s(o.style[y]);b.last!==R&&(b.initial=R,b.last=R);const S=g[y]-m[y];if(S!=b.lastDiff){const P=this.keepXYWithinBounds(o,b.initial+b.initialDiff-S,b.direction);o.style[y]=`${P}px`,b.last=P}b.lastDiff=S};w(l,"top"),w(u,"left")},200).then(g=>{f(()=>{g!=null&&window.clearInterval(g)})})},"popupPositioning")})}isEventFromCurrentPopup(e,t){const{mouseEvent:n,touchEvent:i}=e,o=n||i;if(!o)return!1;const r=this.getPopupIndex(t);if(r===-1)return!1;for(let s=r;s<this.popupList.length;s++){const a=this.popupList[s];if(LL(a.element,o))return!0}return this.isElementWithinCustomPopup(o.target)}isElementWithinCustomPopup(e){const t=cn(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)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 n=this.getWrapper(e);n&&(n.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(n))}bringPopupToFront(e){const t=this.getPopupParent(),n=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),i=n.length,o=this.getWrapper(e);if(!o||i<=1||!t.contains(e))return;const r=[],s=[];for(const g of n)g!==o&&(g.classList.contains("ag-always-on-top")?s.push(g):r.push(g));const a=[],l=s.length,f=o.classList.contains("ag-always-on-top")||!l?[...r,...s,o]:[...r,o,...s];for(let g=0;g<=i;g++){const m=f[g];if(n[g]===f[g]||m===o)continue;const v=m.querySelectorAll("div");for(const w of v)w.scrollTop!==0&&a.push([w,w.scrollTop]);g===0?t.prepend(m):f[g-1].after(m)}for(;a.length;){const g=a.pop();g[0].scrollTop=g[1]}}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const n of this.popupList)t.applyThemeClasses(n.wrapper)}}},rz=class extends oz{getDefaultPopupParent(){return this.beans.ctrlsSvc.get("gridCtrl").getGui()}callPostProcessPopup(e,t,n,i,o){const r=this.gos.getCallback("postProcessPopup");if(r){const{column:s,rowNode:a}=e??{};r({column:s,rowNode:a,ePopup:n,type:t,eventSource:i,mouseEvent:o})}}getActivePopups(){return this.popupList.map(e=>e.element)}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return cr(e)}},Dh={moduleName:"Popup",version:Se,beans:[rz]};function lv(e){return e.get("tooltipShowMode")==="whenTruncated"}var sz=(e,t)=>{const n=e;return typeof n.getTranslatedMessage=="function"?n.getTranslatedMessage(t):e.message},cv=(e,t,n)=>{const{editModelSvc:i}=e,o=i?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,r=i?.getRowValidationModel().getRowValidation(t)?.errorMessages,s=o||r;return s?.length?s.join(n("tooltipValidationErrorSeparator",". ")):void 0},az=(e,t)=>{if(lv(e.gos)){if(t.isCellRenderer()){const i=t.column.getColDef();return!!i.showRowGroup||i.cellRenderer==="agGroupCellRenderer"?Cc(()=>{const r=t.eGui;return r.querySelector(".ag-group-value")||r.querySelector(".ag-cell-value")||r}):void 0}return Cc(()=>{const i=t.eGui;return i.children.length===0?i:i.querySelector(".ag-cell-value")})}},lz=(e,t,n)=>{const{editSvc:i}=e,{column:o}=t,r=az(e,t),s=()=>i?.isEditing(t)?!1:r?o.isTooltipEnabled()?r():!1:!0;return{shouldDisplayDefault:s,shouldDisplayColumnTooltip:s,shouldDisplayCustomTooltip:n??s}},cz=({beans:e,ctrl:t,value:n,displayFunctions:i,translate:o})=>{const{editSvc:r,formula:s,gos:a}=e,{column:l,rowNode:u}=t;if(s?.active&&l.isAllowFormula()){const b=s.getFormulaError(l,u);if(b)return{value:sz(b,o),location:"cellFormula",shouldDisplay:()=>!!s?.getFormulaError(l,u)}}if(!!!r?.isEditing(t)){const b=cv(e,t,o);if(b)return{value:b,location:"cellEditor",shouldDisplay:()=>!r?.isEditing(t)&&!!cv(e,t,o)}}const{shouldDisplayCustomTooltip:f,shouldDisplayColumnTooltip:g}=i;if(n!=null)return{value:n,location:"cell",shouldDisplay:f};const m=l.getColDef(),v=u.data;if(m.tooltipField&&Pe(v))return{value:_c(v,m.tooltipField,l.isTooltipFieldContainsDots()),location:"cell",shouldDisplay:g};const w=m.tooltipValueGetter;return w?{value:w(Ue(a,{location:"cell",colDef:l.getColDef(),column:l,rowIndex:t.cellPosition.rowIndex,node:u,data:u.data,value:t.value,valueFormatted:t.valueFormatted})),location:"cell",shouldDisplay:g}:null},uz=class extends J{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,n,i){e&&t.destroyBean(e);const o=this.gos,r=lv(o),{column:s,eGui:a}=t,l=s.getColDef();!i&&r&&!l.headerComponent&&(i=Cc(()=>a.querySelector(".ag-header-cell-text")));const u="header",f=this.beans.colNames.getDisplayNameForColumn(s,"header",!0),g=n??f,m={getGui:()=>a,getLocation:()=>u,getTooltipValue:()=>n??l?.headerTooltipValueGetter?.(Ue(o,{location:u,colDef:l,column:s,value:g,valueFormatted:f}))??l?.headerTooltip,shouldDisplayTooltip:i,getAdditionalParams:()=>({column:s,colDef:s.getColDef()})};let v=this.createTooltipFeature(m);return v&&(v=t.createBean(v),t.setRefreshFunction("tooltip",()=>v.refreshTooltip())),v}setupHeaderGroupTooltip(e,t,n,i){e&&t.destroyBean(e);const o=this.gos,r=lv(o),{column:s,eGui:a}=t,l=s.getColGroupDef();!i&&r&&!l?.headerGroupComponent&&(i=Cc(()=>a.querySelector(".ag-header-group-text")));const u="headerGroup",f=this.beans.colNames.getDisplayNameForColumnGroup(s,"header"),g=n??f,m={getGui:()=>a,getLocation:()=>u,getTooltipValue:()=>n??l?.headerTooltipValueGetter?.(Ue(o,{location:u,colDef:l,column:s,value:g,valueFormatted:f}))??l?.headerTooltip,shouldDisplayTooltip:i,getAdditionalParams:()=>{const w={column:s};return l&&(w.colDef=l),w}},v=this.createTooltipFeature(m);return v&&t.createBean(v)}enableCellTooltipFeature(e,t,n){const{beans:i}=this,{column:o,rowNode:r}=e,s=lz(i,e,n),a=this.getLocaleTextFunc();let l=null;const u=()=>(l=cz({beans:i,ctrl:e,value:t,displayFunctions:s,translate:a}),l),f={getGui:()=>e.eGui,getLocation:()=>l?.location??"cell",getTooltipValue:()=>u()?.value,shouldDisplayTooltip:()=>{const g=l??u();return g?g.shouldDisplay?g.shouldDisplay():!0:!1},getAdditionalParams:()=>({column:o,colDef:o.getColDef(),rowIndex:e.cellPosition.rowIndex,node:r,data:r.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(f,i)}setupFullWidthRowTooltip(e,t,n,i){const o={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>n,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},r=this.beans,s=r.context;e&&t.destroyBean(e,s);const a=this.createTooltipFeature(o,r);if(a)return t.createBean(a,s)}setupCellEditorTooltip(e,t){const{beans:n}=this,{context:i}=n,o=t.getValidationElement?.(!0)||!t.isPopup?.()&&e.eGui;if(!o)return;const r={getGui:()=>o,getTooltipValue:()=>cv(n,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{const{editModelSvc:a}=n,l=a?.getRowValidationModel()?.getRowValidationMap(),u=a?.getCellValidationModel()?.getCellValidationMap(),h=!!l&&l.size>0,f=!!u&&u.size>0;return h||f}},s=this.createTooltipFeature(r,n);if(s)return e.createBean(s,i)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=Pe(t.tooltipField)||Pe(t.tooltipValueGetter)||Pe(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},dz=class extends X4{createTooltipComp(e,t){O_(this.beans.userCompFactory,e)?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}},xF={moduleName:"Tooltip",version:Se,beans:[uz],dynamicBeans:{tooltipFeature:yF,highlightTooltipFeature:ez,tooltipStateManager:dz},userComponents:{agTooltipComponent:tz},dependsOn:[Dh],css:[nz]},dl=class{constructor(e){this.cellValueChanges=e}},uv=class extends dl{constructor(e,t,n,i){super(e),this.initialRange=t,this.finalRange=n,this.ranges=i}},hz=10,FF=class{constructor(e){this.actionStack=[],this.maxStackSize=e||hz,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}},fz=class extends J{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},n=this.activeCellEdit!==null&&sm(this.activeCellEdit,t),i=this.activeRowEdit!==null&&C2(this.activeRowEdit,t);if(!(n||i||this.isPasting||this.isRangeInAction))return;const{rowPinned:r,rowIndex:s,column:a,oldValue:l,value:u}=e,h={rowPinned:r,rowIndex:s,columnId:a.getColId(),newValue:u,oldValue:l};this.cellValueChanges.push(h)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const n=e.get("undoRedoCellEditingLimit");if(n<=0)return;this.undoStack=new FF(n),this.redoStack=new FF(n),this.addListeners();const i=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:o=>{o.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:i,newColumnsLoaded:i,columnGroupOpened:i,columnRowGroupChanged:i,columnMoved:i,columnPinned:i,columnVisible:i,rowDragEnd:i}),t.whenReady(this,o=>{this.gridBodyCtrl=o.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){const{eventSvc:t,undoStack:n,redoStack:i}=this;t.dispatchEvent({type:"undoStarted",source:e});const o=this.undoRedo(n,i,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:o})}redo(e){const{eventSvc:t,undoStack:n,redoStack:i}=this;t.dispatchEvent({type:"redoStarted",source:e});const o=this.undoRedo(i,n,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:o})}undoRedo(e,t,n,i,o){if(!e)return!1;const r=e.pop();return r?.cellValueChanges?(this.processAction(r,s=>s[i],o),r instanceof uv?this.processRange(r.ranges||[r[n]]):this.processCell(r.cellValueChanges),t.push(r),!0):!1}processAction(e,t,n){const{changeDetectionSvc:i}=this.beans;i?.beginDeferred();try{for(const o of e.cellValueChanges){const{rowIndex:r,rowPinned:s,columnId:a}=o,l={rowIndex:r,rowPinned:s},u=Ao(this.beans,l);u?.displayed&&u.setDataValue(a,t(o),n)}}finally{i?.endDeferred()}}processRange(e){let t;const n=this.beans.rangeSvc;n.removeAllCellRanges(!0),e.forEach((i,o)=>{if(!i)return;const r=i.startRow,s=i.endRow;o===e.length-1&&(t={rowPinned:r.rowPinned,rowIndex:r.rowIndex,columnId:i.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:s.rowIndex,rowEndPinned:s.rowPinned,columnStart:i.startColumn,columns:i.columns};n.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:n,rowPinned:i}=t,o={rowIndex:n,rowPinned:i},r=Ao(this.beans,o),s={rowPinned:t.rowPinned,rowIndex:r.rowIndex,columnId:t.columnId};this.setLastFocusedCell(s)}setLastFocusedCell(e){const{rowIndex:t,columnId:n,rowPinned:i}=e,{colModel:o,focusSvc:r,rangeSvc:s}=this.beans,a=o.getCol(n);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const u={rowIndex:t,column:a,rowPinned:i};r.setFocusedCell({...u,forceBrowserFocus:!0}),s?.setRangeToCell(u)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new dl(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 n=new dl(this.cellValueChanges);this.pushActionsToUndoStack(n)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new dl(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new uv(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:n}=this.beans;t&&rr(n)?e=new uv(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new dl(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){e==="bulkEditing"?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if(e==="bulkEditing"&&!this.bulkEditing||e==="batchEditing"&&!this.batchEditing||(this.updateBigChange(e,!1),t?.length===0))return;const n=new dl(t??[]);this.pushActionsToUndoStack(n),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},gz=".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) .ag-text-area-input{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}",pz={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},mz=class extends Jd{constructor(){super(pz,[km]),this.eEditor=ge}initialiseEditor(e){this.agSetEditValue(e.value),this.eEditor.getInputElement().setAttribute("tabindex","-1"),this.addManagedListeners(this.eEditor,{fieldValueChanged:n=>this.setAriaLabel(n.selected)})}agSetEditValue(e){this.params.value=e;const t=e??void 0;this.eEditor.setValue(t,!0),this.setAriaLabel(t)}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(),n=Ed(t,e),i=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${i} (${n})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,n=this.getValue();return t?t({value:n,internalErrors:null,cellEditorParams:e}):null}},ur=class extends Ys{constructor(e,t="ag-text-field",n="text"){super(e,t,n)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const n=this.eInput;return n.value!==e&&(n.value=Pe(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}setCustomValidity(e){const t=this.eInput,n=e.length>0;t.setCustomValidity(e),n&&t.reportValidity(),mp(t,n)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=n=>{xR(n)&&n.key&&!e.test(n.key)&&n.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:n=>{n.clipboardData?.getData("text")?.split("").some(o=>!e.test(o))&&n.preventDefault()}})}},Th={selector:"AG-INPUT-TEXT-FIELD",component:ur},vz=class extends ur{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=$r();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){Ot(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?jn(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,ii(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?jn(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,ii(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,ii(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return Kn(this.getValue())??void 0}setDate(e,t){this.setValue(jn(e??null,this.includeTime),t)}},PF={selector:"AG-INPUT-DATE-FIELD",component:vz},Ah=class extends Jd{constructor(e){super(),this.cellEditorInput=e,this.eEditor=ge}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:n}=this,{cellStartedEdit:i,eventKey:o,suppressPreventDefault:r}=e;n.getInputElement().setAttribute("title",""),t.init(n,e);let s,a=!0;i?(this.focusAfterAttached=!0,o===K.BACKSPACE||o===K.DELETE?s="":o&&o.length===1?r?a=!1:s=o:(s=t.getStartValue(),o!==K.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,s=t.getStartValue()),a&&s!=null&&n.setStartValue(s),this.addGuiEventListener("keydown",l=>{const{key:u}=l;(u===K.PAGE_UP||u===K.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;$r()||t.getFocusableElement().focus();const n=t.getInputElement();this.highlightAllOnFocus?n.select():this.cellEditorInput.setCaret?.()}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),n=e.getInputElement();t.focus(),n.select()}getValue(){return this.cellEditorInput.getValue()}agSetEditValue(e){this.params.value=e;const t=this.cellEditorInput.getStartValue();this.eEditor.setStartValue(t??null)}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},Cz={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},wz=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return Cz}getAgComponents(){return[PF]}init(e,t){this.eEditor=e,this.params=t;const{min:n,max:i,step:o,colDef:r}=t;n!=null&&e.setMin(n),i!=null&&e.setMax(i),o!=null&&e.setStep(o),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(r.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:n}=this,{min:i,max:o,getValidationErrors:r}=n;let s=[];const a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){const l=i instanceof Date?i:new Date(i);if(t<l){const u=l.toLocaleDateString();s.push(a("minDateValidation",`Date must be after ${u}`,[u]))}}if(o){const l=o instanceof Date?o:new Date(o);if(t>l){const u=l.toLocaleDateString();s.push(a("maxDateValidation",`Date must be before ${u}`,[u]))}}}return s.length||(s=null),r?r({value:t,cellEditorParams:n,internalErrors:s}):s}getValue(){const{eEditor:e,params:t}=this,n=e.getDate();return!Pe(n)&&!Pe(t.value)?t.value:n??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return jn(e,this.includeTime??!1)}},bz=class extends Ah{constructor(){super(new wz(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},yz={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},Sz=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return yz}getAgComponents(){return[PF]}init(e,t){this.eEditor=e,this.params=t;const{min:n,max:i,step:o,colDef:r}=t;n!=null&&e.setMin(n),i!=null&&e.setMax(i),o!=null&&e.setStep(o),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(r.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,n=e.getInputElement().value,i=this.formatDate(this.parseDate(n??void 0)),{min:o,max:r,getValidationErrors:s}=t;let a=[];if(i){const l=new Date(i),u=this.getLocaleTextFunc();if(o){const h=new Date(o);if(l<h){const f=h.toLocaleDateString();a.push(u("minDateValidation",`Date must be after ${f}`,[f]))}}if(r){const h=new Date(r);if(l>h){const f=h.toLocaleDateString();a.push(u("maxDateValidation",`Date must be before ${f}`,[f]))}}}return a.length||(a=null),s?s({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,n=this.formatDate(t.getDate());return!Pe(n)&&!Pe(e.value)?e.value:e.parseValue(n??"")}getStartValue(){return jn(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):Kn(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):jn(e??null,this.includeTime??!1)??void 0}},Rz=class extends Ah{constructor(){super(new Sz(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},xz=class extends Ys{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const n=super.setValue(e,t);return this.eInput.value=e,n}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},Fz={selector:"AG-INPUT-TEXT-AREA",component:xz},Pz={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},Ez=class extends Jd{constructor(){super(Pz,[Fz]),this.eEditor=ge}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:n,eventKey:i,maxLength:o,cols:r,rows:s}=e;this.focusAfterAttached=n,t.getInputElement().setAttribute("title",""),t.setMaxLength(o||200).setCols(r||60).setRows(s||10);let a;n?(this.focusAfterAttached=!0,i===K.BACKSPACE||i===K.DELETE?a="":i&&i.length===1?a=i:(a=this.getStartValue(e),i!==K.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=this.getStartValue(e)),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return t?.toString()??t}agSetEditValue(e){this.params.value=e;const t=this.getStartValue(this.params);this.eEditor.setValue(t??"",!0)}onKeyDown(e){const t=e.key;(t===K.LEFT||t===K.UP||t===K.RIGHT||t===K.DOWN||e.shiftKey&&t===K.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:n}=this,i=this.getLocaleTextFunc();e.setInputAriaLabel(i("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),n&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:n}=t,i=e.getValue();return!Pe(i)&&!Pe(n)?n:t.parseValue(i)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:n}=e,i=this.getLocaleTextFunc(),o=this.getValue();let r=[];return typeof o=="string"&&t!=null&&o.length>t&&r.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),r.length||(r=null),n?n({value:o,internalErrors:r,cellEditorParams:e}):r}},dv=class extends ur{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const r=Number.parseFloat(e.value),s=isNaN(r)?"":this.normalizeValue(r.toString());this.value!==s&&this.setValue(s)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:n,max:i,step:o}=this.config;typeof t=="number"&&this.setPrecision(t),typeof n=="number"&&this.setMin(n),typeof i=="number"&&this.setMax(i),typeof o=="number"&&this.setStep(o)}onWheel(e){Ot(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const n=this.precision;if(n==null)return e;if(t){const o=Number.parseFloat(e).toFixed(n);return Number.parseFloat(o).toString()}const i=String(e).split(".");if(i.length>1){if(i[1].length<=n)return e;if(n>0)return`${i[0]}.${i[1].slice(0,n)}`}return i[0]}setMin(e){return this.min===e?this:(this.min=e,ii(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,ii(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,ii(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(n=>super.setValue(n,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,n){if(Pe(n)){let i=this.isScientificNotation(n);if(i&&this.eInput.validity.valid)return e(n);if(!i){n=this.adjustPrecision(n);const o=this.normalizeValue(n);i=n!=o}if(i)return t(n)}return e(n)}getValue(e=!1){const t=this.eInput;if(!t.validity.valid&&!e)return;const n=t.value;return this.isScientificNotation(n)?this.adjustPrecision(n,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},Dz={selector:"AG-INPUT-NUMBER-FIELD",component:dv},Tz={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},Az=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return Tz}getAgComponents(){return[Dz]}init(e,t){this.eEditor=e,this.params=t;const{max:n,min:i,precision:o,step:r}=t;n!=null&&e.setMax(n),i!=null&&e.setMin(i),o!=null&&e.setPrecision(o),r!=null&&e.setStep(r);const s=e.getInputElement();t.preventStepping?e.addManagedElementListeners(s,{keydown:this.preventStepping}):t.showStepperButtons&&s.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:n,getValidationErrors:i}=e,r=this.eEditor.getInputElement().valueAsNumber,s=this.getLocaleTextFunc();let a=[];return typeof r=="number"&&(t!=null&&r<t&&a.push(s("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),n!=null&&r>n&&a.push(s("maxValueValidation",`Must be less than or equal to ${n}.`,[String(n)]))),a.length||(a=null),i?i({value:r,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===K.UP||e.key===K.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,n=e.getValue();if(!Pe(n)&&!Pe(t.value))return t.value;let i=t.parseValue(n);if(i==null)return i;if(typeof i=="string"){if(i==="")return null;i=Number(i)}return isNaN(i)?null:i}getStartValue(){return this.params.value}setCaret(){$r()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},Iz=class extends Ah{constructor(){super(new Az(()=>this.getLocaleTextFunc()))}},Mz=".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)}}",kz="ag-active-item",Lz=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",cls:`ag-list-item-text ag-${e}-list-item-text`,ref:"eText",children:t}]}),Oz=class extends Ja{constructor(e,t,n){super(Lz(e,t)),this.label=t,this.value=n,this.eText=ge}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(kz,e),BS(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const n=this.getGui();vL(n,e),mL(n,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>jS(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,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)}))}},_z=class extends Ja{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(Mz)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case K.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const n=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(n)}break;case K.DOWN:case K.UP:e.preventDefault(),this.navigate(t);break;case K.PAGE_DOWN:case K.PAGE_UP:case K.PAGE_HOME:case K.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:n}=e,i=n??t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();xn(this.getGui()),this.listItems=[],this.refreshAriaRole()}updateOptions(e){const t=this.options!==e;return t&&(this.clearOptions(),this.addOptions(e)),t}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const n=this.options.findIndex(i=>i.value===e);if(n!==-1){const i=this.options[n];this.value=i.value,this.displayValue=i.text,this.highlightItem(this.listItems[n]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!Mi(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const n=this.getGui(),{scrollTop:i,clientHeight:o}=n,{offsetTop:r,offsetHeight:s}=t;(r+s>i+o||r<i)&&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 n=new Oz(this.cssIdentifier,t,e);n.setParentComponent(this);const i=this.createManagedBean(n);this.listItems.push(i),this.getGui().appendChild(i.getGui())}navigate(e){const t=e===K.DOWN;let n;const{listItems:i,highlightedItem:o}=this;if(!o)n=t?i[0]:At(i);else{let s=i.indexOf(o)+(t?1:-1);s=Math.min(Math.max(s,0),i.length-1),n=i[s]}this.highlightItem(n)}navigateToPage(e){const{listItems:t,highlightedItem:n}=this;if(!n||t.length===0)return;const i=t.indexOf(n),o=this.options.length-1,r=t[0].getHeight(),s=Math.floor(this.getGui().clientHeight/r);let a=-1;e===K.PAGE_HOME?a=0:e===K.PAGE_END?a=o:e===K.PAGE_DOWN?a=Math.min(i+s,o):e===K.PAGE_UP&&(a=Math.max(i-s,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){_r(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((n,i)=>{n.setIndex(i+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},Nz=".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(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}}.ag-picker-field-wrapper:where(.ag-picker-has-focus),.ag-picker-field-wrapper: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)}}.ag-picker-field-wrapper:disabled{opacity:.5}",Bz={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"}}]}]},Hz=class extends rx{constructor(e){if(super(e,e?.template||Bz,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=ge,this.eWrapper=ge,this.eDisplayField=ge,this.eIcon=ge,this.registerCSS(Nz),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:n,variableWidth:i,minPickerWidth:o,maxPickerWidth:r}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,n!=null&&this.setPickerMaxHeight(n),o!=null&&this.setPickerMinWidth(o),r!=null&&this.setPickerMaxWidth(r)}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:n,inputWidth:i}=this.config;if(n){const o=this.beans.iconSvc.createIconNoSpan(n);o&&this.eIcon.appendChild(o)}i!=null&&this.setInputWidth(i)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),vp(e,!1),this.ariaRole&&_r(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case K.UP:case K.DOWN:case K.ENTER:case K.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case K.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:n,pickerAriaLabelValue:i,modalPicker:o=!0},maxPickerHeight:r,minPickerWidth:s,maxPickerWidth:a,variableWidth:l,beans:u,eWrapper:h}=this,f={modal:o,eChild:e,closeOnEsc:!0,closedCallback:()=>{const w=fp(u);this.beforeHidePicker(),w&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(n,i),anchorToElement:h};e.style.position="absolute";const g=u.popupSvc,m=g.addPopup(f);l?(s&&(e.style.minWidth=s),e.style.width=bp(Dd(h)),a&&(e.style.maxWidth=a)):Id(e,a??Dd(h));const v=r??`${Cp(g.getPopupParent())}px`;return e.style.setProperty("max-height",v),this.alignPickerToComponent(),m.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:n,gos:i},eWrapper:o,pickerComponent:r}=this,s=i.get("enableRtl")?"right":"left";n.positionPopupByComponent({type:t,eventSource:o,ePopup:r.getGui(),position:"under",alignSide:s,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();vp(t,e);const n=this.eWrapper.classList;n.toggle("ag-picker-expanded",e),n.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 Id(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},Gz=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}.ag-select:where(:not(.ag-cell-editor,.ag-label-align-top)){min-height:var(--ag-list-item-height)}:where(.ag-select){.ag-picker-field-wrapper{cursor:default;padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}.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(.ag-ltr) .ag-select-list-item{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-select-list-item{padding-right:var(--ag-spacing)}.ag-select-list-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",hv=class extends Hz{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(Gz)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Cc(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:n}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),n&&t==null&&(this.eDisplayField.textContent=n),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new _z("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),n=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",n),PL(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i?.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(t===K.TAB&&this.hidePicker(),t){case K.ENTER:case K.UP:case K.DOWN:case K.PAGE_UP:case K.PAGE_DOWN:case K.PAGE_HOME:case K.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case K.ESCAPE:super.onKeyDown(e);break;case K.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}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}updateOptions(e){return this.listComponent?.updateOptions(e)&&this.setValue(void 0,!0),this}setValue(e,t,n){const{listComponent:i,config:{placeholder:o},eDisplayField:r,tooltipFeature:s}=this;if(this.value===e||!i)return this;if(n||i.setValue(e,!0),i.getValue()===this.getValue())return this;let l=i.getDisplayValue();return l==null&&o&&(l=o),r.textContent=l,s?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},Vz={selector:"AG-SELECT",component:hv},Wz={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},zz=class extends Jd{constructor(){super(Wz,[Vz]),this.eEditor=ge,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:n,gos:i}=this,{values:o,value:r,eventKey:s}=e;if(Wt(o)){le(58);return}this.startedByEnter=s!=null?s===K.ENTER:!1;let a=!1;o.forEach(f=>{const g={value:f},m=n.formatValue(e.column,null,f),v=m!=null;g.text=v?m:f,t.addOption(g),a=a||r===f}),a?t.setValue(e.value??void 0,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:u,valueListMaxHeight:h}=e;l!=null&&t.setPickerGap(l),h!=null&&t.setPickerMaxHeight(h),u!=null&&t.setPickerMaxWidth(u),i.get("editType")!=="fullRow"&&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()}agSetEditValue(e){this.params.value=e,this.eEditor.setValue(e??void 0,!0)}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:n}=e,i=this.getValue();let o=[];if(t&&i!=null&&!t.includes(i)){const r=this.getLocaleTextFunc();o.push(r("invalidSelectionValidation","Invalid selection."))}else o=null;return n?n({value:i,internalErrors:o,cellEditorParams:e}):o}},Uz={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},$z=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return Uz}getAgComponents(){return[Th]}init(e,t){this.eEditor=e,this.params=t;const n=t.maxLength;n!=null&&e.setMaxLength(n)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:n}=e,i=this.getValue(),o=this.getLocaleTextFunc();let r=[];return t!=null&&typeof i=="string"&&i.length>t&&r.push(o("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),r.length||(r=null),n?n({value:i,cellEditorParams:e,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,n=e.getValue();return!Pe(n)&&!Pe(t.value)?t.value:t.parseValue(n)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){$r()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),n=Pe(t)&&t.length||0;n&&e.getInputElement().setSelectionRange(n,n)}},EF=class extends Ah{constructor(){super(new $z(()=>this.getLocaleTextFunc()))}};function jz(e){e.undoRedo?.undo("api")}function Kz(e){e.undoRedo?.redo("api")}function qz(e,t){return e.editModelSvc?.getEditRowDataValue(t,{checkSiblings:!0})}function Qz(e){const t=e.editModelSvc?.getEditMap(),n=[];return t?.forEach((i,o)=>{const{rowIndex:r,rowPinned:s}=o;i.forEach((a,l)=>{const{editorValue:u,pendingValue:h,sourceValue:f,state:g}=a,m=so(a);let v=u??h;v===pn&&(v=void 0);const w={newValue:v,oldValue:f,state:g,column:l,colId:l.getColId(),colKey:l.getColId(),rowIndex:r,rowPinned:s},b=g==="editing";(b||!b&&m)&&n.push(w)})}),n}function Yz(e,t=!1){const{editSvc:n}=e;if(n?.isBatchEditing()){if(t)for(const i of e.editModelSvc?.getEditPositions()??[])i.state==="editing"&&n.revertSingleCellEdit(i);else Zr(e,{persist:!0});Jr(e,void 0,{cancel:t})}else n?.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function Zz(e,t){const n=pt(e,t);return!!e.editSvc?.isEditing(n)}function Jz(e,t){const{key:n,colKey:i,rowIndex:o,rowPinned:r}=t,{editSvc:s,colModel:a}=e,l=a.getCol(i);if(!l){le(12,{colKey:i});return}const h=Ao(e,{rowIndex:o,rowPinned:r||null});if(!h){le(290,{rowIndex:o,rowPinned:r});return}if(!s?.isCellEditable({rowNode:h,column:l},"api"))return;r==null&&cF(e,o),lF(e,i),s?.startEditing({rowNode:h,column:l},{event:n?new KeyboardEvent("keydown",{key:n}):void 0,source:"api",editable:!0})}function Xz(e){return e.editSvc?.validateEdit()||null}function e6(e){return e.undoRedo?.getCurrentUndoStackSize()??0}function t6(e){return e.undoRedo?.getCurrentRedoStackSize()??0}var n6={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},i6=class extends Jp{constructor(e){super(n6),this.params=e}postConstruct(){Vs(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,n=i=>{wm(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:n})}};function o6(e,{column:t},n,i,o="ui"){if(n instanceof KeyboardEvent&&(n.key===K.TAB||n.key===K.ENTER||n.key===K.F2||n.key===K.BACKSPACE&&i))return!0;if(n?.shiftKey&&e.rangeSvc?.getCellRanges().length!=0)return!1;const s=t?.getColDef(),a=r6(e.gos,s),l=n?.type;return l==="click"&&n?.detail===1&&a===1||l==="dblclick"&&n?.detail===2&&a===2?!0:o==="api"?!!i:!1}function r6(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t?.singleClickEdit?1:2}function fv(e,t){return e.editModelSvc?.hasEdits(t,{withOpenEditor:!0})??!1}function gv(e,t){const n=t.column,i=t.rowNode,o=n.getColDef();if(!i)return fv(e,t);const r=o.editable;return i.group&&o.groupRowEditable!=null?e.rowGroupingEditValueSvc?.isGroupCellEditable(i,n)?!0:fv(e,t):n.isColumnFunc(i,r)?!0:fv(e,t)}function s6(e,t,n="ui"){const i=gv(e,t);if(i||n==="ui")return i;const{rowNode:o,column:r}=t;for(const s of e.colModel.getCols())if(s!==r&&gv(e,{rowNode:o,column:s}))return!0;return!1}var Ih=(e,t=!1)=>{if(e!==void 0)return so(e)||t&&e.state==="editing"};function DF(e,t,n=!1){return Ih(e.editModelSvc?.getEdit(t),n)}var TF=(e,t,n)=>{if(e)for(let i=0,o=e.length;i<o;++i){const r=e[i];if(r.data&&(Ih(t?.getEdit({rowNode:r,column:n}))||Ih(t?.getEdit({rowNode:r.pinnedSibling,column:n})))||TF(r.childrenAfterGroup,t,n))return!0}};function AF(e,t){const{column:n,rowNode:i}=t;return e.gos.get("groupTotalRow")&&!i?.footer?!1:TF(i?.childrenAfterGroup,e.editModelSvc,n)}function IF(e,{rowNode:t,column:n}){if(t=t.pinnedSibling,!!t)return Ih(e.editModelSvc?.getEdit({rowNode:t,column:n}))}var a6=class extends J{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:n}=this;if(t?.isBatchEditing()&&t.isEditing()){const o=DF(n,e)||AF(n,e)||IF(n,e);this.applyBatchingStyle(o)}else this.applyBatchingStyle(!1);const i=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss("ag-cell-editing-error",i)}applyBatchingStyle(e){this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&this.editSvc?.isBatchEditing())??!1)}},l6=class extends J{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:n}=this;let i=e.rowNode,o=t?.getEditRow(i);const r=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:i});if(!o&&i.pinnedSibling&&(i=i.pinnedSibling,o=t?.getEditRow(i)),o){const s=Array.from(o.keys()).some(a=>{const l={rowNode:i,column:a};return DF(n,l,!0)||AF(n,l)||IF(n,l)});this.applyStyle(r,s);return}this.applyStyle(r)}applyStyle(e=!1,t=!1){const n=!!this.editSvc?.isBatchEditing(),i=this.gos.get("editType")==="fullRow";this.rowCtrl?.forEachGui(void 0,({rowComp:o})=>{o.toggleCss("ag-row-editing",i&&t),o.toggleCss("ag-row-batch-edit",i&&t&&n),o.toggleCss("ag-row-inline-editing",t),o.toggleCss("ag-row-not-inline-editing",!t),o.toggleCss("ag-row-editing-invalid",i&&t&&e)})}},c6=({rowModel:e,pinnedRowModel:t,editModelSvc:n},i)=>{const o=new Set;e.forEachNode(r=>i.has(r)&&o.add(r)),t?.forEachPinnedRow("top",r=>i.has(r)&&o.add(r)),t?.forEachPinnedRow("bottom",r=>i.has(r)&&o.add(r));for(const r of i)o.has(r)||n.removeEdits({rowNode:r});return o},u6=({editModelSvc:e},t,n)=>{for(const i of t)e?.getEditRow(i)?.forEach((o,r)=>!n.has(r)&&e.removeEdits({rowNode:i,column:r}))},d6=e=>()=>{const t=new Set(e.colModel.getCols()),n=e.editModelSvc.getEditMap(!0),i=new Set(n.keys());u6(e,c6(e,i),t)},h6=new Set(["undo","redo","paste","bulk","rangeSvc"]),f6=new Set(["ui","api"]),MF={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},g6=new Set(Object.keys(MF)),p6=new Set(["paste","rangeSvc","cellClear","redo","undo"]),pv={cancel:!0,source:"api"},m6={cancel:!1,source:"api"},oa={checkSiblings:!0},es={force:!0,suppressFlash:!0},v6={force:!0},C6=class extends J{constructor(){super(...arguments),this.beanName="editSvc",this.committing=!1,this.batch=!1,this.batchStartDispatched=!1,this.stopping=!1,this.rangeSelectionWhileEditing=0}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:i})=>{this.stopEditing(void 0,pv),this.createStrategy(i)});const t=d6(e),n=()=>{const i=this.model.getCellValidationModel().getCellValidationMap().size>0,o=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||o?this.stopEditing(void 0,pv):this.isEditing()&&(this.batch?Jr(e,this.model.getEditPositions()):this.stopEditing(void 0,m6)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:n,filterChanged:n,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}startBatchEditing(){this.batch||(this.batch=!0,this.batchStartDispatched=!1,this.stopEditing(void 0,pv))}stopBatchEditing(e){this.batch&&(e&&this.stopEditing(void 0,e),this.batchStartDispatched&&this.dispatchBatchStopped(new Map,!1),this.batch=!1,this.batchStartDispatched=!1)}ensureBatchStarted(){!this.batch||this.batchStartDispatched||(this.batchStartDispatched=!0,this.dispatchBatchEvent("batchEditingStarted",new Map))}createStrategy(e){const{beans:t,gos:n,strategy:i}=this,o=kF(n,e);if(i){if(i.beanName===o)return i;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(o,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,n,i="ui"){const o=o6(this.beans,e,t,n,i);return o&&(this.strategy??(this.strategy=this.createStrategy())),o}shouldStopEditing(e,t,n="ui"){return this.strategy?.shouldStop(e,t,n)??null}shouldCancelEditing(e,t,n="ui"){return this.strategy?.shouldCancel(e,t,n)??null}validateEdit(){return e3(this.beans)}isEditing(e,t){return this.model.hasEdits(e??void 0,t??oa)}isRowEditing(e,t){return!!e&&this.model.hasRowEdits(e,t)}enableRangeSelectionWhileEditing(){this.beans.rangeSvc&&this.gos.get("cellSelection")&&this.rangeSelectionWhileEditing++}disableRangeSelectionWhileEditing(){this.rangeSelectionWhileEditing=Math.max(0,this.rangeSelectionWhileEditing-1)}isRangeSelectionEnabledWhileEditing(){return this.rangeSelectionWhileEditing>0}startEditing(e,t){const{startedEdit:n=!0,event:i=null,source:o="ui",ignoreEventKey:r=!1,silent:s}=t;if(this.strategy??(this.strategy=this.createStrategy()),!(t.editable??this.isCellEditable(e,"api")))return;const l=pt(this.beans,e);if(l&&!l.comp){t.editable=void 0,l.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const u=this.shouldStartEditing(e,i,n,o);if(u===!1&&o!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,o)&&!t.continueEditing&&this.stopEditing(void 0,{source:o}),u&&this.ensureBatchStarted(),this.strategy.start({position:e,event:i,source:o,ignoreEventKey:r,startedEdit:n,silent:s})}stopEditing(e,t){const n=this.prepareStopContext(e,t);if(!n)return!1;this.stopping=!0;let i=!1,{edits:o}=n;try{const r=this.processStopRequest(n);return i||(i=r.res),o=r.edits,this.finishStopEditing({...n,edits:o,params:t,position:e,res:i}),i}finally{this.rangeSelectionWhileEditing=0,this.stopping=!1}}prepareStopContext(e,t){const{event:n=null,cancel:i=!1,source:o="ui",forceCancel:r=!1,forceStop:s=!1,commit:a=!1}=t||{};if(g6.has(o)&&this.batch)return e?.rowNode&&e?.column&&this.bulkRefreshCell(e),null;const l=this.committing?MF[o]:o;if(!(this.committing||this.isEditing(e)||this.batch&&this.model.hasEdits(e,oa))||!this.strategy||this.stopping)return null;const h=pt(this.beans,e);h&&(h.onEditorAttachedFuncs=[]);const f=!i&&(!!this.shouldStopEditing(e,n,l)||(this.committing||o==="paste")&&!this.batch)||s,g=i&&!!this.shouldCancelEditing(e,n,l)||r;return{cancel:i,cellCtrl:h,edits:this.model.getEditMap(!0),event:n??null,forceCancel:r,forceStop:s,commit:a,position:e,source:o,treatAsSource:l,willCancel:g,willStop:f}}processStopRequest(e){const{event:t,position:n,willCancel:i,willStop:o}=e;return o||i?this.handleStopOrCancel(e):this.shouldHandleMidBatchKey(t,n)?{res:!1,edits:this.handleMidBatchKey(t,n,e)}:(Zr(this.beans,{persist:!0}),this.batch&&this.strategy?.cleanupEditors(n),{res:!1,edits:this.model.getEditMap()})}handleStopOrCancel(e){const{beans:t,model:n}=this,{cancel:i,commit:o,edits:r,event:s,source:a,willCancel:l,willStop:u}=e,h=!this.batch||!l;Zr(t,{persist:h,isCancelling:l||i,isStopping:u});const f=n.getEditMap(),m=!l&&(!this.batch||o)?this.processEdits(f,a):[];i?this.strategy?.stopCancelled(e.forceCancel):this.strategy?.stopCommitted(s,o),this.clearValidationIfNoOpenEditors();for(const v of m)n.clearEditValue(v);this.bulkRefreshMap(r);for(const v of n.getEditPositions(f)){const w=pt(t,v),b=so(v);w?.refreshCell({force:!0,suppressFlash:!b})}return{res:u,edits:f}}shouldHandleMidBatchKey(e,t){return e instanceof KeyboardEvent&&this.batch&&!!this.strategy?.midBatchInputsAllowed(t)&&this.isEditing(t,{withOpenEditor:!0})}handleMidBatchKey(e,t,n){const{beans:i,model:o}=this,{cellCtrl:r,edits:s}=n,{key:a}=e,l=a===K.ENTER,u=a===K.ESCAPE,h=a===K.TAB;if(l||h||u){if(l||h)Zr(i,{persist:!0});else if(u&&r){const{rowNode:f,column:g}=r;if(this.batch&&f&&g){const m={rowNode:f,column:g};Jr(i,[m],{silent:!0}),this.model.stop(m,!0,!0),pt(i,m)?.refreshCell(es)}else this.revertSingleCellEdit(r)}return this.batch?this.strategy?.cleanupEditors():Jr(i,o.getEditPositions(),{event:e,cancel:u}),e.preventDefault(),this.bulkRefreshMap(s,{suppressFlash:!0}),o.getEditMap()}return s}finishStopEditing({cellCtrl:e,edits:t,params:n,position:i,res:o,commit:r,forceCancel:s,willCancel:a,willStop:l}){const u=this.beans;o&&i&&(!this.batch||r)&&this.model.removeEdits(i),this.navigateAfterEdit(n,e?.cellPosition),Bc(u),this.clearValidationIfNoOpenEditors();const{rowRenderer:h,formula:f}=u;if(a&&h.refreshRows({rowNodes:Array.from(t.keys())}),this.batch){f?f.refreshFormulas(!0):h.refreshRows({suppressFlash:!0,force:!0});const g=l&&r;(g||a&&s)&&this.dispatchBatchStopped(t,g)}}dispatchBatchStopped(e,t){let n;t&&(n=j5(e),n.size>0&&this.ensureBatchStarted()),this.batchStartDispatched&&(this.batchStartDispatched=!1,this.dispatchBatchEvent("batchEditingStopped",n??new Map))}clearValidationIfNoOpenEditors(){this.model.hasEdits(void 0,{withOpenEditor:!0})||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap())}navigateAfterEdit(e,t){if(!e||!t)return;const{event:n,suppressNavigateAfterEdit:i}=e;if(!(n instanceof KeyboardEvent)||i)return;const{key:r,shiftKey:s}=n,a=this.gos.get("enterNavigatesVerticallyAfterEdit");if(r!==K.ENTER||!a)return;const l=s?K.UP:K.DOWN;this.beans.navigation?.navigateToNextCell(null,l,t,!1)}processEdits(e,t){const n=Array.from(e.keys()),i=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,o=[],{changeDetectionSvc:r}=this.beans;r?.beginDeferred();try{for(const s of n){const a=e.get(s);for(const l of a.keys()){const u=a.get(l),h={rowNode:s,column:l};if(so(u)&&!i){const f=pt(this.beans,h);this.setNodeDataValue(s,l,u.pendingValue,f,t)||o.push(h)}}}}finally{r?.endDeferred()}return o}setNodeDataValue(e,t,n,i,o="edit"){const r=f6.has(o)?"edit":o;i&&(i.suppressRefreshCell=!0),this.committing=!0;try{return e.setDataValue(t,n,r)}finally{this.committing=!1,i&&(i.suppressRefreshCell=!1)}}syncEditAfterCommit(e,t){const n=this.model.getEdit(e);n&&n.state!=="editing"&&(t?this.beans.editModelSvc?.setEdit(e,{sourceValue:n.pendingValue}):this.model.clearEditValue(e))}setEditMap(e,t){this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(e,t),this.bulkRefreshMap(e);let n=es;t?.forceRefreshOfEditCellsOnly&&(n={...w6(e),...es}),this.beans.rowRenderer.refreshCells(n)}dispatchEditValuesChanged({rowNode:e,column:t},n={}){if(!e||!t||!n)return;const{pendingValue:i,sourceValue:o}=n,{rowIndex:r,rowPinned:s,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:r,rowPinned:s,column:t,source:"api",data:a,newValue:i,oldValue:o,value:i,colDef:t.getColDef()})}bulkRefreshCell(e,t){en(this.gos,this.beans.rowModel)&&this.refCell(e,this.model.getEdit(e),t)}bulkRefreshMap(e,t){en(this.gos,this.beans.rowModel)&&e.forEach((n,i)=>{for(const o of n.keys())this.refCell({rowNode:i,column:o},n.get(o),t)})}refCell({rowNode:e,column:t},n,i={}){const{beans:o,gos:r}=this,s=new Set([e]),a=new Set,l=e.pinnedSibling;l&&s.add(l);const u=e.sibling;u&&a.add(u);let h=e.parent;for(;h;)h.sibling?.footer&&r.get("groupTotalRow")||!h.parent&&h.sibling&&r.get("grandTotalRow")?a.add(h.sibling):a.add(h),h=h.parent;for(const f of s)this.dispatchEditValuesChanged({rowNode:f,column:t},n);for(const f of s)pt(o,{rowNode:f,column:t})?.refreshCell(i);for(const f of a){const g=pt(o,{rowNode:f,column:t});g&&(g.refreshCell(i),!i.force&&this.batch&&g.editStyleFeature?.applyCellStyles?.())}}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{gos:n,beans:i}=this,o=e.rowNode;if(o.group&&e.column.getColDef().groupRowEditable==null){if(n.get("treeData")){if(!o.data&&!n.get("enableGroupEdit"))return!1}else if(!n.get("enableGroupEdit"))return!1}const r=kF(n)==="fullRow"?s6(i,e,t):gv(i,e);return r&&(this.strategy??(this.strategy=this.createStrategy())),r}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,n=!0){if(this.hasValidationErrors(e)){const i=pt(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),n&&(i&&!i.hasBrowserFocus()&&i.focusCell(),i?.comp?.getCellEditor()?.focusIn?.()),"block-stop"):(i&&this.revertSingleCellEdit(i),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){const n=pt(this.beans,e);n?.comp?.getCellEditor()&&(Jr(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),ea(this.beans,e,{silent:!0}),Xr(this.beans),n?.refreshCell(es),t&&(n?.focusCell(),n?.comp?.getCellEditor()?.focusIn?.()))}hasValidationErrors(e){Xr(this.beans);const t=pt(this.beans,e);t&&(t.refreshCell(es),t.rowCtrl.rowEditStyleFeature?.applyRowStyles());let n=!1;return e?.rowNode?(n||(n=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(n||(n=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(n||(n=this.model.getCellValidationModel().getCellValidationMap().size>0),n||(n=this.model.getRowValidationModel().getRowValidationMap().size>0)),n}moveToNextCell(e,t,n,i="ui"){let o;const r=this.isEditing(),s=r&&this.checkNavWithValidation(void 0,n)==="block-stop";return e instanceof cl&&r&&(o=this.strategy?.moveToNextEditingCell(e,t,n,i,s)),o===null||(o=o||!!this.beans.focusSvc.focusedHeader,o===!1&&!s&&this.stopEditing()),o}getPendingEditValue(e,t,n){if(n==="data"||n==="batch"&&!this.batch)return;const i=this.model.getEdit({rowNode:e,column:t},oa);if(!i||this.stopping&&!this.batch&&!i.editorState?.cellStartedEditing)return;if(n==="edit"){const r=i.editorValue;if(r!=null&&r!==pn)return r}const o=i.pendingValue;if(o!==pn)return o}getCellDataValue(e){const t=this.model.getEdit(e,oa);if(t){const n=t.pendingValue;if(n!==pn)return n;const i=t.sourceValue;if(i!=null)return i}return this.valueSvc.getValue(e.column,e.rowNode,"data")}addStopEditingWhenGridLosesFocus(e){z5(this,this.beans,e)}createPopupEditorWrapper(e){return new i6(e)}batchResetToSourceValue(e){if(!this.batch)return!1;const t=this.model.getEdit(e);if(!t)return!1;const{pendingValue:n,sourceValue:i,state:o}=t;return n===i||o==="editing"?!1:(this.dispatchEditValuesChanged(e,{...t,pendingValue:i}),this.beans.editModelSvc?.removeEdits(e),pt(this.beans,e)?.refreshCell(es),!0)}setDataValue(e,t,n){try{const i=this.batch,o=this.isEditing(i?void 0:e);if((!o||this.committing)&&!i&&!p6.has(n)||!o&&!i&&n==="paste"||n==="batch"&&!i)return;if(n==="edit"){if(o&&this.applyEditorValue(e,t))return!0;if(!i)return}if(this.strategy??(this.strategy=this.createStrategy()),n==="batch"||n==="edit")return this.applyDirectValue(e,t,n);const r=this.beans;let s;if(i?s="ui":this.committing?s=n??"api":s="api",!n||h6.has(n))return this.applyDirectValue(e,t,n);const a=this.applyExistingEdit(e,t,n,s);return a!==void 0?a:(al(r,e,t,n,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0)}finally{this.committing=!1}}applyExistingEdit(e,t,n,i){const o=this.model.getEdit(e);if(o)return o.pendingValue===t?!1:o.sourceValue!==t?(al(this.beans,e,t,n,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:i,suppressNavigateAfterEdit:!0}),!0):(this.beans.editModelSvc?.removeEdits(e),this.ensureBatchStarted(),this.dispatchEditValuesChanged(e,{...o,pendingValue:t}),!0)}applyEditorValue(e,t){const n=this.beans,i=pt(n,e),o=i?.comp?.getCellEditor();return!i||!o?!1:(al(n,e,t,"edit",void 0,{persist:!0}),i.editStyleFeature?.applyCellStyles?.(),"agSetEditValue"in o?(o.agSetEditValue(t),!0):o.refresh&&i.editCompDetails?(o.refresh({...i.editCompDetails.params,value:t}),!0):(i.hasBrowserFocus()&&i.onEditorAttachedFuncs.push(()=>{const s=pt(this.beans,e);s?.focusCell(!0),s?.comp?.getCellEditor()?.focusIn?.()}),Jr(n,[e],{silent:!0,cancel:!0}),ea(n,e,{silent:!0}),Xr(n),pt(n,e)?.refreshCell(es),!0))}applyDirectValue(e,t,n){const i=this.beans;if(this.batch){if(n==="batch"&&pt(i,e)?.comp?.getCellEditor()){const{editModelSvc:s,valueSvc:a}=i,{rowNode:l,column:u}=e;s?.getEdit(e)?.sourceValue===void 0&&s?.setEdit(e,{sourceValue:a.getValue(u,l,"data")}),s?.setEdit(e,{pendingValue:t})}else al(i,e,t,n,void 0,{persist:!0}),n!=="batch"&&this.cleanupEditors();return Bc(i),this.ensureBatchStarted(),this.bulkRefreshCell(e),!0}al(i,e,t,n,void 0,{persist:!0});const o=pt(i,e),r=this.setNodeDataValue(e.rowNode,e.column,t,o,n);return this.syncEditAfterCommit(e,r),Bc(i),pt(i,e)?.refreshCell(r?v6:es),r}handleColDefChanged(e){q5(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){const{model:n}=this;if(!this.batch||!n.hasRowEdits(e.rowNode,oa))return;const{rowNode:o}=e,{compDetails:r,valueToDisplay:s}=t;if(r){const{params:a}=r;return a.data=n.getEditRowDataValue(o,oa),{compDetails:r}}return{valueToDisplay:s}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,n,i){this.strategy?.dispatchCellEvent(e,t,n,i)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return Ue(this.gos,{type:e,...e==="batchEditingStopped"?{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},n){if(!n||n.length===0)return;const{beans:i,rangeSvc:o,valueSvc:r}=this,{formula:s}=i;Zr(i,{persist:!0});const a=this.model.getEditMap(!0);let l=a.get(e)?.get(t)?.pendingValue,u=!1;this.batch||(this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),u=!0);const h=s?.isFormula(l)??!1;n.forEach(g=>{const m=g.columns.some(v=>v?.isAllowFormula());if(o?.forEachRowInRange(g,v=>{const w=Ao(i,v);if(w===void 0)return;const b=a.get(w)??new Map;let y=l;for(const R of g.columns){if(!R)continue;const S=!!h&&R.isAllowFormula();if(this.isCellEditable({rowNode:w,column:R},"api")){const P=r.getValue(R,w,"data",!0);let F=r.parseValue(R,w??null,y,P);Number.isNaN(F)&&(F=null),b.set(R,{editorValue:void 0,pendingValue:F,sourceValue:P,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}S&&(y=s?.updateFormulaByOffset({value:y,columnDelta:1}))}b.size>0&&a.set(w,b),h&&m&&(l=s?.updateFormulaByOffset({value:l,rowDelta:1}))}),this.setEditMap(a),this.batch){this.cleanupEditors(),Bc(i),this.ensureBatchStarted();return}this.committing=!0;try{this.stopEditing(void 0,{source:"bulk"})}finally{this.committing=!1,u&&this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(a)})}});const f=pt(i,{rowNode:e,column:t});f&&f.focusCell(!0)}createCellStyleFeature(e){return new a6(e,this.beans)}createRowStyleFeature(e){return new l6(e,this.beans)}setEditingCells(e,t){const{beans:n}=this,{colModel:i,valueSvc:o}=n,r=new Map;for(let{colId:s,column:a,colKey:l,rowIndex:u,rowPinned:h,newValue:f,state:g}of e){const m=s?i.getCol(s):l?i.getCol(l):a;if(!m)continue;const v=Ao(n,{rowIndex:u,rowPinned:h});if(!v)continue;const w=o.getValue(m,v,"data",!0);if(!t?.forceRefreshOfEditCellsOnly&&!so({pendingValue:f,sourceValue:w})&&g!=="editing")continue;let b=r.get(v);b||(b=new Map,r.set(v,b)),f===void 0&&(f=pn),b.set(m,{editorValue:void 0,pendingValue:f,sourceValue:w,state:g??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(r,t)}onCellFocused(e){const t=pt(this.beans,e);if(!t||!this.isEditing(t,oa))return;const n=this.model.getEdit(t);if(!n||!so(n))return;const o=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(o,"pendingChange")}allowedFocusTargetOnValidation(e){return pt(this.beans,e)}};function w6(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 kF(e,t){return t??e.get("editType")??"singleCell"}var LF=class extends J{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 n=e.previousParams,{editSvc:i,beans:o}=this,r=e.type==="cellFocused"?e.sourceEvent:null;n&&(t=pt(o,n));const{gos:s,editModelSvc:a}=o,l=e.type==="cellFocusCleared";if(i.isEditing(void 0,{withOpenEditor:!0})){const{column:u,rowIndex:h,rowPinned:f}=e,g={column:u,rowNode:Ao(o,{rowIndex:h,rowPinned:f})},m=s.get("invalidEditValueMode")==="block";if(m)return;const v=!m,w=!!a?.getCellValidationModel().hasCellValidation(g),b=v&&w;!(n||l)||i.stopEditing(void 0,{cancel:b,source:l&&v?"api":void 0,event:r})||(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"}))}t?.refreshCell({suppressFlash:!0,force:!0})}stopCancelled(e){const t=this.editSvc.isBatchEditing()&&!e;for(const n of this.model.getEditPositions())Hc(this.beans,n,{cancel:!0},pt(this.beans,n)),this.model.stop(n,t,!0);return!0}stopCommitted(e,t){const n=this.model.getEditPositions(),i={all:[],pass:[],fail:[]};for(const s of n)i.all.push(s),(this.model.getCellValidationModel().getCellValidation(s)?.errorMessages?.length??0)>0?i.fail.push(s):i.pass.push(s);const o=this.processValidationResults(i),r=this.editSvc.isBatchEditing()&&!t;for(const s of o.destroy)Hc(this.beans,s,{event:e},pt(this.beans,s)),this.model.stop(s,r,!1);for(const s of o.keep){const a=pt(this.beans,s);!this.editSvc.cellEditingInvalidCommitBlocks()&&a&&this.editSvc.revertSingleCellEdit(a)}return!0}cleanupEditors({rowNode:e}={},t){Zr(this.beans,{persist:!1});const n=this.model.getEditPositions(),i=[];if(e)for(const o of n)o.rowNode!==e&&i.push(o);else for(const o of n)i.push(o);Jr(this.beans,i),Bc(this.beans,t)}setFocusOutOnEditor(e){e.comp?.getCellEditor()?.focusOut?.()}setFocusInOnEditor(e){const t=e.comp,n=t?.getCellEditor();if(n?.focusIn)n.focusIn();else{const i=this.beans.gos.get("editType")==="fullRow";e.focusCell(i),e.onEditorAttachedFuncs.push(()=>t?.getCellEditor()?.focusIn?.())}}setupEditors(e){const{event:t,ignoreEventKey:n=!1,startedEdit:i,position:o,cells:r=this.model.getEditPositions()}=e,s=t instanceof KeyboardEvent&&!n&&t.key||void 0;$5(this.beans,r,o,s,t,i)}dispatchCellEvent(e,t,n,i){const o=pt(this.beans,e);o&&this.eventSvc.dispatchEvent({...o.createEvent(t??null,n),...i})}dispatchRowEvent(e,t,n){if(n)return;const i=bh(this.beans,e);i&&this.eventSvc.dispatchEvent(i.createRowEvent(t))}shouldStop(e,t,n="ui"){const i=this.editSvc.isBatchEditing();return i&&n==="api"?!0:i&&(n==="ui"||n==="edit")?!1:n==="api"?!0:t instanceof KeyboardEvent&&!i?t.key===K.ENTER:null}shouldCancel(e,t,n="ui"){const i=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!i&&t.key===K.ESCAPE||i&&n==="api"||n==="api")}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const n=[];if(e.forEach((i,o)=>{i.forEach((r,s)=>{r.state==="editing"&&n.push({...r,rowNode:o,column:s})})}),t?.update&&(e=new Map([...this.model.getEditMap(),...e])),this.model?.setEditMap(e),n.length>0){const i=n.at(-1),o=i.pendingValue===pn?void 0:i.pendingValue;this.start({position:i,event:new KeyboardEvent("keydown",{key:o}),source:"api"});const r=pt(this.beans,i);r&&this.setFocusInOnEditor(r)}}destroy(){this.cleanupEditors(),super.destroy()}},b6=class extends LF{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=new Set}shouldStop(e,t,n="ui"){const{rowNode:i,beans:o}=this,{rowNode:r}=e||{};if(!bh(o,{rowNode:i}))return!0;const a=super.shouldStop({rowNode:i},t,n);return a!==null?a:i?r!==i:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:n,startedEdit:i,event:o,ignoreEventKey:r}=e,{rowNode:s}=t,{beans:a,model:l,startedRows:u}=this;this.rowNode!==s&&super.cleanupEditors(t);const h=a.visibleCols.allCols,f=[],g=[];for(const m of h)m.isCellEditable(s)&&g.push(m);if(g.length!=0){u.has(s)||(this.dispatchRowEvent({rowNode:s},"rowEditingStarted",n),u.add(s));for(const m of g){const v={rowNode:s,column:m};f.push(v),l.start(v)}this.rowNode=s,this.setupEditors({cells:f,position:t,startedEdit:i,event:o,ignoreEventKey:r})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){const{rowNode:t,model:n}=this;return t&&!n.hasRowEdits(t)?!1:(super.stopCancelled(e),this.cleanupEditors({rowNode:t},!0),this.rowNode=void 0,!0)}stopCommitted(e,t){const{rowNode:n,beans:i,model:o,editSvc:r}=this;if(n&&!o.hasRowEdits(n))return!1;const s=[];if(o.getEditMap().forEach((a,l)=>{if(!(!a||a.size===0)){for(const u of a.values())if(so(u)){s.push(l);break}}}),Xr(i),r.checkNavWithValidation({rowNode:n})==="block-stop")return!1;if(super.stopCommitted(e,t),t||!r.isBatchEditing())for(const a of s)this.dispatchRowEvent({rowNode:a},"rowValueChanged");return this.cleanupEditors({rowNode:n},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,n=e.previousParams;if(n?.rowIndex===t||e.sourceEvent instanceof KeyboardEvent)return;const{beans:i,gos:o,model:r}=this;if(i.editSvc?.isRangeSelectionEnabledWhileEditing())return;const s=pt(i,n);o.get("invalidEditValueMode")==="block"&&s&&(r.getCellValidationModel().getCellValidation(s)||r.getRowValidationModel().getRowValidation(s))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);const{startedRows:n}=this;for(const i of n)this.dispatchRowEvent({rowNode:i},"rowEditingStopped"),this.destroyEditorsForRow(i);n.clear()}destroyEditorsForRow(e){const t=bh(this.beans,{rowNode:e});if(!t)return;const n={};for(const i of t.getAllCellCtrls())i.comp?.getCellEditor()&&Hc(this.beans,i,n,i)}moveToNextEditingCell(e,t,n,i="ui",o=!1){const{beans:r,model:s,gos:a,editSvc:l}=this,u=e.cellPosition;let h;s.suspend(!0);try{h=r.navigation?.findNextCellToFocusOn(u,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{s.suspend(!1)}if(h===!1)return null;if(h==null)return!1;const f=h.cellPosition,g=e.isCellEditable(),m=h.isCellEditable(),v=f&&u.rowIndex===f.rowIndex&&u.rowPinned===f.rowPinned;g&&this.setFocusOutOnEditor(e),this.restoreEditors();const w=a.get("suppressStartEditOnTab");return m&&!o?w?h.focusCell(!0,n):(h.comp?.getCellEditor()||ea(r,h,{event:n,cellStartedEdit:!0}),this.setFocusInOnEditor(h),h.focusCell(!1,n)):(m&&o&&this.setFocusInOnEditor(h),h.focusCell(!0,n)),!v&&!o&&(l?.stopEditing({rowNode:e.rowNode},{event:n,forceStop:!0}),l?.isRowEditing(e.rowNode,{withOpenEditor:!0})&&this.cleanupEditors(h,!0),w?h.focusCell(!0,n):l.startEditing(h,{startedEdit:!0,event:n,source:i,ignoreEventKey:!0,editable:m||void 0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){const{beans:e,model:t}=this;t.getEditMap().forEach((n,i)=>n.forEach(({state:o},r)=>{if(o!=="editing")return;const s=pt(e,{rowNode:i,column:r});s&&!s.comp?.getCellEditor()&&ea(e,s,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.clear()}},y6=class extends LF{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,n="ui"){const i=super.shouldStop(e,t,n);if(i!==null)return i;const o=e?.rowNode,r=e?.column,s=this.rowNode,a=this.column;return(!s||!a)&&o&&r?null:s!==o||a!==r?!0:!s&&!a?this.model.hasEdits(void 0,{withOpenEditor:!0}):!1}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:n,event:i,ignoreEventKey:o}=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:n,event:i,ignoreEventKey:o})}dispatchRowEvent(e,t,n){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){return super.stopCancelled(e),this.clearPosition()}stopCommitted(e,t){return super.stopCommitted(e,t),this.clearPosition()}clearPosition(){return this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:n}=this.beans,{rowIndex:i,column:o,rowPinned:r}=e,s=Ao(this.beans,{rowIndex:i,rowPinned:r}),a=Ym(o),l=t.getCol(a),u=e.previousParams;if(u){const h=Ym(u.column);if(u?.rowIndex===i&&h===a&&u?.rowPinned===r)return}e.type=="cellFocused"&&(n?.isRangeSelectionEnabledWhileEditing()||n?.isEditing({rowNode:s,column:l},{withOpenEditor:!0}))||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,n,i="ui",o=!1){const r=this.beans.focusSvc.getFocusedCell();r&&(e=el(this.beans,r)??e);const s=e.cellPosition;let a;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),o||(e.eGui.focus(),this.editSvc?.stopEditing(e,{source:this.editSvc?.isBatchEditing()?"ui":"api",event:n}));try{a=this.beans.navigation?.findNextCellToFocusOn(s,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(a===!1)return null;if(a==null)return!1;const u=a.cellPosition,h=e.isCellEditable(),f=a.isCellEditable(),g=u&&s.rowIndex===u.rowIndex&&s.rowPinned===u.rowPinned;h&&!o&&this.setFocusOutOnEditor(e);const m=this.gos.get("suppressStartEditOnTab");let v=!1;if(!g&&!o&&(super.cleanupEditors(a,!0),m?a.focusCell(!0,n):(v=!0,this.editSvc.startEditing(a,{startedEdit:!0,event:n,source:i,ignoreEventKey:!0,editable:f}))),f&&!o){if(a.focusCell(!1,n),m)a.focusCell(!0,n);else if(!a.comp?.getCellEditor()){if(!v){const w=this.editSvc?.isEditing(a,{withOpenEditor:!0});ea(this.beans,a,{event:n,cellStartedEdit:!0,silent:w})}this.setFocusInOnEditor(a),this.cleanupEditors(a)}}else f&&o&&this.setFocusInOnEditor(a),a.focusCell(!0,n);return e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},ts={moduleName:"EditCore",version:Se,beans:[W5,C6],apiFunctions:{getEditingCells:Qz,getEditRowValues:qz,getCellEditorInstances:U5,startEditingCell:Jz,stopEditing:Yz,isEditing:Zz,validateEdit:Xz},dynamicBeans:{singleCell:y6,fullRow:b6},dependsOn:[Dh,xF],css:[gz]},S6={moduleName:"UndoRedoEdit",version:Se,beans:[fz],apiFunctions:{undoCellEditing:jz,redoCellEditing:Kz,getCurrentUndoSize:e6,getCurrentRedoSize:t6},dependsOn:[ts]},R6={moduleName:"TextEditor",version:Se,userComponents:{agCellEditor:EF,agTextCellEditor:EF},dependsOn:[ts]},x6={moduleName:"NumberEditor",version:Se,userComponents:{agNumberCellEditor:{classImp:Iz}},dependsOn:[ts]},F6={moduleName:"DateEditor",version:Se,userComponents:{agDateCellEditor:bz,agDateStringCellEditor:Rz},dependsOn:[ts]},P6={moduleName:"CheckboxEditor",version:Se,userComponents:{agCheckboxCellEditor:mz},dependsOn:[ts]},E6={moduleName:"SelectEditor",version:Se,userComponents:{agSelectCellEditor:zz},dependsOn:[ts]},D6={moduleName:"LargeTextEditor",version:Se,userComponents:{agLargeTextCellEditor:Ez},dependsOn:[ts]},T6={moduleName:"CustomEditor",version:Se,dependsOn:[ts]},OF={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agBigIntColumnFilter:"agBigIntColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},A6=new Set(Object.values(OF));function ns(e,t){const n=e.filterUi;if(!n)return null;if(n.created)return n.promise;if(t)return null;const i=n.create(n.refreshed),o=n;return o.created=!0,o.promise=i,i}function I6(e,t,n,i,o,r,s){return t.refresh?.({...n,model:i,source:r,additionalEventAttributes:s}),e().then(a=>{if(a){const{filter:l,filterParams:u}=a;_F(l,u,i,o,r,s)}})}function _F(e,t,n,i,o,r){e?.refresh?.({...t,model:n,state:i,source:o,additionalEventAttributes:r})}function NF(e,t,n,i){const o=e();o?.created&&o.promise.then(r=>{const s=t();_F(r,o.filterParams,s,n()??{model:s},"ui",i)})}function BF(e){let t,n=!1,i;const{action:o,filterParams:r,getFilterUi:s,getModel:a,getState:l,updateState:u,updateModel:h,processModelToApply:f}=e;switch(o){case"apply":{const g=l();i=g?.model??null,f&&(i=f(i)),t={state:g?.state,model:i},n=!0;break}case"clear":{t={model:null},r?.buttons?.includes("apply")||(n=!0,i=null);break}case"reset":{t={model:null},n=!0,i=null;break}case"cancel":{t={model:a()};break}}u(t),n?h(i):NF(s,a,l,{fromAction:o})}function mn(e,t){return e[t]??null}var M6=class extends hm{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,n,i,o){this.comp=e;const r=kc(this,this.beans.context,o);this.eButtonShowMainFilter=n,this.eFloatingFilterBody=i,this.setGui(t,r),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(r),this.setupLeft(r),this.setupHover(r),this.setupFocus(r),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(r),this.setupUi(),r.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(r);const s=()=>this.onColDefChanged(r);r.addManagedListeners(this.column,{colDefChanged:s}),r.addManagedEventListeners({filterSwitched:({column:a})=>{a===this.column&&s()}}),r.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,n=e.colDef;return Ue(t.gos,{colDef:n,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,n=!!e.floatingFilter;this.active=t&&n}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=ri("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new Dc(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();Ga(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(Ot(t)===this.eGui)return;const o=js(t,this.eGui,null,e.shiftKey);if(o){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),o.focus();return}const r=this.findNextColumnWithFloatingFilter(e.shiftKey);r&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:r},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let n=this.column;do if(n=e?t.getColBefore(n):t.getColAfter(n),!n)break;while(!n.getColDef().filter||!n.getColDef().floatingFilter);return n}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case K.UP:case K.DOWN:case K.LEFT:case K.RIGHT:if(t)return;Ks(e);case K.ENTER:t&&$s(this.eGui)&&e.preventDefault();break;case K.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const n=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&_s(e.relatedTarget,"ag-floating-filter");if(n&&i&&e.target===this.eGui){const o=this.lastFocusEvent,r=!!(o&&o.key===K.TAB);if(o&&r){const s=o.shiftKey;$s(this.eGui,s)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new dm(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!oi(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:n,gos:i}=this,o=r=>{if(r?.source==="filterDestroyed"&&(!this.isAlive()||!t?.isAlive()))return;const s=this.comp.getFloatingFilterComp();s&&s.then(a=>{if(a){if(i.get("enableFilterHandlers")){const h=r;let f="filter";h?.afterFloatingFilter?f="ui":h?.afterDataChange?f="dataChanged":r?.source==="api"&&(f="api"),this.updateFloatingFilterParams(this.userCompDetails,f);return}const l=t?.getCurrentFloatingFilterParentModel(n),u=r?{...r,columns:r.columns??[],source:r.source==="api"?"api":"columnFilter"}:null;a.onParentModelChanged(l,u)}})};[this.destroySyncListener]=e.addManagedListeners(n,{filterChanged:o}),t?.isFilterActive(n)&&o(null)}setupWidth(e){const t=()=>{const n=`${this.column.getActualWidth()}px`;this.comp.setWidth(n)};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 n=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const i=this.beans.colFilter,o=this.active?i?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,r=this.comp.getFloatingFilterComp();!r||!o?this.updateCompDetails(e,o,n):r.then(s=>{!s||i?.areFilterCompsDifferent(this.userCompDetails??null,o)?this.updateCompDetails(e,o,n):this.updateFloatingFilterParams(o,"colDef")})}updateCompDetails(e,t,n){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),n&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){if(!e)return;let n=e.params;this.comp.getFloatingFilterComp()?.then(i=>{typeof i?.refresh=="function"&&(this.gos.get("enableFilterHandlers")&&(n={...n,model:mn(this.beans.colFilter?.model??{},this.column.getColId()),source:t}),i.refresh(n))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function k6(e,t){const n=e.colModel.getCol(t);if(!n){mt(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:n,positionBy:"auto"})}function L6(e){e.menuSvc?.hidePopupMenu()}var O6=class extends J{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(GF(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,n){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,n)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}hideFilterMenu(){GF(this.beans)?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(oi(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&Vr(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(zs()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!oi(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!oi(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 oi(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,n,i){const{positionBy:o,onClosedCallback:r}=t,s=t.column;if(o==="button"){const{buttonElement:a}=t;e?.showMenuAfterButtonClick(s,a,n,r,i)}else if(o==="mouse"){const{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(s,a,n,r,i)}else if(s){const a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(s,"auto"),ir(a,()=>{const u=l.getHeaderRowContainerCtrl(s.getPinned())?.getHeaderCtrlForColumn(s);u&&e?.showMenuAfterButtonClick(s,u.getAnchorElementForMenu(i),n,r,i)})}}};function HF(e,t,n){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",n))}function GF(e){const{enterpriseMenuFactory:t,filterMenuFactory:n,gos:i}=e;return t&&oi(i)?t:n}var _6={moduleName:"SharedMenu",version:Se,beans:[O6],apiFunctions:{showColumnMenu:k6,hidePopupMenu:L6}},N6=".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;:where(.ag-set-filter-group-closed-icon),:where(.ag-set-filter-group-indeterminate-icon),:where(.ag-set-filter-group-opened-icon){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{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%}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>:where(.ag-date-floating-filter-wrapper),>:where(.ag-floating-filter-input),>:where(.ag-input-field){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(.ag-input-field-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;gap:var(--ag-widget-vertical-spacing);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:var(--ag-widget-container-vertical-padding);: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)}";function B6(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function H6(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function G6(e,t){const n=e.colModel.getColDefCol(t);if(n)return e.colFilter?.destroyFilter(n,"api")}function V6(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function W6(e){return e.filterManager?.getFilterModel()??{}}function z6(e,t,n){const{gos:i,colModel:o,colFilter:r}=e;n&&!i.get("enableFilterHandlers")&&(le(288),n=!1);const s=o.getColDefCol(t);return s?r?.getModelForColumn(s,n)??null:null}function U6(e,t,n){return e.filterManager?.setColumnFilterModel(t,n)??Promise.resolve()}function $6(e,t){const n=e.colModel.getCol(t);if(!n){mt(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:n,containerType:"columnFilter",positionBy:"auto"})}function j6(e){e.menuSvc?.hideFilterMenu()}function K6(e,t){const n=e.colModel.getCol(t);if(!n){mt(12,{colKey:t});return}return e.colFilter?.getHandler(n,!0)}function q6(e,t){const{colModel:n,colFilter:i,gos:o}=e;if(!o.get("enableFilterHandlers")){le(287);return}const{colId:r,action:s}=t;if(r){const a=n.getColById(r);a&&i?.updateModel(a,s)}else i?.updateAllModels(s)}var VF={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},WF=["january","february","march","april","may","june","july","august","september","october","november","december"];function Q6(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function Y6(e,t){if(e==null)return-1;if(t==null)return 1;const n=si(e),i=si(t);return n!=null&&i!=null?n===i?0:n>i?1:-1:String(e).localeCompare(String(t))}function zF(e){return e instanceof Date&&!isNaN(e.getTime())}var mv={number:()=>{},bigint:()=>{},boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>t===!1,numberOfInputs:0}]}),date:()=>({isValidDate:zF}),dateString:({dataTypeDefinition:e})=>({comparator:(t,n)=>{const i=e.dateParser(n);return n==null||i<t?-1:i>t?1:0},isValidDate:t=>typeof t=="string"&&zF(e.dateParser(t))}),dateTime:e=>mv.date(e),dateTimeString:e=>mv.dateString(e),object:()=>{},text:()=>{}},vv={number:()=>({comparator:Q6}),bigint:()=>({comparator:Y6}),boolean:({t:e})=>({valueFormatter:t=>Pe(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:n=>{const i=e(n);return Pe(i)?i:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(n,i)=>{if(n==="NaN")return t("invalidDate","Invalid Date");if(i===1&&n!=null){const o=WF[Number(n)-1];return t(o,VF[o])}return n??t("blanks","(Blanks)")},treeListPathGetter:n=>ph(n,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:n})=>({valueFormatter:i=>{const o=e(i);return Pe(o)?o:n("blanks","(Blanks)")},treeList:!0,treeListPathGetter:i=>ph(t.dateParser(i??void 0),!1),treeListFormatter:(i,o)=>{if(o===1&&i!=null){const r=WF[Number(i)-1];return n(r,VF[r])}return i??n("blanks","(Blanks)")}}),dateTime:e=>{const t=vv.date(e);return t.treeListPathGetter=ph,t},dateTimeString(e){const t=e.dataTypeDefinition.dateParser,n=vv.dateString(e);return n.treeListPathGetter=i=>ph(t(i??void 0)),n},object:({formatValue:e,t})=>({valueFormatter:n=>{const i=e(n);return Pe(i)?i:t("blanks","(Blanks)")}}),text:()=>{}};function Z6(e,t,n,i,o,r,s){let a=t,l=n;const u=e==="agSetColumnFilter";!l&&i.baseDataType==="object"&&!u&&(l=({column:m,node:v})=>o({column:m,node:v,value:r.valueSvc.getValue(m,v,"data")}));const f=(u?vv:mv)[i.baseDataType],g=f({dataTypeDefinition:i,formatValue:o,t:s});return a=typeof t=="object"?{...g,...t}:g,{filterParams:a,filterValueGetter:l}}var J6={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",bigint:"agBigIntColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},X6={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",bigint:"agBigIntColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};function e8(e,t=!1){return(t?X6:J6)[e??"text"]}function t8(e,t,n){if(t==null)return null;let i=null;const{compName:o,jsComp:r,fwComp:s}=N0(e,t);return o?i={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agBigIntColumnFilter:"agBigIntColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[o]:r==null&&s==null&&t.filter===!0&&(i=n()),i}var n8={filterHandler:()=>({doesFilterPass:()=>!0})};function UF(e,t,n,i){if(!e.isPrimary())return!0;const r=!n;return!e.isValueActive()||!r?!1:t?!0:i}var i8=class extends J{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={...OF},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.addManagedPropertyListener("pivotMode",this.onPivotModeChanged.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",n){const{colModel:i,dataTypeSvc:o,filterManager:r}=this.beans;if(o?.isPendingInference){this.modelUpdates.push({model:e,source:t});return}const s=[],a=this.getModel(!0);if(e){const l=new Set(Object.keys(e));this.allColumnFilters.forEach((u,h)=>{const f=e[h];s.push(this.setModelOnFilterWrapper(u,f)),l.delete(h)}),l.forEach(u=>{const h=i.getColDefCol(u)||i.getCol(u);if(!h){le(62,{colId:u});return}if(!h.isFilterAllowed()){le(63,{colId:u});return}const f=this.getOrCreateFilterWrapper(h,!0);if(!f){le(64,{colId:u});return}s.push(this.setModelOnFilterWrapper(f,e[u],!0))})}else this.model={},this.allColumnFilters.forEach(l=>{s.push(this.setModelOnFilterWrapper(l,null))});_t.all(s).then(()=>{const l=this.getModel(!0),u=[];this.allColumnFilters.forEach((h,f)=>{const g=a?a[f]:null,m=l?l[f]:null;uc(g,m)||u.push(h.column)}),u.length>0?r?.onFilterChanged({columns:u,source:t}):n&&this.updateActive("filterChanged")})}getModel(e){const t={},{allColumnFilters:n,initialModel:i,beans:{colModel:o}}=this;if(n.forEach((r,s)=>{const a=this.getModelFromFilterWrapper(r);Pe(a)&&(t[s]=a)}),!e)for(const r of Object.keys(i)){const s=i[r];Pe(s)&&!n.has(r)&&o.getCol(r)?.isFilterAllowed()&&(t[r]=s)}return t}setState(e,t,n="api"){if(this.state.clear(),t)for(const i of Object.keys(t)){const o=t[i];this.state.set(i,{model:mn(this.model,i),state:o})}this.setModel(e,n,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let n=!1;return e.forEach((i,o)=>{const r=i.state;r!=null&&(n=!0,t[o]=r)}),n?t:void 0}getModelFromFilterWrapper(e){const n=e.column.getColId();if(e.isHandler)return mn(this.model,n);const i=e.filter;return i?typeof i.getModel!="function"?(le(66),null):i.getModel():mn(this.initialModel,n)}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):!1}updateActiveFilters(){const e=l=>l?l.isFilterActive?l.isFilterActive():(le(67),!1):!1,{colModel:t,gos:n}=this.beans,i=!!Bd(n),o=[],r=[],s=(l,u,h)=>{u&&(UF(l,t.isPivotMode(),t.isPivotActive(),i)?o.push(h):r.push(h))},a=[];return this.allColumnFilters.forEach(l=>{const u=l.column,h=u.getColId();if(l.isHandler)a.push(_t.resolve().then(()=>{s(u,this.isHandlerActive(u),{colId:h,isHandler:!0,handler:l.handler,handlerParams:l.handlerParams})}));else{const f=ns(l);f&&a.push(f.then(g=>{s(u,e(g),{colId:h,isHandler:!1,comp:g})}))}}),_t.all(a).then(()=>{this.activeAggregateFilters=o,this.activeColumnFilters=r})}updateFilterFlagInColumns(e,t){const n=[];return this.allColumnFilters.forEach(i=>{const o=i.column;if(i.isHandler)n.push(_t.resolve().then(()=>{this.setColFilterActive(o,this.isHandlerActive(o),e,t)}));else{const r=ns(i);r&&n.push(r.then(s=>{this.setColFilterActive(o,s.isFilterActive(),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),_t.all(n)}doFiltersPass(e,t,n){const{data:i,aggData:o}=e,r=n?this.activeAggregateFilters:this.activeColumnFilters,s=n?o:i,a=this.model;for(let l=0;l<r.length;l++){const u=r[l],{colId:h,isHandler:f}=u;if(h!==t)if(f){const{handler:g,handlerParams:m}=u;if(!g.doesFilterPass({node:e,data:s,model:mn(a,h),handlerParams:m}))return!1}else{const g=u.comp;if(typeof g.doesFilterPass!="function"){mt(91);continue}if(!g.doesFilterPass({node:e,data:s}))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:n}=this.beans,i=()=>{this.isAlive()&&n?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(i,0):i()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:n}=e,i=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",n).then(()=>{this.allColumnFilters.forEach(o=>{const{column:r,isHandler:s}=o;i!==r.getColId()&&(s&&o.handler.onAnyFilterChanged?.(),ns(o,s)?.then(a=>{typeof a?.onAnyFilterChanged=="function"&&a.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach(n=>{const i=n.isHandler;i&&n.handler.onNewRowsLoaded?.();const o=ns(n,i);o&&t.push(o.then(r=>{r.onNewRowsLoaded?.()}))}),_t.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){const{filterValueSvc:n,colModel:i}=this.beans;return(o,r)=>{const s=r?i.getCol(r):e;return s?n.getValue(s,o,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t?.isHandler)return this.isHandlerActive(e);const n=t?.filter;return n?n.isFilterActive():mn(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=Pe(mn(this.model,e.getColId()));if(t)return t;const n=this.beans.groupFilter;return n?.isGroupFilter(e)?n.isFilterActive(e):!1}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?ns(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const n=ns(t);return n?n.then(i=>({comp:i,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const n=this.getOrCreateFilterWrapper(e,t);return n?.isHandler?n.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let n=this.cachedFilter(e);return!n&&t&&(n=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,n)),n}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 PO(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":e8(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,n,i,o,r){const s=()=>{const u=this.createFilterCompParams(e,o,r),h=i(u,o);return k_(this.beans.userCompFactory,t,h,n)},a=s();return a?{compDetails:a,createFilterUi:u=>(u?s():a).newAgStackInstance()}:null}createFilterInstance(e,t,n,i){const o=this.beans.selectableFilter;o?.isSelectable(t)&&(t=o.getFilterDef(e,t));const{handler:r,handlerParams:s,handlerGenerator:a}=this.createHandler(e,t,n)??{},l=this.createFilterComp(e,t,n,i,!!r,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:r,handlerGenerator:a,handlerParams:s};const{compDetails:u,createFilterUi:h}=l;return this.isGlobalButtons&&(u.params?.buttons?.length||le(281,{colId:e.getColId()})),{compDetails:u,handler:r,handlerGenerator:a,handlerParams:s,createFilterUi:h}}createBaseFilterParams(e,t){const{filterManager:n,rowModel:i}=this.beans;return Ue(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:o=>n?.doesRowPassOtherFilters(e.getColId(),o)??!0,rowModel:i})}createFilterCompParams(e,t,n,i){const o=this.filterChangedCallbackFactory(e),r=this.createBaseFilterParams(e,i);if(r.filterChangedCallback=o,r.filterModifiedCallback=i?()=>{}:s=>this.filterModified(e,s),t){const s=r,a=e.getColId(),l=mn(this.model,a);s.model=l,s.state=this.state.get(a)??{model:l},s.onModelChange=(u,h)=>{this.updateStoredModel(a,u),this.refreshHandlerAndUi(e,u,"ui",!1,h).then(()=>{o({...h,source:"columnFilter"})})},s.onStateChange=u=>{this.updateState(e,u),this.updateOrRefreshFilterUi(e)},s.onAction=(u,h,f)=>{this.updateModel(e,u,h),this.dispatchLocalEvent({type:"filterAction",column:e,action:u,event:f})},s.getHandler=()=>this.getHandler(e,!0),s.onUiChange=u=>this.filterUiChanged(e,u),s.source=n}return r}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,n){const i=t(),o={created:!0,create:t,filterParams:e.params,compDetails:e,promise:i};return i.then(n),o}createFilterWrapper(e){const{compDetails:t,handler:n,handlerGenerator:i,handlerParams:o,createFilterUi:r}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),a=>a),s=e.getColId();if(n)return delete this.initialModel[s],n.init?.({...o,source:"init",model:mn(this.model,s)}),{column:e,isHandler:!0,handler:n,handlerGenerator:i,handlerParams:o,filterUi:this.createFilterUiForHandler(t,r)};if(r){const a={column:e,filterUi:null,isHandler:!1};return a.filterUi=this.createFilterUiLegacy(t,r,l=>{a.filter=l??void 0}),a}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,n){const{gos:i,frameworkOverrides:o,registry:r}=this.beans;let s;const a=m=>{const v=m.filter;if(M0(v)){const w=v.handler;return w||(s=v.doesFilterPass,s?()=>({doesFilterPass:s}):void 0)}return typeof v=="string"?v:void 0},l=i.get("enableFilterHandlers"),u=l?a(t):void 0,h=m=>()=>this.createBean(r.createDynamicBean(m,!0));let f,g;if(typeof u=="string"){const m=i.get("filterHandlers")?.[u];m!=null?f=m:A6.has(u)&&(f=h(u),g=u)}else f=u;if(!f){let m;const{compName:v,jsComp:w,fwComp:b}=N0(o,t);v?m=v:w==null&&b==null&&t.filter===!0&&(m=n),g=this.handlerMap[m],g&&(f=h(g))}return f?{filterHandler:f,handlerNameOrCallback:s??g}:l?(en(i)&&le(277,{colId:e.getColId()}),n8):void 0}createHandler(e,t,n){const i=this.createHandlerFunc(e,t,n);if(!i)return;const o=Gp(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:r,filterHandler:s}=i,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,s,o);return{handler:a,handlerParams:l,handlerGenerator:r??s}}createHandlerFromFunc(e,t,n){const i=e.getColDef(),o=t(Ue(this.gos,{column:e,colDef:i})),r=this.createHandlerParams(e,n);return{handler:o,handlerParams:r}}createHandlerParams(e,t){const n=e.getColDef(),i=e.getColId(),o=this.filterChangedCallbackFactory(e);return Ue(this.gos,{colDef:n,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:r=>this.beans.filterManager?.doesRowPassOtherFilters(i,r)??!0,onModelChange:(r,s)=>{this.updateStoredModel(i,r),this.refreshHandlerAndUi(e,r,"handler",!1,s).then(()=>{o({...s,source:"columnFilter"})})},onModelAsStringChange:()=>{e.dispatchColEvent("filterChanged","filterChanged"),this.dispatchLocalEvent({type:"filterModelAsStringChanged",column:e})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:n,groupFilter:i}=this.beans;this.allColumnFilters.forEach((r,s)=>{let a;r.column.isPrimary()?a=t.getColDefCol(s):a=t.getCol(s),!(a&&a===r.column)&&(e.push(r.column),this.disposeFilterWrapper(r,"columnChanged"),this.disposeColumnListener(s))});const o=i&&e.every(r=>i.isGroupFilter(r));e.length>0&&!o&&n?.onFilterChanged({columns:e,source:"api"})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const n=this.beans.groupFilter;return n?.isGroupFilter(e)?n.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){const{userCompFactory:n,frameworkOverrides:i,selectableFilter:o,gos:r}=this.beans,s=m=>{this.getOrCreateFilterUi(e)?.then(w=>{m(Xs(w))})},a=e.getColDef(),l=o?.isSelectable(a)?o.getFilterDef(e,a):a,u=t8(i,l,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",h=r.get("enableFilterHandlers"),f=Gp(n,l,this.createFilterCompParams(e,h,"init",!0)),g=Ue(r,{column:e,filterParams:f,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:s,showParentFilter:t});if(h){const m=g,v=e.getColId(),w=this.filterChangedCallbackFactory(e);m.onUiChange=b=>this.floatingFilterUiChanged(e,b),m.model=mn(this.model,v),m.onModelChange=(b,y)=>{this.updateStoredModel(v,b),this.refreshHandlerAndUi(e,b,"floating",!0,y).then(()=>{w({...y,source:"columnFilter"})})},m.getHandler=()=>this.getHandler(e,!0),m.source="init"}return __(n,a,g,u)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,n,i){const o="paramsUpdated";if(e.isHandler){const r=t.getColId();delete this.initialModel[r],this.state.delete(r);const s=e.filterUi,a=this.createFilterUiForHandler(n,i);e.filterUi=a;const l=this.eventSvc;s?.created?s.promise.then(u=>{this.destroyBean(u),l.dispatchEvent({type:"filterDestroyed",source:o,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:o,column:t})}else this.destroyFilter(t,o)}destroyFilter(e,t="api"){const n=e.getColId(),i=this.allColumnFilters.get(n);this.disposeColumnListener(n),delete this.initialModel[n],i&&this.disposeFilterWrapper(i,t).then(o=>{o&&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 n=!1;const{column:i,isHandler:o,filterUi:r}=e,s=i.getColId();o&&(n=this.isHandlerActive(i),this.destroyBean(e.handler),delete this.model[s],this.state.delete(s));const a=()=>{this.setColFilterActive(i,!1,"filterDestroyed"),this.allColumnFilters.delete(s),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:i})};if(r){if(r.created)return r.promise.then(l=>(n=o?n:!!l?.isFilterActive(),this.destroyBean(l),a(),n));a()}return _t.resolve(n)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:t?.source??"columnFilter"})}}filterParamsChanged(e,t="api"){const n=this.allColumnFilters.get(e);if(!n)return;const i=this.beans,o=n.column,r=o.getColDef(),s=o.isFilterAllowed(),a=this.getDefaultFilter(o),l=i.selectableFilter,u=l?.isSelectable(r)?l.getFilterDef(o,r):r,h=s?this.createHandlerFunc(o,u,this.getDefaultFilter(o)):void 0,f=!!h,g=n.isHandler;if(g!=f){this.destroyFilter(o,"paramsUpdated");return}const{compDetails:m,createFilterUi:v}=(s?this.createFilterComp(o,u,a,b=>b,f,"colDef"):null)??{compDetails:null,createFilterUi:null},w=m?.params??Gp(i.userCompFactory,u,this.createFilterCompParams(o,f,"colDef"));if(g){const b=h?.handlerNameOrCallback??h?.filterHandler,y=mn(this.model,e);if(n.handlerGenerator!=b){const R=n.handler,{handler:S,handlerParams:P}=this.createHandlerFromFunc(o,h.filterHandler,w);n.handler=S,n.handlerParams=P,n.handlerGenerator=b,delete this.model[e],S.init?.({...P,source:"init",model:null}),this.destroyBean(R),y!=null&&this.beans.filterManager?.onFilterChanged({columns:[o],source:t})}else{const R=this.createHandlerParams(o,m?.params);n.handlerParams=R,n.handler.refresh?.({...R,source:"colDef",model:y})}}if(this.areFilterCompsDifferent(n.filterUi?.compDetails??null,m)||!n.filterUi||!m){this.destroyFilterUi(n,o,m,v);return}n.filterUi.filterParams=w,ns(n,g)?.then(b=>{(b?.refresh?b.refresh(w):!0)===!1?this.destroyFilterUi(n,o,m,v):this.dispatchLocalEvent({type:"filterParamsChanged",column:o,params:w})})}refreshHandlerAndUi(e,t,n,i,o){const r=this.cachedFilter(e);if(!r)return i&&this.getOrCreateFilterWrapper(e,!0),_t.resolve();if(!r.isHandler)return _t.resolve();const{filterUi:s,handler:a,handlerParams:l}=r;return I6(()=>{if(s){const{created:u,filterParams:h}=s;if(u)return s.promise.then(f=>f?{filter:f,filterParams:h}:void 0);s.refreshed=!0}return _t.resolve(void 0)},a,l,t,this.state.get(e.getColId())??{model:t},n,o)}setColumnFilterWrapper(e,t){const n=e.getColId();this.allColumnFilters.set(n,t),this.allColumnListeners.set(n,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(n)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:n}=e,{componentClass:i}=t;return!(n===i||n?.render&&i?.render&&n.render===i.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 n=this.getOrCreateFilterUi(t);return n?new Promise(i=>{n.then(o=>{i(Xs(o))})}):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:n})=>{this.setModelForColumn(e,t).then(()=>n())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:i,model:o}=this,r=e.getColId(),s=i.get(r);return s?s.model??null:mn(o,r)}const n=this.cachedFilter(e);return n?this.getModelFromFilterWrapper(n):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let n=()=>{};const i=new Promise(o=>{n=o});return this.columnModelUpdates.push({key:e,model:t,resolve:n}),i}return new Promise(n=>{this.setModelForColumnLegacy(e,t).then(i=>n(i))})}getStateForColumn(e){return this.state.get(e)??{model:mn(this.model,e)}}setModelForColumnLegacy(e,t){const n=this.beans.colModel.getColDefCol(e),i=n?this.getOrCreateFilterWrapper(n,!0):null;return i?this.setModelOnFilterWrapper(i,t):_t.resolve()}setColDefPropsForDataType(e,t,n){const i=e.filter,o=i===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):i;if(typeof o!="string")return;let r,s;const a=this.beans,{filterParams:l,filterValueGetter:u}=e;o==="agMultiColumnFilter"?{filterParams:r,filterValueGetter:s}=a.multiFilter?.getParamsForDataType(l,u,t,n)??{}:{filterParams:r,filterValueGetter:s}=Z6(o,l,u,t,n,a,this.getLocaleTextFunc()),e.filterParams=r,s&&(e.filterValueGetter=s)}setColFilterActive(e,t,n,i){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",n)),e.dispatchColEvent("filterChanged",n,i)}setModelOnFilterWrapper(e,t,n){return new _t(i=>{if(e.isHandler){const r=e.column,s=r.getColId(),a=this.model[s];if(this.updateStoredModel(s,t),n&&t===a){i();return}this.refreshHandlerAndUi(r,t,"api").then(()=>i());return}const o=ns(e);if(o){o.then(r=>{if(typeof r?.setModel!="function"){le(65),i();return}(r.setModel(t)||_t.resolve()).then(()=>i())});return}i()})}updateStoredModel(e,t){Pe(t)?this.model[e]=t:delete this.model[e];const n=this.state.get(e),i={model:t,state:n?.state};this.state.set(e,i)}filterModified(e,t){this.getOrCreateFilterUi(e)?.then(n=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:n,...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,n){const i=e.getColId(),o=this.cachedFilter(e),r=()=>o?.filterUi;BF({action:t,filterParams:o?.filterUi?.filterParams,getFilterUi:r,getModel:()=>mn(this.model,i),getState:()=>this.state.get(i),updateState:s=>this.updateState(e,s),updateModel:s=>r()?.filterParams?.onModelChange(s,{...n,fromAction:t}),processModelToApply:o?.isHandler?o.handler.processModelToApply?.bind(o.handler):void 0})}updateAllModels(e,t){const n=[];this.allColumnFilters.forEach((i,o)=>{const r=this.beans.colModel.getColDefCol(o);r&&BF({action:e,filterParams:i.filterUi?.filterParams,getFilterUi:()=>i.filterUi,getModel:()=>mn(this.model,o),getState:()=>this.state.get(o),updateState:s=>this.updateState(r,s),updateModel:s=>{this.updateStoredModel(o,s),this.dispatchLocalEvent({type:"filterAction",column:r,action:e}),n.push(this.refreshHandlerAndUi(r,s,"ui"))},processModelToApply:i?.isHandler?i.handler.processModelToApply?.bind(i.handler):void 0})}),n.length&&_t.all(n).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();NF(()=>this.cachedFilter(e)?.filterUi,()=>mn(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:n}=this;for(const o of n)if(o.source==="COLUMN_MENU")return!1;let i=!1;for(const o of e.keys()){const r=e.get(o);if(r.valid===!1)return!1;(r.model??null)!==mn(t,o)&&(i=!0)}return i}hasUnappliedModel(e){const{model:t,state:n}=this;return(n.get(e)?.model??null)!==mn(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;const n=this.beans.filterPanelSvc;return n?.isActive?!!n.getState(e.getColId()):!1}onPivotModeChanged(e){const{colModel:t,pivotColsSvc:n}=this.beans,i=!!Bd(this.gos),o=e.currentValue,r=o?this.activeColumnFilters:this.activeAggregateFilters,s=o?this.activeAggregateFilters:this.activeColumnFilters,a=[];for(const l of r){const u=t.getColById(l.colId),h=o&&!!n?.columns.length;u&&o===UF(u,o,h,i)&&(s.push(l),a.push(l))}oL(r,a)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function o8(e){return!!e.filterManager?.isAnyFilterPresent()}function r8(e,t="api"){e.filterManager?.onFilterChanged({source:t})}var s8=class extends J{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:i})=>this.onAdvFilterEnabledChanged(i),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:n}=this;this.alwaysPassFilter=n.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=n.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,n="api"){this.isAdvFilterEnabled()||this.colFilter?.setState(e,t,n)}setFilterModel(e,t="api",n){if(this.isAdvFilterEnabled()){n||this.warnAdvFilters();return}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(){Bd(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:n,columns:i=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):_t.resolve()).then(()=>{const o={source:t,type:"filterChanged",columns:i};n&&Un(o,n),this.eventSvc.dispatchEvent(o),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!Bd(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)?!0:!(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)?!0:!(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()?!1:!!this.colFilter?.isFilterAllowed(e)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){if(this.beans.dataTypeSvc?.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}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()?!1:!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){le(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()}};function a8(e){return{tag:"div",cls:e}}var l8=class extends Pt{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super(a8(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){const n=this.buttons;if(this.buttons=e,n===e)return;const i=this.getGui();xn(i);let o;this.destroyListeners();const r=document.createDocumentFragment(),s=this.className,a=({type:u,label:h})=>{const f=y=>{this.dispatchLocalEvent({type:u,event:y})};["apply","clear","reset","cancel"].includes(u)||le(75);const g=u==="apply",v=un({tag:"button",attrs:{type:g&&t?"submit":"button"},ref:`${u}FilterButton`,cls:`ag-button ag-standard-button ${s}-button${g?" "+s+"-apply-button":""}`,children:h});this.activateTabIndex([v]),g&&(o=v);const w=y=>{y.key===K.ENTER&&(y.preventDefault(),f(y))},b=this.listeners;v.addEventListener("click",f),b.push(()=>v.removeEventListener("click",f)),v.addEventListener("keydown",w),b.push(()=>v.removeEventListener("keydown",w)),r.append(v)};for(const u of e)a(u);this.eApply=o;const l=this.validationTooltipFeature;o&&!l?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!o&&l&&(this.validationTooltipFeature=this.destroyBean(l)),i.append(r)}getApplyButton(){return this.eApply}updateValidity(e,t=null){const n=this.eApply;n&&(pc(n,!e),this.validationMessage=t,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(const e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},c8=class extends Pt{constructor(e,t,n,i,o,r){super(),this.column=e,this.wrapper=t,this.eventParent=n,this.updateModel=i,this.isGlobalButtons=o,this.enableGlobalButtonCheck=r,this.hidePopup=null,this.applyActive=!1}postConstruct(){const{comp:e,params:t}=this.wrapper,n=t,i=n.useForm,o=i?"form":"div";this.setTemplate({tag:o,cls:"ag-filter-wrapper"}),i&&this.addManagedElementListeners(this.getGui(),{submit:r=>{r?.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=n,this.resetButtonsPanel(n),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:r,params:s})=>{r===this.column&&this.resetButtonsPanel(s,this.params)},filterStateChanged:({column:r,state:s})=>{r===this.column&&this.eButtons?.updateValidity(s.valid!==!1)},filterAction:({column:r,action:s,event:a})=>{r===this.column&&this.afterAction(s,a)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:r})=>{if(r!==this.isGlobalButtons){this.isGlobalButtons=r;const s=this.params;this.resetButtonsPanel(s,s,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,n){const{buttons:i,readOnly:o}=t??{},{buttons:r,readOnly:s,useForm:a}=e;if(!n&&o===s&&uc(i,r))return;const l=r&&r.length>0&&!e.readOnly&&!this.isGlobalButtons;let u=this.eButtons;if(l){const h=r.map(f=>{const g=`${f}Filter`;return{type:f,label:to(this,g)}});if(this.applyActive=Zd(this.params),!u){u=this.createBean(new l8),this.appendChild(u.getGui());const f=this.column,g=m=>({event:v})=>{this.updateModel(f,m,{fromButtons:!0}),this.afterAction(m,v)};u?.addManagedListeners(u,{apply:g("apply"),clear:g("clear"),reset:g("reset"),cancel:g("cancel")}),this.eButtons=u}u.updateButtons(h,a)}else this.applyActive=!1,u&&(Ii(u.getGui()),this.eButtons=this.destroyBean(u))}close(e){const t=this.hidePopup;if(!t)return;const n=e,i=n?.key;let o;(i===K.ENTER||i===K.SPACE)&&(o={keyboardEvent:n}),t(o),this.hidePopup=null}afterAction(e,t){const{params:n,applyActive:i}=this,o=n?.closeOnApply;switch(e){case"apply":{t?.preventDefault(),o&&i&&this.close(t);break}case"reset":{o&&i&&this.close();break}case"cancel":{o&&this.close(t);break}}}handleKeyDown(e){!e.defaultPrevented&&e.key===K.ENTER&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},u8=":where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}",d8={tag:"div",cls:"ag-filter"},h8=class extends Pt{constructor(e,t,n){super(d8),this.column=e,this.source=t,this.enableGlobalButtonCheck=n,this.wrapper=null}postConstruct(){this.beans.colFilter?.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return this.wrapper!=null}getFilter(){return this.wrapper?.then(e=>e.comp)??null}afterInit(){return this.wrapper?.then(()=>{})??_t.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:n,beans:{colFilter:i}}=this,o=i.getFilterUiForDisplay(t)??null;this.wrapper=o,o?.then(r=>{if(!r)return;const{isHandler:s,comp:a}=r;let l;if(s){const u=!!this.enableGlobalButtonCheck,h=this.createBean(new c8(t,r,i,i.updateModel.bind(i),u&&i.isGlobalButtons,u));this.comp=h,l=h.getGui()}else this.registerCSS(u8),l=a.getGui(),Pe(l)||le(69,{guiFromFilter:l});this.appendChild(l),e?this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:n,eGui:this.getGui()}):a.afterGuiAttached?.(this.afterGuiAttachedParams)})}onFilterDestroyed(e){const{source:t,column:n}=e;(t==="api"||t==="paramsUpdated")&&n.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(xn(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()}},f8=class extends J{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,n,i){e&&!e.isColumn||this.showPopup(e,o=>{this.popupSvc?.positionPopupUnderMouseEvent({additionalParams:{column:e},type:n,mouseEvent:t,ePopup:o})},n,t.target,oi(this.gos),i)}showMenuAfterButtonClick(e,t,n,i){if(e&&!e.isColumn)return;let o=-1,r="left";const s=oi(this.gos);!s&&this.gos.get("enableRtl")&&(o=1,r="right");const a=s?void 0:4*o,l=s?void 0:4;this.showPopup(e,u=>{this.popupSvc?.positionPopupByComponent({type:n,eventSource:t,ePopup:u,nudgeX:a,nudgeY:l,alignSide:r,keepWithinBounds:!0,position:"under",additionalParams:{column:e}})},n,t,s,i)}showPopup(e,t,n,i,o,r){const s=e?this.createBean(new h8(e,"COLUMN_MENU")):void 0;if(this.activeMenu=s,!s?.hasFilter()||!e){mt(57);return}const a=un({tag:"div",cls:`ag-menu${o?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:w=>this.trapFocusWithin(w,a)}),a.appendChild(s?.getGui());let l;const u=()=>s?.afterGuiDetached(),h=EO(this.gos)?i??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,f=w=>{HF(e,!1,"contextMenu");const b=w instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),b&&i&&Mi(i)&&K0(i)?.focus({preventScroll:!0}),u(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,n,e),r?.()},g=this.getLocaleTextFunc(),m=o&&n!=="columnFilter"?g("ariaLabelColumnMenu","Column Menu"):g("ariaLabelColumnFilter","Column Filter"),v=this.popupSvc?.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:f,positionCallback:()=>t(a),anchorToElement:h,ariaLabel:m});v&&(this.hidePopup=l=v.hideFunc),s.afterInit().then(()=>{t(a),s.afterGuiAttached({container:n,hidePopup:l})}),HF(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,n,e)}trapFocusWithin(e,t){e.key!==K.TAB||e.defaultPrevented||js(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),$s(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,n){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:n??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},g8=class extends J{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,n){if(!t)return;const i=e.getColDef(),{selectableFilter:o,valueSvc:r,formula:s}=this.beans,a=n??o?.getFilterValueGetter(e.getColId())??i.filterValueGetter;if(a)return this.executeFilterValueGetter(a,t.data,e,t,i);const l=r.getValue(e,t,"data");return e.isAllowFormula()&&s?.isFormula(l)?s.resolveValue(e,t):l}executeFilterValueGetter(e,t,n,i,o){const{expressionSvc:r,valueSvc:s}=this.beans,a=Ue(this.gos,{data:t,node:i,column:n,colDef:o,getValue:s.getValueCallback.bind(s,i)});return typeof e=="function"?e(a):r?.evaluate(e,a)}},p8={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},m8=class extends Pt{constructor(){super(p8,[Th]),this.eFloatingFilterText=ge}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 n=e,i=n.getHandler();if(i.getModelAsString){const o=i.getModelAsString(n.model);this.eFloatingFilterText.setValue(o)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const n=t.getModelAsString(e);this.eFloatingFilterText.setValue(n)}})}refresh(e){this.init(e)}},v8=class extends Mm{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)}},Cv=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){const n=e.filterOptions??t;this.filterOptions!==n&&(this.filterOptions=n,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){const{filterOptions:e}=this;if(e)for(const t of e){if(typeof t=="string")continue;const n=[["displayKey"],["displayName"],["predicate","test"]],i=o=>o.some(r=>t[r]!=null)?!0:(le(72,{keys:o}),!1);if(!n.every(i)){this.filterOptions=e.filter(o=>o===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}getDefaultItem(e){const{filterOptions:t}=this;if(e)return e;if(t.length>=1){const n=t[0];if(typeof n=="string")return n;if(n.displayKey)return n.displayKey;le(73)}else le(74)}getCustomOption(e){return this.customFilterOptions[e]}};function zc(e,t,n){return n==null?e.splice(t):e.splice(t,n)}function Mh(e){return e==null||typeof e=="string"&&e.trim().length===0}function C8(e){return e==="AND"||e==="OR"?e:"AND"}function w8(e,t,n){if(e==null)return;const{predicate:i}=e;if(i!=null&&!t.some(o=>o==null))return i(t,n)}function b8(e,t){let n=e.length;return n>t&&(e.splice(t),le(78),n=t),n}var y8=new Set(["empty","notBlank","blank","today","yesterday","tomorrow","thisWeek","lastWeek","nextWeek","thisMonth","lastMonth","nextMonth","thisQuarter","lastQuarter","nextQuarter","thisYear","lastYear","nextYear","yearToDate","last7Days","last30Days","last90Days","last6Months","last12Months","last24Months"]);function is(e,t){const n=t.getCustomOption(e);if(n){const{numberOfInputs:i}=n;return i??1}return e&&y8.has(e)?0:e==="inRange"?2:1}var kh=class extends q_{constructor(e,t,n){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=n,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 Cv;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=C8(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions(),ii(this.getGui(),"tabindex",this.isReadOnly()?"-1":null)}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,n)=>{const i=n===0?e:this.optionsFactory.defaultOption;t.setValue(i,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?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 e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){const n=!e.operator,i=!t.operator;if(!n&&i||n&&!i)return!1;let r;if(n){const s=e,a=t;r=this.areSimpleModelsEqual(s,a)}else{const s=e,a=t;r=s.operator===a.operator&&Or(s.conditions,a.conditions,(l,u)=>this.areSimpleModelsEqual(l,u))}return r}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),_t.resolve();if(e.operator){const i=e;let o=i.conditions;o==null&&(o=[],le(77));const r=b8(o,this.maxNumConditions),s=this.getNumConditions();if(r<s)this.removeConditionsAndOperators(r);else if(r>s)for(let l=s;l<r;l++)this.createJoinOperatorPanel(),this.createOption();const a=i.operator==="OR";this.eJoinAnds.forEach(l=>l.setValue(!a,!0)),this.eJoinOrs.forEach(l=>l.setValue(a,!0)),o.forEach((l,u)=>{this.eTypes[u].setValue(l.type,!0),this.setConditionIntoUi(l,u)})}else{const i=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(i.type,!0),this.setConditionIntoUi(i,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),_t.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(le(79),t=1),this.maxNumConditions=t;let n=e.numAlwaysVisibleConditions??1;n<1&&(le(80),n=1),n>t&&(le(81),n=t),this.numAlwaysVisibleConditions=n}createOption(){const e=this.getGui(),t=this.createManagedBean(new hv);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const n=this.createEValue();this.eConditionBodies.push(n),e.appendChild(n),this.putOptionsIntoDropdown(t),this.resetType(t);const i=this.getNumConditions()-1;this.forEachPositionInput(i,o=>this.resetInput(o)),this.addChangedListeners(t,i)}createJoinOperatorPanel(){const e=un({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),n=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const i=this.eJoinPanels.length-1,o=this.joinOperatorId++;this.resetJoinOperatorAnd(t,i,o),this.resetJoinOperatorOr(n,i,o),this.isReadOnly()||(t.onValueChange(this.listener),n.onValueChange(this.listener))}createJoinOperator(e,t,n){const i=this.createManagedBean(new v8);e.push(i);const o="ag-filter-condition-operator";return i.addCss(o),i.addCss(`${o}-${n}`),t.appendChild(i.getGui()),i}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const n of t)e.addOption(n);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,n=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:n?this.getLocaleTextFunc()(n.displayKey,n.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 n=0;n<this.getNumConditions();n++)this.isConditionUiComplete(n)?e=n:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const n=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<n){this.removeConditionsAndOperators(n+1);const i=e+1,o=n-i;o>0&&this.removeConditionsAndOperators(i,o),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((i,o)=>{const r=this.isConditionDisabled(o,e);i.setDisabled(r||this.filterListOptions.length<=1),o===1&&(pc(this.eJoinPanels[0],r),this.eJoinAnds[0].setDisabled(r),this.eJoinOrs[0].setDisabled(r))}),this.eConditionBodies.forEach((i,o)=>{Ft(i,this.isConditionBodyVisible(o))});const n=(t??this.getJoinOperator())==="OR";for(const i of this.eJoinAnds)i.setValue(!n,!0);for(const i of this.eJoinOrs)i.setValue(n,!0);this.forEachInput((i,o,r,s)=>{this.setElementDisplayed(i,o<s),this.setElementDisabled(i,this.isConditionDisabled(r,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:n,eConditionBodies:i,eJoinPanels:o,eJoinAnds:r,eJoinOrs:s}=this;this.removeComponents(n,e,t),this.removeElements(i,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(o,a,t),this.removeComponents(r,a,t),this.removeComponents(s,a,t)}removeElements(e,t,n){const i=zc(e,t,n);for(const o of i)Ii(o)}removeComponents(e,t,n){const i=zc(e,t,n);for(const o of i)Ii(o.getGui()),this.destroyBean(o)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let t;if(!this.isReadOnly()){const n=this.getInputs(0)[0];n instanceof Ys&&this.isConditionBodyVisible(0)?t=n.getInputElement():t=this.eTypes[0]?.getFocusableElement()}(t??this.getGui()).focus({preventScroll:!0})}}shouldKeepInvalidInputState(){return!1}afterGuiDetached(){super.afterGuiDetached();const e=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(e.column)||this.shouldKeepInvalidInputState())return;e.onStateChange({model:e.model});let t=-1,n=-1,i=!1;const o=this.getJoinOperator();for(let s=this.getNumConditions()-1;s>=0;s--)if(this.isConditionUiComplete(s))t===-1&&(t=s,n=s);else{const a=s>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(s-1),l=s<t;(a||l)&&(this.removeConditionsAndOperators(s,1),i=!0,l&&n--)}let r=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),r=!0),this.shouldAddNewConditionAtEnd(n===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),r=!0),r&&this.updateConditionStatusesAndValues(n,o),i&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=n}getModelAsString(e){return this.params.getHandler()?.getModelAsString?.(e)??""}resetPlaceholder(){const e=this.getLocaleTextFunc(),{filterPlaceholder:t,eTypes:n}=this;this.forEachInput((i,o,r,s)=>{if(!(i instanceof Ys))return;const a=o===0&&s>1?"inRangeStart":o===0?"filterOoo":"inRangeEnd",l=o===0&&s>1?e("ariaFilterFromValue","Filter from value"):o===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value"),u=n[r].getValue(),h=Z0(this,t,a,u);i.setInputPlaceholder(h),i.setInputAriaLabel(l)})}setElementValue(e,t,n){e instanceof Ys&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){G0(e)&&Ft(e.getGui(),t)}setElementDisabled(e,t){G0(e)&&pc(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Ys&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,n)=>{this.forEachPositionTypeInput(n,t,e)})}forEachPositionInput(e,t){const n=this.getConditionType(e);this.forEachPositionTypeInput(e,n,t)}forEachPositionTypeInput(e,t,n){const i=is(t,this.optionsFactory),o=this.getInputs(e);for(let r=0;r<o.length;r++){const s=o[r];s!=null&&n(s,r,e,i)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return is(t,this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(n=>n==null)||this.positionHasInvalidInputs(e))}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,n)=>this.resetJoinOperatorAnd(t,n,this.joinOperatorId+n)),this.eJoinOrs.forEach((t,n)=>this.resetJoinOperatorOr(t,n,this.joinOperatorId+n)),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 n=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(n).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,n){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),n)}resetJoinOperatorOr(e,t,n){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),n)}resetJoinOperator(e,t,n,i,o){this.updateJoinOperatorDisabled(e.setValue(n,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${o}`).setLabel(i),t)}updateJoinOperatorsDisabled(){const e=(t,n)=>this.updateJoinOperatorDisabled(t,n);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 n=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((i,o,r)=>{r===t&&this.setElementValue(i,n[o]!=null?n[o]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,n,i)=>{this.setElementValue(t,n===0&&i===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,n=>{this.attachElementOnChange(n,this.listener)}))}hasInvalidInputs(){return!1}positionHasInvalidInputs(e){return!1}isReadOnly(){return!!this.params.readOnly}},wv=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function bv(e){return e?.allowedCharPattern??null}function $F(e,t){const{filter:n,filterTo:i,type:o}=e||{};return[si(n),si(i)].slice(0,is(o,t))}var S8=class extends kh{constructor(){super("bigintFilter",$F,wv),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="bigint",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Xa()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){const t=this.eValuesFrom[e],n=this.eValuesTo[e];this.refreshInputPairValidation(t,n)}}refreshInputPairValidation(e,t,n=!1){const{bigintParser:i}=this.params,o=this.getParsedValue(e,i),r=this.getParsedValue(t,i),s=this.isInvalidValue(e,o),a=this.isInvalidValue(t,r),l=n?e:t,u=n?t:e,h=n?s:a,f=n?a:s;let g="";if(h)g=this.getLocaleTextFunc()("invalidBigInt","Invalid BigInt");else if(!s&&!a){const m=R8(o,r,n);m&&(g=this.translate(m,[String(n?t.getValue():e.getValue())]))}l.setCustomValidity(g),f||u.setCustomValidity(""),g.length>0&&this.beans.ariaAnnounce.announceValue(g,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:n,additionalEventAttributes:i}=e,o=this.state,r=i?.fromAction;return(r&&r!="apply"||n.model!==o.model||!this.areStatesEqual(n.state,o.state))&&this.refreshInputValidation(),t}setElementValue(e,t,n){super.setElementValue(e,t,n),t===null&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:n}=this,i=bv(e),o=un({tag:"div",cls:"ag-filter-body",role:"presentation"}),r=this.createFromToElement(o,t,"from",i),s=this.createFromToElement(o,n,"to",i),a=(h,f,g)=>()=>this.refreshInputPairValidation(h,f,g),l=a(r,s,!0);r.onValueChange(l),r.addGuiEventListener("focusin",l);const u=a(r,s,!1);return s.onValueChange(u),s.addGuiEventListener("focusin",u),o}createFromToElement(e,t,n,i){const o=this.createManagedBean(i?new ur({allowedCharPattern:i}):new ur);return o.addCss(`ag-filter-${n}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui()),o}removeEValues(e,t){const n=i=>this.removeComponents(i,e,t);n(this.eValuesFrom),n(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(n,i,o,r)=>{i<r&&t.push(si(n.getValue()??null))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(n.filter=String(i[0])),i.length>1&&(n.filterTo=String(i[1])),n}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,n=>t||(t=!n.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}getParsedValue(e,t){const n=e.getValue();return n==null||typeof n=="string"&&n.trim()===""?null:t?t(n):si(n)}isInvalidValue(e,t){const n=e.getValue();return n!=null&&String(n).trim()!==""&&t===null}};function R8(e,t,n){return e!=null&&t!=null&&e>=t?`strict${n?"Max":"Min"}ValueValidation`:null}var jF=class extends J{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,n=new Cv;this.optionsFactory=n,n.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(n,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if(e.source==="colDef"){const t=e.filterParams,n=this.optionsFactory;n.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:n,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(t==null)return!0;const{operator:n}=t,i=[];if(n){const s=t;i.push(...s.conditions??[])}else i.push(t);const o=n&&n==="OR"?"some":"every",r=this.params.getValue(e.node);return i[o](s=>this.individualConditionPasses(e,s,r))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:n,maxNumConditions:i}}=e;if(t==null)return;let r=B0(t)?t.conditions:[t];const s=n?.map(h=>typeof h=="string"?h:h.displayKey)??this.defaultOptions;if(!(!r||r.every(h=>s.find(f=>f===h.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let l=!1;const u=this.filterType;if((r&&!r.every(h=>h.filterType===u)||t.filterType!==u)&&(r=r.map(h=>({...h,filterType:u})),l=!0),typeof i=="number"&&r&&r.length>i&&(r=r.slice(0,i),l=!0),l){const h=r.length>1?{...t,filterType:u,conditions:r}:{...r[0],filterType:u};this.params={...e,model:h},e.onModelChange(h)}}individualConditionPasses(e,t,n){const i=this.optionsFactory,o=this.mapValuesFromModel(t,i),r=i.getCustomOption(t.type),s=w8(r,o,n);return s??(n==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(o,n,t,e))}},yv=class extends jF{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:n,includeBlanksInGreaterThan:i,includeBlanksInLessThan:o,includeBlanksInRange:r}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(n)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(i)return!0;break;case"lessThan":case"lessThanOrEqual":if(o)return!0;break;case"inRange":if(r)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,n){const i=n.type;if(!this.isValid(t))return i==="notEqual"||i==="notBlank";const o=this.comparator(),r=e[0]!=null?o(e[0],t):0;switch(i){case"equals":return r===0;case"notEqual":return r!==0;case"greaterThan":return r>0;case"greaterThanOrEqual":return r>=0;case"lessThan":return r<0;case"lessThanOrEqual":return r<=0;case"inRange":{const s=o(e[1],t);return this.params.filterParams.inRangeInclusive?r>=0&&s<=0:r>0&&s<0}case"blank":return Mh(t);case"notBlank":return!Mh(t);default:return le(76,{filterModelType:i}),!0}}},Sv={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},x8={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},Lh=class extends J{constructor(e,t,n){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=n}getModelAsString(e,t){const n=this.getLocaleTextFunc(),i=t==="filterToolPanel";if(!e)return i?to(this,"filterSummaryInactive"):null;if(e.operator!=null){const r=e,a=(r.conditions??[]).map(u=>this.getModelAsString(u,t)),l=r.operator==="AND"?"andCondition":"orCondition";return a.join(` ${to(this,l)} `)}else{if(e.type==="blank"||e.type==="notBlank")return i?to(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):n(e.type,e.type);{const r=e,s=this.optionsFactory.getCustomOption(r.type),{displayKey:a,displayName:l,numberOfInputs:u}=s||{};return a&&l&&u===0?n(a,l):this.conditionToString(r,i,r.type==="inRange"||u===2,a,l)}}}updateParams(e){const{optionsFactory:t,filterParams:n}=e;this.optionsFactory=t,this.filterParams=n}conditionForToolPanel(e,t,n,i,o,r){let s;const a=this.getTypeKey(e);return a&&(s=to(this,a)),o&&r&&(s=this.getLocaleTextFunc()(o,r)),s!=null?t?`${s} ${to(this,"filterSummaryInRangeValues",[n(),i()])}`:`${s} ${n()}`: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)}},KF=class extends Lh{constructor(e,t){super(e,t,t.bigintFormatter),this.filterTypeKeys=Sv}conditionToString(e,t,n,i,o){const{filter:r,filterTo:s,type:a}=e,l=this.formatValue.bind(this),u=si(r),h=si(s);if(t){const f=this.conditionForToolPanel(a,n,()=>l(u),()=>l(h),i,o);if(f!=null)return f}return n?`${l(u)}-${l(h)}`:r!=null?l(u):`${a}`}},F8=class extends yv{constructor(){super($F,wv),this.filterType="bigint",this.FilterModelFormatterClass=KF}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return si(e)!==null}},Rv=class extends J{constructor(e){super(),this.params=e,this.eInput=ge,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new ur(this.params?.config));const t=this.eInput.getGui();e.appendChild(t);const n=i=>this.onValueChanged(i);this.addManagedListeners(t,{input:n,keydown:n})}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,placeholder:n}){const{eInput:i}=this;i.setInputAriaLabel(e),t!==void 0&&i.setAutoComplete(t),i.toggleCss("ag-floating-filter-search-icon",!!n),i.setInputPlaceholder(n)}};function xv(e){const t=e?.trim();return t===""?e:t}function qF(e,t){const{filter:n,filterTo:i,type:o}=e||{};return[n||null,i||null].slice(0,is(o,t))}var QF=class extends Pt{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}const t=e.operator;let n;t?n=e.conditions[0]:n=e,this.lastType=n.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const n=e;return this.isTypeEditable(n.type)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){const n=e;this.onModelUpdated(n.model)}}setParams(e){const t=new Cv;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 n=this.optionsFactory.defaultOption;t||(this.lastType=n),this.readOnly=!!e.filterParams.readOnly;const i=this.isTypeEditable(n);this.setEditable(i)}refresh(e){this.params=e;const t=e,n=this.reactive;if((!n||t.source==="colDef")&&this.updateParams(e),n){const{source:i,model:o}=t;if(i==="dataChanged"||i==="ui")return;this.onModelUpdated(o)}}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)}isTypeEditable(e){return!!e&&!this.readOnly&&is(e,this.optionsFactory)===1}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},P8={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},Fv=class extends QF{constructor(){super(...arguments),this.eFloatingFilterInputContainer=ge,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(P8)}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{inputSvc:t,defaultDebounceMs:n,readOnly:i}=this,{filterPlaceholder:o,column:r,browserAutoComplete:s,filterParams:a}=e,l=this.lastType??this.optionsFactory.defaultOption,u=e.filterParams.filterPlaceholder,h=o===!0?Z0(this,u,"filterOoo",l):o||void 0;if(t.setParams({ariaLabel:this.getAriaLabel(r),autoComplete:s??!1,placeholder:h}),this.applyActive=Zd(a),!i){const f=Zp(a,n);t.setValueChangedListener(gn(this,this.syncUpWithParentFilter.bind(this),f))}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,n=t.getValue();xn(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(n,!0)}syncUpWithParentFilter(e){const t=e.key===K.ENTER,n=this.reactive;if(n&&this.params.onUiChange(),this.applyActive&&!t)return;const{inputSvc:i,params:o,lastType:r}=this;let s=i.getValue();if(o.filterParams.trimInput&&(s=xv(s),i.setValue(s,!0)),n){const a=o,l=a.model,u=this.convertValue(s),h=u==null?null:{...l??{filterType:this.filterType,type:r??this.optionsFactory.defaultOption},filter:u};a.onModelChange(h,{afterFloatingFilter:!0})}else o.parentFilterInstance(a=>{a?.onFloatingFilterChanged(r||null,s||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},E8=class extends Fv{constructor(){super(...arguments),this.FilterModelFormatterClass=KF,this.filterType="bigint",this.defaultOptions=wv}updateParams(e){const t=e.filterParams;bv(t)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),this.bigintParser=t?.bigintParser,super.updateParams(e)}createFloatingFilterInputService(e){const t=e.filterParams;this.allowedCharPattern=bv(t),this.bigintParser=t?.bigintParser;const n=this.allowedCharPattern?{allowedCharPattern:this.allowedCharPattern}:void 0;return this.createManagedBean(new Rv({config:n}))}convertValue(e){return e==null||e===""?null:this.bigintParser?this.bigintParser(e):si(e)}},YF=".ag-input-field-input",ZF=class{constructor(e,t,n,i,o,r){this.context=e,this.eParent=o,this.alive=!0,this.debouncedReport=gn({isAlive:()=>this.alive},JF,500),this.timeoutHandle=null,L_(t,n,i)?.newAgStackInstance().then(a=>{if(!this.alive){e.destroyBean(a);return}if(this.dateComp=a,!a)return;o.appendChild(a.getGui()),a?.afterGuiAttached?.();const{tempValue:l,disabled:u}=this;l&&a.setDate(l),u!=null&&a.setDisabled?.(u),r?.(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){Ft(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)}setCustomValidity(e,t=!1){const n=this.dateComp?.getGui().querySelector(YF);if(n&&"setCustomValidity"in n){const i=e.length>0;n.setCustomValidity(e),i?t?this.timeoutHandle=this.debouncedReport(n):JF(n):this.timeoutHandle&&window.clearTimeout(this.timeoutHandle),mp(n,i)}}getValidity(){return this.dateComp?.getGui().querySelector(YF)?.validity}};function JF(e){e.reportValidity()}var Pv=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function XF(e,t){const{dateFrom:n,dateTo:i,type:o}=e||{};return[n&&Kn(n,void 0,!0)||null,i&&Kn(i,void 0,!0)||null].slice(0,is(o,t))}var e1=1e3,t1=1/0,D8=class extends kh{constructor(){super("dateFilter",XF,Pv),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=e1,this.maxValidYear=t1,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Xa()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(l,u)=>{const h=e[l];if(h!=null)if(isNaN(h))le(82,{param:l});else return h==null?u:Number(h);return u},n=t("minValidYear",e1),i=t("maxValidYear",t1);this.minValidYear=n,this.maxValidYear=i,n>i&&le(83);const{minValidDate:o,maxValidDate:r}=e,s=o instanceof Date?o:Kn(o);this.minValidDate=s;const a=r instanceof Date?r:Kn(r);this.maxValidDate=a,s&&a&&s>a&&le(84)}refreshInputValidation(){for(let e=0;e<this.dateConditionFromComps.length;e++)this.refreshInputPairValidation(e,!1,!0)}refreshInputPairValidation(e,t=!1,n=!1){const{dateConditionFromComps:i,dateConditionToComps:o,beans:r}=this,s=i[e],a=o[e],l=is(this.getConditionType(e),this.optionsFactory),u=s.getDate(),h=a.getDate(),f=l>=2?T8(u,h,t):null,g=f?this.translate(f,[String(t?h:u)]):"",m=!Xa()&&!n;(t?s:a).setCustomValidity(g,m),(t?a:s).setCustomValidity("",m),g.length>0&&r.ariaAnnounce.announceValue(g,"dateFilter")}createDateCompWrapper(e,t,n){const{beans:{userCompFactory:i,context:o,gos:r},params:s}=this,a=n==="from",l=new ZF(o,i,s.colDef,Ue(r,{onDateChanged:()=>{this.refreshInputPairValidation(t,a),this.onUiChanged()},onFocusIn:()=>this.refreshInputPairValidation(t,a),filterParams:s,location:"filter"}),e);return this.addDestroyFunc(()=>l.destroy()),l}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}setElementValue(e,t){e.setDate(t),t||e.setCustomValidity("")}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=un({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,n,i){const o=un({tag:"div",cls:`ag-filter-${i} ag-filter-date-${i}`});t.push(o),e.appendChild(o),n.push(this.createDateCompWrapper(o,t.length-1,i))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),zc(this.eConditionPanelsFrom,e,t),zc(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,n){const i=zc(e,t,n);for(const o of i)o.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:n,minValidYear:i,maxValidYear:o}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<i)return!1;if(n){if(e>n)return!1}else if(e.getUTCFullYear()>o)return!1;return!0}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=t.getDate()!=null&&!(t.getValidity()?.valid??!0))),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,n=>t||(t=!(n.getValidity()?.valid??!0))),t}canApply(e){return!this.hasInvalidInputs()}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachPositionInput(e,(n,i,o,r)=>{!t||i>=r||t&&(t=this.isValidDateValue(n.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),n={},{params:i,filterType:o}=this,r=this.getValues(e),s=i.useIsoSeparator?"T":" ";return r.length>0&&(n.dateFrom=jn(r[0],!0,s)),r.length>1&&(n.dateTo=jn(r[1],!0,s)),{dateFrom:null,dateTo:null,filterType:o,type:t,...n}}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),n=e("ariaFilterValue","Filter Value");this.forEachInput(i=>{i.setInputPlaceholder(t),i.setInputAriaLabel(n)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(n,i,o,r)=>{i<r&&t.push(n.getDate())}),t}translate(e,t){let n=e;return e==="lessThan"?n="before":e==="greaterThan"&&(n="after"),super.translate(n,t)}};function T8(e,t,n){return e!=null&&t!=null&&e>=t?`${n?"max":"min"}DateValidation`:null}var n1=class extends Lh{constructor(e,t){super(e,t,n=>{const{dataTypeSvc:i,valueSvc:o}=this.beans,r=t.column,s=i?.getDateFormatterFunction(r),a=s?s(n??void 0):n;return o.formatValue(r,null,a)}),this.filterTypeKeys=Sv}conditionToString(e,t,n,i,o){const{type:r}=e,s=Kn(e.dateFrom),a=Kn(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,u=t?this.formatValue.bind(this):g=>uG(g,l),h=()=>s!==null?u(s):"null",f=()=>a!==null?u(a):"null";if(s==null&&a==null)return to(this,r);if(t){const g=this.conditionForToolPanel(r,n,h,f,i,o);if(g!=null)return g}return n?`${h()}-${f()}`:s!=null?u(s):`${r}`}};function A8(e,t){const n=t;return n<e?-1:n>e?1:0}var I8=class extends yv{constructor(){super(XF,Pv),this.filterType="date",this.FilterModelFormatterClass=n1,this.filterTypeToRangeCache=new Map}getOrRefreshRangeCacheItem(e,t){const{filterTypeToRangeCache:n}=this,i=Date.now();let o=n.get(e);if(o&&o.expires<i&&(o=void 0),!o){const[r,s]=t(new Date(i),new Date(i));o={from:r,to:s,expires:Bi(new Date(i)).getTime()-i},n.set(e,o)}return o}comparator(){return this.params.filterParams.comparator??A8}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}evaluateNonNullValue(e,t,n){const i=n.type,o=this.comparator();if(!this.isValid(t))return i==="notEqual"||i==="notBlank";const r=i,s=Z8[r];if(s){const{from:a,to:l}=this.getOrRefreshRangeCacheItem(r,s);return o(a,t)>=0&&o(l,t)<0}return super.evaluateNonNullValue(e,t,n)}},M8=1,Oh=null,k8=()=>{if(Oh!=null)return Oh;let e;const t=typeof navigator>"u"?void 0:navigator.languages?.[0]??navigator.language;if(t&&typeof Intl<"u"&&typeof Intl.Locale=="function")try{e=new Intl.Locale(t).getWeekInfo?.()?.firstDay}catch{e=void 0}return Oh=e==null?M8:e%7,Oh},mi=e=>(e.setHours(0,0,0,0),e),_h=e=>{const t=e.getDay(),n=k8(),i=(t-n+7)%7;return e.setDate(e.getDate()-i),mi(e)},Nh=(e,t=1)=>(e.setDate(e.getDate()-t),e),Bi=e=>(e.setDate(e.getDate()+1),mi(e)),i1=e=>(_h(e),e.setDate(e.getDate()+6),Bi(e)),Bh=e=>(e.setDate(1),mi(e)),Ev=e=>(e.setDate(1),e.setMonth(e.getMonth()+1),mi(e)),Dv=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3),Bh(e)},o1=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3+2),Ev(e)},Tv=e=>(e.setMonth(0,1),mi(e)),r1=e=>(e.setMonth(12,0),Bi(e)),hl=e=>Nh(e),Av=e=>hl(_h(e)),Iv=e=>hl(Bh(e)),Mv=e=>hl(Dv(e)),kv=(e,t)=>[mi(e),Bi(t)],L8=(e,t)=>kv(hl(e),hl(t)),Lv=(e,t)=>[_h(e),i1(t)],O8=(e,t)=>Lv(Av(e),Av(t)),Ov=(e,t)=>[Bh(e),Ev(t)],_8=(e,t)=>Ov(Iv(e),Iv(t)),_v=(e,t)=>[Dv(e),o1(t)],N8=(e,t)=>_v(Mv(e),Mv(t)),Nv=(e,t)=>[Tv(e),r1(t)],B8=(e,t)=>[Tv(e),Bi(t)],H8=(e,t)=>[mi(Nh(e,7)),Bi(t)],G8=(e,t)=>[mi(Nh(e,30)),Bi(t)],V8=(e,t)=>[mi(Nh(e,90)),Bi(t)],W8=(e,t)=>(e.setFullYear(e.getFullYear()-1),e.setMonth(e.getMonth()+6),[mi(e),Bi(t)]),z8=(e,t)=>(e.setFullYear(e.getFullYear()-1),[mi(e),Bi(t)]),U8=(e,t)=>(e.setFullYear(e.getFullYear()-2),[mi(e),Bi(t)]),$8=(e,t)=>(e.setFullYear(e.getFullYear()-1),t.setFullYear(t.getFullYear()-1),Nv(e,t)),j8=(e,t)=>(e.setFullYear(e.getFullYear()+1),t.setFullYear(t.getFullYear()+1),Nv(e,t)),K8=(e,t)=>(e.setMonth(e.getMonth()+3),t.setMonth(t.getMonth()+3),_v(e,t)),q8=(e,t)=>(e.setMonth(e.getMonth()+1),t.setMonth(t.getMonth()+1),Ov(e,t)),Q8=(e,t)=>(e.setDate(e.getDate()+7),t.setDate(t.getDate()+7),Lv(e,t)),Y8=(e,t)=>(e.setDate(e.getDate()+1),t.setDate(t.getDate()+1),kv(e,t)),Z8={today:kv,yesterday:L8,tomorrow:Y8,thisWeek:Lv,lastWeek:O8,nextWeek:Q8,thisMonth:Ov,lastMonth:_8,nextMonth:q8,thisQuarter:_v,lastQuarter:N8,nextQuarter:K8,thisYear:Nv,lastYear:$8,nextYear:j8,yearToDate:B8,last7Days:H8,last30Days:G8,last90Days:V8,last6Months:W8,last12Months:z8,last24Months:U8,setStartOfDay:mi,setStartOfWeek:_h,setStartOfNextDay:Bi,setStartOfNextWeek:i1,setStartOfMonth:Bh,setStartOfNextMonth:Ev,setStartOfQuarter:Dv,setStartOfNextQuarter:o1,setStartOfYear:Tv,setStartOfNextYear:r1,setPreviousDay:hl,setPreviousWeek:Av,setPreviousMonth:Iv,setPreviousQuarter:Mv},J8={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"}]},X8=class extends QF{constructor(){super(J8,[Th]),this.eReadOnlyText=ge,this.eDateWrapper=ge,this.FilterModelFormatterClass=n1,this.filterType="date",this.defaultOptions=Pv}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 n=e?Kn(e.dateFrom):null;this.dateComp.setDate(n),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){Ft(this.eDateWrapper,e),Ft(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 n=t.model,i=jn(e),o=i==null?null:{...n??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:i};t.onModelChange(o,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t?.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=Zp(e,this.defaultDebounceMs);return Ue(this.gos,{onDateChanged:gn(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:n,params:{column:i}}=this;this.dateComp=new ZF(e,t,i.getColDef(),this.getDateComponentParams(),n,o=>{o.setInputAriaLabel(this.getAriaLabel(i))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},e7={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},t7=class extends Pt{constructor(){super(e7,[Th]),this.eDateInput=ge,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),focusin:this.handleFocusIn.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}handleFocusIn(){this.params.onFocusIn?.()}setParams(e){const t=this.eDateInput.getInputElement(),n=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=n&&$r();const{minValidYear:i,maxValidYear:o,minValidDate:r,maxValidDate:s,buttons:a,includeTime:l,colDef:u}=e.filterParams||{},h=this.beans.dataTypeSvc,f=l??h?.getDateIncludesTimeFlag?.(u.cellDataType)??!1;n?f?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text";const g=s1(r,i,!0),m=s1(s,o,!1);g&&m&&g.getTime()>m.getTime()&&le(87),g&&(t.min=jn(g,f)),m&&(t.max=jn(m,f)),this.isApply=e.location==="floatingFilter"&&!!a?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return Kn(this.eDateInput.getValue())}setDate(e){const t=this.params.filterParams.colDef.cellDataType,n=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(t)??!1;this.eDateInput.setValue(jn(e,n))}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}};function s1(e,t,n){return e&&t&&le(n?85:86),e instanceof Date?e:e?Kn(e):t?Kn(`${t}-${n?"01-01":"12-31"}`):null}var Bv=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function Hv(e){return e?.allowedCharPattern??null}function Hh(e){return e==null||isNaN(e)?null:e}function a1(e,t){const{filter:n,filterTo:i,type:o}=e||{};return[Hh(n),Hh(i)].slice(0,is(o,t))}var n7=class extends kh{constructor(){super("numberFilter",a1,Bv),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Xa()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){const t=this.eValuesFrom[e],n=this.eValuesTo[e];this.refreshInputPairValidation(t,n)}}refreshInputPairValidation(e,t,n=!1){const i=this.params.numberParser,o=c1(i,e),r=c1(i,t),s=i7(o,r,n),a=s?this.translate(s,[String(n?r:o)]):"";(n?e:t).setCustomValidity(a),(n?t:e).setCustomValidity(""),a.length>0&&this.beans.ariaAnnounce.announceValue(a,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:n,additionalEventAttributes:i}=e,o=this.state,r=i?.fromAction;return(r&&r!="apply"||n.model!==o.model||!this.areStatesEqual(n.state,o.state))&&this.refreshInputValidation(),t}setElementValue(e,t,n){const{numberFormatter:i}=this.params,o=!n&&i?i(t??null):t;super.setElementValue(e,o),o===null&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:n}=this,i=Hv(e),o=un({tag:"div",cls:"ag-filter-body",role:"presentation"}),r=this.createFromToElement(o,t,"from",i),s=this.createFromToElement(o,n,"to",i),a=(h,f,g)=>()=>this.refreshInputPairValidation(h,f,g),l=a(r,s,!0);r.onValueChange(l),r.addGuiEventListener("focusin",l);const u=a(r,s,!1);return s.onValueChange(u),s.addGuiEventListener("focusin",u),o}createFromToElement(e,t,n,i){const o=this.createManagedBean(i?new ur({allowedCharPattern:i}):new dv);return o.addCss(`ag-filter-${n}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui()),o}removeEValues(e,t){const n=i=>this.removeComponents(i,e,t);n(this.eValuesFrom),n(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(n,i,o,r)=>{i<r&&t.push(Hh(l1(this.params.numberParser,n.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(n.filter=i[0]),i.length>1&&(n.filterTo=i[1]),n}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,n=>t||(t=!n.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}};function l1(e,t){if(typeof t=="number")return t;let n=nr(t);return n!=null&&n.trim()===""&&(n=null),e?e(n):n==null||n.trim()==="-"?null:Number.parseFloat(n)}function c1(e,t){return Hh(l1(e,t.getValue(!0)))}function i7(e,t,n){return e!=null&&t!=null&&e>=t?`strict${n?"Max":"Min"}ValueValidation`:null}var u1=class extends Lh{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=Sv}conditionToString(e,t,n,i,o){const{filter:r,filterTo:s,type:a}=e,l=this.formatValue.bind(this);if(t){const u=this.conditionForToolPanel(a,n,()=>l(r),()=>l(s),i,o);if(u!=null)return u}return n?`${l(r)}-${l(s)}`:r!=null?l(r):`${a}`}},o7=class extends yv{constructor(){super(a1,Bv),this.filterType="number",this.FilterModelFormatterClass=u1}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},r7=class extends J{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new dv),this.eTextInput=this.createManagedBean(new ur),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),n=this.eTextInput.getGui();e.appendChild(t),e.appendChild(n),this.setupListeners(t,i=>this.onValueChanged(i)),this.setupListeners(n,i=>this.onValueChanged(i))}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({ariaLabel:e,autoComplete:t,placeholder:n}){this.setAriaLabel(e),t!==void 0&&this.setAutoComplete(t),this.setPlaceholder(this.eNumberInput,n),this.setPlaceholder(this.eTextInput,n)}setPlaceholder(e,t){e.toggleCss("ag-floating-filter-search-icon",!!t),e.setInputPlaceholder(t)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},s7=class extends Fv{constructor(){super(...arguments),this.FilterModelFormatterClass=u1,this.filterType="number",this.defaultOptions=Bv}updateParams(e){Hv(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=Hv(e.filterParams),this.allowedCharPattern?this.createManagedBean(new Rv({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new r7)}convertValue(e){return e?Number(e):null}},Gv=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],a7=class extends kh{constructor(){super("textFilter",qF,Gv),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(n.filter=i[0]),i.length>1&&(n.filterTo=i[1]),n}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(n,i,o,r)=>{i<r&&t.push(nr(n.getValue()))}),t}createEValue(){const e=un({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:n}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,n,"to"),e}createFromToElement(e,t,n){const i=this.createManagedBean(new ur);i.addCss(`ag-filter-${n}`),i.addCss("ag-filter-filter"),t.push(i),e.appendChild(i.getGui())}removeEValues(e,t){const n=r=>this.removeComponents(r,e,t),{eValuesFrom:i,eValuesTo:o}=this;n(i),n(o)}},d1=class extends Lh{constructor(){super(...arguments),this.filterTypeKeys=x8}conditionToString(e,t,n,i,o){const{filter:r,filterTo:s,type:a}=e;if(t){const l=h=>()=>to(this,"filterSummaryTextQuote",[h]),u=this.conditionForToolPanel(a,n,l(r),l(s),i,o);if(u!=null)return u}return n?`${r}-${s}`:r!=null?`${r}`:`${a}`}},l7=({filterOption:e,value:t,filterText:n})=>{if(n==null)return!1;switch(e){case"contains":return t.includes(n);case"notContains":return!t.includes(n);case"equals":return t===n;case"notEqual":return t!=n;case"startsWith":return t.indexOf(n)===0;case"endsWith":{const i=t.lastIndexOf(n);return i>=0&&i===t.length-n.length}default:return!1}},c7=e=>e,u7=e=>e==null?null:e.toString().toLowerCase(),d7=class extends jF{constructor(){super(qF,Gv),this.filterType="text",this.FilterModelFormatterClass=d1}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??l7,this.formatter=t.textFormatter??(t.caseSensitive?c7:u7)}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,n,i){const o=e.map(g=>this.formatter(g))||[],r=this.formatter(t),{api:s,colDef:a,column:l,context:u,filterParams:{textFormatter:h}}=this.params;if(n.type==="blank")return Mh(t);if(n.type==="notBlank")return!Mh(t);const f={api:s,colDef:a,column:l,context:u,node:i.node,data:i.data,filterOption:n.type,value:r,textFormatter:h};return o.some(g=>this.matcher({...f,filterText:g}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=n=>{const i={...n},{filter:o,filterTo:r}=n;return o&&(i.filter=xv(o)??null),r&&(i.filterTo=xv(r)??null),i};return B0(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},h7=class extends Fv{constructor(){super(...arguments),this.FilterModelFormatterClass=d1,this.filterType="text",this.defaultOptions=Gv}createFloatingFilterInputService(){return this.createManagedBean(new Rv)}};function f7(e){return!!e.quickFilter?.isFilterPresent()}function g7(e){return e.quickFilter?.getText()}function p7(e){e.quickFilter?.resetCache()}var m7=class extends J{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",n=>this.setFilter(n.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:n,pivotResultCols:i}=this.beans,o=t.isPivotMode(),r=e?.getColumns(),s=t.getColDefCols();let a=(o&&!n.get("applyQuickFilterBeforePivotOrAgg")?i?.getPivotResultCols()?.list:s)??[];r&&(a=a.concat(r)),this.colsToUse=n.get("includeHiddenColumnsInQuickFilter")?a:a.filter(l=>l.isVisible()||l.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(n=>t?this.doesRowPassCache(e,n):this.doesRowPassNoCache(e,n))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return Pe(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){le(70,{newFilter:e});return}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"),n=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,n&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(n=>{const i=this.getTextForColumn(n,e);return Pe(i)&&i.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let n;e?(this.checkGenerateAggText(t),n=t.quickFilterAggregateText):n=this.getAggText(t);const{quickFilterParts:i,matcher:o}=this;return o(i,n)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let n=this.beans.filterValueSvc.getValue(e,t);const i=e.getColDef();if(i.getQuickFilterText){const o=Ue(this.gos,{value:n,node:t,data:t.data,column:e,colDef:i});n=i.getQuickFilterText(o)}return Pe(n)?n.toString().toUpperCase():null}getAggText(e){const t=[];for(const n of this.colsToUse){const i=this.getTextForColumn(n,e);Pe(i)&&t.push(i)}return t.join(`
|
|
64
|
+
`)}},v7={moduleName:"ClientSideRowModelFilter",version:Se,rowModels:["clientSide"],beans:[u4]},Vv={moduleName:"FilterCore",version:Se,beans:[s8],apiFunctions:{isAnyFilterPresent:o8,onFilterChanged:r8},css:[N6],dependsOn:[v7]},h1={moduleName:"FilterValue",version:Se,beans:[g8]},Uc={moduleName:"ColumnFilter",version:Se,beans:[i8,f8],dynamicBeans:{headerFilterCellCtrl:M6},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:B6,getColumnFilterInstance:H6,destroyFilter:G6,setFilterModel:V6,getFilterModel:W6,getColumnFilterModel:z6,setColumnFilterModel:U6,showColumnFilter:$6,hideColumnFilter:j6,getColumnFilterHandler:K6,doFilterAction:q6},dependsOn:[Vv,Dh,h1,_6]},C7={moduleName:"CustomFilter",version:Se,userComponents:{agReadOnlyFloatingFilter:m8},dependsOn:[Uc]},w7={moduleName:"TextFilter",version:Se,dependsOn:[Uc],userComponents:{agTextColumnFilter:{classImp:a7,params:{useForm:!0}},agTextColumnFloatingFilter:h7},dynamicBeans:{agTextColumnFilterHandler:d7}},b7={moduleName:"NumberFilter",version:Se,dependsOn:[Uc],userComponents:{agNumberColumnFilter:{classImp:n7,params:{useForm:!0}},agNumberColumnFloatingFilter:s7},dynamicBeans:{agNumberColumnFilterHandler:o7}},y7={moduleName:"BigIntFilter",version:Se,dependsOn:[Uc],userComponents:{agBigIntColumnFilter:{classImp:S8,params:{useForm:!0}},agBigIntColumnFloatingFilter:E8},dynamicBeans:{agBigIntColumnFilterHandler:F8}},S7={moduleName:"DateFilter",version:Se,dependsOn:[Uc],userComponents:{agDateColumnFilter:{classImp:D8,params:{useForm:!0}},agDateInput:t7,agDateColumnFloatingFilter:X8},dynamicBeans:{agDateColumnFilterHandler:I8}},R7={moduleName:"QuickFilterCore",version:Se,rowModels:["clientSide"],beans:[m7],dependsOn:[Vv,h1]},x7={moduleName:"QuickFilter",version:Se,apiFunctions:{isQuickFilterPresent:f7,getQuickFilter:g7,resetQuickFilter:p7},dependsOn:[R7]},F7={moduleName:"ExternalFilter",version:Se,dependsOn:[Vv]},P7=class extends J{constructor(e,t,n){super(),this.id=e,this.parentCache=t,this.params=n,this.state="needsLoading",this.version=0,this.startRow=e*n.blockSize,this.endRow=this.startRow+n.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,n){this.successCommon(e,{rowData:t,rowCount:n})}isRequestMostRecentAndLive(e){const t=e===this.version,n=this.isAlive();return t&&n}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:n,beans:i,rowNodes:o}=this;for(let r=0;r<e;r++){const s=n+r,a=new jr(i);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(s),a.setRowTop(t*s),o.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:n,state:i}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:n,pageStatus:i}}}setDataAndId(e,t,n){Pe(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(Wt(this.params.datasource.getRows)){le(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:n,params:{sortModel:i,filterModel:o},gos:r}=this;return Ue(r,{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,n),failCallback:this.pageLoadFailed.bind(this,n),sortModel:i,filterModel:o})}forEachNode(e,t,n){this.rowNodes.forEach((i,o)=>{this.startRow+o<n&&e(i,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const n=e-this.startRow;return this.rowNodes[n]}processServerResult(e){const{rowNodes:t,beans:n}=this;t.forEach((o,r)=>{const s=e.rowData?e.rowData[r]:void 0;!o.id&&o.alreadyRendered&&s&&(t[r]=new jr(n),t[r].setRowIndex(o.rowIndex),t[r].setRowTop(o.rowTop),t[r].setRowHeight(o.rowHeight),o._destroy(!0)),this.setDataAndId(t[r],s,this.startRow+r)});const i=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,i)}destroy(){const e=this.rowNodes;for(let t=0,n=e.length;t<n;t++)e[t]._destroy(!1);e.length=0,super.destroy()}},E7=2,D7=class extends J{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const n=Math.floor(e/this.params.blockSize);let i=this.blocks[n];if(!i){if(t)return;i=this.createBlock(n)}return i.getRow(e)}createBlock(e){const t=this.params,n=this.createBean(new P7(e,this,t));return this.blocks[n.id]=n,this.blockCount++,this.purgeBlocksIfNeeded(n),t.rowNodeBlockLoader.addBlock(n),n}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}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()&&(Hr(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(s=>s!=e),n=(s,a)=>a.lastAccessed-s.lastAccessed;t.sort(n);const i=this.params.maxBlocksInCache>0,o=i?this.params.maxBlocksInCache-1:null,r=E7-1;t.forEach((s,a)=>{const l=s.state==="needsLoading"&&a>=r,u=i?a>=o:!1;if(l||u){if(this.isBlockCurrentlyDisplayed(s)||this.isBlockFocused(s))return;this.removeBlockFromCache(s)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:n,endRow:i}=e;return t.rowIndex>=n&&t.rowIndex<i}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:n}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,n-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:n,overflowSize:i}=this.params,r=(e.id+1)*n+i;this.rowCount<r&&(this.rowCount=r)}}setRowCount(e,t){this.rowCount=e,Pe(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const n of this.getBlocksInOrder())n.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(n,i)=>n.id-i.id;return Object.values(this.blocks).sort(e)}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,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const n=[];let i=-1,o=!1;const r={value:0};let s=!1;for(const l of this.getBlocksInOrder())if(!s){if(o&&i+1!==l.id){s=!0;continue}i=l.id,l.forEachNode(u=>{const h=u===e||u===t;(o||h)&&n.push(u),h&&(o=!o)},r,this.rowCount)}return s||o?[]:n}},T7=class extends J{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.hierarchical=!1}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new jr(e);this.rootNode=t,t.level=-1,this.rowHeight=Gs(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=Gs(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;this.cacheParams?e=!uc(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getOverlayType(){return this.infiniteCache?.getRowCount()===0?this.beans.filterManager?.isAnyFilterPresent()?"noMatchingRows":"noRows":null}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){if(!this.datasource)return;Ka(this.gos)!=null||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:n,rowNodeBlockLoader:i,eventSvc:o,gos:r}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:n?.getSortModel()??[],rowNodeBlockLoader:i,initialRowCount:r.get("infiniteInitialRowCount"),maxBlocksInCache:r.get("maxBlocksInCache"),rowHeight:Gs(e),overflowSize:r.get("cacheOverflowSize"),blockSize:r.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new D7(this.cacheParams)),o.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(n=>{n.id===e&&(t=n)}),t}forEachNode(e){this.infiniteCache?.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),n=this.getRowCount()-1;return t>n?n: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(){}};function A7(e){Xd(e)?.refreshCache()}function I7(e){Xd(e)?.purgeCache()}function M7(e){return Xd(e)?.getRowCount()}var k7=class extends J{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=bO(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=gn(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){Fo(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(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){Hr(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(n=>n.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const n of t)n.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:n,state:i}=t.getBlockStateJson();e[n]=i}),e}printCacheStatus(){Hr(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},L7={moduleName:"InfiniteRowModelCore",version:Se,rowModels:["infinite"],beans:[T7,k7]},O7={moduleName:"InfiniteRowModel",version:Se,apiFunctions:{refreshInfiniteCache:A7,purgeInfiniteCache:I7,getInfiniteRowCount:M7},dependsOn:[L7,i4]},_7=class extends J{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 n=this.wrapSvc?.wrap(e,t)??t,i=!Nc.has(e),o=i?this.asyncListeners:this.syncListeners;o.has(e)||o.set(e,new Set),o.get(e).add(n),this.eventSvc.addListener(e,n,i)}removeListener(e,t){const n=this.wrapSvc?.unwrap(e,t)??t,o=!!this.asyncListeners.get(e)?.delete(n);o||this.syncListeners.get(e)?.delete(n),this.eventSvc.removeListener(e,n,o)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,n=(r,s)=>{Nc.has(r)&&t(r,s)},i=(r,s)=>{Nc.has(r)||t(r,s)};this.globalListenerPairs.set(e,{syncListener:n,asyncListener:i});const o=this.eventSvc;o.addGlobalListener(n,!1),o.addGlobalListener(i,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:n,globalListenerPairs:i}=this,o=n?.unwrapGlobal(e)??e;if(i.has(o)){const{syncListener:s,asyncListener:a}=i.get(o);t.removeGlobalListener(s,!1),t.removeGlobalListener(a,!0),i.delete(e)}else this.syncGlobalListeners.delete(o),t.removeGlobalListener(o,!1)}destroyEventListeners(e,t){e.forEach((n,i)=>{n.forEach(o=>this.eventSvc.removeListener(i,o,t)),n.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const n of e)this.eventSvc.removeGlobalListener(n,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:n,asyncListener:i})=>{t.removeGlobalListener(n,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function N7(e,t,n){e.apiEventSvc?.addListener(t,n)}function B7(e,t,n){e.apiEventSvc?.removeListener(t,n)}function H7(e,t){e.apiEventSvc?.addGlobalListener(t)}function G7(e,t){e.apiEventSvc?.removeGlobalListener(t)}var V7={moduleName:"EventApi",version:Se,apiFunctions:{addEventListener:N7,addGlobalListener:H7,removeEventListener:B7,removeGlobalListener:G7},beans:[_7]},W7=class extends J{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");return t?WL(t):zL(e.get("localeText"))}},z7={moduleName:"Locale",version:Se,beans:[W7]};function U7(e){return e.stateSvc?.getState()??{}}function $7(e,t,n){return e.stateSvc?.setState(t,n)}function f1(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=j7(e)),e.version=Se,e}function j7(e){return e.cellSelection=K7(e,"rangeSelection"),e}function K7(e,t){if(e&&typeof e=="object")return e[t]}var q7=class extends J{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=gn(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=gn(this,()=>this.updateGroupExpansionState(),0),this.onRowSelectedDebounced=gn(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:n}=this.beans;this.isClientSideRowModel=en(e);const i=f1(e.get("initialState")??{}),o=i.partialColumnState;delete i.partialColumnState,this.cachedState=i;const r=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>r(()=>this.setupStateOnGridReady(i))),(i.columnOrder||i.columnVisibility||i.columnSizing||i.columnPinning||i.columnGroup)&&n?.hideColumns("columnState");const[s,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:u})=>{u==="gridInitializing"&&(s(),r(()=>{this.setupStateOnColumnsInitialised(i,!!o),n?.revealColumns("columnState")}))},rowCountReady:()=>{a?.(),r(()=>this.setupStateOnRowCountReady(i))},firstDataRendered:()=>{l?.(),r(()=>this.setupStateOnFirstDataRendered(i))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const n=f1(e);delete n.partialColumnState,this.cachedState=n,this.startSuppressEvents();const i="api",o=t?new Set(t):void 0;this.setGridReadyState(n,i,o),this.setColumnsInitialisedState(n,i,!!o,o),this.setRowCountState(n,i,o),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(n,i,o),this.stopSuppressEvents(i)})}setGridReadyState(e,t,n){t==="api"&&!n?.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,n,i){this.setColumnState(e,t,n,i),this.setColumnGroupState(e,t,i),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const n=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:n("aggregation"),columnMoved:n("columnOrder"),columnPinned:n("columnPinning"),columnResized:n("columnSizing"),columnVisible:n("columnVisibility"),columnPivotChanged:n("pivot"),columnPivotModeChanged:n("pivot"),columnRowGroupChanged:n("rowGroup"),sortChanged:n("sort"),newColumnsLoaded:({source:i})=>{this.updateColumnAndGroupState(),i!=="gridInitializing"&&this.isClientSideRowModel&&this.onRowGroupOpenedDebounced()},columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,n){const{filter:i,rowGroupExpansion:o,ssrmRowGroupExpansion:r,rowSelection:s,pagination:a,rowPinning:l}=e,u=(f,g)=>!n?.has(f)&&(g||t==="api");u("filter",i)&&this.setFilterState(i),(u("rowGroupExpansion",o)||u("ssrmRowGroupExpansion",r))&&this.setRowGroupExpansionState(r,o,t),u("rowSelection",s)&&this.setRowSelectionState(s,t),u("pagination",a)&&this.setPaginationState(a,t),u("rowPinning",l)&&this.setRowPinningState(l);const h=this.updateCachedState.bind(this);h("filter",this.getFilterState()),this.updateGroupExpansionState(),h("rowSelection",this.getRowSelectionState()),h("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>{this.updateRowGroupExpansionStateTimer=0,this.updateGroupExpansionState()},i=()=>t("filter",this.getFilterState()),{gos:o,colFilter:r,selectableFilter:s}=this.beans;this.addManagedEventListeners({filterChanged:i,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:n,columnRowGroupChanged:n,rowDataUpdated:()=>{(o.get("groupDefaultExpanded")!==0||o.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(n)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:a=>{(a.newPage||a.newPageSize)&&t("pagination",this.getPaginationState())},pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())}),r&&this.addManagedListeners(r,{filterStateChanged:i}),s&&this.addManagedListeners(s,{selectedFilterChanged:i})}setFirstDataRenderedState(e,t,n){const{scroll:i,cellSelection:o,focusedCell:r,columnOrder:s}=e,a=(h,f)=>!n?.has(h)&&(f||t==="api");a("focusedCell",r)&&this.setFocusedCellState(r),a("cellSelection",o)&&this.setCellSelectionState(o),a("scroll",i)&&this.setScrollState(i),this.setColumnPivotState(!!s?.orderedColIds,t);const l=this.updateCachedState.bind(this);l("sideBar",this.getSideBarState()),l("focusedCell",this.getFocusedCellState());const u=this.getRangeSelectionState();l("rangeSelection",u),l("cellSelection",u),l("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:n,cellFocusCleared:n,cellSelectionChanged:i=>{if(i.finished){const o=this.getRangeSelectionState();t("rangeSelection",o),t("cellSelection",o)}},bodyScrollEnd:()=>t("scroll",this.getScrollState())})}getColumnState(){const e=this.beans;return MW(gh(e),e.colModel.isPivotMode())}setColumnState(e,t,n,i){const{sort:o,rowGroup:r,aggregation:s,pivot:a,columnPinning:l,columnVisibility:u,columnSizing:h,columnOrder:f}=e;let g=!1;const m=(E,I)=>{const B=!i?.has(E)&&!!(I||t==="api");return g||(g=B),B},v={},w=E=>{let I=v[E];return I||(I={colId:E},v[E]=I,I)},b={},y=m("sort",o);y&&o?.sortModel.forEach(({colId:E,sort:I,type:B},W)=>{const X=w(E);X.sort=I,X.sortIndex=W,X.sortType=B}),(y||!n)&&(b.sort=null,b.sortIndex=null);const R=m("rowGroup",r);R&&r?.groupColIds.forEach((E,I)=>{const B=w(E);B.rowGroup=!0,B.rowGroupIndex=I}),(R||!n)&&(b.rowGroup=null,b.rowGroupIndex=null);const S=m("aggregation",s);S&&s?.aggregationModel.forEach(({colId:E,aggFunc:I})=>{w(E).aggFunc=I}),(S||!n)&&(b.aggFunc=null);const P=m("pivot",a);P&&(a?.pivotColIds.forEach((E,I)=>{const B=w(E);B.pivot=!0,B.pivotIndex=I}),this.gos.updateGridOptions({options:{pivotMode:!!a?.pivotMode},source:t})),(P||!n)&&(b.pivot=null,b.pivotIndex=null);const F=m("columnPinning",l);if(F){for(const E of l?.leftColIds??[])w(E).pinned="left";for(const E of l?.rightColIds??[])w(E).pinned="right"}(F||!n)&&(b.pinned=null);const A=m("columnVisibility",u);if(A)for(const E of u?.hiddenColIds??[])w(E).hide=!0;(A||!n)&&(b.hide=null);const k=m("columnSizing",h);if(k)for(const{colId:E,flex:I,width:B}of h?.columnSizingModel??[]){const W=w(E);W.flex=I??null,W.width=B}(k||!n)&&(b.flex=null);const L=f?.orderedColIds,N=!!L?.length&&!i?.has("columnOrder"),M=N?L.map(E=>w(E)):Object.values(v);(M.length||g)&&(this.columnStates=M,oo(this.beans,{state:M,applyOrder:N,defaultState:b},t))}setColumnPivotState(e,t){const n=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;this.columnGroupStates=void 0;const o=this.beans,{pivotResultCols:r,colGroupSvc:s}=o;if(r?.isPivotResultColsPresent()){if(n){const a=[];for(const l of n)r.getPivotResultCol(l.colId)&&a.push(l);oo(o,{state:a,applyOrder:e},t)}i&&s?.setColumnGroupState(i,t)}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return kW(t)}setColumnGroupState(e,t,n){const i=this.beans.colGroupSvc;if(!i||n?.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const o=new Set(e.columnGroup?.openColumnGroupIds),s=i.getColumnGroupState().map(({groupId:a})=>{const l=o.has(a);return l&&o.delete(a),{groupId:a,open:l}});for(const a of o)s.push({groupId:a,open:!0});s.length&&(this.columnGroupStates=s),i.setColumnGroupState(s,t)}getFilterState(){const{filterManager:e,selectableFilter:t}=this.beans;let n=e?.getFilterModel();n&&Object.keys(n).length===0&&(n=void 0);const i=e?.getFilterState(),o=e?.getAdvFilterModel()??void 0,r=t?.getState();return n||o||i||r?{filterModel:n,columnFilterState:i,advancedFilterModel:o,selectableFilters:r}:void 0}setFilterState(e){const{filterManager:t,selectableFilter:n}=this.beans,{filterModel:i,columnFilterState:o,advancedFilterModel:r,selectableFilters:s}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};s!==void 0&&n?.setState(s??{}),(i!==void 0||o!==void 0)&&t?.setFilterState(i??null,o??null,"columnFilter"),r!==void 0&&t?.setAdvFilterModel(r??null,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:n,type:i,startRow:o,endRow:r,columns:s,startColumn:a}=t;return{id:n,type:i,startRow:o,endRow:r,colIds:s.map(l=>l.getColId()),startColId:a.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:n,colModel:i,visibleCols:o}=this.beans;if(!rr(t)||!n)return;const r=[];for(const s of e?.cellRanges??[]){const a=[];for(const u of s.colIds){const h=i.getCol(u);h&&a.push(h)}if(!a.length)continue;let l=i.getCol(s.startColId);if(!l){const u=o.allCols,h=new Set(a);l=u.find(f=>h.has(f))}r.push({...s,columns:a,startColumn:l})}n.setCellRanges(r)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:n}=e?.getVScrollPosition()??{top:0};return n||t?{top:n,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:n}=e??{top:0,left:0},{frameworkOverrides:i,rowRenderer:o,animationFrameSvc:r,ctrlsSvc:s}=this.beans;i.wrapIncoming(()=>{s.get("center").setCenterViewportScrollLeft(n),s.getScrollFeature()?.setVerticalScrollPosition(t),o.redraw({afterScroll:!0}),r?.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:n,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:n,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:n}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:i,rowIndex:o,rowPinned:r}=e;t.setFocusedCell({column:n.getCol(i),rowIndex:o,rowPinned:r,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const n=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!n&&!i))return{page:n,pageSize:i}}setPaginationState(e,t){const{pagination:n,gos:i}=this.beans;if(!n)return;const{pageSize:o,page:r}=e??{page:0,pageSize:i.get("paginationPageSize")},s=t==="gridInitializing";o&&!i.get("paginationAutoPageSize")&&n.setPageSize(o,s?"initialState":"pageSizeSelector"),typeof r=="number"&&(s?n.setPage(r):n.goToPage(r))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e,t){this.beans.selectionSvc?.setSelectionState(e,t,t==="api")}updateGroupExpansionState(){const{expansionSvc:e,gos:t}=this.beans,n=e?.getExpansionState(),i=t.get("ssrmExpandAllAffectsAllRows");this.updateCachedState("ssrmRowGroupExpansion",i?n:void 0),this.updateCachedState("rowGroupExpansion",i?void 0:n)}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,n){const i=e??t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};this.beans.expansionSvc?.setExpansionState(i,n)}updateColumnState(e){const t=this.getColumnState();let n=!1;const i=this.cachedState;for(const o of Object.keys(t)){const r=t[o];uc(r,i[o])||(n=!0)}this.cachedState={...i,...t},n&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const n=this.cachedState[e];this.setCachedStateValue(e,t),uc(t,n)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&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")}},Q7={moduleName:"GridState",version:Se,beans:[q7],apiFunctions:{getState:U7,setState:$7}};function Y7(e){return e.rowModel.isLastRowIndexKnown()}function Z7(e){return e.pagination?.getPageSize()??100}function J7(e){return e.pagination?.getCurrentPage()??0}function X7(e){return e.pagination?.getTotalPages()??1}function e9(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function t9(e){e.pagination?.goToNextPage()}function n9(e){e.pagination?.goToPreviousPage()}function i9(e){e.pagination?.goToFirstPage()}function o9(e){e.pagination?.goToLastPage()}function r9(e,t){e.pagination?.goToPage(t)}var s9=class extends J{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")||this.centerRowsCtrl==null}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,n=()=>{const i=Math.max(Gs(t),1),o=Math.floor(e/i);t.pagination.setPageSize(o,"autoCalculated")};this.isBodyRendered?gn(this,n,50)():(n(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};function a9(e,t){if(typeof e!="number")return"";const n=t(),i=n("thousandSeparator",","),o=n("decimalSeparator",".");return e.toString().replace(".",o).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${i}`)}var $c="paginationPageSizeSelector",l9={tag:"span",cls:"ag-paging-page-size"},c9=class extends Pt{constructor(){super(l9),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($c,()=>{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(),this.selectPageSizeComp)}reset(){xn(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")&&this.gos.get($c)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),n=!t||!e.includes(t);if(n){const o=this.gos.exists("paginationPageSize"),r=this.gos.get($c)!==!0;le(94,{pageSizeSet:o,pageSizesSet:r,pageSizeOptions:e,paginationPageSizeOption:t}),r||le(95,{paginationPageSizeOption:t,paginationPageSizeSelector:$c}),e.unshift("")}const i=String(n?"":t);this.selectPageSizeComp?(Or(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(i,!0)):this.createPageSizeSelectorComp(e,i),this.hasEmptyOption=n}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const n=this.getLocaleTextFunc(),i=n("pageSizeSelectorLabel","Page Size:"),o=n("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new hv).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(o).setLabel(i).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get($c);return!Array.isArray(t)||!t?.length?e:[...t].sort((n,i)=>n-i)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},u9={selector:"AG-PAGE-SIZE-SELECTOR",component:c9},d9=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;flex-wrap:wrap-reverse;gap:calc(var(--ag-spacing)*4);justify-content:flex-end;min-height:var(--ag-pagination-panel-height);padding:calc(var(--ag-spacing)*.5) var(--ag-cell-horizontal-padding);row-gap:calc(var(--ag-spacing)*.5);@container (width < 600px){justify-content:center}}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel,.ag-paging-row-summary-panel{margin:calc(var(--ag-spacing)*.5)}.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}.ag-paging-description{line-height:0}",h9=class extends MR{constructor(){super(),this.btFirst=ge,this.btPrevious=ge,this.btNext=ge,this.btLast=ge,this.lbRecordCount=ge,this.lbFirstRowOnPage=ge,this.lbLastRowOnPage=ge,this.lbCurrent=ge,this.lbTotal=ge,this.pageSizeComp=ge,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(d9)}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(),[u9]);const{btFirst:t,btPrevious:n,btNext:i,btLast:o}=this;this.activateTabIndex([t,n,i,o]),t.insertAdjacentElement("afterbegin",ri(e?"last":"first",this.beans)),n.insertAdjacentElement("afterbegin",ri(e?"next":"previous",this.beans)),i.insertAdjacentElement("afterbegin",ri(e?"previous":"next",this.beans)),o.insertAdjacentElement("afterbegin",ri(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:r=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(r):S2(this.beans,r),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}getFocusableContainerName(){return"pagination"}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:n}=e;this.addManagedListeners(t,{click:n,keydown:i=>{(i.key===K.ENTER||i.key===K.SPACE)&&(i.preventDefault(),n())}})}y2(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}):a9(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(),n=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const i=this.isZeroPagesToDisplay(),o=e===n-1;this.nextButtonDisabled=o||i,this.lastButtonDisabled=!t||i||e===n-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){pL(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),n=this.pagination.getMasterRowCount(),i=e?n:null,o=this.pagination.getCurrentPage(),r=this.pagination.getPageSize();let s,a;this.isZeroPagesToDisplay()?s=a=0:(s=r*o+1,a=s+r-1,e&&a>i&&(a=i));const l=s+r-1,u=!e&&n<l,h=this.formatNumber(s);this.lbFirstRowOnPage.textContent=h;let f;const g=this.getLocaleTextFunc();u?f=g("pageLastRowUnknown","?"):f=this.formatNumber(a),this.lbLastRowOnPage.textContent=f;const v=t>0?o+1:0,w=this.formatNumber(v);this.lbCurrent.textContent=w;let b,y;if(e)b=this.formatNumber(t),y=this.formatNumber(i);else{const R=g("more","more");b=R,y=R}this.lbTotal.textContent=b,this.lbRecordCount.textContent=y,this.announceAriaStatus(h,f,y,w,b)}announceAriaStatus(e,t,n,i,o){const r=this.getLocaleTextFunc(),s=r("page","Page"),a=r("to","to"),l=r("of","of"),u=`${e} ${a} ${t} ${l} ${n}`,h=`${s} ${i} ${l} ${o}`;u!==this.ariaRowStatus&&(this.ariaRowStatus=u,this.ariaAnnounce?.announceValue(u,"paginationRow")),h!==this.ariaPageStatus&&(this.ariaPageStatus=h,this.ariaAnnounce?.announceValue(h,"paginationPage"))}},f9={selector:"AG-PAGINATION",component:h9},g9=100,p9=class extends J{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 f9}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0: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||typeof t!="number")return;const{editSvc:n}=this.beans;n?.isEditing()&&(n.isBatchEditing()?n.cleanupEditors():n.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:!0}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 Pe(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:Pe(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:Pe(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:Pe(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:g9}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const n=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}n!==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){this.setZeroRows();return}const n=this.pageSize,i=t-1;this.totalPages=Math.floor(i/n)+1,this.adjustCurrentPageIfInvalid();const o=this.currentPage,r=n*o;let s=n*(o+1)-1;if(s>i&&(s=i),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(r),s===i)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(s+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:n}=this,i=e-1;this.totalPages=Math.floor(i/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*n,this.bottomDisplayedRowIndex=t*(n+1)-1,this.bottomDisplayedRowIndex>i&&(this.bottomDisplayedRowIndex=i)}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:n=!1,newPageSize:i=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:n,newPageSize:i,keepRenderedRows:t})}},m9={moduleName:"Pagination",version:Se,beans:[p9,s9],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:Y7,paginationGetPageSize:Z7,paginationGetCurrentPage:J7,paginationGetTotalPages:X7,paginationGetRowCount:e9,paginationGoToNextPage:t9,paginationGoToPreviousPage:n9,paginationGoToFirstPage:i9,paginationGoToLastPage:o9,paginationGoToPage:r9},dependsOn:[Dh]},v9=".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)}";function C9(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function w9(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function b9(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function y9(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function S9(e,t,n){return e.pinnedRowModel?.forEachPinnedRow(t,n)}var R9={moduleName:"PinnedRow",version:Se,beans:[s2],css:[v9],apiFunctions:{getPinnedTopRowCount:C9,getPinnedBottomRowCount:w9,getPinnedTopRow:b9,getPinnedBottomRow:y9,forEachPinnedRow:S9},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},x9="↑",F9="↓",P9={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},E9=class extends Pt{constructor(){super(P9),this.eValue=ge,this.eDelta=ge,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const n=Math.abs(t),i=e.formatValue(n),o=Pe(i)?i:n,r=t>=0,s=this.eDelta;r?s.textContent=x9+o:s.textContent=F9+o,s.classList.toggle("ag-value-change-delta-up",r),s.classList.toggle("ag-value-change-delta-down",!r)}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"),xn(this.eDelta)}refresh(e,t=!1){const{value:n,valueFormatted:i}=e,{eValue:o,lastValue:r,beans:s}=this;if(n===r||(Pe(i)?o.textContent=i:Pe(n)?o.textContent=n:xn(o),s.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n,l=r&&typeof r=="object"&&"toNumber"in r?r.toNumber():r;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const u=a-l;this.showDelta(e,u)}return r&&o.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=n,!0}},D9=".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}",T9={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},A9=class extends Pt{constructor(){super(T9),this.eCurrent=ge,this.refreshCount=0,this.registerCSS(D9)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:n}=this,i=un({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=i,i.textContent=n.textContent,this.getGui().insertBefore(i,n),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 n=e.value;if(Wt(n)&&(n=""),n===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=n;const i=this.eCurrent;return Pe(e.valueFormatted)?i.textContent=e.valueFormatted:Pe(e.value)?i.textContent=n:xn(i),!0}},I9=class extends J{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,n=this.beans.gos.get("cellFlashDuration"),i=this.beans.gos.get("cellFadeDuration")){const o=this.animations[t];o.delete(e);const r=Date.now(),s=r+n,a=r+n+i,l={phase:"flash",flashEndTime:s,fadeEndTime:a};o.set(e,l);const u=`ag-cell-${t}`,h=`${u}-animation`,{comp:f,eGui:{style:g}}=e;f.toggleCss(u,!0),f.toggleCss(h,!1),g.removeProperty("transition"),g.removeProperty("transition-delay"),this.nextAnimationTime&&s+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),n)}),this.nextAnimationTime=s)}advanceAnimations(){const e=Date.now();let t=null;for(const n of Object.keys(this.animations)){const i=this.animations[n],o=`ag-cell-${n}`,r=`${o}-animation`;for(const[s,a]of i){if(!s.isAlive()||!s.comp){i.delete(s);continue}const{phase:l,flashEndTime:u,fadeEndTime:h}=a,f=l==="flash"?u:h;if(!(e+15>=f)){t=Math.min(f,t??1/0);continue}const{comp:m,eGui:{style:v}}=s;switch(l){case"flash":m.toggleCss(o,!1),m.toggleCss(r,!0),v.transition=`background-color ${h-u}ms`,v.transitionDelay=`${u-e}ms`,t=Math.min(h,t??1/0),a.phase="fade";break;case"fade":m.toggleCss(o,!1),m.toggleCss(r,!1),v.removeProperty("transition"),v.removeProperty("transition-delay"),i.delete(s);break}}}t==null?(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 n=m2(e.cellPosition);t.cells[n]&&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()}};function M9(e,t={}){const{cellFlashSvc:n}=e;n&&e.frameworkOverrides.wrapIncoming(()=>{for(const i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))n.flashCell(i,t)})}var k9={moduleName:"HighlightChanges",version:Se,beans:[I9],userComponents:{agAnimateShowChangeCellRenderer:E9,agAnimateSlideCellRenderer:A9},apiFunctions:{flashCells:M9}};function L9(e,t,n){if(!t)return;const i=e.ctrlsSvc.getGridBodyCtrl().eGridBody,o=`aria-${t}`;n===null?i.removeAttribute(o):i.setAttribute(o,n)}function O9(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function _9(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function N9(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function B9(e){e.animationFrameSvc?.flushAllFrames()}function H9(e){return{rowHeight:Gs(e),headerHeight:Mc(e)}}function G9(e,t={}){const n=[];for(const r of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const s=r.getCellRenderer();s!=null&&n.push(Xs(s))}if(t.columns?.length)return n;const i=[],o=tv(t.rowNodes);for(const r of e.rowRenderer.getAllRowCtrls()){if(o&&!nv(r.rowNode,o)||!r.isFullWidth())continue;const s=r.getFullWidthCellRenderers();for(let a=0;a<s.length;a++){const l=s[a];l!=null&&i.push(Xs(l))}}return[...i,...n]}var V9={moduleName:"RenderApi",version:Se,apiFunctions:{setGridAriaProperty:L9,refreshCells:O9,refreshHeader:_9,isAnimationFrameQueueEmpty:N9,flushAllAnimationFrames:B9,getSizesForCurrentTheme:H9,getCellRendererInstances:G9}},W9=class extends J{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=gn(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const{visibleCols:e,rowModel:t,rowSpanSvc:n,pinnedRowModel:i}=this.beans,o=e.autoHeightCols;let r=!1;const s=a=>{const l=a.__autoHeights;let u=Gr(this.beans,a).height;for(const h of o){let f=l?.[h.getColId()];const g=n?.getCellSpan(h,a);if(g){if(g.getLastNode()!==a)continue;if(f=n?.getCellSpan(h,a)?.getLastNodeAutoHeight(),!f)return}if(f==null){if(this.colSpanSkipCell(h,a))continue;return}u=Math.max(f,u)}u!==a.rowHeight&&(a.setRowHeight(u),r=!0)};i?.forEachPinnedRow?.("top",s),i?.forEachPinnedRow?.("bottom",s),t.forEachDisplayedNode?.(s),r&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,n){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[n.getId()];return}const i=e.__autoHeights[n.getId()];e.__autoHeights[n.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:n,colViewport:i,visibleCols:o}=this.beans;if(!n.colSpanActive)return!1;let r=[];switch(e.getPinned()){case"left":r=o.getLeftColsForRow(t);break;case"right":r=o.getRightColsForRow(t);break;case null:r=i.getColsWithinViewport(t);break}return!r.includes(e)}setupCellAutoHeight(e,t,n){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const i=t.parentElement,{rowNode:o,column:r}=e,s=this.beans,a=h=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!n.isAlive())return;const{paddingTop:f,paddingBottom:g,borderBottomWidth:m,borderTopWidth:v}=Ns(i),w=f+g+m+v,y=t.offsetHeight+w;if(h<5){const S=!cn(s)?.contains(t),P=y==0;if(S||P){window.setTimeout(()=>a(h+1),0);return}}this.setRowAutoHeight(o,y,r)},l=()=>a(0);l();const u=Nr(s,t,l);return n.addDestroyFunc(()=>{u(),this.setRowAutoHeight(o,void 0,r)}),!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:n}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(n).filter(o=>o.isAutoHeight())),t.length!==0){if(!n.__autoHeights)return!1;for(const i of t){const o=n.__autoHeights[i.getColId()];if(!o||n.rowHeight<o)return!1}}return!0}},z9={moduleName:"RowAutoHeight",version:Se,beans:[W9]},U9=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?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){const e=this.firstNode.__autoHeights?.[this.col.getColId()];if(e==null)return;let t=0;for(const n of this.spannedNodes)n!==this.lastNode&&(t+=n.rowHeight);return e-t}},$9=class extends J{constructor(e){super(),this.column=e}buildCache(e){const{column:t,beans:{gos:n,pinnedRowModel:i,rowModel:o,valueSvc:r,pagination:s}}=this,{colDef:a}=t,l=this.getNodeMap(e),u=new Map,h=n.getCallback("isFullWidthRow"),f=a.equals,g=a.spanRows,m=typeof g=="function";let v=null,w=null,b;const y=(S,P)=>{v=S,w=null,b=P},R=S=>{const P=!S.isExpandable()&&!S.group&&!S.detail&&(h?!h({rowNode:S}):!0);if(S.rowIndex==null||!P){y(null,null);return}if(v==null||S.level!==v.level||S.footer||w&&S.rowIndex-1!==w?.getLastNode().rowIndex){y(S,r.getValue(t,S,"data"));return}const F=r.getValue(t,S,"data");if(m){const A=Ue(n,{valueA:b,nodeA:v,valueB:F,nodeB:S,column:t,colDef:a});if(!g(A)){y(S,F);return}}else if(f?!f(b,F):b!==F){y(S,F);return}if(!w){const A=l?.get(v);A?.firstNode===v?(A.reset(),w=A):w=new U9(t,v),u.set(v,w)}w.addSpannedNode(S),u.set(S,w)};switch(e){case"center":o.forEachDisplayedNode?.(S=>{(!s||s.isRowInPage(S.rowIndex))&&R(S)}),this.centerValueNodeMap=u;break;case"top":i?.forEachPinnedRow("top",R),this.topValueNodeMap=u;break;case"bottom":i?.forEachPinnedRow("bottom",R),this.bottomValueNodeMap=u;break}}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}}},j9=class extends J{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=gn(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=gn(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 n=this.createManagedBean(new $9(e));this.spanningColumns.set(e,n),n.buildCache("top"),n.buildCache("bottom"),n.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(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t?.createCtrls("top"),t?.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t?.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const n=this.spanningColumns.get(e);return n?n.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:n}=this.beans,i=e.column,o=e.rowIndex,r=this.spanningColumns.get(i);if(!r)return;let s;switch(e.rowPinned){case"top":s=t?.getPinnedTopRow(o);break;case"bottom":s=t?.getPinnedBottomRow(o);break;default:s=n.getRow(o)}if(s)return r.getCellSpan(s)}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 n=this.spanningColumns.get(e);if(n)return n.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[n,i]of this.spanningColumns)if(i.isCellSpanning(e)){const o=i.getCellSpan(e);t(n,o)}}destroy(){super.destroy(),this.spanningColumns.clear()}},K9=class extends cl{constructor(e,t,n){super(e.col,e.firstNode,n,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,n,i,o,r,s){this.eWrapper=n,super.setComp(e,t,n,i,o,r,s),this.setAriaRowSpan()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||fc(e,t.rowIndex)}setAriaRowSpan(){bL(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(Ic(t)){this.focusedCellPosition=void 0;return}const n=this.isCellFocused();n||(this.focusedCellPosition=void 0),e&&n&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},q9=class extends Sh{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 K9(t,this,this.beans)}isCorrectCtrlForSpan(e){const t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},Q9=class extends J{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,n=this.getCtrlsMap(e),i=n.size,o=this.getAllRelevantRowControls(e),r=new Map;let s=!1;for(const l of o)l.isAlive()&&t?.forEachSpannedColumn(l.rowNode,(u,h)=>{if(r.has(h.firstNode))return;const f=n.get(h.firstNode);if(f){r.set(h.firstNode,f),n.delete(h.firstNode);return}s=!0;const g=new q9(h.firstNode,this.beans,!1,!1,!1);r.set(h.firstNode,g)});this.setCtrlsMap(e,r);const a=r.size===i;if(!(!s&&a)){for(const l of n.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,n=t?.getCellSpanByPosition(e);if(!n)return;const i=this.getCtrlsMap(e.rowPinned).get(n.firstNode);if(i)return i.getAllCellCtrls().find(o=>o.column===e.column)}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;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},Y9={moduleName:"CellSpan",version:Se,beans:[j9,Q9]},Z9=class extends J{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,Za(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),YO(e))}createColumns(e,t){const n=()=>{Kd(this.beans,this.columns?.tree),this.columns=null},i=e.treeDepth,r=(this.columns?.treeDepth??-1)==i,s=this.generateSelectionCols();if(QO(s,this.columns?.list??[])&&r)return;n();const{colGroupSvc:l}=this.beans,u=l?.findDepth(e.tree)??0,h=l?.balanceTreeForAutoCols(s,u)??[];this.columns={list:s,tree:h,treeDepth:u,map:{}},t(g=>{if(!g)return null;const m=g.filter(v=>!zr(v));return[...s,...m]})}updateColumns(e){const t=Za(e.source),{beans:n}=this;for(const i of this.columns?.list??[]){const o=this.createSelectionColDef(e.currentValue);i.setColDef(o,null,t),oo(n,{state:[JO(o,i.colId)]},t)}}getColumn(e){return this.columns?.list.find(t=>Pc(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,n=e.get("rowSelection");if(typeof n!="object"||!Hs(e))return!1;const i=(t.autoColSvc?.getColumns()?.length??0)>0;if(n.checkboxLocation==="autoGroupColumn"&&i)return!1;const o=!!qa(n),r=Hd(n);return o||r}createSelectionColDef(e){const{gos:t}=this,n=e??t.get("selectionColumnDef"),i=t.get("enableRtl"),{rowSpan:o,spanRows:r,...s}=n??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:i?"right":"left",comparator(a,l,u,h){const f=u.isSelected(),g=h.isSelected();return f===g?0:f?1:-1},editable:!1,suppressFillHandle:!0,suppressAutoSize:!0,pinned:null,...s,colId:P0,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const n=new Ws(e,null,t,!1);return this.createBean(n),[n]}onSelectionOptionsChanged(e,t,n){const i=t&&typeof t!="string"?qa(t):void 0,o=e&&typeof e!="string"?qa(e):void 0,r=i!==o,s=t&&typeof t!="string"?Hd(t):void 0,a=e&&typeof e!="string"?Hd(e):void 0,l=s!==a,u=Gd(e),h=Gd(t);(r||l||u!==h)&&this.beans.colModel.refreshAll(n)}destroy(){Kd(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e,t,n){if(!this.columns?.list.length)return;const i=e.length+t.length+n.length;if(i===0)return;const o=this.columns.list[0];if(!o.isVisible())return;const r=()=>{let l;switch(o.pinned){case"left":case!0:l=e;break;case"right":l=n;break;default:l=t}l&&Fo(l,o)};(this.beans.rowNumbersSvc?.getColumn(E0)?2:1)===i&&r()}},J9=':where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:before{content:"";cursor:pointer;inset:-8px;position:absolute}';function X9(e,t){if(!t.nodes.every(s=>s.rowPinned&&!yh(s)?(le(59),!1):s.id===void 0?(le(60),!1):!0))return;const{nodes:i,source:o,newValue:r}=t;e.selectionSvc?.setNodesSelected({nodes:i,source:o??"api",newValue:r})}function eU(e,t,n="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:n,selectAll:t})}function tU(e,t,n="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:n,selectAll:t})}function nU(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function iU(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function oU(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function rU(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function sU(e){return e.selectionSvc?.getSelectedNodes()??[]}function aU(e){return e.selectionSvc?.getSelectedRows()??[]}var lU={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},cU=class extends Pt{constructor(){super(lU,[km]),this.eCheckbox=ge}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:n}=this,i=t.isSelected(),o=Ed(e,i),[r,s]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(r,s);n.setValue(i,!0),n.setInputAriaLabel(`${a} (${o})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getWrapperElement(),{dblclick:Ks,click:i=>{Ks(i),!this.eCheckbox.isDisabled()&&this.beans.selectionSvc?.handleSelectionEvent(i,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:i,previousValue:o})=>{const r=typeof i=="object"?Lp(i):void 0,s=typeof o=="object"?Lp(o):void 0;r!==s&&this.onSelectableChanged()}),Op(this.gos)||typeof this.getIsVisible()=="function"){const i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:n,gos:i}=this,o=t.selectable,r=this.getIsVisible();let s;if(typeof r=="function"){const f=n?.callbackParams;if(!e)s=r({...f,node:t,data:t.data});else{const g=e.createColumnFunctionCallbackParams(t);s=r({...f,...g})}}else s=r??!1;const a=o&&!s||!o&&s,l=o||s,u=i.get("rowSelection"),h=u&&typeof u!="string"?!Lp(u):!!e?.getColDef().showDisabledCheckboxes;this.setVisible(l&&(a?h:!0)),this.setDisplayed(l&&(a?h:!0)),l&&this.eCheckbox.setDisabled(a),n?.removeHidden&&this.setDisplayed(l)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?qa(t):this.column?.getColDef()?.checkboxSelection}},uU=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(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){if(this.rootId)return this.getRowNode(this.rootId);if(e)return this.setRoot(e),e}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(e){let t;const{rowModel:n,pinnedRowModel:i}=this;return t??(t=n.getRowNode(e)),i?.isManual()&&(t??(t=i.getPinnedRowById(e,"top")),t??(t=i.getPinnedRowById(e,"bottom"))),t}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const n=t[0].id===this.rootId,i=t.findIndex(o=>o.id===e.id);if(i>-1){const o=t.slice(0,i),r=t.slice(i+1);return this.setEndRange(e),n?{keep:o,discard:r}:{keep:r,discard:o}}else return{keep:t,discard:[]}}extend(e,t=!1){const n=this.getRoot();if(n==null){const o=this.getRange().slice();return t&&e.depthFirstSearch(r=>!r.group&&o.push(r)),o.push(e),this.setRoot(e),{keep:o,discard:[]}}const i=this.getNodesInRange(n,e);if(!i)return this.setRoot(e),{keep:[e],discard:[]};if(i.find(o=>o.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const o=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:o}}}getNodesInRange(e,t){const{pinnedRowModel:n,rowModel:i}=this;if(!n?.isManual())return i.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&!t.rowPinned)return Ni(n,"top",e,void 0).concat(i.getNodesInRangeForSelection(i.getRow(0),t)??[]);if(e.rowPinned==="bottom"&&!t.rowPinned){const o=Ni(n,"bottom",void 0,e),r=i.getRowCount(),s=i.getRow(r-1);return(i.getNodesInRangeForSelection(t,s)??[]).concat(o)}if(!e.rowPinned&&!t.rowPinned)return i.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&t.rowPinned==="top")return Ni(n,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){const o=Ni(n,"top",t,void 0),r=Ni(n,"bottom",void 0,e),s=i.getRow(0),a=i.getRow(i.getRowCount()-1);return o.concat(i.getNodesInRangeForSelection(s,a)??[]).concat(r)}if(!e.rowPinned&&t.rowPinned==="top")return Ni(n,"top",t,void 0).concat(i.getNodesInRangeForSelection(i.getRow(0),e)??[]);if(e.rowPinned==="top"&&t.rowPinned==="bottom"){const o=Ni(n,"top",e,void 0),r=Ni(n,"bottom",void 0,t),s=i.getRow(0),a=i.getRow(i.getRowCount()-1);return o.concat(i.getNodesInRangeForSelection(s,a)??[]).concat(r)}if(e.rowPinned==="bottom"&&t.rowPinned==="bottom")return Ni(n,"bottom",e,t);if(!e.rowPinned&&t.rowPinned==="bottom"){const o=Ni(n,"bottom",void 0,t),r=i.getRow(i.getRowCount());return(i.getNodesInRangeForSelection(e,r)??[]).concat(o)}return null}},dU=class extends J{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(Ot(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new Mm);this.cbSelectAll=t,t.addCss("ag-header-select-all"),_r(t.getGui(),"presentation"),this.showOrHideSelectAll();const n=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:n,paginationChanged:n,modelUpdated:n}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:o})=>{const r=s=>typeof s=="string"||!s||s.mode==="singleRow"?void 0:s.selectAll;r(i)!==r(o)&&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(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,n=this.cbSelectAll,i=t.getSelectAllState(e);n.setValue(i);const o=t.hasNodesToSelect(e);n.setDisabled(!o),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:n,cbSelectAll:i,cbSelectAllVisible:o}=this,r=i.getValue(),s=Ed(t,r),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");n.setAriaDescriptionProperty("selectAll",o?`${a} (${s})`:null),i.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||n.announceAriaDescription()}checkSelectionType(e){return xc(this.gos)?!0:(le(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:n}=this.beans;return en(t)||Rc(t)?!0:(le(129,{feature:e,rowModel:n.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let n="uiSelectAll";t==="currentPage"?n="uiSelectAllCurrentPage":t==="filtered"&&(n="uiSelectAllFiltered");const i={source:n,selectAll:t},o=this.beans.selectionSvc;e?o.selectAllRowNodes(i):o.deselectAllRowNodes(i)}isCheckboxSelection(){const{column:e,gos:t,beans:n}=this,r=typeof t.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return g1(n,e)&&this.checkRightRowModelType(r)&&this.checkSelectionType(r)}getSelectAllMode(){const e=b0(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:n}=this.column.getColDef();return t?"currentPage":n?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}};function g1({gos:e,selectionColSvc:t},n){const i=e.get("rowSelection"),o=n.getColDef(),{headerCheckboxSelection:r}=o;let s=!1;if(typeof i=="object"){const l=zr(n),u=Bp(n);(Gd(i)==="autoGroupColumn"&&u||l&&t?.isSelectionColumnEnabled())&&(s=Hd(i))}else typeof r=="function"?s=r(Ue(e,{column:n,colDef:o})):s=!!r;return s}var hU=class extends J{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new uU(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const n=Op(e);n!==this.isRowSelectable&&(this.isRowSelectable=n,this.updateSelectable())}),this.isRowSelectable=Op(e),this.addManagedEventListeners({cellValueChanged:n=>this.updateRowSelectable(n.node),rowNodeDataChanged:n=>this.updateRowSelectable(n.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new cU}createSelectAllFeature(e){if(g1(this.beans,e))return new dU(e)}isMultiSelect(){return xc(this.gos)}onRowCtrlSelected(e,t,n){const i=!!e.rowNode.isSelected();e.forEachGui(n,o=>{o.rowComp.toggleCss("ag-row-selected",i);const r=o.element;BS(r,i),r.contains(Ot(this.beans))&&t(o)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected(),n=this.beans.editSvc?.isEditing({rowNode:e});if(!e.selectable||n)return;const o=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(o,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!yh(e)||!Hs(this.gos)}updateRowSelectable(e,t){const n=e.rowPinned&&e.pinnedSibling?e.pinnedSibling.selectable:this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,n,t),n}setRowSelectable(e,t,n){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),n)return;if(Fc(this.gos)){const o=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:o??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,n=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let i=0;i<e.childrenAfterGroup.length;i++){const o=e.childrenAfterGroup[i];let r=o.isSelected();if(!o.selectable){const s=this.calculateSelectedFromChildren(o);if(s===null)continue;r=s}switch(r){case!0:t=!0;break;case!1:n=!0;break;default:return}}if(!(t&&n))return t?!0:n?!1:e.selectable?e.__selected:null}selectRowNode(e,t,n,i="api"){if(t&&e.destroyed)return!1;const o=!e.selectable&&t,r=e.__selected===t;if(o||r)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const s=e.sibling;s&&s.footer&&s.__localEventService&&s.dispatchRowEvent("rowSelected");const a=e.pinnedSibling;return a?.rowPinned&&a.__localEventService&&a.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...Z_(e,this.gos,"rowSelected"),event:n||null,source:i}),!0}isCellCheckboxSelection(e,t){const n=this.gos.get("rowSelection");if(n&&typeof n!="string"){const i=zr(e)&&qa(n);return e.isColumnFunc(t,i)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,n,i){const{gos:o,selectionCtx:r}=this,s=e.isSelected(),a=Fc(o),l=SO(o),u=RO(o),h=this.isMultiSelect(),f=i==="rowClicked";if(f&&!(l||u))return null;if(t&&n&&h){const g=r.getRoot();if(g)if(g.isSelected()){const m=r.isInRange(e)?r.truncate(e):r.extend(e,a);return{deselect:m.discard,select:m.keep,reset:!1}}else{const m=r.extend(e,a);return{select:[],deselect:m.keep,reset:!1}}else return null}else if(t&&h){const g=r.selectAll?this.beans.rowModel.getRow(0):void 0,m=r.getRoot(g),v=r.isInRange(e)?r.truncate(e):r.extend(e,a);return{select:v.keep,deselect:v.discard,reset:r.selectAll||!!(m&&!m.isSelected())}}else if(n){if(f){const g=!s;return g&&!l||!g&&!u?null:(r.setRoot(e),{node:e,newValue:g,clearSelection:!1})}return r.setRoot(e),{node:e,newValue:!s,clearSelection:!h}}else{r.setRoot(e);const g=xO(o),m=Wd(o)==="filteredDescendants",v=f&&(!g||!l);if(m&&s===void 0&&en(o))return{node:e,newValue:!1,checkFilteredNodes:!0,clearSelection:!h||v};if(f){const w=s?!g:l;return w===s&&!v||w&&!l||!w&&!u?null:{node:e,newValue:w,clearSelection:!h||v,keepDescendants:e.group&&a}}return{node:e,newValue:!s,clearSelection:!h||v}}}},fU=class extends hU{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=Vd(e),this.groupSelectsDescendants=Fc(e),this.groupSelectsFiltered=Wd(e)==="filteredDescendants",this.masterSelectsDetail=y0(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=Fc(e),n=Vd(e),i=Wd(e)==="filteredDescendants";this.masterSelectsDetail=y0(e)==="detail",(t!==this.groupSelectsDescendants||i!==this.groupSelectsFiltered||n!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=i,this.mode=n)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,n){if(this.isRowSelectionBlocked(t))return 0;const i=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,n);if(i==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in i)return i.reset?this.resetNodes():this.selectRange(i.deselect,!1,n),this.selectRange(i.select,!0,n);{const o=i.checkFilteredNodes?m1(i.node):i.newValue;return this.setNodesSelected({nodes:[i.node],newValue:o,clearSelection:i.clearSelection,keepDescendants:i.keepDescendants,event:e,source:n})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:n,nodes:i,event:o,source:r,keepDescendants:s=!1}){if(i.length===0)return 0;const{gos:a}=this;if(!Hs(a)&&e)return le(132),0;if(i.length>1&&!this.isMultiSelect())return le(130),0;let l=0;for(let u=0;u<i.length;u++){const h=i[u],f=h.primaryRow;if(f.rowPinned&&!yh(f)){le(59);continue}if(f.id===void 0){le(60);continue}if(e&&h.destroyed)continue;this.groupSelectsFiltered&&f.group&&!a.get("treeData")||this.selectRowNode(f,e,o,r)&&(this.detailSelection.delete(f.id),l++),this.groupSelectsDescendants&&f.childrenAfterGroup?.length&&(l+=this.selectChildren(f,e,r))}return n||(i.length===1&&r==="api"&&this.selectionCtx.setRoot(i[0].primaryRow),e&&(t||!this.isMultiSelect())&&(l+=this.clearOtherNodes(i[0].primaryRow,s,r)),l>0&&(this.updateGroupsFromChildrenSelections(r),this.dispatchSelectionChanged(r))),l}selectRange(e,t,n){let i=0;return e.forEach(o=>{const r=o.primaryRow;if(r.group&&this.groupSelectsDescendants)return;this.selectRowNode(r,t,void 0,n)&&i++}),i>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n)),i}selectChildren(e,t,n){const i=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return i?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:n,nodes:i}):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((n,i)=>{e(n)&&t.set(i,n)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:n,rowModel:i}=this.beans;if(!en(n))return!1;const o=i.rootNode;if(!o)return!1;let r=!1;const s=a=>{if(a!==o){const l=this.calculateSelectedFromChildren(a);r=this.selectRowNode(a,l===null?!1:l,void 0,e)||r}};return ia(o,this.beans.rowModel.hierarchical,t,s),r}clearOtherNodes(e,t,n){const i=new Map;let o=0;return this.selectedNodes.forEach(r=>{const s=r.id==e.id;if((t?!pU(e,r):!0)&&!s){const l=this.selectedNodes.get(r.id);o+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:n}),this.groupSelectsDescendants&&r.parent&&i.set(r.parent.id,r.parent)}}),i.forEach(r=>{const s=this.calculateSelectedFromChildren(r);this.selectRowNode(r,s===null?!1:s,void 0,n)}),o}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 jr(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(!en(e))return;const n=t.getTopLevelNodes();if(n===null)return;const i=[];function o(r){for(let s=0,a=r.length;s<a;s++){const l=r[s];l.isSelected()?i.push(l):l.group&&l.childrenAfterGroup&&o(l.childrenAfterGroup)}}return o(n),i}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){const n=en(this.gos);let i=!1;const o=r=>{const s=this.selectRowNode(r.primaryRow,!1,void 0,e);i||(i=s)};if(t==="currentPage"||t==="filtered"){if(!n){mt(102);return}this.getNodesToSelect(t).forEach(o)}else this.selectedNodes.forEach(o),this.reset(e);if(this.selectionCtx.selectAll=!1,n&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(e);i||(i=r)}i&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,n=0;return this.getNodesToSelect(e).forEach(i=>{this.groupSelectsDescendants&&i.group||(i.isSelected()?t++:i.selectable&&n++)}),{selectedCount:t,notSelectedCount:n}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:n}=this.getSelectedCounts(e);return p1(t,n)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],n=o=>t.push(o);if(e==="currentPage")return this.forEachNodeOnPage(o=>{if(!o.group){n(o);return}if(!o.footer&&!o.expanded){const r=s=>{n(s);const a=s.childrenAfterFilter;if(a)for(let l=0,u=a.length;l<u;++l)r(a[l])};r(o);return}this.groupSelectsDescendants||n(o)}),t;const i=this.beans.rowModel;return e==="filtered"?(i.forEachNodeAfterFilter(n),t):(i.forEachNode(n),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:n}=this.beans,i=t.getFirstRow(),o=t.getLastRow();for(let r=i;r<=o;r++){const s=n.getRow(r);s&&e(s)}}selectAllRowNodes(e){const{gos:t,selectionCtx:n}=this;if(!Hs(t)){le(132);return}if(yO(t)&&!xc(t)){le(130);return}if(!this.canSelectAll())return;const{source:i,selectAll:o}=e;let r=!1;if(this.getNodesToSelect(o).forEach(s=>{const a=this.selectRowNode(s.primaryRow,!0,void 0,i);r||(r=a)}),n.selectAll=!0,en(t)&&this.groupSelectsDescendants){const s=this.updateGroupsFromChildrenSelections(i);r||(r=s)}r&&this.dispatchSelectionChanged(i)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,n){if(e||(e=[]),!Array.isArray(e)){mt(103);return}const i=new Set(e),o=[];this.beans.rowModel.forEachNode(r=>{i.has(r.id)&&o.push(r)}),n&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:o,source:t})}canSelectAll(){return en(this.beans.gos)}updateSelectable(e){const{gos:t,rowModel:n}=this.beans;if(!Hs(t))return;const i="selectableChanged",o=en(t)&&this.groupSelectsDescendants,r=[];if(o){const s=n.rootNode;s&&ia(s,n.hierarchical,e,a=>{let l=!1;for(const u of a.childrenAfterGroup)l||(l=u.selectable),!u.group&&!this.updateRowSelectable(u,!0)&&u.isSelected()&&r.push(u);this.setRowSelectable(a,l,!0)})}else n.forEachNode(s=>{!this.updateRowSelectable(s,!0)&&s.isSelected()&&r.push(s)});r.length&&this.setNodesSelected({nodes:r,newValue:!1,source:i}),!e&&o&&this.updateGroupsFromChildrenSelections?.(i)}updateSelectableAfterGrouping(e){this.updateSelectable(e),this.groupSelectsDescendants&&this.updateGroupsFromChildrenSelections?.("rowGroupChanged",e)&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail)return;const n=e.detailNode?.detailGridInfo?.api;if(!n)return;const i=gU(n);e.isSelected()!==i&&this.selectRowNode(e,i,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),i||this.detailSelection.set(e.id,new Set(n.getSelectedNodes().map(r=>r.id)))}setDetailSelectionState(e,t,n){if(this.masterSelectsDetail){if(!xc(t)){le(269);return}switch(e.isSelected()){case!0:{n.selectAll();break}case!1:{n.deselectAll();break}case void 0:{const i=this.detailSelection.get(e.id);if(i){const o=[];for(const r of i){const s=n.getRowNode(r);s&&o.push(s)}n.setNodesSelected({nodes:o,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function gU(e){let t=0,n=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&n++}),p1(t,n)}function p1(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function pU(e,t){let n=t.parent;for(;n;){if(n===e)return!0;n=n.parent}return!1}function m1(e){const t=e.isSelected()===!1,n=e.childrenAfterFilter?.some(m1)??!1;return t||n}var mU={moduleName:"SharedRowSelection",version:Se,beans:[Z9],css:[J9],apiFunctions:{setNodesSelected:X9,selectAll:eU,deselectAll:tU,selectAllFiltered:nU,deselectAllFiltered:iU,selectAllOnCurrentPage:oU,deselectAllOnCurrentPage:rU,getSelectedNodes:sU,getSelectedRows:aU}},vU={moduleName:"RowSelection",version:Se,rowModels:["clientSide","infinite","viewport"],beans:[fU],dependsOn:[mU]},CU=class extends J{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,n=e.colDef,i=n.cellClassRules,o=this.getCellClassParams(e,n);Jm(this.beans.expressionSvc,i===this.cellClassRules?void 0:this.cellClassRules,i,o,r=>t.toggleCss(r,!0),r=>t.toggleCss(r,!1)),this.cellClassRules=i}applyUserStyles(){const e=this.column,t=e.colDef,n=t.cellStyle;if(!n)return;let i;if(typeof n=="function"){const o=this.getCellClassParams(e,t);i=n(o)}else i=n;i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,n=e.colDef,i=this.getCellClassParams(e,n);for(const r of this.staticClasses)t.toggleCss(r,!1);const o=this.beans.cellStyles.getStaticCellClasses(n,i);this.staticClasses=o;for(const r of o)t.toggleCss(r,!0)}getCellClassParams(e,t){const{value:n,rowNode:i}=this.cellCtrl;return Ue(this.beans.gos,{value:n,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},wU=class extends J{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,n,i){Jm(this.beans.expressionSvc,void 0,e.cellClassRules,t,n,i),this.processStaticCellClasses(e,t,n)}getStaticCellClasses(e,t){const{cellClass:n}=e;if(!n)return[];let i;return typeof n=="function"?i=n(t):i=n,typeof i=="string"&&(i=[i]),i||[]}createCellCustomStyleFeature(e){return new CU(e,this.beans)}processStaticCellClasses(e,t,n){this.getStaticCellClasses(e,t).forEach(o=>{n(o)})}},bU={moduleName:"CellStyle",version:Se,beans:[wU]},yU={moduleName:"RowStyle",version:Se,beans:[p3]},SU={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,overlayComponent:!0,suppressOverlays:!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},ai="clientSide",_n="serverSide",fl="infinite",RU={onGroupExpandedOrCollapsed:[ai],refreshClientSideRowModel:[ai],isRowDataEmpty:[ai],forEachLeafNode:[ai],forEachNodeAfterFilter:[ai],forEachNodeAfterFilterAndSort:[ai],resetRowHeights:[ai,_n],applyTransaction:[ai],applyTransactionAsync:[ai],flushAsyncTransactions:[ai],getBestCostNodeSelection:[ai],getServerSideSelectionState:[_n],setServerSideSelectionState:[_n],applyServerSideTransaction:[_n],applyServerSideTransactionAsync:[_n],applyServerSideRowData:[_n],retryServerSideLoads:[_n],flushServerSideAsyncTransactions:[_n],refreshServerSide:[_n],getServerSideGroupLevelState:[_n],refreshInfiniteCache:[fl],purgeInfiniteCache:[fl],getInfiniteRowCount:[fl],isLastRowIndexKnown:[fl,_n],expandAll:[ai,_n],collapseAll:[ai,_n],onRowHeightChanged:[ai,_n],setRowCount:[fl,_n],getCacheBlockState:[fl,_n]},xU={showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"},selectAllFiltered:{version:"v33",old:"selectAllFiltered()",new:'selectAll("filtered")'},deselectAllFiltered:{version:"v33",old:"deselectAllFiltered()",new:'deselectAll("filtered")'},selectAllOnCurrentPage:{version:"v33",old:"selectAllOnCurrentPage()",new:'selectAll("currentPage")'},deselectAllOnCurrentPage:{version:"v33",old:"deselectAllOnCurrentPage()",new:'deselectAll("currentPage")'}};function FU(e,t,n){const i=xU[e];if(i){const{version:r,new:s,old:a,message:l}=i,u=a??e;return(...h)=>{const f=s?`Please use ${s} instead. `:"";return yc(`Since ${r} api.${u} is deprecated. ${f}${l??""}`),t.apply(t,h)}}const o=RU[e];return o?(...r)=>{const s=n.rowModel.getType();if(!o.includes(s)){Wa(`api.${e} can only be called when gridOptions.rowModelType is ${o.join(" or ")}`);return}return t.apply(t,r)}:t}var PU={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",agBigIntColumnFilterHandler:"BigIntFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},EU={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,aasc:1,adesc: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},DU={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",overlayLoading:"Overlay",overlayExporting:"Overlay",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",richSelectLoading:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortAbsoluteAscending:["MenuCore","Sort"],sortAbsoluteDescending:["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"},TU=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),AU=class extends J{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,aO(EW)}warnOnInitialPropertyUpdate(e,t){e==="api"&&SU[t]&&le(22,{key:t})}processGridOptions(e){this.processOptions(e,m5())}validateApiFunction(e,t){return FU(e,t,this.beans)}missingUserComponent(e,t,n,i){const o=sl[t];o?this.gos.assertModuleRegistered(o,`AG Grid '${e}' component: ${t}`):le(101,{propertyName:e,componentName:t,agGridDefaults:n,jsComps:i})}missingDynamicBean(e){const t=PU[e];return t?Do(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){MU.has(e)&&le(10,{eventType:e})}validateIcon(e){if(TU.has(e)&&le(43,{iconName:e}),EU[e])return;const t=DU[e];if(t){mt(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:Ap(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}le(134,{iconName:e})}isProvidedUserComp(e){return!!sl[e]}validateColDef(e){this.processOptions(e,l5())}processOptions(e,t){const{validations:n,deprecations:i,allProperties:o,propertyExceptions:r,objectName:s,docsUrl:a}=t;o&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...r??[],...Object.keys(i)],o,s,a);const l=new Set;if(Object.keys(e).forEach(h=>{const f=i[h];if(f){const{message:R,version:S}=f;l.add(`As of v${S}, ${String(h)} is deprecated. ${R??""}`)}const g=e[h];if(g==null||g===!1)return;const m=n[h];if(!m)return;const{dependencies:v,validate:w,supportedRowModels:b,expectedType:y}=m;if(y){const R=typeof g;if(R!==y){l.add(`${String(h)} should be of type '${y}' but received '${R}' (${g}).`);return}}if(b){const R=this.gridOptions.rowModelType??"clientSide";if(!b.includes(R)){l.add(`${String(h)} is not supported with the '${R}' row model. It is only valid with: ${b.join(", ")}.`);return}}if(v){const R=this.checkForRequiredDependencies(h,v,e);if(R){l.add(R);return}}if(w){const R=w(e,this.gridOptions,this.beans);if(R){l.add(R);return}}}),l.size>0)for(const h of l)yc(h)}checkForRequiredDependencies(e,t,n){const o=Object.entries(t).filter(([r,s])=>{const a=n[r];return!s.required.includes(a)});return o.length===0?null:o.map(([r,s])=>`'${String(e)}' requires '${r}' to be one of [${s.required.map(a=>a===null?"null":a===void 0?"undefined":a).join(", ")}]. ${s.reason??""}`).join(`
|
|
65
65
|
`)}checkProperties(e,t,n,i,o){const r=["__ob__","__v_skip","__metadata__"],s=IU(Object.getOwnPropertyNames(e),[...r,...t,...n],n),a=Object.keys(s);for(const l of a){const u=s[l];let h=`invalid ${i} property '${l}' did you mean any of these: ${u.slice(0,8).join(", ")}.`;n.includes("context")&&(h+=`
|
|
66
|
-
If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),yc(h)}if(a.length>0&&o){const l=this.beans.frameworkOverrides.getDocLink(o);yc(`to see all the valid ${i} properties please check: ${l}`)}}};function IU(e,t,n){const i={},o=e.filter(r=>!t.some(s=>s===r));if(o.length>0)for(const r of o)i[r]=ov({inputValue:r,allSuggestions:n}).values;return i}var MU=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),kU={moduleName:"Validation",version:Se,beans:[AU]},LU={moduleName:"AllCommunity",version:Se,dependsOn:[D4,Y4,
|
|
66
|
+
If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),yc(h)}if(a.length>0&&o){const l=this.beans.frameworkOverrides.getDocLink(o);yc(`to see all the valid ${i} properties please check: ${l}`)}}};function IU(e,t,n){const i={},o=e.filter(r=>!t.some(s=>s===r));if(o.length>0)for(const r of o)i[r]=ov({inputValue:r,allSuggestions:n}).values;return i}var MU=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),kU={moduleName:"Validation",version:Se,beans:[AU]},LU={moduleName:"AllCommunity",version:Se,dependsOn:[D4,Y4,O7,kU,R6,x6,F6,P6,E6,D6,T6,S6,w7,b7,y7,S7,C7,x7,F7,Q7,OW,m9,dx,uF,qW,V9,O4,DB,R9,vU,fW,bU,G4,yU,V7,mW,k9,xF,z7,z9,EB,T4,Y9]},OU=class{wrap(e,t,n,i){const o=this.createWrapper(e,i);for(const r of t??[])this.createMethod(o,r,!0);for(const r of n??[])this.createMethod(o,r,!1);return o}createMethod(e,t,n){e.addMethod(t,this.createMethodProxy(e,t,n))}createMethodProxy(e,t,n){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(n&&le(49,{methodName:t}),null)}}};function Wv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function _U(e){if(Array.isArray(e))return e}function NU(e){if(Array.isArray(e))return Wv(e)}function BU(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HU(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,C1(i.key),i)}}function GU(e,t,n){return t&&HU(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Gh(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=zv(e))||t){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(l){throw l},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
67
67
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return s=l.done,l},e:function(l){a=!0,r=l},f:function(){try{s||n.return==null||n.return()}finally{if(a)throw r}}}}function nt(e,t,n){return(t=C1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VU(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function WU(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,o,r,s,a=[],l=!0,u=!1;try{if(r=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(h){u=!0,o=h}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return a}}function zU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
68
68
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UU(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
69
69
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v1(Object(n),!0).forEach(function(i){nt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v1(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Vh(e,t){return _U(e)||WU(e,t)||zv(e,t)||zU()}function ao(e){return NU(e)||VU(e)||zv(e)||UU()}function $U(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function C1(e){var t=$U(e,"string");return typeof t=="symbol"?t:t+""}function Wh(e){"@babel/helpers - typeof";return Wh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wh(e)}function zv(e,t){if(e){if(typeof e=="string")return Wv(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wv(e,t):void 0}}var w1=function(){},Uv={},b1={},y1=null,S1={mark:w1,measure:w1};try{typeof window<"u"&&(Uv=window),typeof document<"u"&&(b1=document),typeof MutationObserver<"u"&&(y1=MutationObserver),typeof performance<"u"&&(S1=performance)}catch{}var jU=Uv.navigator||{},R1=jU.userAgent,x1=R1===void 0?"":R1,os=Uv,Nt=b1,F1=y1,zh=S1;os.document;var dr=!!Nt.documentElement&&!!Nt.head&&typeof Nt.addEventListener=="function"&&typeof Nt.createElement=="function",P1=~x1.indexOf("MSIE")||~x1.indexOf("Trident/"),$v,KU=/fa(k|kd|s|r|l|t|d|dr|dl|dt|b|slr|slpr|wsb|tl|ns|nds|es|gt|jr|jfr|jdr|usb|ufsb|udsb|cr|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,qU=/Font ?Awesome ?([567 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit|Notdog Duo|Notdog|Chisel|Etch|Graphite|Thumbprint|Jelly Fill|Jelly Duo|Jelly|Utility|Utility Fill|Utility Duo|Slab Press|Slab|Whiteboard)?.*/i,E1={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"},slab:{"fa-regular":"regular",faslr:"regular"},"slab-press":{"fa-regular":"regular",faslpr:"regular"},thumbprint:{"fa-light":"light",fatl:"light"},whiteboard:{"fa-semibold":"semibold",fawsb:"semibold"},notdog:{"fa-solid":"solid",fans:"solid"},"notdog-duo":{"fa-solid":"solid",fands:"solid"},etch:{"fa-solid":"solid",faes:"solid"},graphite:{"fa-thin":"thin",fagt:"thin"},jelly:{"fa-regular":"regular",fajr:"regular"},"jelly-fill":{"fa-regular":"regular",fajfr:"regular"},"jelly-duo":{"fa-regular":"regular",fajdr:"regular"},chisel:{"fa-regular":"regular",facr:"regular"},utility:{"fa-semibold":"semibold",fausb:"semibold"},"utility-duo":{"fa-semibold":"semibold",faudsb:"semibold"},"utility-fill":{"fa-semibold":"semibold",faufsb:"semibold"}},QU={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},D1=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-graphite","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],Pn="classic",jc="duotone",T1="sharp",A1="sharp-duotone",I1="chisel",M1="etch",k1="graphite",L1="jelly",O1="jelly-duo",_1="jelly-fill",N1="notdog",B1="notdog-duo",H1="slab",G1="slab-press",V1="thumbprint",W1="utility",z1="utility-duo",U1="utility-fill",$1="whiteboard",YU="Classic",ZU="Duotone",JU="Sharp",XU="Sharp Duotone",e$="Chisel",t$="Etch",n$="Graphite",i$="Jelly",o$="Jelly Duo",r$="Jelly Fill",s$="Notdog",a$="Notdog Duo",l$="Slab",c$="Slab Press",u$="Thumbprint",d$="Utility",h$="Utility Duo",f$="Utility Fill",g$="Whiteboard",j1=[Pn,jc,T1,A1,I1,M1,k1,L1,O1,_1,N1,B1,H1,G1,V1,W1,z1,U1,$1];$v={},nt(nt(nt(nt(nt(nt(nt(nt(nt(nt($v,Pn,YU),jc,ZU),T1,JU),A1,XU),I1,e$),M1,t$),k1,n$),L1,i$),O1,o$),_1,r$),nt(nt(nt(nt(nt(nt(nt(nt(nt($v,N1,s$),B1,a$),H1,l$),G1,c$),V1,u$),W1,d$),z1,h$),U1,f$),$1,g$);var p$={classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"},slab:{400:"faslr"},"slab-press":{400:"faslpr"},whiteboard:{600:"fawsb"},thumbprint:{300:"fatl"},notdog:{900:"fans"},"notdog-duo":{900:"fands"},etch:{900:"faes"},graphite:{100:"fagt"},chisel:{400:"facr"},jelly:{400:"fajr"},"jelly-fill":{400:"fajfr"},"jelly-duo":{400:"fajdr"},utility:{600:"fausb"},"utility-duo":{600:"faudsb"},"utility-fill":{600:"faufsb"}},m$={"Font Awesome 7 Free":{900:"fas",400:"far"},"Font Awesome 7 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 7 Brands":{400:"fab",normal:"fab"},"Font Awesome 7 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 7 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 7 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"},"Font Awesome 7 Jelly":{400:"fajr",normal:"fajr"},"Font Awesome 7 Jelly Fill":{400:"fajfr",normal:"fajfr"},"Font Awesome 7 Jelly Duo":{400:"fajdr",normal:"fajdr"},"Font Awesome 7 Slab":{400:"faslr",normal:"faslr"},"Font Awesome 7 Slab Press":{400:"faslpr",normal:"faslpr"},"Font Awesome 7 Thumbprint":{300:"fatl",normal:"fatl"},"Font Awesome 7 Notdog":{900:"fans",normal:"fans"},"Font Awesome 7 Notdog Duo":{900:"fands",normal:"fands"},"Font Awesome 7 Etch":{900:"faes",normal:"faes"},"Font Awesome 7 Graphite":{100:"fagt",normal:"fagt"},"Font Awesome 7 Chisel":{400:"facr",normal:"facr"},"Font Awesome 7 Whiteboard":{600:"fawsb",normal:"fawsb"},"Font Awesome 7 Utility":{600:"fausb",normal:"fausb"},"Font Awesome 7 Utility Duo":{600:"faudsb",normal:"faudsb"},"Font Awesome 7 Utility Fill":{600:"faufsb",normal:"faufsb"}},v$=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["chisel",{defaultShortPrefixId:"facr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["etch",{defaultShortPrefixId:"faes",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["graphite",{defaultShortPrefixId:"fagt",defaultStyleId:"thin",styleIds:["thin"],futureStyleIds:[],defaultFontWeight:100}],["jelly",{defaultShortPrefixId:"fajr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-duo",{defaultShortPrefixId:"fajdr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-fill",{defaultShortPrefixId:"fajfr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["notdog",{defaultShortPrefixId:"fans",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["notdog-duo",{defaultShortPrefixId:"fands",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["slab",{defaultShortPrefixId:"faslr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["slab-press",{defaultShortPrefixId:"faslpr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["thumbprint",{defaultShortPrefixId:"fatl",defaultStyleId:"light",styleIds:["light"],futureStyleIds:[],defaultFontWeight:300}],["utility",{defaultShortPrefixId:"fausb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-duo",{defaultShortPrefixId:"faudsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-fill",{defaultShortPrefixId:"faufsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["whiteboard",{defaultShortPrefixId:"fawsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}]]),C$={chisel:{regular:"facr"},classic:{brands:"fab",light:"fal",regular:"far",solid:"fas",thin:"fat"},duotone:{light:"fadl",regular:"fadr",solid:"fad",thin:"fadt"},etch:{solid:"faes"},graphite:{thin:"fagt"},jelly:{regular:"fajr"},"jelly-duo":{regular:"fajdr"},"jelly-fill":{regular:"fajfr"},notdog:{solid:"fans"},"notdog-duo":{solid:"fands"},sharp:{light:"fasl",regular:"fasr",solid:"fass",thin:"fast"},"sharp-duotone":{light:"fasdl",regular:"fasdr",solid:"fasds",thin:"fasdt"},slab:{regular:"faslr"},"slab-press":{regular:"faslpr"},thumbprint:{light:"fatl"},utility:{semibold:"fausb"},"utility-duo":{semibold:"faudsb"},"utility-fill":{semibold:"faufsb"},whiteboard:{semibold:"fawsb"}},K1=["fak","fa-kit","fakd","fa-kit-duotone"],q1={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},w$=["kit"],b$="kit",y$="kit-duotone",S$="Kit",R$="Kit Duotone";nt(nt({},b$,S$),y$,R$);var x$={kit:{"fa-kit":"fak"}},F$={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},P$={kit:{fak:"fa-kit"}},Q1={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}},jv,Uh={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},E$=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-graphite","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],D$="classic",T$="duotone",A$="sharp",I$="sharp-duotone",M$="chisel",k$="etch",L$="graphite",O$="jelly",_$="jelly-duo",N$="jelly-fill",B$="notdog",H$="notdog-duo",G$="slab",V$="slab-press",W$="thumbprint",z$="utility",U$="utility-duo",$$="utility-fill",j$="whiteboard",K$="Classic",q$="Duotone",Q$="Sharp",Y$="Sharp Duotone",Z$="Chisel",J$="Etch",X$="Graphite",ej="Jelly",tj="Jelly Duo",nj="Jelly Fill",ij="Notdog",oj="Notdog Duo",rj="Slab",sj="Slab Press",aj="Thumbprint",lj="Utility",cj="Utility Duo",uj="Utility Fill",dj="Whiteboard";jv={},nt(nt(nt(nt(nt(nt(nt(nt(nt(nt(jv,D$,K$),T$,q$),A$,Q$),I$,Y$),M$,Z$),k$,J$),L$,X$),O$,ej),_$,tj),N$,nj),nt(nt(nt(nt(nt(nt(nt(nt(nt(jv,B$,ij),H$,oj),G$,rj),V$,sj),W$,aj),z$,lj),U$,cj),$$,uj),j$,dj);var hj="kit",fj="kit-duotone",gj="Kit",pj="Kit Duotone";nt(nt({},hj,gj),fj,pj);var mj={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"},slab:{"fa-regular":"faslr"},"slab-press":{"fa-regular":"faslpr"},whiteboard:{"fa-semibold":"fawsb"},thumbprint:{"fa-light":"fatl"},notdog:{"fa-solid":"fans"},"notdog-duo":{"fa-solid":"fands"},etch:{"fa-solid":"faes"},graphite:{"fa-thin":"fagt"},jelly:{"fa-regular":"fajr"},"jelly-fill":{"fa-regular":"fajfr"},"jelly-duo":{"fa-regular":"fajdr"},chisel:{"fa-regular":"facr"},utility:{"fa-semibold":"fausb"},"utility-duo":{"fa-semibold":"faudsb"},"utility-fill":{"fa-semibold":"faufsb"}},vj={classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"],slab:["faslr"],"slab-press":["faslpr"],whiteboard:["fawsb"],thumbprint:["fatl"],notdog:["fans"],"notdog-duo":["fands"],etch:["faes"],graphite:["fagt"],jelly:["fajr"],"jelly-fill":["fajfr"],"jelly-duo":["fajdr"],chisel:["facr"],utility:["fausb"],"utility-duo":["faudsb"],"utility-fill":["faufsb"]},Kv={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"},slab:{faslr:"fa-regular"},"slab-press":{faslpr:"fa-regular"},whiteboard:{fawsb:"fa-semibold"},thumbprint:{fatl:"fa-light"},notdog:{fans:"fa-solid"},"notdog-duo":{fands:"fa-solid"},etch:{faes:"fa-solid"},graphite:{fagt:"fa-thin"},jelly:{fajr:"fa-regular"},"jelly-fill":{fajfr:"fa-regular"},"jelly-duo":{fajdr:"fa-regular"},chisel:{facr:"fa-regular"},utility:{fausb:"fa-semibold"},"utility-duo":{faudsb:"fa-semibold"},"utility-fill":{faufsb:"fa-semibold"}},Cj=["fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands","fa-semibold"],Y1=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt","faslr","faslpr","fawsb","fatl","fans","fands","faes","fagt","fajr","fajfr","fajdr","facr","fausb","faudsb","faufsb"].concat(E$,Cj),wj=["solid","regular","light","thin","duotone","brands","semibold"],Z1=[1,2,3,4,5,6,7,8,9,10],bj=Z1.concat([11,12,13,14,15,16,17,18,19,20]),yj=["aw","fw","pull-left","pull-right"],Sj=[].concat(ao(Object.keys(vj)),wj,yj,["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","inverse","layers","layers-bottom-left","layers-bottom-right","layers-counter","layers-text","layers-top-left","layers-top-right","li","pull-end","pull-start","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul","width-auto","width-fixed",Uh.GROUP,Uh.SWAP_OPACITY,Uh.PRIMARY,Uh.SECONDARY]).concat(Z1.map(function(e){return"".concat(e,"x")})).concat(bj.map(function(e){return"w-".concat(e)})),Rj={"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}},hr="___FONT_AWESOME___",qv=16,J1="fa",X1="svg-inline--fa",ra="data-fa-i2svg",Qv="data-fa-pseudo-element",xj="data-fa-pseudo-element-pending",Yv="data-prefix",Zv="data-icon",eP="fontawesome-i2svg",Fj="async",Pj=["HTML","HEAD","STYLE","SCRIPT"],tP=["::before","::after",":before",":after"],nP=(function(){try{return!0}catch{return!1}})();function Kc(e){return new Proxy(e,{get:function(n,i){return i in n?n[i]:n[Pn]}})}var iP=be({},E1);iP[Pn]=be(be(be(be({},{"fa-duotone":"duotone"}),E1[Pn]),q1.kit),q1["kit-duotone"]);var Ej=Kc(iP),Jv=be({},C$);Jv[Pn]=be(be(be(be({},{duotone:"fad"}),Jv[Pn]),Q1.kit),Q1["kit-duotone"]);var oP=Kc(Jv),Xv=be({},Kv);Xv[Pn]=be(be({},Xv[Pn]),P$.kit);var eC=Kc(Xv),tC=be({},mj);tC[Pn]=be(be({},tC[Pn]),x$.kit),Kc(tC);var Dj=KU,rP="fa-layers-text",Tj=qU,Aj=be({},p$);Kc(Aj);var Ij=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],nC=QU,Mj=[].concat(ao(w$),ao(Sj)),qc=os.FontAwesomeConfig||{};function kj(e){var t=Nt.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function Lj(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}if(Nt&&typeof Nt.querySelector=="function"){var Oj=[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-search-pseudo-elements","searchPseudoElements"],["data-search-pseudo-elements-warnings","searchPseudoElementsWarnings"],["data-search-pseudo-elements-full-scan","searchPseudoElementsFullScan"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]];Oj.forEach(function(e){var t=Vh(e,2),n=t[0],i=t[1],o=Lj(kj(n));o!=null&&(qc[i]=o)})}var sP={styleDefault:"solid",familyDefault:Pn,cssPrefix:J1,replacementClass:X1,autoReplaceSvg:!0,autoAddCss:!0,searchPseudoElements:!1,searchPseudoElementsWarnings:!0,searchPseudoElementsFullScan:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};qc.familyPrefix&&(qc.cssPrefix=qc.familyPrefix);var gl=be(be({},sP),qc);gl.autoReplaceSvg||(gl.observeMutations=!1);var We={};Object.keys(sP).forEach(function(e){Object.defineProperty(We,e,{enumerable:!0,set:function(n){gl[e]=n,Qc.forEach(function(i){return i(We)})},get:function(){return gl[e]}})}),Object.defineProperty(We,"familyPrefix",{enumerable:!0,set:function(t){gl.cssPrefix=t,Qc.forEach(function(n){return n(We)})},get:function(){return gl.cssPrefix}}),os.FontAwesomeConfig=We;var Qc=[];function _j(e){return Qc.push(e),function(){Qc.splice(Qc.indexOf(e),1)}}var pl=qv,Bo={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function Nj(e){if(!(!e||!dr)){var t=Nt.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=Nt.head.childNodes,i=null,o=n.length-1;o>-1;o--){var r=n[o],s=(r.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(s)>-1&&(i=r)}return Nt.head.insertBefore(t,i),e}}var Bj="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function aP(){for(var e=12,t="";e-- >0;)t+=Bj[Math.random()*62|0];return t}function ml(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function iC(e){return e.classList?ml(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function lP(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Hj(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(lP(e[n]),'" ')},"").trim()}function $h(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function oC(e){return e.size!==Bo.size||e.x!==Bo.x||e.y!==Bo.y||e.rotate!==Bo.rotate||e.flipX||e.flipY}function Gj(e){var t=e.transform,n=e.containerWidth,i=e.iconWidth,o={transform:"translate(".concat(n/2," 256)")},r="translate(".concat(t.x*32,", ").concat(t.y*32,") "),s="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),a="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(r," ").concat(s," ").concat(a)},u={transform:"translate(".concat(i/2*-1," -256)")};return{outer:o,inner:l,path:u}}function Vj(e){var t=e.transform,n=e.width,i=n===void 0?qv:n,o=e.height,r=o===void 0?qv:o,s="";return P1?s+="translate(".concat(t.x/pl-i/2,"em, ").concat(t.y/pl-r/2,"em) "):s+="translate(calc(-50% + ".concat(t.x/pl,"em), calc(-50% + ").concat(t.y/pl,"em)) "),s+="scale(".concat(t.size/pl*(t.flipX?-1:1),", ").concat(t.size/pl*(t.flipY?-1:1),") "),s+="rotate(".concat(t.rotate,"deg) "),s}var Wj=`:root, :host {
|
|
@@ -664,4 +664,4 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
664
664
|
`:`;
|
|
665
665
|
`)+ue+`return __p
|
|
666
666
|
}`;var st=gI(function(){return Rt(T,Be+"return "+ue).apply(n,_)});if(st.source=ue,mb(st))throw st;return st}function Gae(c){return Dt(c).toLowerCase()}function Vae(c){return Dt(c).toUpperCase()}function Wae(c,d,p){if(c=Dt(c),c&&(p||d===n))return RT(c);if(!c||!(d=xi(d)))return c;var C=go(c),x=go(d),T=xT(C,x),_=FT(C,x)+1;return bs(C,T,_).join("")}function zae(c,d,p){if(c=Dt(c),c&&(p||d===n))return c.slice(0,ET(c)+1);if(!c||!(d=xi(d)))return c;var C=go(c),x=FT(C,go(d))+1;return bs(C,0,x).join("")}function Uae(c,d,p){if(c=Dt(c),c&&(p||d===n))return c.replace(mw,"");if(!c||!(d=xi(d)))return c;var C=go(c),x=xT(C,go(d));return bs(C,x).join("")}function $ae(c,d){var p=M,C=E;if(qt(d)){var x="separator"in d?d.separator:x;p="length"in d?ot(d.length):p,C="omission"in d?xi(d.omission):C}c=Dt(c);var T=c.length;if(Pl(c)){var _=go(c);T=_.length}if(p>=T)return c;var G=p-El(C);if(G<1)return C;var $=_?bs(_,0,G).join(""):c.slice(0,G);if(x===n)return $+C;if(_&&(G+=$.length-G),vb(x)){if(c.slice(G).search(x)){var re,se=$;for(x.global||(x=kw(x.source,Dt($D.exec(x))+"g")),x.lastIndex=0;re=x.exec(se);)var ue=re.index;$=$.slice(0,ue===n?G:ue)}}else if(c.indexOf(xi(x),G)!=G){var Ae=$.lastIndexOf(x);Ae>-1&&($=$.slice(0,Ae))}return $+C}function jae(c){return c=Dt(c),c&&_e.test(c)?c.replace(Lf,yne):c}var Kae=Ll(function(c,d,p){return c+(p?" ":"")+d.toUpperCase()}),bb=pA("toUpperCase");function fI(c,d,p){return c=Dt(c),d=p?n:d,d===n?mne(c)?xne(c):ane(c):c.match(d)||[]}var gI=at(function(c,d){try{return Si(c,n,d)}catch(p){return mb(p)?p:new tt(p)}}),qae=Rr(function(c,d){return Wi(d,function(p){p=zo(p),yr(c,p,gb(c[p],c))}),c});function Qae(c){var d=c==null?0:c.length,p=Ke();return c=d?Kt(c,function(C){if(typeof C[1]!="function")throw new zi(s);return[p(C[0]),C[1]]}):[],at(function(C){for(var x=-1;++x<d;){var T=c[x];if(Si(T[0],this,C))return Si(T[1],this,C)}})}function Yae(c){return yie($i(c,f))}function yb(c){return function(){return c}}function Zae(c,d){return c==null||c!==c?d:c}var Jae=vA(),Xae=vA(!0);function di(c){return c}function Sb(c){return KT(typeof c=="function"?c:$i(c,f))}function ele(c){return QT($i(c,f))}function tle(c,d){return YT(c,$i(d,f))}var nle=at(function(c,d){return function(p){return Ou(p,c,d)}}),ile=at(function(c,d){return function(p){return Ou(c,p,d)}});function Rb(c,d,p){var C=Sn(d),x=ig(d,C);p==null&&!(qt(d)&&(x.length||!C.length))&&(p=d,d=c,c=this,x=ig(d,Sn(d)));var T=!(qt(p)&&"chain"in p)||!!p.chain,_=Fr(c);return Wi(x,function(G){var $=d[G];c[G]=$,_&&(c.prototype[G]=function(){var re=this.__chain__;if(T||re){var se=c(this.__wrapped__),ue=se.__actions__=li(this.__actions__);return ue.push({func:$,args:arguments,thisArg:c}),se.__chain__=re,se}return $.apply(c,gs([this.value()],arguments))})}),c}function ole(){return Tn._===this&&(Tn._=Ane),this}function xb(){}function rle(c){return c=ot(c),at(function(d){return ZT(d,c)})}var sle=tb(Kt),ale=tb(CT),lle=tb(Pw);function pI(c){return lb(c)?Ew(zo(c)):Bie(c)}function cle(c){return function(d){return c==null?n:Ra(c,d)}}var ule=wA(),dle=wA(!0);function Fb(){return[]}function Pb(){return!1}function hle(){return{}}function fle(){return""}function gle(){return!0}function ple(c,d){if(c=ot(c),c<1||c>me)return[];var p=H,C=Bn(c,H);d=Ke(d),c-=H;for(var x=Aw(C,d);++p<c;)d(p);return x}function mle(c){return it(c)?Kt(c,zo):Fi(c)?[c]:li(OA(Dt(c)))}function vle(c){var d=++Dne;return Dt(c)+d}var Cle=cg(function(c,d){return c+d},0),wle=nb("ceil"),ble=cg(function(c,d){return c/d},1),yle=nb("floor");function Sle(c){return c&&c.length?ng(c,di,Vw):n}function Rle(c,d){return c&&c.length?ng(c,Ke(d,2),Vw):n}function xle(c){return yT(c,di)}function Fle(c,d){return yT(c,Ke(d,2))}function Ple(c){return c&&c.length?ng(c,di,$w):n}function Ele(c,d){return c&&c.length?ng(c,Ke(d,2),$w):n}var Dle=cg(function(c,d){return c*d},1),Tle=nb("round"),Ale=cg(function(c,d){return c-d},0);function Ile(c){return c&&c.length?Tw(c,di):0}function Mle(c,d){return c&&c.length?Tw(c,Ke(d,2)):0}return D.after=ese,D.ary=jA,D.assign=Vse,D.assignIn=sI,D.assignInWith=Sg,D.assignWith=Wse,D.at=zse,D.before=KA,D.bind=gb,D.bindAll=qae,D.bindKey=qA,D.castArray=hse,D.chain=zA,D.chunk=yoe,D.compact=Soe,D.concat=Roe,D.cond=Qae,D.conforms=Yae,D.constant=yb,D.countBy=Ire,D.create=Use,D.curry=QA,D.curryRight=YA,D.debounce=ZA,D.defaults=$se,D.defaultsDeep=jse,D.defer=tse,D.delay=nse,D.difference=xoe,D.differenceBy=Foe,D.differenceWith=Poe,D.drop=Eoe,D.dropRight=Doe,D.dropRightWhile=Toe,D.dropWhile=Aoe,D.fill=Ioe,D.filter=kre,D.flatMap=_re,D.flatMapDeep=Nre,D.flatMapDepth=Bre,D.flatten=HA,D.flattenDeep=Moe,D.flattenDepth=koe,D.flip=ise,D.flow=Jae,D.flowRight=Xae,D.fromPairs=Loe,D.functions=Xse,D.functionsIn=eae,D.groupBy=Hre,D.initial=_oe,D.intersection=Noe,D.intersectionBy=Boe,D.intersectionWith=Hoe,D.invert=nae,D.invertBy=iae,D.invokeMap=Vre,D.iteratee=Sb,D.keyBy=Wre,D.keys=Sn,D.keysIn=ui,D.map=mg,D.mapKeys=rae,D.mapValues=sae,D.matches=ele,D.matchesProperty=tle,D.memoize=Cg,D.merge=aae,D.mergeWith=aI,D.method=nle,D.methodOf=ile,D.mixin=Rb,D.negate=wg,D.nthArg=rle,D.omit=lae,D.omitBy=cae,D.once=ose,D.orderBy=zre,D.over=sle,D.overArgs=rse,D.overEvery=ale,D.overSome=lle,D.partial=pb,D.partialRight=JA,D.partition=Ure,D.pick=uae,D.pickBy=lI,D.property=pI,D.propertyOf=cle,D.pull=zoe,D.pullAll=VA,D.pullAllBy=Uoe,D.pullAllWith=$oe,D.pullAt=joe,D.range=ule,D.rangeRight=dle,D.rearg=sse,D.reject=Kre,D.remove=Koe,D.rest=ase,D.reverse=hb,D.sampleSize=Qre,D.set=hae,D.setWith=fae,D.shuffle=Yre,D.slice=qoe,D.sortBy=Xre,D.sortedUniq=tre,D.sortedUniqBy=nre,D.split=_ae,D.spread=lse,D.tail=ire,D.take=ore,D.takeRight=rre,D.takeRightWhile=sre,D.takeWhile=are,D.tap=Sre,D.throttle=cse,D.thru=pg,D.toArray=iI,D.toPairs=cI,D.toPairsIn=uI,D.toPath=mle,D.toPlainObject=rI,D.transform=gae,D.unary=use,D.union=lre,D.unionBy=cre,D.unionWith=ure,D.uniq=dre,D.uniqBy=hre,D.uniqWith=fre,D.unset=pae,D.unzip=fb,D.unzipWith=WA,D.update=mae,D.updateWith=vae,D.values=Nl,D.valuesIn=Cae,D.without=gre,D.words=fI,D.wrap=dse,D.xor=pre,D.xorBy=mre,D.xorWith=vre,D.zip=Cre,D.zipObject=wre,D.zipObjectDeep=bre,D.zipWith=yre,D.entries=cI,D.entriesIn=uI,D.extend=sI,D.extendWith=Sg,Rb(D,D),D.add=Cle,D.attempt=gI,D.camelCase=Sae,D.capitalize=dI,D.ceil=wle,D.clamp=wae,D.clone=fse,D.cloneDeep=pse,D.cloneDeepWith=mse,D.cloneWith=gse,D.conformsTo=vse,D.deburr=hI,D.defaultTo=Zae,D.divide=ble,D.endsWith=Rae,D.eq=mo,D.escape=xae,D.escapeRegExp=Fae,D.every=Mre,D.find=Lre,D.findIndex=NA,D.findKey=Kse,D.findLast=Ore,D.findLastIndex=BA,D.findLastKey=qse,D.floor=yle,D.forEach=UA,D.forEachRight=$A,D.forIn=Qse,D.forInRight=Yse,D.forOwn=Zse,D.forOwnRight=Jse,D.get=Cb,D.gt=Cse,D.gte=wse,D.has=tae,D.hasIn=wb,D.head=GA,D.identity=di,D.includes=Gre,D.indexOf=Ooe,D.inRange=bae,D.invoke=oae,D.isArguments=Pa,D.isArray=it,D.isArrayBuffer=bse,D.isArrayLike=ci,D.isArrayLikeObject=nn,D.isBoolean=yse,D.isBuffer=ys,D.isDate=Sse,D.isElement=Rse,D.isEmpty=xse,D.isEqual=Fse,D.isEqualWith=Pse,D.isError=mb,D.isFinite=Ese,D.isFunction=Fr,D.isInteger=XA,D.isLength=bg,D.isMap=eI,D.isMatch=Dse,D.isMatchWith=Tse,D.isNaN=Ase,D.isNative=Ise,D.isNil=kse,D.isNull=Mse,D.isNumber=tI,D.isObject=qt,D.isObjectLike=Zt,D.isPlainObject=Vu,D.isRegExp=vb,D.isSafeInteger=Lse,D.isSet=nI,D.isString=yg,D.isSymbol=Fi,D.isTypedArray=_l,D.isUndefined=Ose,D.isWeakMap=_se,D.isWeakSet=Nse,D.join=Goe,D.kebabCase=Pae,D.last=Ki,D.lastIndexOf=Voe,D.lowerCase=Eae,D.lowerFirst=Dae,D.lt=Bse,D.lte=Hse,D.max=Sle,D.maxBy=Rle,D.mean=xle,D.meanBy=Fle,D.min=Ple,D.minBy=Ele,D.stubArray=Fb,D.stubFalse=Pb,D.stubObject=hle,D.stubString=fle,D.stubTrue=gle,D.multiply=Dle,D.nth=Woe,D.noConflict=ole,D.noop=xb,D.now=vg,D.pad=Tae,D.padEnd=Aae,D.padStart=Iae,D.parseInt=Mae,D.random=yae,D.reduce=$re,D.reduceRight=jre,D.repeat=kae,D.replace=Lae,D.result=dae,D.round=Tle,D.runInContext=z,D.sample=qre,D.size=Zre,D.snakeCase=Oae,D.some=Jre,D.sortedIndex=Qoe,D.sortedIndexBy=Yoe,D.sortedIndexOf=Zoe,D.sortedLastIndex=Joe,D.sortedLastIndexBy=Xoe,D.sortedLastIndexOf=ere,D.startCase=Nae,D.startsWith=Bae,D.subtract=Ale,D.sum=Ile,D.sumBy=Mle,D.template=Hae,D.times=ple,D.toFinite=Pr,D.toInteger=ot,D.toLength=oI,D.toLower=Gae,D.toNumber=qi,D.toSafeInteger=Gse,D.toString=Dt,D.toUpper=Vae,D.trim=Wae,D.trimEnd=zae,D.trimStart=Uae,D.truncate=$ae,D.unescape=jae,D.uniqueId=vle,D.upperCase=Kae,D.upperFirst=bb,D.each=UA,D.eachRight=$A,D.first=GA,Rb(D,(function(){var c={};return Vo(D,function(d,p){Et.call(D.prototype,p)||(c[p]=d)}),c})(),{chain:!1}),D.VERSION=i,Wi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){D[c].placeholder=D}),Wi(["drop","take"],function(c,d){dt.prototype[c]=function(p){p=p===n?1:fn(ot(p),0);var C=this.__filtered__&&!d?new dt(this):this.clone();return C.__filtered__?C.__takeCount__=Bn(p,C.__takeCount__):C.__views__.push({size:Bn(p,H),type:c+(C.__dir__<0?"Right":"")}),C},dt.prototype[c+"Right"]=function(p){return this.reverse()[c](p).reverse()}}),Wi(["filter","map","takeWhile"],function(c,d){var p=d+1,C=p==W||p==pe;dt.prototype[c]=function(x){var T=this.clone();return T.__iteratees__.push({iteratee:Ke(x,3),type:p}),T.__filtered__=T.__filtered__||C,T}}),Wi(["head","last"],function(c,d){var p="take"+(d?"Right":"");dt.prototype[c]=function(){return this[p](1).value()[0]}}),Wi(["initial","tail"],function(c,d){var p="drop"+(d?"":"Right");dt.prototype[c]=function(){return this.__filtered__?new dt(this):this[p](1)}}),dt.prototype.compact=function(){return this.filter(di)},dt.prototype.find=function(c){return this.filter(c).head()},dt.prototype.findLast=function(c){return this.reverse().find(c)},dt.prototype.invokeMap=at(function(c,d){return typeof c=="function"?new dt(this):this.map(function(p){return Ou(p,c,d)})}),dt.prototype.reject=function(c){return this.filter(wg(Ke(c)))},dt.prototype.slice=function(c,d){c=ot(c);var p=this;return p.__filtered__&&(c>0||d<0)?new dt(p):(c<0?p=p.takeRight(-c):c&&(p=p.drop(c)),d!==n&&(d=ot(d),p=d<0?p.dropRight(-d):p.take(d-c)),p)},dt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},dt.prototype.toArray=function(){return this.take(H)},Vo(dt.prototype,function(c,d){var p=/^(?:filter|find|map|reject)|While$/.test(d),C=/^(?:head|last)$/.test(d),x=D[C?"take"+(d=="last"?"Right":""):d],T=C||/^find/.test(d);x&&(D.prototype[d]=function(){var _=this.__wrapped__,G=C?[1]:arguments,$=_ instanceof dt,re=G[0],se=$||it(_),ue=function(ct){var ht=x.apply(D,gs([ct],G));return C&&Ae?ht[0]:ht};se&&p&&typeof re=="function"&&re.length!=1&&($=se=!1);var Ae=this.__chain__,Be=!!this.__actions__.length,Qe=T&&!Ae,st=$&&!Be;if(!T&&se){_=st?_:new dt(this);var Ye=c.apply(_,G);return Ye.__actions__.push({func:pg,args:[ue],thisArg:n}),new Ui(Ye,Ae)}return Qe&&st?c.apply(this,G):(Ye=this.thru(ue),Qe?C?Ye.value()[0]:Ye.value():Ye)})}),Wi(["pop","push","shift","sort","splice","unshift"],function(c){var d=Vf[c],p=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",C=/^(?:pop|shift)$/.test(c);D.prototype[c]=function(){var x=arguments;if(C&&!this.__chain__){var T=this.value();return d.apply(it(T)?T:[],x)}return this[p](function(_){return d.apply(it(_)?_:[],x)})}}),Vo(dt.prototype,function(c,d){var p=D[d];if(p){var C=p.name+"";Et.call(Il,C)||(Il[C]=[]),Il[C].push({name:d,func:p})}}),Il[lg(n,y).name]=[{name:"wrapper",func:n}],dt.prototype.clone=jne,dt.prototype.reverse=Kne,dt.prototype.value=qne,D.prototype.at=Rre,D.prototype.chain=xre,D.prototype.commit=Fre,D.prototype.next=Pre,D.prototype.plant=Dre,D.prototype.reverse=Tre,D.prototype.toJSON=D.prototype.valueOf=D.prototype.value=Are,D.prototype.first=D.prototype.head,Du&&(D.prototype[Du]=Ere),D}),Dl=Fne();Ca?((Ca.exports=Dl)._=Dl,Sw._=Dl):Tn._=Dl}).call(SY)})(Su,Su.exports)),Su.exports}var xY=RY();const Re=tw(xY),Bt={conjunction:0,query:[]},nw={sources:Bt,contributor:Bt,employer:Bt,employeeStatus:Bt,occupation:Bt,address:Bt,state:Bt,zipCode:Bt,date:Bt,dateDetected:Bt,amount:Bt,recipient:Bt,status:Bt,reconciliationStatus:Bt,preclearance:Bt,approvalDate:Bt,approvalAmount:Bt,amended:Bt,jurisdiction:Bt,lastUpdated:Bt,lastUpdatedBy:Bt,notes:Bt,tags:Bt,groups:Bt},FY={"contribution-search":Re.cloneDeep(nw),"detected-contributions":Re.cloneDeep(nw)},fD=ha({name:"ContributionSearch",initialState:FY,reducers:{resetSearchBody:(e,t)=>({...e,[t.payload.page]:{...Re.cloneDeep(nw)}}),resetSearchBodyFilterGroup:(e,t)=>({...e,[t.payload.page]:{...e[t.payload.page],[t.payload.filterName]:Re.cloneDeep(Bt)}}),pruneSearchBodyFilterGroups:(e,t)=>({...e,[t.payload.page]:Re.entries(e[t.payload.page]).reduce((n,[i,o])=>{const r=o.query.filter(a=>Re.isString(a.value)?!Re.isEmpty(a.value):!Re.isNil(a.value)),s={conjunction:r.length<=1?0:o.conjunction,query:r};return{...n,[i]:s}},{})}),updateSearchBodyFilterGroupConjunction:(e,t)=>({...e,[t.payload.page]:{...e[t.payload.page],[t.payload.filterName]:{...e[t.payload.page][t.payload.filterName],conjunction:t.payload.conjunction}}}),addSearchBodyFilterGroupQuery:(e,t)=>{const n=[...e[t.payload.page][t.payload.filterName].query];return n.some(i=>i.id===t.payload.query.id)||n.push(t.payload.query),{...e,[t.payload.page]:{...e[t.payload.page],[t.payload.filterName]:{...e[t.payload.page][t.payload.filterName],query:n}}}},updateSearchBodyFilterGroupQueryComparator:(e,t)=>{const n=e[t.payload.page][t.payload.filterName].query.map(i=>i.id!==t.payload.id?i:{...i,comparator:t.payload.comparator});return{...e,[t.payload.page]:{...e[t.payload.page],[t.payload.filterName]:{...e[t.payload.page][t.payload.filterName],query:n}}}},updateSearchBodyFitlerGroupQueryValue:(e,t)=>{const n=e[t.payload.page][t.payload.filterName].query.map(i=>i.id!==t.payload.id?i:{...i,value:t.payload.value});return{...e,[t.payload.page]:{...e[t.payload.page],[t.payload.filterName]:{...e[t.payload.page][t.payload.filterName],query:n}}}},removeSearchBodyFilterGroupQuery:(e,t)=>({...e,[t.payload.page]:{...e[t.payload.page],[t.payload.filterName]:{...e[t.payload.page][t.payload.filterName],query:e[t.payload.page][t.payload.filterName].query.filter(n=>n.id!==t.payload.id)}}})}}),{addSearchBodyFilterGroupQuery:gD,pruneSearchBodyFilterGroups:Hle,removeSearchBodyFilterGroupQuery:Gle,resetSearchBody:Vle,resetSearchBodyFilterGroup:pD,updateSearchBodyFilterGroupConjunction:mD,updateSearchBodyFilterGroupQueryComparator:Wle,updateSearchBodyFitlerGroupQueryValue:zle}=fD.actions,PY={ContributionSearchReducer:fD.reducer},us=(()=>{const e=[Hi.middleware];return e.push(yY),bQ({reducer:{[Hi.reducerPath]:Hi.reducer,...PY},middleware:t=>t().concat(e)})})(),EY=()=>Aq(),vD=e=>Lq(e);function pa(e){const t=yo();let n,i;const o=()=>{i&&(t.value=e.select(i)(us.getState()))},r=()=>{n?.reset(),n=void 0,i=void 0,t.value=void 0},s=()=>{n?.abort()},a=async l=>{const u=us.dispatch(e.initiate(l));n=u,i=u.requestId,o();try{const h=await u.unwrap();return o(),h}catch(h){throw o(),h}};return{state:he(()=>t.value),data:he(()=>t.value?.data),error:he(()=>t.value?.error),isUninitialized:he(()=>t.value?.isUninitialized),isLoading:he(()=>t.value?.isLoading),isSuccess:he(()=>t.value?.isSuccess),isError:he(()=>t.value?.isError),status:he(()=>t.value?.status),originalArgs:he(()=>t.value?.originalArgs),trigger:a,abort:s,reset:r}}function Ru(e,t){const n=()=>XI(t),i=yo();let o,r;const s=()=>{r?.unsubscribe(),r=void 0,o?.(),o=void 0},a=l=>{const u=e.select(l),h=()=>{i.value=u(us.getState())};h(),o=us.subscribe(h),r=us.dispatch(e.initiate(l))};return Jt(n,l=>{s(),a(l)},{immediate:!0}),Es(()=>{s()}),{state:he(()=>i.value),data:he(()=>i.value?.data),error:he(()=>i.value?.error),currentData:he(()=>i.value?.currentData),isUninitialized:he(()=>i.value?.isUninitialized),isLoading:he(()=>i.value?.isLoading),isFetching:he(()=>i.value?.isFetching),isSuccess:he(()=>i.value?.isSuccess),isError:he(()=>i.value?.isError),status:he(()=>i.value?.status),refetch:()=>r?.refetch(),unwrap:async()=>{if(!r)throw new Error("Query has not been started yet.");return r.unwrap()}}}const CD=Hi.injectEndpoints({endpoints:e=>({getPreclearance:e.query({query:({user:t,company:n,stack:i,username:o,id:r=null})=>({url:r?`/preclearance/${r}`:"/preclearance",params:{user:t,company:n,stack:i,username:o}})}),preclearanceMatch:e.mutation({query:({id:t,body:n})=>({url:`/contributions/${t}/preclearance/match`,method:"POST",body:n})})})});function DY(e){return Ru(CD.endpoints.getPreclearance,e)}function TY(){return pa(CD.endpoints.preclearanceMatch)}function iw(e){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(e)}function AY(e){return new Date(e).toLocaleDateString("en-CA")}function IY(e){const t=new Date(e);return Number.isNaN(t.getTime())?"":`on ${wD(t)}`}function wD(e=new Date){return Number.isNaN(e.getTime())?"":e.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})}const MY={class:"preclearance-table-scroll","aria-description":"scroll container for preclearance request table"},kY={class:"preclearance-table"},LY={key:0,class:"preclearance-table-tr preclearance-table-tr-empty"},OY={class:"preclearance-table-td preclearance-table-td-select"},_Y=["id","name","value","checked","onClick"],NY={class:"preclearance-table-td"},BY={class:"preclearance-table-td"},HY={class:"preclearance-table-td preclearance-table-td-amount"},GY={class:"preclearance-table-td"},VY={class:"preclearance-table-td"},WY={class:"preclearance-table-td"},zY={class:"preclearance-table-td preclearance-table-td-match"},UY={class:"match-score-value","aria-description":"match score percentage"},$Y=Ct({__name:"PreclearanceRequestTable",props:Jo({contributionId:{type:Number},user:{type:String},company:{type:String},stack:{type:String},username:{type:String}},{modelValue:{default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=fi(e,"modelValue"),i={Approved:"preclearance-status-approved",Pending:"preclearance-status-pending",Denied:"preclearance-status-denied"},o=he(()=>({user:String(t.user),company:String(t.company),stack:t.stack,username:t.username,id:String(t.contributionId)})),{data:r}=DY(o),s=he(()=>`preclearance-match-${t.contributionId}`),a=he(()=>{const f=r.value;return f?(Array.isArray(f)?f:[f]).map(m=>l(m)):[]}),l=f=>({name:f.name,preclearanceId:f.id,requester:f.employee,amount:f.amount,recipient:f.recipient,requestDate:f.approvalDate,status:f.status,match:f.match}),u=f=>f>=90?"match-score-high":f>=75?"match-score-medium":"match-score-low",h=(f,g)=>{if(n.value?.preclearanceId===g.preclearanceId){f.preventDefault(),n.value=null;return}n.value={preclearanceId:g.preclearanceId,label:g.name}};return(f,g)=>(ae(),ve("div",MY,[q("table",kY,[g[2]||(g[2]=q("thead",null,[q("tr",null,[q("th",{class:"preclearance-table-th preclearance-table-th-select",scope:"col"},"Select"),q("th",{class:"preclearance-table-th",scope:"col"},"Request ID"),q("th",{class:"preclearance-table-th",scope:"col"},"Requester"),q("th",{class:"preclearance-table-th",scope:"col"},"Amount"),q("th",{class:"preclearance-table-th",scope:"col"},"Recipient"),q("th",{class:"preclearance-table-th",scope:"col"},"Request Date"),q("th",{class:"preclearance-table-th",scope:"col"},"Status"),q("th",{class:"preclearance-table-th preclearance-table-th-match",scope:"col"},"Match Score")])],-1)),q("tbody",null,[a.value.length===0?(ae(),ve("tr",LY,[...g[0]||(g[0]=[q("td",{class:"preclearance-table-td preclearance-table-empty",colspan:"8"},"No data found",-1)])])):(ae(!0),ve(wt,{key:1},Ti(a.value,m=>(ae(),ve("tr",{key:m.name,class:"preclearance-table-tr"},[q("td",OY,[q("input",{id:`preclearance-radio-${m.name}`,class:ft(["preclearance-table-radio",{"preclearance-table-radio-selected":n.value?.preclearanceId===m.preclearanceId}]),type:"radio",name:s.value,value:m.name,checked:n.value?.preclearanceId===m.preclearanceId,onClick:v=>h(v,m)},null,10,_Y)]),q("td",NY,Je(m.name),1),q("td",BY,Je(m.requester),1),q("td",HY,Je(ni(iw)(m.amount)),1),q("td",GY,Je(m.recipient),1),q("td",VY,Je(m.requestDate),1),q("td",WY,[q("span",{class:ft(["preclearance-status",i[m.status]]),"aria-description":"preclearance request status"},Je(m.status),3)]),q("td",zY,[q("span",{class:ft(["match-score",u(m.match)]),"aria-description":"match score for preclearance request"},[g[1]||(g[1]=q("span",{class:"match-score-bar","aria-hidden":"true","aria-description":"match score visual indicator"},null,-1)),q("span",UY,Je(m.match)+"% ",1)],2)])]))),128))])])]))}}),jY=`.match-score[data-v-dc726dd2]{align-items:center;display:inline-flex;gap:.4rem}.match-score-bar[data-v-dc726dd2]{align-self:center;border-radius:.125rem;flex-shrink:0;height:1em;width:.125rem}.match-score-high[data-v-dc726dd2]{color:var(--color-primary-green)}.match-score-high .match-score-bar[data-v-dc726dd2]{background:var(--color-primary-green)}.match-score-low[data-v-dc726dd2]{color:var(--color-red-700)}.match-score-low .match-score-bar[data-v-dc726dd2]{background:var(--color-red-700)}.match-score-medium[data-v-dc726dd2]{color:var(--color-yellow-700)}.match-score-medium .match-score-bar[data-v-dc726dd2]{background:var(--color-yellow-700)}.preclearance-status[data-v-dc726dd2]{font-weight:600;white-space:nowrap}.preclearance-status-approved[data-v-dc726dd2]{color:var(--color-primary-green)}.preclearance-status-denied[data-v-dc726dd2]{color:var(--color-red-700)}.preclearance-status-pending[data-v-dc726dd2]{color:var(--color-yellow-700)}.preclearance-table[data-v-dc726dd2]{border-collapse:collapse;font-size:.875rem;min-width:58rem;width:100%}.preclearance-table tbody .preclearance-table-tr[data-v-dc726dd2]:nth-child(2n){background:var(--color-green-50)}.preclearance-table-empty[data-v-dc726dd2]{color:var(--color-grey-600);padding:1.5rem 1rem;text-align:center}.preclearance-table-radio[data-v-dc726dd2]{-webkit-appearance:none;appearance:none;background:var(--color-white);border:.125rem solid var(--color-grey-300);border-radius:.25rem;box-sizing:border-box;cursor:pointer;flex-shrink:0;height:1.125rem;margin:0;vertical-align:middle;width:1.125rem}.preclearance-table-radio[data-v-dc726dd2]:focus-visible{outline:.125rem solid var(--color-primary-green);outline-offset:.125rem}.preclearance-table-radio-selected[data-v-dc726dd2]{background-color:var(--color-primary-green);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.5 6.5 11.5 12.5 4.5' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:.875rem;border-color:var(--color-primary-green)}.preclearance-table-scroll[data-v-dc726dd2]{-webkit-overflow-scrolling:touch;overflow-x:auto}.preclearance-table-td[data-v-dc726dd2]{border-bottom:.0625rem solid var(--color-primary-grey);color:var(--color-primary-black);padding:.75rem 1rem;vertical-align:middle}.preclearance-table-td-amount[data-v-dc726dd2]{font-weight:700;white-space:nowrap}.preclearance-table-td-match[data-v-dc726dd2]{font-size:.75rem;line-height:1;white-space:nowrap}.preclearance-table-td-select[data-v-dc726dd2]{text-align:center;width:3.25rem}.preclearance-table-th[data-v-dc726dd2]{background:var(--color-secondary-green);border-bottom:.0625rem solid var(--color-primary-black);font-weight:600;padding:.5rem 1rem;text-align:left;white-space:nowrap}.preclearance-table-th-match[data-v-dc726dd2]{min-width:6.5rem;text-align:left}.preclearance-table-th-select[data-v-dc726dd2]{text-align:center;width:3.25rem}.preclearance-table-tr[data-v-dc726dd2]{background:var(--color-white)}.preclearance-table-tr:last-child .preclearance-table-td[data-v-dc726dd2]{border-bottom:none}`,Ht=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},KY=Ht($Y,[["styles",[jY]],["__scopeId","data-v-dc726dd2"]]),qY={class:"card-base-body","aria-description":"card body"},QY=Ht(Ct({__name:"CardBase",props:{borderColor:{default:"var(--color-green-200)",type:String},radius:{default:"0.5rem",type:String}},setup(e){return(t,n)=>(ae(),ve("section",{class:"card-base",style:Uo({borderColor:e.borderColor,borderRadius:e.radius})},[t.$slots.header?(ae(),ve("header",{key:0,class:"card-base-header",style:Uo({borderColor:e.borderColor})},[Ts(t.$slots,"header",{},void 0)],4)):gt("",!0),q("div",qY,[Ts(t.$slots,"default",{},void 0)])],4))}}),[["styles",[".card-base[data-v-8f2e1eff]{background:var(--color-white);border:.0625rem solid;box-sizing:border-box}.card-base-body[data-v-8f2e1eff]{padding:1.5rem}.card-base-header[data-v-8f2e1eff]{padding:1.5rem;padding-bottom:0}"]],["__scopeId","data-v-8f2e1eff"]]),YY=Hi.injectEndpoints({endpoints:e=>({getStatuses:e.query({query:({user:t,company:n,stack:i,username:o,id:r=null})=>({url:r?`/statuses/${r}`:"/statuses",params:{user:t,company:n,stack:i,username:o}})})})});function ow(e){return Ru(YY.endpoints.getStatuses,e)}const ZY=["aria-expanded"],JY=["aria-description"],XY={class:"status-select-panel",role:"listbox","aria-description":"Available match status options"},eZ=["aria-selected","onClick"],tZ=["aria-description"],nZ=["aria-description"],iZ=Ht(Ct({__name:"ContributionStatusSelect",props:{modelValue:{type:Object},showRadio:{type:Boolean,default:!1},user:{type:String},company:{type:String},stack:{type:String},username:{type:String}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t,{data:o}=ow(he(()=>({user:n.user,company:n.company,stack:n.stack,username:n.username}))),r=he(()=>{const h=o.value;return Array.isArray(h)?h:[]}),s=we(!1),a=()=>{s.value=!s.value},l=h=>{i("update:modelValue",h),s.value=!1},u=()=>{s.value=!1};return(h,f)=>(ae(),ve(wt,null,[s.value?(ae(),ve("div",{key:0,class:"status-select-backdrop","aria-hidden":"true","aria-description":"Closes the status menu when clicked",onClick:u})):gt("",!0),q("div",{class:ft(["status-select",{"status-select-open":s.value}]),"aria-description":"Contribution match status selector"},[q("button",{type:"button",class:"status-select-trigger","aria-expanded":s.value,onClick:xt(a,["stop"])},[q("span",{class:"status-selected","aria-description":`Current match status: ${e.modelValue.name}`},Je(e.modelValue.name),9,JY),q("span",{class:ft(["status-select-chevron",{"status-select-chevron-open":s.value}]),"aria-hidden":"true","aria-description":"Dropdown open or closed indicator"},null,2)],8,ZY),Fs(q("div",XY,[(ae(!0),ve(wt,null,Ti(r.value,g=>(ae(),ve("button",{key:g.id,type:"button",class:ft(["status-option",{"status-option-active":g.id===e.modelValue.id}]),role:"option","aria-selected":g.id===e.modelValue.id,onClick:xt(m=>l(g),["stop"])},[e.showRadio?(ae(),ve("span",{key:0,class:ft(["status-option-radio",{"status-option-radio-selected":g.id===e.modelValue.id}]),"aria-description":`Selected-state marker for ${g.name}`},null,10,tZ)):gt("",!0),q("span",{class:"status-option-label","aria-description":`Match status option: ${g.name}`},Je(g.name),9,nZ)],10,eZ))),128))],512),[[rp,s.value]])],2)],64))}}),[["styles",[".status-option[data-v-6c4c28fa]{align-items:center;background:transparent;border:none;border-bottom:.0625rem solid var(--color-green-300);cursor:pointer;display:flex;font:inherit;font-size:.875rem;gap:.6rem;padding:.75rem;text-align:left;width:100%}.status-option[data-v-6c4c28fa]:hover{background:var(--color-green-100)}.status-option-active .status-option-label[data-v-6c4c28fa]{color:var(--color-primary-green);font-weight:600}.status-option-label[data-v-6c4c28fa]{color:var(--color-grey-900)}.status-option-radio[data-v-6c4c28fa]{border:.125rem solid var(--color-grey-300);border-radius:50%;flex-shrink:0;height:1rem;width:1rem}.status-option-radio-selected[data-v-6c4c28fa]{background:radial-gradient(circle,var(--color-primary-green) 0 42%,transparent 43%);border-color:var(--color-primary-green);box-shadow:inset 0 0 0 3px var(--color-white)}.status-select[data-v-6c4c28fa]{max-width:100%;position:relative;width:100%}.status-selected[data-v-6c4c28fa]{color:var(--color-green-900)}.status-select-backdrop[data-v-6c4c28fa]{background:transparent;inset:0;position:fixed;z-index:10000}.status-select-chevron[data-v-6c4c28fa]{border-left:.3125rem solid transparent;border-right:.3125rem solid transparent;border-top:.375rem solid var(--color-green-900);flex-shrink:0;height:0;transition:transform .15s ease;width:0}.status-select-chevron-open[data-v-6c4c28fa]{transform:rotate(180deg)}.status-select-open[data-v-6c4c28fa]{z-index:10001}.status-select-panel[data-v-6c4c28fa]{background:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.375rem;box-shadow:0 .25rem .75rem #00000014;left:0;margin-top:.25rem;position:absolute;right:0;z-index:100}.status-select-trigger[data-v-6c4c28fa]{align-items:center;background:var(--color-white);border:.0625rem solid var(--color-green-400);border-radius:.25rem;cursor:pointer;display:flex;font:inherit;font-size:.875rem;gap:.5rem;height:3rem;justify-content:space-between;padding:.75rem 1rem;text-align:left;width:100%}.status-select-trigger[data-v-6c4c28fa]:focus{border:.125rem solid var(--color-brand-bright-200);outline:0}.status-select-trigger[data-v-6c4c28fa]:hover{background-color:var(--color-green-50)}"]],["__scopeId","data-v-6c4c28fa"]]),oZ=["aria-description"],rZ={class:"detail-item-label","aria-description":"Field label"},sZ={class:"detail-item-value","aria-description":"Field value"},bD=Ht(Ct({__name:"DetailItem",props:{fullWidth:{type:Boolean,default:!1},label:{type:String},value:{default:"",type:[String,null]}},setup(e){const t=e,n=o=>o==null||o===""?"—":o,i=he(()=>`Detail field: ${t.label}`);return(o,r)=>(ae(),ve("div",{class:ft(["detail-item",{"detail-item-full":e.fullWidth}]),"aria-description":i.value},[q("div",rZ,Je(e.label),1),q("div",sZ,[Ts(o.$slots,"value",{},()=>[Xi(Je(n(e.value)),1)])])],10,oZ))}}),[["styles",[".detail-item[data-v-14dc73bf]{display:flex;flex-direction:column;gap:.5rem;min-width:0}.detail-item-full[data-v-14dc73bf]{grid-column:1 / -1}.detail-item-label[data-v-14dc73bf]{color:var(--color-grey-400);font-size:.875rem;font-weight:500;line-height:1.5}.detail-item-value[data-v-14dc73bf]{color:var(--color-green-900);font-size:.875rem;line-height:1.5;word-break:break-word}"]],["__scopeId","data-v-14dc73bf"]]),aZ=["type","disabled"],ds=Ht(Ct({__name:"Button",props:{disabled:{type:Boolean,default:!1},label:{type:String},type:{default:"button",type:String},variant:{default:"primary",type:String}},emits:["click"],setup(e,{emit:t}){const n=t,i=o=>{n("click",o)};return(o,r)=>(ae(),ve("button",{type:e.type,class:ft(["ui-button",{"ui-button-primary":e.variant==="primary","ui-button-secondary":e.variant==="secondary","ui-button-tertiary":e.variant==="tertiary"}]),disabled:e.disabled,onClick:i},Je(e.label),11,aZ))}}),[["styles",[".ui-button[data-v-ad4347d7]{align-items:center;border-radius:.25rem;box-sizing:border-box;cursor:pointer;display:inline-flex;font-family:inherit;font-size:.875rem;font-weight:500;justify-content:center;line-height:1.25;min-height:2.25rem;padding:.5rem 1rem;transition:background-color .15s ease,filter .15s ease,border-color .15s ease,color .15s ease}.ui-button[data-v-ad4347d7]:disabled{cursor:not-allowed;filter:none}.ui-button-primary[data-v-ad4347d7]{background:var(--color-brand-dark-500);border:1px solid transparent;color:var(--color-white)}.ui-button-primary[data-v-ad4347d7]:disabled{background:var(--color-green-500)}.ui-button-primary[data-v-ad4347d7]:not(:disabled):active{background:var(--color-brand-dark-900)}.ui-button-primary[data-v-ad4347d7]:not(:disabled):focus,.ui-button-primary[data-v-ad4347d7]:not(:disabled):focus-visible{border:.125rem solid var(--color-brand-bright-100);outline:0}.ui-button-primary[data-v-ad4347d7]:not(:disabled):hover{background:var(--color-brand-dark-800)}.ui-button-secondary[data-v-ad4347d7]{background:var(--color-white);border:1px solid var(--color-brand-dark-500);color:var(--color-brand-dark-500)}.ui-button-secondary[data-v-ad4347d7]:disabled{background:var(--color-green-50);border:1px solid var(--color-green-200);color:var(--color-grey-400)}.ui-button-secondary[data-v-ad4347d7]:not(:disabled):active{background:var(--color-brand-dark-100);border-color:var(--color-brand-dark-900)}.ui-button-secondary[data-v-ad4347d7]:not(:disabled):hover{background:var(--color-brand-dark-50);border-color:var(--color-brand-dark-800)}.ui-button-tertiary[data-v-ad4347d7]{background:var(--color-white);border:1px solid var(--color-grey-300);color:var(--color-primary-black)}.ui-button-tertiary[data-v-ad4347d7]:disabled{background:var(--color-white);border-color:var(--color-grey-300);color:var(--color-grey-600)}.ui-button-tertiary[data-v-ad4347d7]:not(:disabled):active{filter:brightness(.97)}.ui-button-tertiary[data-v-ad4347d7]:not(:disabled):hover{background:var(--color-grey-50)}"]],["__scopeId","data-v-ad4347d7"]]),lZ=["aria-labelledby"],cZ={class:"dialog-header"},uZ=["id"],dZ=["aria-label"],hZ=["aria-labelledby"],fZ={key:0,class:"dialog-footer"},rw=Ht(Ct({__name:"Dialog",props:{bodyPadding:{type:Boolean,default:!0},cancelButtonLabel:{default:"Cancel",type:String},closeAriaLabel:{default:"Close dialog",type:String},contentWidth:{default:"min(36rem, 100%)",type:String},primaryButtonDisabled:{type:Boolean,default:!1},primaryButtonLabel:{default:"Submit",type:String},showCloseButton:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!0},title:{type:String},titleId:{default:void 0,type:String}},emits:["cancel-click","close","primary-click"],setup(e,{expose:t,emit:n}){const i=e,o=n,r=we(null),s=$g(),a=he(()=>i.titleId??`dialog-title-${s}`),l=he(()=>i.showFooter&&!!(i.cancelButtonLabel||i.primaryButtonLabel)),u=()=>{const b=r.value;b&&(typeof b.showModal=="function"?b.showModal():b.setAttribute("open",""))},h=()=>{const b=r.value;b&&(typeof b.close=="function"?b.close():b.removeAttribute("open"),o("close"))},f=b=>{b.target===r.value&&h()},g=b=>{b.preventDefault(),h()},m=()=>{h()},v=()=>{h(),o("cancel-click")},w=()=>{o("primary-click")};return t({open:u,close:h,dialogRef:r}),(b,y)=>{const R=Ds("font-awesome-icon");return ae(),ve("dialog",{ref_key:"dialogRef",ref:r,class:"dialog","aria-labelledby":a.value,style:Uo({width:e.contentWidth}),onCancel:g,onClick:f},[q("section",{class:"dialog-panel",onClick:y[0]||(y[0]=xt(()=>{},["stop"]))},[q("header",cZ,[q("h2",{id:a.value,class:"dialog-title"},Je(e.title),9,uZ),e.showCloseButton?(ae(),ve("button",{key:0,type:"button",class:"dialog-close","aria-label":e.closeAriaLabel,onClick:m},[Le(R,{class:"dialog-close-icon",icon:["fas","xmark"],size:"xs","aria-hidden":"true"})],8,dZ)):gt("",!0)]),q("section",{class:ft(["dialog-body",{"dialog-body-flush":!e.bodyPadding}]),"aria-labelledby":a.value},[Ts(b.$slots,"default",{},void 0)],10,hZ),l.value?(ae(),ve("footer",fZ,[e.cancelButtonLabel?(ae(),rn(ds,{key:0,label:e.cancelButtonLabel,variant:"secondary",onClick:v},null,8,["label"])):gt("",!0),e.primaryButtonLabel?(ae(),rn(ds,{key:1,disabled:e.primaryButtonDisabled,label:e.primaryButtonLabel,variant:"primary",onClick:w},null,8,["disabled","label"])):gt("",!0)])):gt("",!0)])],44,lZ)}}}),[["styles",[".dialog[data-v-393323d3]{border:.0625rem solid var(--color-grey-300);border-radius:.5rem;box-shadow:0 8px 24px #0000001f;font-family:inherit;margin:auto;max-width:calc(100vw - 2rem);padding:0}.dialog[data-v-393323d3]::backdrop{background:#00000059}.dialog-body[data-v-393323d3]{-webkit-overflow-scrolling:touch;flex:1;max-height:75dvh;min-height:0;overflow-y:auto;padding:1.5rem}.dialog-body.dialog-body-flush[data-v-393323d3]{padding:0}.dialog-close[data-v-393323d3]{align-items:center;background:transparent;border:none;border-radius:.25rem;color:var(--color-grey-900);cursor:pointer;display:inline-flex;font-size:1.25rem;font-weight:500;height:2rem;justify-content:center;line-height:1;padding:0;width:2rem}.dialog-close[data-v-393323d3]:hover{background:var(--color-green-50)}.dialog-close-icon[data-v-393323d3]{height:1rem;width:1rem}.dialog-footer[data-v-393323d3]{align-items:center;display:flex;flex-shrink:0;flex-wrap:wrap;gap:.75rem;justify-content:flex-end;padding:1.5rem;padding-top:0}.dialog-header[data-v-393323d3]{align-items:center;display:flex;flex-shrink:0;gap:.75rem;justify-content:space-between;padding:1.5rem;padding-bottom:0}.dialog-panel[data-v-393323d3]{display:flex;flex-direction:column;max-height:calc(100vh - 3rem);padding:0}.dialog-title[data-v-393323d3]{color:var(--color-grey-900);font-size:1.25rem;font-weight:500;line-height:1.3;margin:0}"]],["__scopeId","data-v-393323d3"]]),gZ={class:"detail-grid","aria-description":"contribution detail fields grid"},pZ={class:"bottom-section","aria-description":"contribution match status"},mZ=Ht(Ct({__name:"ContributionDetailsCard",props:{contribution:{type:Object},user:{type:String},company:{type:String},stack:{type:String},username:{type:String}},emits:["clear-preclearance","match-preclearance","update-status"],setup(e,{emit:t}){const n=e,i=t,{data:o}=ow(he(()=>({user:n.user,company:n.company,stack:n.stack,username:n.username}))),r=he(()=>{const f=o.value,m=(Array.isArray(f)?f:[]).find(v=>v.name===n.contribution.status);return m||{id:0,name:n.contribution.status,organization:0,created:"",modified:""}}),s=[{kind:"value",key:"contributor",label:"Contributor"},{kind:"value",key:"employer",label:"Employer"},{kind:"value",key:"occupation",label:"Occupation"},{kind:"value",key:"address",label:"Address"},{kind:"value",key:"state",label:"State"},{kind:"value",key:"zipCode",label:"Zip Code"},{kind:"value",key:"amount",label:"Amount"},{kind:"value",key:"date",label:"Date"},{kind:"value",key:"dateDetected",label:"Date Detected"},{kind:"value",key:"source",label:"Source"},{kind:"value",key:"jurisdiction",label:"Jurisdiction"},{kind:"value",key:"employeeStatus",label:"Employee Status"},{kind:"value",key:"recipient",label:"Recipient"},{kind:"value",key:"amended",label:"Amended"},{kind:"value",key:"lastUpdated",label:"Last Updated On"},{kind:"value",key:"lastUpdatedBy",label:"Last Updated By"}],a=f=>f.kind==="value"?f.key:f.kind,l=we(null),u=we(null),h=()=>{const f=u.value;f&&(i("match-preclearance",{preclearanceId:f.preclearanceId,preclearanceLabel:f.label}),l.value?.close())};return(f,g)=>(ae(),rn(QY,null,{default:Vn(()=>[q("div",gZ,[(ae(),ve(wt,null,Ti(s,m=>Le(bD,{key:a(m),label:m.label,value:m.kind==="value"?e.contribution[m.key]:""},null,8,["label","value"])),64))]),q("div",pZ,[Le(bD,{label:"Status"},{value:Vn(()=>[Le(iZ,{"model-value":r.value,user:e.user,company:e.company,stack:e.stack,username:e.username,"onUpdate:modelValue":g[0]||(g[0]=m=>i("update-status",m))},null,8,["model-value","user","company","stack","username"])]),_:1})]),Le(rw,{"body-padding":!1,"content-width":"min(60rem, calc(100vw - 2rem))","primary-button-disabled":!u.value,"primary-button-label":"Match Selected",ref_key:"preclearanceMatchDialog",ref:l,"secondary-button-label":"Cancel",title:"Match to Preclearance Request",onPrimaryClick:h},{default:Vn(()=>[Le(KY,{"contribution-id":e.contribution.contributionId,user:e.user,company:e.company,stack:e.stack,username:e.username,modelValue:u.value,"onUpdate:modelValue":g[1]||(g[1]=m=>u.value=m)},null,8,["contribution-id","user","company","stack","username","modelValue"])]),_:1},8,["primary-button-disabled"])]),_:1}))}}),[["styles",[".bottom-section[data-v-bae9060d]{border-top:.0625rem solid var(--color-green-200);display:grid;gap:1.5rem 2rem;grid-template-columns:1fr 1fr;margin-top:1rem;padding-top:1rem}.detail-grid[data-v-bae9060d]{display:grid;gap:1.5rem 2rem;grid-template-columns:repeat(3,minmax(0,1fr))}"]],["__scopeId","data-v-bae9060d"]]),vZ={class:"collapsible-panel","aria-description":"Collapsible panel"},CZ=["aria-expanded"],wZ={class:"collapsible-panel-heading","aria-description":"Panel heading"},bZ={key:0,class:"collapsible-panel-icon","aria-hidden":"true"},yZ={class:"collapsible-panel-title","aria-description":"Panel title"},SZ=["aria-hidden"],RZ={class:"collapsible-panel-body-inner","aria-description":"Panel content inner wrapper"},xZ=Ht(Ct({__name:"CollapsiblePanel",props:{title:{type:String}},setup(e){const t=we(!1),n=()=>{t.value=!t.value};return(i,o)=>(ae(),ve("div",vZ,[q("button",{type:"button",class:"collapsible-panel-header","aria-expanded":t.value,onClick:n},[q("span",wZ,[i.$slots.icon?(ae(),ve("span",bZ,[Ts(i.$slots,"icon",{},void 0)])):gt("",!0),q("span",yZ,Je(e.title),1)]),q("i",{class:ft(["fa-solid fa-chevron-down collapsible-panel-chevron",{"collapsible-panel-chevron-open":t.value}]),"aria-hidden":"true"},null,2)],8,CZ),q("div",{class:ft(["collapsible-panel-body",{"collapsible-panel-body-open":t.value}]),"aria-description":"Panel content","aria-hidden":!t.value},[q("div",RZ,[Ts(i.$slots,"default",{},void 0)])],10,SZ)]))}}),[["styles",[".collapsible-panel[data-v-29317d49]{border:.0625rem solid var(--color-primary-grey);border-radius:.5rem;box-sizing:border-box;overflow:hidden}.collapsible-panel-body[data-v-29317d49]{display:grid;grid-template-rows:0fr;transition:grid-template-rows .2s ease}.collapsible-panel-body-inner[data-v-29317d49]{min-height:0;opacity:0;overflow:hidden;padding:0;transition:opacity .2s ease}.collapsible-panel-body-open[data-v-29317d49]{grid-template-rows:1fr}.collapsible-panel-body-open .collapsible-panel-body-inner[data-v-29317d49]{opacity:1;padding:1rem}.collapsible-panel-chevron[data-v-29317d49]{color:var(--color-primary-black);flex-shrink:0;font-size:.75rem;margin-left:.75rem;transition:transform .2s ease}.collapsible-panel-chevron-open[data-v-29317d49]{transform:rotate(180deg)}.collapsible-panel-header[data-v-29317d49]{align-items:center;background:var(--color-white);border:none;color:var( --color-grey-900);cursor:pointer;display:flex;font:inherit;justify-content:space-between;padding:1rem;text-align:left;width:100%}.collapsible-panel-header[data-v-29317d49]:hover{background:var(--color-green-50)}.collapsible-panel-header[aria-expanded=true][data-v-29317d49]{border-bottom:1px solid var(--color-primary-grey)}.collapsible-panel-heading[data-v-29317d49]{align-items:center;display:inline-flex;gap:.5rem;min-width:0}.collapsible-panel-icon[data-v-29317d49]{align-items:center;color:var(--color-grey-900);display:inline-flex;flex-shrink:0;height:1.5rem;justify-content:center;width:1.5rem}.collapsible-panel-icon [data-v-29317d49] svg{display:block;height:100%;width:100%}.collapsible-panel-title[data-v-29317d49]{font-size:1rem;font-weight:400;line-height:1.5}"]],["__scopeId","data-v-29317d49"]]),FZ=["aria-description"],PZ=["aria-description"],EZ={key:0,class:"ui-input-req",title:"required"},DZ=["aria-description","aria-describedby"],TZ=["aria-description"],AZ=["aria-label"],IZ=["aria-description"],MZ=["title"],kZ=["aria-label","disabled","onClick"],LZ=["id","type","name","autocomplete","placeholder","disabled","maxlength","aria-invalid","aria-label","value"],OZ=["aria-label","disabled"],_Z=["id","name","autocomplete","placeholder","disabled","maxlength","rows","aria-invalid","aria-describedby"],NZ=["id","type","name","value","autocomplete","placeholder","disabled","maxlength","aria-invalid","aria-describedby"],BZ=["id"],uo=Ht(Ct({inheritAttrs:!1,__name:"Input",props:Jo({autocomplete:{default:void 0,type:String},describedBy:{default:void 0,type:String},disabled:{type:Boolean,default:!1},error:{default:"",type:String},id:{default:void 0,type:String},invalid:{type:Boolean,default:!1},label:{type:String},labelAriaDescription:{default:void 0,type:String},maxlength:{default:void 0,type:Number},multiple:{type:Boolean,default:!1},name:{default:void 0,type:String},placeholder:{default:void 0,type:String},required:{type:Boolean,default:!1},rows:{default:4,type:Number},type:{default:"text",type:String}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=fi(e,"modelValue"),i=$g(),o=he(()=>t.id??i),r=he(()=>`${o.value}-error`),s=we([]),a=we(""),l=he(()=>t.invalid||!!t.error),u=he(()=>{const L=[];return t.error&&L.push(r.value),t.describedBy&&L.push(...t.describedBy.split(/\s+/).filter(Boolean)),L.length>0?L.join(" "):void 0}),h=he(()=>s.value.length>0),f=he(()=>t.type==="textarea"),g=L=>Re.isNil(t.maxlength)?L:L.slice(0,t.maxlength),m=he({get:()=>typeof n.value=="string"?n.value:"",set:L=>{n.value=g(L)}}),v=L=>{const N=L.target,M=g(N.value);N.value!==M&&(N.value=M),n.value=M},w=L=>{s.value=Array.isArray(L)?L.map(N=>String(N)):[]},b=()=>{if(!t.multiple)return;const L=Array.isArray(n.value)?n.value:[];Re.isEqual(L,s.value)||(n.value=[...s.value])};Jt(()=>n.value,L=>{if(!t.multiple)return;const N=Array.isArray(L)?L:[];Re.isEqual(N,s.value)||w(L)},{immediate:!0,deep:!0});const y=L=>{const N=L.target;a.value=g(N.value),N.value!==a.value&&(N.value=a.value)},R=L=>{y(L),S()},S=()=>{const L=a.value.trim();if(Re.isEmpty(L)||s.value.includes(L)){a.value="";return}s.value=[...s.value,L],a.value="",b()},P=L=>{L.preventDefault(),S()},F=L=>{!Re.isEmpty(String(a.value??""))||s.value.length===0||(L.preventDefault(),s.value=s.value.slice(0,-1),b())},A=L=>{s.value=s.value.filter((N,M)=>M!==L),b()},k=()=>{s.value=[],a.value="",b()};return(L,N)=>{const M=Ds("font-awesome-icon");return ae(),ve("div",{class:"ui-input","aria-description":e.label?`${e.label} input field`:"input field"},[e.label?(ae(),ve("span",{key:0,class:"ui-input-label","aria-description":e.labelAriaDescription??`${e.label} field label`},[Xi(Je(e.label)+" ",1),e.required?(ae(),ve("abbr",EZ,"*")):gt("",!0)],8,PZ)):gt("",!0),e.multiple?(ae(),ve("div",{key:1,class:ft(["ui-input-tags",{"ui-input-tags-invalid":l.value}]),"aria-description":e.label?`${e.label} multi-value input`:"multi-value input","aria-describedby":u.value},[q("div",{class:"ui-input-tags-value","aria-description":`${e.label} selected values`},[h.value?(ae(),ve("ul",{key:0,class:"ui-input-tags-list",role:"list","aria-label":`Selected ${e.label}`},[(ae(!0),ve(wt,null,Ti(s.value,(E,I)=>(ae(),ve("li",{key:`${E}-${I}`,class:"ui-input-tags-item",role:"listitem"},[q("span",{class:"ui-input-tag-chip","aria-description":`Selected value: ${E}`},[q("span",{class:"ui-input-tag-text",title:E},Je(E),9,MZ),q("button",{type:"button",class:"ui-input-tag-remove","aria-label":`Remove ${E}`,disabled:e.disabled,onClick:B=>A(I)},[Le(M,{class:"ui-input-tag-remove-icon",icon:["fas","xmark"],size:"xs","aria-hidden":"true"})],8,kZ)],8,IZ)]))),128))],8,AZ)):gt("",!0),q("input",nc({id:o.value,class:"ui-input-tags-field",type:e.type,name:e.name,autocomplete:e.autocomplete,placeholder:h.value?void 0:e.placeholder,disabled:e.disabled,maxlength:e.maxlength,"aria-invalid":l.value?!0:void 0,"aria-label":h.value?`Add ${e.label}`:void 0,value:a.value},L.$attrs,{onInput:y,onKeydown:[Xt(P,["enter"]),Xt(F,["backspace"])],onBlur:R}),null,16,LZ)],8,TZ),h.value?(ae(),ve("button",{key:0,type:"button",class:"ui-input-tags-clear","aria-label":`Clear all ${e.label}`,disabled:e.disabled,onClick:k},[Le(M,{class:"ui-input-tag-remove-icon",icon:["fas","xmark"],size:"xs","aria-hidden":"true"})],8,OZ)):gt("",!0)],10,DZ)):f.value?Fs((ae(),ve("textarea",nc({key:2,id:o.value,"onUpdate:modelValue":N[0]||(N[0]=E=>m.value=E),class:"ui-input-control ui-input-control-textarea",name:e.name,autocomplete:e.autocomplete,placeholder:e.placeholder,disabled:e.disabled,maxlength:e.maxlength,rows:e.rows,"aria-invalid":l.value?!0:void 0,"aria-describedby":u.value},L.$attrs),null,16,_Z)),[[Yk,m.value]]):(ae(),ve("input",nc({key:3,id:o.value,class:"ui-input-control",type:e.type,name:e.name,value:m.value,autocomplete:e.autocomplete,placeholder:e.placeholder,disabled:e.disabled,maxlength:e.maxlength,"aria-invalid":l.value?!0:void 0,"aria-describedby":u.value},L.$attrs,{onInput:v}),null,16,NZ)),e.error?(ae(),ve("p",{key:4,id:r.value,class:"ui-input-error",role:"alert"},Je(e.error),9,BZ)):gt("",!0)],8,FZ)}}}),[["styles",["input[data-v-ea98b3c5]:-webkit-autofill,input[data-v-ea98b3c5]:-webkit-autofill:active,input[data-v-ea98b3c5]:-webkit-autofill:focus,input[data-v-ea98b3c5]:-webkit-autofill:hover{-webkit-box-shadow:0 0 0 1000px #fff inset}.ui-input[data-v-ea98b3c5]{display:flex;flex-direction:column;gap:.35rem;min-width:0}.ui-input-control[data-v-ea98b3c5]{border:.0625rem solid var(--color-green-400);border-radius:.25rem;box-sizing:border-box;color:var(--color-primary-black);font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:.875rem;height:3rem;padding:.75rem 1rem;width:100%}.ui-input-control[data-v-ea98b3c5]:disabled{cursor:not-allowed;opacity:.65}.ui-input-control[data-v-ea98b3c5]:focus-visible{border:.125rem solid var(--color-brand-bright-200);outline:0}.ui-input-control[data-v-ea98b3c5]:hover:not(:disabled){background-color:var(--color-green-50)}.ui-input-control[data-v-ea98b3c5]::placeholder{color:var(--color-grey-600);opacity:1}.ui-input-control[aria-invalid=true][data-v-ea98b3c5]{border-color:var(--color-red)}.ui-input-control[aria-invalid=true][data-v-ea98b3c5]:focus-visible{border-color:var(--color-red)}.ui-input-control[type=number][data-v-ea98b3c5]{-moz-appearance:textfield;appearance:textfield}.ui-input-control[type=number][data-v-ea98b3c5]::-webkit-inner-spin-button,.ui-input-control[type=number][data-v-ea98b3c5]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.ui-input-control-textarea[data-v-ea98b3c5]{height:auto;line-height:1.45;min-height:6rem;resize:vertical}.ui-input-error[data-v-ea98b3c5]{color:var(--color-red);font-size:.75rem;line-height:1.125rem;margin:0}.ui-input-label[data-v-ea98b3c5]{color:var(--color-grey-900);font-size:.875rem;line-height:1.25rem;white-space:nowrap}.ui-input-req[data-v-ea98b3c5]{color:var(--color-red);cursor:help;text-decoration:none}.ui-input-tag-chip[data-v-ea98b3c5]{align-items:center;background-color:var(--color-green-100);border-radius:.25rem;box-sizing:border-box;color:var(--color-grey-900);display:inline-flex;font-size:.875rem;gap:.125rem;height:1.75rem;line-height:1.25;max-width:100%;min-width:0;overflow:hidden;padding:.25rem .5rem}.ui-input-tag-remove[data-v-ea98b3c5]{align-items:center;background:transparent;border:none;border-radius:.125rem;color:var(--color-grey-600);cursor:pointer;display:inline-flex;flex-shrink:0;font-size:.75rem;height:1.25rem;justify-content:center;padding:0;width:1.25rem}.ui-input-tag-remove[data-v-ea98b3c5]:disabled{cursor:not-allowed;opacity:.65}.ui-input-tag-remove[data-v-ea98b3c5]:hover:not(:disabled){color:var(--color-primary-green)}.ui-input-tag-remove-icon[data-v-ea98b3c5]{height:.75rem;width:.75rem}.ui-input-tag-remove-icon[data-v-ea98b3c5]:hover{color:var(--color-red)}.ui-input-tag-text[data-v-ea98b3c5]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-input-tags[data-v-ea98b3c5]{align-items:center;background:var(--color-white);border:.0625rem solid var(--color-green-400);border-radius:.25rem;box-sizing:border-box;display:flex;gap:.5rem;min-height:3rem;padding:.45rem 1rem;width:100%}.ui-input-tags[data-v-ea98b3c5]:focus-within{border:.125rem solid var(--color-brand-bright-200)}.ui-input-tags[data-v-ea98b3c5]:hover:not(:has(:disabled)){background-color:var(--color-green-50)}.ui-input-tags-clear[data-v-ea98b3c5]{align-items:center;background:transparent;border:none;color:var(--color-grey-900);cursor:pointer;display:inline-flex;flex-shrink:0;font-size:.875rem;height:1.75rem;justify-content:center;margin-top:.125rem;padding:0;width:1.75rem}.ui-input-tags-clear[data-v-ea98b3c5]:disabled{cursor:not-allowed;opacity:.65}.ui-input-tags-clear[data-v-ea98b3c5]:hover:not(:disabled){color:var(--color-red)}.ui-input-tags-field[data-v-ea98b3c5]{background:transparent;border:none;color:var(--color-primary-black);flex:1 1 4rem;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:.875rem;min-width:2rem;outline:none;padding:.25rem 0}.ui-input-tags-field[data-v-ea98b3c5]::placeholder{color:var(--color-grey-600);opacity:1}.ui-input-tags-field[data-v-ea98b3c5]:disabled{cursor:not-allowed}.ui-input-tags-field[type=number][data-v-ea98b3c5]{-moz-appearance:textfield;appearance:textfield}.ui-input-tags-field[type=number][data-v-ea98b3c5]::-webkit-inner-spin-button,.ui-input-tags-field[type=number][data-v-ea98b3c5]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.ui-input-tags-invalid[data-v-ea98b3c5]{border-color:var(--color-red)}.ui-input-tags-item[data-v-ea98b3c5]{list-style:none;margin:0;max-width:100%;min-width:0;padding:0}.ui-input-tags-list[data-v-ea98b3c5]{display:flex;flex-wrap:wrap;gap:.625rem;list-style:none;margin:0;max-width:100%;min-width:0;padding:0}.ui-input-tags-value[data-v-ea98b3c5]{align-items:center;display:flex;flex:1;flex-wrap:wrap;gap:.625rem;min-width:0}"]],["__scopeId","data-v-ea98b3c5"]]),HZ={class:"notes-section"},GZ={class:"notes-section-actions","aria-description":"add note button container"},VZ={key:0,class:"notes-section-rule"},WZ={class:"notes-section-list",role:"list"},zZ={class:"notes-item-text"},UZ={key:0,class:"notes-item-badge"},$Z={key:1,class:"notes-item-meta"},jZ={key:1,class:"notes-item-text"},KZ=Ht(Ct({__name:"ContributionNotes",props:{notes:{type:Array}},emits:["add-note"],setup(e,{emit:t}){const n=t,i=we(""),o=()=>{const r=i.value.trim();r&&(n("add-note",r),i.value="")};return(r,s)=>(ae(),rn(xZ,{title:"Contribution Notes & Change History"},{icon:Vn(()=>[...s[1]||(s[1]=[q("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[q("path",{d:"M21 11.01L3 11V13H21V11.01ZM3 16H15V18H3V16ZM21 6H3V8.01L21 8V6Z",fill:"#222222"})],-1)])]),default:Vn(()=>[q("section",HZ,[Le(uo,{modelValue:i.value,"onUpdate:modelValue":s[0]||(s[0]=a=>i.value=a),label:"Add New Note",placeholder:"Enter your note",type:"textarea",rows:4},null,8,["modelValue"]),q("div",GZ,[Le(ds,{disabled:!i.value.trim(),label:"Add Note",onClick:o},null,8,["disabled"])]),e.notes.length?(ae(),ve("hr",VZ)):gt("",!0),q("ul",WZ,[(ae(!0),ve(wt,null,Ti(e.notes,a=>(ae(),ve("li",{key:a.id,class:"notes-item","aria-description":"note text and metadata"},[a.created?.trim()?(ae(),ve(wt,{key:0},[q("p",zZ,Je(a.text),1),a.type!=="user"||a.createdBy?.trim()?(ae(),ve("p",UZ,Je(a.type==="user"?a.createdBy?.trim()??"":"System note"),1)):gt("",!0),a.created?.trim()?(ae(),ve("p",$Z,Je(ni(IY)(a.created)),1)):gt("",!0)],64)):(ae(),ve("p",jZ,Je(a.text),1))]))),128))])])]),_:1}))}}),[["styles",[".notes-item[data-v-0a1519b3]{margin-bottom:1rem}.notes-item[data-v-0a1519b3]:last-child{margin-bottom:0}.notes-item-badge[data-v-0a1519b3]{color:var(--color-primary-black);font-size:.675rem;font-weight:500;margin:.35rem 0 0}.notes-item-meta[data-v-0a1519b3]{color:var(--color-grey-600);font-size:.625rem;margin:.35rem 0 0}.notes-item-text[data-v-0a1519b3]{color:var(--color-grey-900);font-size:.75rem;line-height:1.45;margin:0}.notes-section[data-v-0a1519b3]{display:flex;flex-direction:column;gap:1rem}.notes-section-actions[data-v-0a1519b3]{display:flex;justify-content:flex-end}.notes-section-list[data-v-0a1519b3]{margin:0;padding-left:1.25rem}.notes-section-rule[data-v-0a1519b3]{border:none;border-top:.0625rem solid var(--color-green-200);margin:.25rem 0}"]],["__scopeId","data-v-0a1519b3"]]);var Tf={exports:{}},qZ=Tf.exports,yD;function QZ(){return yD||(yD=1,(function(e,t){(function(n,i){i()})(qZ,function(){function n(u,h){return typeof h>"u"?h={autoBom:!1}:typeof h!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),h={autoBom:!h}),h.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type)?new Blob(["\uFEFF",u],{type:u.type}):u}function i(u,h,f){var g=new XMLHttpRequest;g.open("GET",u),g.responseType="blob",g.onload=function(){l(g.response,h,f)},g.onerror=function(){console.error("could not download file")},g.send()}function o(u){var h=new XMLHttpRequest;h.open("HEAD",u,!1);try{h.send()}catch{}return 200<=h.status&&299>=h.status}function r(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{var h=document.createEvent("MouseEvents");h.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(h)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Gi=="object"&&Gi.global===Gi?Gi:void 0,a=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(u,h,f){var g=s.URL||s.webkitURL,m=document.createElement("a");h=h||u.name||"download",m.download=h,m.rel="noopener",typeof u=="string"?(m.href=u,m.origin===location.origin?r(m):o(m.href)?i(u,h,f):r(m,m.target="_blank")):(m.href=g.createObjectURL(u),setTimeout(function(){g.revokeObjectURL(m.href)},4e4),setTimeout(function(){r(m)},0))}:"msSaveOrOpenBlob"in navigator?function(u,h,f){if(h=h||u.name||"download",typeof u!="string")navigator.msSaveOrOpenBlob(n(u,f),h);else if(o(u))i(u,h,f);else{var g=document.createElement("a");g.href=u,g.target="_blank",setTimeout(function(){r(g)})}}:function(u,h,f,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),typeof u=="string")return i(u,h,f);var m=u.type==="application/octet-stream",v=/constructor/i.test(s.HTMLElement)||s.safari,w=/CriOS\/[\d]+/.test(navigator.userAgent);if((w||m&&v||a)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var S=b.result;S=w?S:S.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=S:location=S,g=null},b.readAsDataURL(u)}else{var y=s.URL||s.webkitURL,R=y.createObjectURL(u);g?g.location=R:location.href=R,g=null,setTimeout(function(){y.revokeObjectURL(R)},4e4)}});s.saveAs=l.saveAs=l,e.exports=l})})(Tf)),Tf.exports}var YZ=QZ();const ZZ=tw(YZ),JZ=Hi.injectEndpoints({endpoints:e=>({exportContributions:e.mutation({query:({user:t,company:n,stack:i,username:o,format:r,columnsState:s=null,sortColumn:a=null,sortOrder:l=null,match:u=!1,body:h})=>({url:`/contributions/search/export?user=${encodeURIComponent(t)}&company=${encodeURIComponent(n)}&stack=${encodeURIComponent(i)}&username=${encodeURIComponent(o)}&format=${r}&columnsState=${JSON.stringify(s)}${a&&l?`&sortColumn=${a}&sortOrder=${l}`:""}&match=${u}`,method:"POST",body:h,responseHandler:f=>f.headers.get("Content-Type")?.includes("/json")?f.json():f.blob()}),transformResponse:(t,n)=>{const o=n?.response?.headers?.get("Content-Disposition")?.match(/filename="?([^"]+)"?/)?.[1]??`contributions_export_${new Date().toISOString().split("T")[0]}`;return t instanceof Blob&&ZZ(t,o),o}})})});function SD(){return pa(JZ.endpoints.exportContributions)}const XZ="3c7efRwnq2C5f4NnnvM12Q==",eJ="SZb/VbiIJxsmiO5+8HmGZg==",tJ="x054VnMWM65BNwSK0wtjPQ==",nJ={class:"content-container","aria-description":"main content container"},iJ={class:"content-title","aria-description":"content title"},oJ={key:0,"aria-description":"export actions"},rJ=["disabled"],sJ={class:"content","aria-description":"page content"},sw=Ht(Ct({__name:"ContentContainer",props:{title:{type:String},user:{default:()=>eJ,type:String},company:{default:()=>XZ,type:String},stack:{default:"QA01",type:String},username:{default:()=>tJ,type:String},columnsState:{default:null,type:[Array,null]},sortColumn:{default:null,type:[String,null]},sortOrder:{default:null,type:[String,null]},page:{default:"contribution-search",type:String},showExport:{type:Boolean,default:!0},disableExport:{type:Boolean,default:!1}},setup(e){const t=vD(m=>m.ContributionSearchReducer),{trigger:n,isLoading:i}=SD(),o=e.page==="detected-contributions",r=he(()=>t.value?.[e.page]??void 0),s=we(null),a=we(null),l=we({}),u=we(!1),h=(m="xlsx",v=null,w=null,b=null)=>{!r.value||e.disableExport||(s.value?.close(),u.value=!1,console.log("Exporting contributions with subsequent search body:"),console.log(r),n({user:e.user,company:e.company,stack:e.stack,username:e.username,format:m,columnsState:v,sortColumn:w,sortOrder:b,match:o,body:r.value}))},f=async()=>{const m=s.value,v=a.value;if(!m||!v)return;const w=v?.getBoundingClientRect(),b=190,y=8,R=Math.max(y,Math.min(w.right-b,window.innerWidth-b-y)),S=Math.min(w.bottom+y,window.innerHeight-120);l.value={position:"absolute",top:`${S}px`,left:`${R}px`,margin:"0"},await xs(),m?.showModal(),u.value=!0},g=m=>{e.disableExport||i.value||(u.value?m.target===s.value&&(s.value?.close(),u.value=!1):f())};return(m,v)=>{const w=Ds("font-awesome-icon");return ae(),ve(wt,null,[q("div",nJ,[q("header",null,[q("h1",iJ,Je(e.title),1),e.page&&e.showExport?(ae(),ve("span",oJ,[q("button",{class:"export-button",ref_key:"exportModalButton",ref:a,disabled:ni(i)||e.disableExport,onClick:xt(g,["prevent"]),"aria-description":"export button"},[Le(w,{class:"contributions-export-download-icon",icon:["fas","download"],size:"medium"})],8,rJ)])):gt("",!0)]),q("div",sJ,[Ts(m.$slots,"content",{},void 0)])]),q("dialog",{class:"contributions-export-modal",ref_key:"exportModal",ref:s,style:Uo(l.value),onClick:g},[q("button",{onClick:v[0]||(v[0]=xt(b=>h("xlsx",e.columnsState,e.sortColumn,e.sortOrder),["stop"]))},[Le(w,{class:"export-excel-icon",icon:["fas","file-excel"],size:"small"}),v[1]||(v[1]=Xi("Export to Excel",-1))])],4)],64)}}}),[["styles",["a[data-v-aba70dec],button[data-v-aba70dec]{cursor:pointer}.content-container[data-v-aba70dec]{background:var(--color-white);display:flex;flex-direction:column;padding:1.25rem}.content-container header[data-v-aba70dec]{align-items:center;border-bottom:.0625rem solid var(--color-primary-grey);display:flex;justify-content:space-between;margin-bottom:1.5rem}.content-container header button[data-v-aba70dec]{background:transparent;border:none;border-radius:.25rem;color:var(--color-primary-green);font-size:xx-large;padding:.5rem;text-decoration:none}.content-container header button[data-v-aba70dec]:disabled{cursor:not-allowed;opacity:.5}.content-container header button[data-v-aba70dec]:hover{background:var(--color-green-50)}.content-title[data-v-aba70dec]{font-size:1.5rem;font-weight:500;margin-bottom:1rem}.contributions-export-download-icon[data-v-aba70dec]{height:2rem;width:2.5rem}.contributions-export-modal[data-v-aba70dec]{border:.1rem solid var(--color-primary-grey);box-shadow:.1875rem .15625rem .15625rem var(--color-secondary-grey);opacity:0;padding:.25rem 0;transform:translateY(-.25rem);transition:opacity .2s ease,transform .2s ease,overlay .2s ease allow-discrete;width:fit-content}.contributions-export-modal[open][data-v-aba70dec]{opacity:1;transform:translateY(0)}@starting-style{.contributions-export-modal[open][data-v-aba70dec]{opacity:0;transform:translateY(-.25rem)}}.contributions-export-modal button[data-v-aba70dec]{background:transparent;border:none;display:block;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:.875rem;padding:.5rem 1rem}.contributions-export-modal button[data-v-aba70dec]:hover{background:var(--color-green-50)}.contributions-export-modal button svg[data-v-aba70dec]{margin-right:.5rem}.contributions-export-modal button .export-excel-icon[data-v-aba70dec]{color:var(--color-green);height:2rem;vertical-align:middle;width:1rem}.contributions-export-modal button .export-pdf-icon[data-v-aba70dec]{color:var(--color-red);height:2rem;vertical-align:middle;width:1rem}[data-v-aba70dec]::backdrop{background:transparent}"]],["__scopeId","data-v-aba70dec"]]),aJ=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},lJ=Ct({name:"ClipLoader",props:{loading:{type:Boolean,default:!0},color:{type:String,default:"#5dc596"},size:{type:String,default:"35px"},radius:{type:String,default:"100%"}},setup(e){return{spinnerStyle:he(()=>({height:e.size,width:e.size,borderWidth:"2px",borderStyle:"solid",borderColor:e.color+" "+e.color+" transparent",borderRadius:e.radius,background:"transparent"}))}}}),cJ={class:"v-spinner"};function uJ(e,t,n,i,o,r){return Fs((ae(),ve("div",cJ,[q("div",{class:"v-clip",style:Uo(e.spinnerStyle)},null,4)],512)),[[rp,e.loading]])}const dJ=aJ(lJ,[["render",uJ],["__scopeId","data-v-8e9283de"]]),hJ={class:"loading-overlay"},fJ={key:0},gJ="#0a8f2a",aw=Ht(Ct({__name:"LoadingSpinner",props:{loadingText:{default:null,type:String},size:{default:null,type:Number}},setup(e){const t=we(`${e.size?e.size:120}px`);return(n,i)=>(ae(),ve("div",hJ,[Le(ni(dJ),{loading:!0,size:t.value,color:gJ},null,8,["size"]),e.loadingText?(ae(),ve("span",fJ,Je(e.loadingText),1)):gt("",!0)]))}}),[["styles",[".loading-overlay[data-v-c04b44eb]{align-items:center;display:flex;flex-direction:column;gap:12px;height:100%;justify-content:center}"]],["__scopeId","data-v-c04b44eb"]]);function pJ(e){const{contribution:t,match:n}=e,i=n.preclearance,o=n.created,r=typeof o=="string"&&o.length>0?o.slice(0,10):"";return{contributionId:t.id,reference:i.name,contributor:t.contributor,employer:t.employer,occupation:t.occupation,address:t.address,state:t.state,zipCode:t.zipCode,date:t.date,dateDetected:r,amount:iw(t.amount),approvedAmount:iw(i.amount),recipient:t.recipient,source:t.source,jurisdiction:t.jurisdiction,status:n.status,employeeStatus:n.employee.status,reconciliationStatus:i.reconciliationStatus,preclearanceLabel:i.name,preclearanceId:i.id,amended:String(t.amended)==="true"?"Yes":"No",approvalDate:i.approvalDate,lastUpdated:AY(n.modified),lastUpdatedBy:n.modifiedBy}}const mJ=e=>{const t=Number(e.replace(/\/+$/,"").split("/").pop());return Number.isFinite(t)?t:void 0};function vJ(){const e=window.location.search;new URLSearchParams(e).get("id");const n=we(window.location.pathname),i=()=>{n.value=window.location.pathname};return Ir(()=>{i(),window.addEventListener("popstate",i)}),pd(()=>{window.removeEventListener("popstate",i)}),he(()=>mJ(n.value))}const CJ=Hi.injectEndpoints({endpoints:e=>({getContributionDetails:e.query({query:({id:t,user:n,company:i,stack:o,username:r})=>({url:`/contributions/${t}`,params:{user:n,company:i,stack:o,username:r}})})})});function wJ(e){return Ru(CJ.endpoints.getContributionDetails,e)}const RD=Hi.injectEndpoints({endpoints:e=>({addContributionNote:e.mutation({query:({contribution:t,user:n,company:i,stack:o,username:r,body:s})=>({url:`/contributions/${t}/notes`,method:"POST",params:{user:n,company:i,stack:o,username:r},body:s})}),addContributionNoteBulk:e.mutation({query:({user:t,company:n,stack:i,username:o,body:r})=>({url:"/contributions/notes",method:"POST",params:{user:t,company:n,stack:i,username:o},body:r})})})});function bJ(){return pa(RD.endpoints.addContributionNote)}function yJ(){return pa(RD.endpoints.addContributionNoteBulk)}const xD=Hi.injectEndpoints({endpoints:e=>({updateContributionStatus:e.mutation({query:({contribution:t,user:n,company:i,stack:o,username:r,body:s})=>({url:`/contributions/${t}/status`,method:"POST",params:{user:n,company:i,stack:o,username:r},body:s})}),updateContributionsStatusBulk:e.mutation({query:({user:t,company:n,stack:i,username:o,body:r})=>({url:"/contributions/status",method:"POST",params:{user:t,company:n,stack:i,username:o},body:r})})})});function SJ(){return pa(xD.endpoints.updateContributionStatus)}function RJ(){return pa(xD.endpoints.updateContributionsStatusBulk)}const xJ=Hi.injectEndpoints({endpoints:e=>({getUsers:e.query({query:t=>`/users/${encodeURIComponent(t)}`})})});function FJ(e){return Ru(xJ.endpoints.getUsers,e)}const PJ={class:"contribution-details-stack","aria-description":"Contribution details layout stack"},EJ={key:0,class:"contribution-details-loading","aria-description":"Contribution details loading state"},DJ={key:1,"aria-description":"Contribution details load error"},TJ=Ht(Ct({__name:"ContributionDetails",props:{user:{type:String},company:{type:String},stack:{type:String},username:{type:String}},setup(e){const t=e,n=vJ(),i=he(()=>({user:t.user,company:t.company,stack:t.stack,username:t.username})),{data:o}=FJ(rM(t,"user")),{data:r,isLoading:s,isError:a,refetch:l}=wJ(he(()=>({id:Number(n.value)||0,...i.value}))),{trigger:u}=bJ(),{trigger:h}=SJ(),{trigger:f}=TY(),g=he(()=>{const A=o.value;return A&&([A.firstName,A.lastName].filter(Boolean).join(" ").trim()||A.email||A.username)||"Guest"}),m=we({}),v=he(()=>{const A=r.value;return A?{...pJ(A),...m.value}:null}),w=he(()=>r.value?.match.notes??[]),b=he(()=>n.value!==void 0&&s.value),y=he(()=>n.value===void 0?"Invalid contribution id":a.value?"Failed to load contribution":null);Jt(n,()=>{m.value={}});const R=A=>{m.value={...m.value,...A}},S=async(A,k="user")=>{const L=n.value;if(L!==void 0)try{await u({contribution:Number(L),...i.value,body:{note:A,type:k}}),await l()}catch(N){console.error("Failed to add note",N)}},P=async A=>{const k=n.value;if(k!==void 0)try{await f({id:k,body:{preclearance:A.preclearanceId}}),R({preclearanceId:A.preclearanceId,preclearanceLabel:A.preclearanceLabel}),await S(`${g.value} matched preclearance to ${A.preclearanceLabel} on ${wD(new Date)}`,"system")}catch(L){console.error("Failed to match preclearance",L)}},F=async A=>{const k=n.value,L=v.value;if(!(k===void 0||!L||L.status===A.name))try{await h({contribution:Number(k),...i.value,body:{status:A.id}}),await l()}catch(N){console.error("Failed to update contribution status",N)}};return(A,k)=>(ae(),rn(sw,{title:"Contribution Details","show-export":!1},{content:Vn(()=>[q("div",PJ,[b.value?(ae(),ve("div",EJ,[Le(aw,{size:64})])):y.value?(ae(),ve("div",DJ,Je(y.value),1)):(ae(),ve(wt,{key:2},[v.value?(ae(),rn(mZ,{key:0,contribution:v.value,user:e.user,company:e.company,stack:e.stack,username:e.username,onClearPreclearance:k[0]||(k[0]=L=>R({preclearanceId:null,preclearanceLabel:""})),onMatchPreclearance:P,onUpdateStatus:F},null,8,["contribution","user","company","stack","username"])):gt("",!0),Le(KZ,{notes:w.value,onAddNote:S},null,8,["notes"])],64))])]),_:1}))}}),[["styles",[".contribution-details-loading[data-v-8cfa7346]{min-height:12rem}.contribution-details-stack[data-v-8cfa7346]{display:flex;flex-direction:column;gap:1rem}"]],["__scopeId","data-v-8cfa7346"]]),AJ={class:"body"},IJ=Ct({__name:"ContributionDetails.ce",props:{user:{type:String},company:{type:String},stack:{type:String},username:{type:String}},setup(e){return(t,n)=>(ae(),ve("div",AJ,[Le(TJ,{user:e.user,company:e.company,stack:e.stack,username:e.username},null,8,["user","company","stack","username"])]))}}),lw=':root,:host{--color-black: #000000;--color-white: #ffffff;--color-green: #008000;--color-red: #db0400;--color-primary-green: #0a8f2a;--color-secondary-green: #eaf2ee;--color-green-50: #f0f5f0;--color-green-100: #e1ece4;--color-green-200: #d4e3d7;--color-green-300: #c7daca;--color-green-400: #bad1bd;--color-green-500: #adc2b0;--color-green-900: #2b342c;--color-brand-dark-50: #e5fff1;--color-brand-dark-100: #b8e2cb;--color-brand-dark-500: #006e33;--color-brand-dark-800: #003c1c;--color-brand-dark-900: #002b14;--color-brand-medium-500: #00892f;--color-brand-medium-600: #007229;--color-brand-bright-100: #c4f0cd;--color-brand-bright-200: #9ee6ad;--color-primary-black: #1c2b2d;--color-primary-grey: #d9d9d9;--color-secondary-grey: #d7e3dc;--color-grey-50: #fbf9fa;--color-grey-300: #c9d0cc;--color-grey-400: #8e8e8e;--color-grey-500: #757575;--color-grey-600: #5f6361;--color-grey-700: #4c4c4c;--color-grey-900: #222222;--color-yellow-700: #c07a00;--color-red-700: #c10007}#app{background:var(--color-primary-grey);color:var(--color-primary-black);display:flex;height:100vh;width:100%}:host,:root{--font-family-base: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;--topbar-border-bottom-height: .0625rem;--topbar-height: 4rem}body,.body{color:var(--color-primary-black);font-family:var(--font-family-base);margin:0}.docs-story,.sb-show-main,.sbdocs,.sbdocs-content,.sbdocs-preview,.sbdocs-wrapper,#storybook-docs,#storybook-root{font-family:var(--font-family-base)}.v-spinner .v-clip{animation:v-clipDelay .75s 0s infinite linear;border-radius:100%;color:var(--color-primary-green)}@keyframes v-clipDelay{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}',MJ=Ht(IJ,[["styles",[lw,".body>*{width:100%}"]]]),FD=6e4,PD=36e5,ED=Symbol.for("constructDateFrom");function DD(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ED in e?e[ED](t):e instanceof Date?new e.constructor(t):new Date(t)}function Af(e,t){return DD(e,e)}function kJ(e,t){return+Af(e)>+Af(t)}function TD(e,t){const n=()=>DD(t?.in,NaN),o=NJ(e);let r;if(o.date){const u=BJ(o.date,2);r=HJ(u.restDateString,u.year)}if(!r||isNaN(+r))return n();const s=+r;let a=0,l;if(o.time&&(a=GJ(o.time),isNaN(a)))return n();if(o.timezone){if(l=VJ(o.timezone),isNaN(l))return n()}else{const u=new Date(s+a),h=Af(0);return h.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),h.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),h}return Af(s+a+l)}const If={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},LJ=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,OJ=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,_J=/^([+-])(\d{2})(?::?(\d{2}))?$/;function NJ(e){const t={},n=e.split(If.dateTimeDelimiter);let i;if(n.length>2)return t;if(/:/.test(n[0])?i=n[0]:(t.date=n[0],i=n[1],If.timeZoneDelimiter.test(t.date)&&(t.date=e.split(If.timeZoneDelimiter)[0],i=e.substr(t.date.length,e.length))),i){const o=If.timezone.exec(i);o?(t.time=i.replace(o[1],""),t.timezone=o[1]):t.time=i}return t}function BJ(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),i=e.match(n);if(!i)return{year:NaN,restDateString:""};const o=i[1]?parseInt(i[1]):null,r=i[2]?parseInt(i[2]):null;return{year:r===null?o:r*100,restDateString:e.slice((i[1]||i[2]).length)}}function HJ(e,t){if(t===null)return new Date(NaN);const n=e.match(LJ);if(!n)return new Date(NaN);const i=!!n[4],o=xu(n[1]),r=xu(n[2])-1,s=xu(n[3]),a=xu(n[4]),l=xu(n[5])-1;if(i)return jJ(t,a,l)?WJ(t,a,l):new Date(NaN);{const u=new Date(0);return!UJ(t,r,s)||!$J(t,o)?new Date(NaN):(u.setUTCFullYear(t,r,Math.max(o,s)),u)}}function xu(e){return e?parseInt(e):1}function GJ(e){const t=e.match(OJ);if(!t)return NaN;const n=cw(t[1]),i=cw(t[2]),o=cw(t[3]);return KJ(n,i,o)?n*PD+i*FD+o*1e3:NaN}function cw(e){return e&&parseFloat(e.replace(",","."))||0}function VJ(e){if(e==="Z")return 0;const t=e.match(_J);if(!t)return 0;const n=t[1]==="+"?-1:1,i=parseInt(t[2]),o=t[3]&&parseInt(t[3])||0;return qJ(i,o)?n*(i*PD+o*FD):NaN}function WJ(e,t,n){const i=new Date(0);i.setUTCFullYear(e,0,4);const o=i.getUTCDay()||7,r=(t-1)*7+n+1-o;return i.setUTCDate(i.getUTCDate()+r),i}const zJ=[31,null,31,30,31,30,31,31,30,31,30,31];function AD(e){return e%400===0||e%4===0&&e%100!==0}function UJ(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(zJ[t]||(AD(e)?29:28))}function $J(e,t){return t>=1&&t<=(AD(e)?366:365)}function jJ(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function KJ(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function qJ(e,t){return t>=0&&t<=59}const QJ=["aria-description"],YJ={class:"sources-checkbox-label"},ZJ=["value"],JJ={class:"sources-checkbox-label-text","aria-description":"source display name"},uw=Ht(Ct({__name:"ContributionSearchSourceCheckboxRow",props:Jo({isNested:{type:Boolean,default:!1},source:{type:Object}},{selectedSourceIndexes:{required:!0},selectedSourceIndexesModifiers:{}}),emits:["update:selectedSourceIndexes"],setup(e){const t=e,n=fi(e,"selectedSourceIndexes"),i=`contribution-search-source-${t.source.name}`;return(o,r)=>(ae(),ve("div",{class:ft(["sources-checkbox-row",{"sources-checkbox-row-nested":e.isNested}]),role:"group","aria-description":e.isNested?"nested source checkbox row":"source checkbox row"},[q("label",YJ,[Fs(q("input",{id:i,"onUpdate:modelValue":r[0]||(r[0]=s=>n.value=s),type:"checkbox",name:"sources",value:e.source.name},null,8,ZJ),[[up,n.value]]),q("span",JJ,Je(e.source.label),1)])],10,QJ))}}),[["styles",[`.sources-checkbox-label[data-v-582fd460]{align-items:center;color:var(--color-primary-black);cursor:pointer;display:flex;font-size:.8125rem;gap:.375rem;line-height:1.35;padding:.125rem}.sources-checkbox-label[data-v-582fd460]:hover{background-color:var(--color-green-50)}.sources-checkbox-label input[type=checkbox][data-v-582fd460]{appearance:none;background-color:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.125rem;cursor:pointer;flex-shrink:0;height:1rem;margin-top:.125rem;width:1rem}.sources-checkbox-label input[type=checkbox][data-v-582fd460]:checked{background-color:var(--color-primary-green);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M1 5l3 3 7-7'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:.625rem .5rem;border-color:var(--color-primary-green)}.sources-checkbox-row-nested .sources-checkbox-label[data-v-582fd460]{font-size:.75rem}`]],["__scopeId","data-v-582fd460"]]),Mf=e=>[e.source.name,...e.children.flatMap(t=>Mf(t))],XJ=(e,t)=>{if(t.length===0||e.length===0)return t;const n=new Set(t),i=o=>{if(o.children.length>0&&n.has(o.source.name))for(const r of Mf(o))n.add(r);for(const r of o.children)i(r)};for(const o of e)i(o);return[...n]},eX=e=>{const t=new Set,n=i=>{i.children.length>0&&t.add(i.source.name);for(const o of i.children)n(o)};for(const i of e)n(i);return t},ID=(e,t)=>e.filter(n=>!t.has(n)),tX=(e,t)=>{if(t.length===0||e.length===0)return t;const n=new Set(t),i=o=>{if(o.children.length>0){const r=Mf(o).filter(a=>a!==o.source.name);r.length>0&&r.every(a=>n.has(a))?n.add(o.source.name):n.delete(o.source.name)}for(const r of o.children)i(r)};for(const o of e)i(o);return[...n]},nX={class:"source-group-header-row","aria-description":"parent source with expand control"},iX=["aria-expanded","aria-label"],oX={class:"source-group-child-list"},rX=["aria-selected"],sX=Ht(Ct({__name:"ContributionSearchSourceGroupDropdown",props:Jo({depth:{default:0,type:Number},sourceDisplayNode:{type:Object}},{selectedSourceIndexes:{required:!0},selectedSourceIndexesModifiers:{}}),emits:["update:selectedSourceIndexes"],setup(e){const t=e,n=fi(e,"selectedSourceIndexes"),i=we(!1),o=we(!1),r=he(()=>t.sourceDisplayNode.source.name),s=he(()=>Mf(t.sourceDisplayNode).filter(v=>v!==r.value)),a=he(()=>n.value.includes(r.value)),l=he(()=>s.value.length===0?!0:s.value.every(v=>n.value.includes(v))),u=he(()=>`Show or hide child sources for ${t.sourceDisplayNode.source.label}`),h=()=>{i.value=!i.value},f=(v,w)=>{if(!(o.value||v===w||s.value.length===0)){if(o.value=!0,v)n.value=Re.uniq([...n.value,...s.value]);else if(l.value){const b=new Set(s.value);n.value=n.value.filter(y=>!b.has(y))}o.value=!1}},g=()=>{if(o.value||s.value.length===0)return;const v=l.value,w=a.value;v!==w&&(o.value=!0,v?n.value=Re.uniq([...n.value,r.value]):n.value=n.value.filter(b=>b!==r.value),o.value=!1)},m=he(()=>s.value.filter(v=>n.value.includes(v)).sort().join(","));return Jt(a,f,{immediate:!0}),Jt(m,g,{immediate:!0}),(v,w)=>{const b=Ds("ContributionSearchSourceGroupDropdown",!0);return ae(),ve("section",{class:ft(["source-group",{"source-group-nested":e.depth>0}]),style:Uo(e.depth>0?{marginLeft:`${e.depth*.75}rem`}:void 0),"aria-description":"collapsible parent source group"},[q("header",nX,[Le(uw,{source:e.sourceDisplayNode.source,"is-nested":e.depth>0,"selected-source-indexes":n.value,"onUpdate:selectedSourceIndexes":w[0]||(w[0]=y=>n.value=y)},null,8,["source","is-nested","selected-source-indexes"]),q("button",{type:"button",class:"source-group-caret-button","aria-expanded":i.value,"aria-label":u.value,onClick:h},[q("i",{class:ft(["fa-chevron-down fa-solid source-group-chevron",{"source-group-chevron-expanded":i.value}]),"aria-hidden":"true"},null,2)],8,iX)]),Le(Rd,{name:"source-group-panel"},{default:Vn(()=>[i.value?(ae(),ve("section",{key:0,class:"source-group-panel","aria-description":"expanded child source checkboxes",onClick:w[3]||(w[3]=xt(()=>{},["stop"]))},[q("ul",oX,[(ae(!0),ve(wt,null,Ti(e.sourceDisplayNode.children,y=>(ae(),ve("li",{key:y.source.name,class:"source-group-child-item",role:"option","aria-selected":n.value.includes(y.source.name)},[y.children.length>0?(ae(),rn(b,{key:0,"source-display-node":y,depth:e.depth+1,"selected-source-indexes":n.value,"onUpdate:selectedSourceIndexes":w[1]||(w[1]=R=>n.value=R)},null,8,["source-display-node","depth","selected-source-indexes"])):(ae(),rn(uw,{key:1,source:y.source,"is-nested":"","selected-source-indexes":n.value,"onUpdate:selectedSourceIndexes":w[2]||(w[2]=R=>n.value=R)},null,8,["source","selected-source-indexes"]))],8,rX))),128))])])):gt("",!0)]),_:1})],6)}}}),[["styles",[".source-group[data-v-76a4741b]{display:flex;flex-direction:column;gap:.25rem}.source-group-caret-button[data-v-76a4741b]{background:transparent;border:none;color:var(--color-primary-black);cursor:pointer;flex-shrink:0;line-height:1;margin-top:.125rem;padding:.125rem}.source-group-caret-button[data-v-76a4741b]:hover{color:var(--color-primary-green)}.source-group-chevron[data-v-76a4741b]{font-size:.75rem;transform:rotate(-90deg);transition:transform .2s ease}.source-group-chevron-expanded[data-v-76a4741b]{transform:rotate(0)}.source-group-child-item[data-v-76a4741b]{list-style:none;margin:0;padding:0}.source-group-child-list[data-v-76a4741b]{display:flex;flex-direction:column;gap:.375rem;list-style:none;margin:0;padding:0}.source-group-header-row[data-v-76a4741b]{align-items:flex-start;display:flex;gap:.25rem;width:100%}.source-group-header-row[data-v-76a4741b] .sources-checkbox-label{flex:1;min-width:0}.source-group-panel[data-v-76a4741b]{margin-left:.5rem;padding:.375rem 0 0 .625rem}.source-group-panel-enter-active[data-v-76a4741b],.source-group-panel-leave-active[data-v-76a4741b]{transition:opacity .2s ease,transform .2s ease}.source-group-panel-enter-from[data-v-76a4741b],.source-group-panel-leave-to[data-v-76a4741b]{opacity:0;transform:translateY(-.25rem)}"]],["__scopeId","data-v-76a4741b"]]),MD=e=>String(e.id),kD=e=>{const t=Re.keyBy(e,MD),n={};for(const r of e){const s=r.parent;s&&t[s]&&(n[s]||(n[s]=[]),n[s].push(r))}const i=r=>({source:r,children:(n[MD(r)]??[]).sort((s,a)=>s.label.localeCompare(a.label)).map(s=>i(s))});return e.filter(r=>!r.parent||!t[r.parent]).sort((r,s)=>r.label.localeCompare(s.label)).map(r=>i(r))},aX=Hi.injectEndpoints({endpoints:e=>({getSources:e.query({query:({id:t=null})=>({url:t?`/sources/${t}`:"/sources/getAllSources"})})})});function lX(e){return Ru(aX.endpoints.getSources,e)}const cX={class:"sources-select","aria-description":"sources multi-select field"},uX=["aria-expanded","aria-label"],dX={class:"sources-dropdown-count"},hX=["aria-label"],fX={key:1,class:"sources-empty-message"},gX={key:2,class:"sources-options","aria-description":"source checkbox options"},pX={class:"sources-select-all-list"},mX={class:"sources-select-all-item"},vX={class:"sources-checkbox-label sources-select-all-label"},CX={class:"sources-list"},wX=["aria-selected"],bX=Ht(Ct({__name:"ContributionSearchSourcesSelect",props:{selectedSourceIndexes:{default:()=>[]},selectedSourceIndexesModifiers:{}},emits:["update:selectedSourceIndexes"],setup(e){const t=fi(e,"selectedSourceIndexes"),n=yo({}),{data:i,isLoading:o}=lX(n),r=we(!1),s=we(null),a=we(null),l=we(null),u=we(!1),h=we(!1),f=he(()=>{const E=i.value;return E?Array.isArray(E)?E:[E]:[]}),g=he(()=>kD(f.value)),m=he(()=>eX(g.value)),v=he(()=>f.value.map(E=>E.name)),w=he(()=>ID(v.value,m.value)),b=he(()=>ID(t.value,m.value)),y=he(()=>b.value.length),R=he(()=>{const E=w.value;return E.length===0?!1:E.every(I=>t.value.includes(I))}),S=he(()=>y.value>0&&!R.value),P=he({get:()=>R.value,set:E=>{t.value=E?[...v.value]:[]}}),F=he(()=>{const E=y.value;return E===1?"1 source selected":`${E} sources selected`}),A=()=>{r.value=!r.value},k=()=>{r.value=!1},L=(E,I)=>{if(Re.isEmpty(I)||E.length===0)return I;const B=I.map(W=>E.some(pe=>pe.name===W)?W:E.find(pe=>pe.label===W)?.name??W);return Re.uniq(B).filter(W=>E.some(X=>X.name===W))},N=(E,I)=>{if(E.length===0)return;h.value=!0;let B=[...t.value];if(B=L(E,B),!Re.isEmpty(B)){const W=kD(E);B=XJ(W,B),B=tX(W,B)}I&&!u.value&&(u.value=!0,Re.isEmpty(B)&&(B=E.map(W=>W.name))),Re.isEqual([...B].sort(),[...t.value].sort())||(t.value=B),h.value=!1};Jt(f,E=>{N(E,!0)},{flush:"post",immediate:!0}),Jt(t,()=>{h.value||N(f.value,!1)},{deep:!0,flush:"post"}),Jt([S,R],()=>{l.value&&(l.value.indeterminate=S.value)},{flush:"post"});const M=E=>{if(r.value){{const I=E.target;if(a.value?.contains(I)||s.value?.contains(I))return}k()}};return Ir(()=>{document.addEventListener("click",M)}),Es(()=>{document.removeEventListener("click",M)}),(E,I)=>(ae(),ve("section",cX,[q("section",{class:"sources-dropdown","aria-description":"sources checkbox dropdown",onKeydown:Xt(k,["esc"])},[q("button",{ref_key:"dropdownButtonRef",ref:s,type:"button",class:ft(["sources-dropdown-button",{"sources-dropdown-button-open":r.value}]),"aria-expanded":r.value,"aria-haspopup":"listbox","aria-label":`Sources, ${F.value}`,onClick:xt(A,["stop"])},[q("span",dX,Je(y.value),1),I[4]||(I[4]=q("span",{class:"sources-dropdown-title"},"Sources Selected",-1)),q("i",{class:ft(["fa-solid fa-chevron-down sources-dropdown-chevron",{"sources-dropdown-chevron-open":r.value}]),"aria-hidden":"true"},null,2)],10,uX),Le(Rd,{name:"sources-dropdown"},{default:Vn(()=>[r.value?(ae(),ve("section",{key:0,ref_key:"dropdownPanelRef",ref:a,class:"sources-dropdown-panel","aria-description":"sources checkbox list panel",role:"listbox","aria-multiselectable":"true","aria-label":F.value,onClick:I[3]||(I[3]=xt(()=>{},["stop"]))},[ni(o)?(ae(),rn(aw,{key:0,size:48,"loading-text":"Loading sources…"})):f.value.length===0?(ae(),ve("p",fX," No sources available. ")):(ae(),ve("section",gX,[q("ul",pX,[q("li",mX,[q("label",vX,[Fs(q("input",{id:"contribution-search-source-select-all",ref_key:"selectAllCheckboxRef",ref:l,"onUpdate:modelValue":I[0]||(I[0]=B=>P.value=B),type:"checkbox",name:"sources-select-all"},null,512),[[up,P.value]]),I[5]||(I[5]=Xi(" ALL SOURCES ",-1))])])]),q("ul",CX,[(ae(!0),ve(wt,null,Ti(g.value,B=>(ae(),ve("li",{key:B.source.name,class:"sources-list-item",role:"option","aria-selected":t.value.includes(B.source.name)},[B.children.length>0?(ae(),rn(sX,{key:0,"source-display-node":B,"selected-source-indexes":t.value,"onUpdate:selectedSourceIndexes":I[1]||(I[1]=W=>t.value=W)},null,8,["source-display-node","selected-source-indexes"])):(ae(),rn(uw,{key:1,source:B.source,"selected-source-indexes":t.value,"onUpdate:selectedSourceIndexes":I[2]||(I[2]=W=>t.value=W)},null,8,["source","selected-source-indexes"]))],8,wX))),128))])]))],8,hX)):gt("",!0)]),_:1})],32)]))}}),[["styles",[`.sources-checkbox-label[data-v-1b13abb9]{align-items:center;color:var(--color-primary-black);cursor:pointer;display:flex;font-size:.8125rem;gap:.375rem;line-height:1.35;padding:.125rem}.sources-checkbox-label[data-v-1b13abb9]:hover{background-color:var(--color-green-50)}.sources-checkbox-label input[type=checkbox][data-v-1b13abb9]{appearance:none;background-color:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.125rem;cursor:pointer;flex-shrink:0;height:1rem;margin-top:.125rem;width:1rem}.sources-checkbox-label input[type=checkbox][data-v-1b13abb9]:checked{background-color:var(--color-primary-green);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M1 5l3 3 7-7'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:.625rem .5rem;border-color:var(--color-primary-green)}.sources-checkbox-label input[type=checkbox][data-v-1b13abb9]:indeterminate{background-color:var(--color-primary-green);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-width='2' d='M2 6h8'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:.625rem;border-color:var(--color-primary-green)}.sources-dropdown[data-v-1b13abb9]{position:relative}.sources-dropdown-button[data-v-1b13abb9]{align-items:center;background:var(--color-white);border:.0625rem solid var(--color-green-400);border-radius:.25rem;box-sizing:border-box;color:var(--color-grey-900);cursor:pointer;display:flex;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:1rem;gap:.375rem;height:3rem;padding:.75rem 1rem;width:100%}.sources-dropdown-button[data-v-1b13abb9]:focus-visible,.sources-dropdown-button-open[data-v-1b13abb9]{border:.125rem solid var(--color-brand-bright-200);outline:0}.sources-dropdown-button[data-v-1b13abb9]:hover{background-color:var(--color-green-50)}.sources-dropdown-chevron[data-v-1b13abb9]{font-size:.75rem;margin-left:auto;opacity:.85;transform:rotate(0);transition:transform .2s ease}.sources-dropdown-chevron-open[data-v-1b13abb9]{transform:rotate(180deg)}.sources-dropdown-count[data-v-1b13abb9]{background-color:var(--color-brand-medium-500);border-radius:6.25rem;box-sizing:border-box;color:var(--color-white);font-size:.75rem;font-weight:400;height:1.5rem;line-height:1.125rem;padding:.25rem .5rem;text-align:center}.sources-dropdown-enter-active[data-v-1b13abb9],.sources-dropdown-leave-active[data-v-1b13abb9]{transition:opacity .2s ease,transform .2s ease}.sources-dropdown-enter-from[data-v-1b13abb9],.sources-dropdown-leave-to[data-v-1b13abb9]{opacity:0;transform:translateY(-.25rem)}.sources-dropdown-panel[data-v-1b13abb9]{background:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.375rem;box-shadow:0 .625rem 1.5rem #00000014;left:0;margin-top:.375rem;max-height:min(70vh,24rem);max-width:36rem;overflow-x:hidden;overflow-y:auto;padding:.75rem;position:absolute;top:100%;width:100%;z-index:3}.sources-empty-message[data-v-1b13abb9]{color:var(--color-primary-black);font-size:.875rem;margin:0}.sources-list[data-v-1b13abb9]{display:grid;gap:.5rem 1rem;grid-template-columns:1fr 1fr;list-style:none;margin:0;padding:0}.sources-list-item[data-v-1b13abb9]{list-style:none;margin:0;min-width:0;padding:0}.sources-options[data-v-1b13abb9]{display:flex;flex-direction:column;gap:.5rem}.sources-select[data-v-1b13abb9]{display:flex;flex-direction:column;gap:.35rem;margin-top:1rem;min-width:0;width:100%}.sources-select-all-item[data-v-1b13abb9]{list-style:none}.sources-select-all-label[data-v-1b13abb9]{color:var(--color-red);font-weight:600}.sources-select-all-list[data-v-1b13abb9]{border-bottom:.0625rem solid var(--color-primary-grey);list-style:none;margin:0;padding:0 0 .5rem}`]],["__scopeId","data-v-1b13abb9"]]),LD=[{value:"AL",label:"Alabama"},{value:"AK",label:"Alaska"},{value:"AZ",label:"Arizona"},{value:"AR",label:"Arkansas"},{value:"CA",label:"California"},{value:"CO",label:"Colorado"},{value:"CT",label:"Connecticut"},{value:"DE",label:"Delaware"},{value:"DC",label:"District of Columbia"},{value:"FL",label:"Florida"},{value:"GA",label:"Georgia"},{value:"HI",label:"Hawaii"},{value:"ID",label:"Idaho"},{value:"IL",label:"Illinois"},{value:"IN",label:"Indiana"},{value:"IA",label:"Iowa"},{value:"KS",label:"Kansas"},{value:"KY",label:"Kentucky"},{value:"LA",label:"Louisiana"},{value:"ME",label:"Maine"},{value:"MD",label:"Maryland"},{value:"MA",label:"Massachusetts"},{value:"MI",label:"Michigan"},{value:"MN",label:"Minnesota"},{value:"MS",label:"Mississippi"},{value:"MO",label:"Missouri"},{value:"MT",label:"Montana"},{value:"NE",label:"Nebraska"},{value:"NV",label:"Nevada"},{value:"NH",label:"New Hampshire"},{value:"NJ",label:"New Jersey"},{value:"NM",label:"New Mexico"},{value:"NY",label:"New York"},{value:"NC",label:"North Carolina"},{value:"ND",label:"North Dakota"},{value:"OH",label:"Ohio"},{value:"OK",label:"Oklahoma"},{value:"OR",label:"Oregon"},{value:"PA",label:"Pennsylvania"},{value:"RI",label:"Rhode Island"},{value:"SC",label:"South Carolina"},{value:"SD",label:"South Dakota"},{value:"TN",label:"Tennessee"},{value:"TX",label:"Texas"},{value:"UT",label:"Utah"},{value:"VT",label:"Vermont"},{value:"VA",label:"Virginia"},{value:"WA",label:"Washington"},{value:"WV",label:"West Virginia"},{value:"WI",label:"Wisconsin"},{value:"WY",label:"Wyoming"}],yX={class:"states-select","aria-description":"U.S. states multi-select field"},SX=["aria-expanded","aria-label","onKeydown"],RX={class:"states-dropdown-value","aria-description":"Selected states or placeholder"},xX={key:0,class:"states-dropdown-placeholder","aria-description":"Placeholder for no states selected"},FX={key:1,class:"states-selected-list",role:"list","aria-label":"Selected states"},PX={class:"states-selected-chip","aria-description":"Selected state chip"},EX=["aria-label","onClick"],DX=["aria-label"],TX={class:"states-options","aria-description":"state checkbox options"},AX={class:"states-list"},IX=["aria-selected"],MX={class:"states-checkbox-label"},kX=["id","value"],LX={"aria-description":"State name"},OX=Ht(Ct({__name:"ContributionSearchStatesSelect",props:{selectedStateValues:{default:()=>[]},selectedStateValuesModifiers:{}},emits:["update:selectedStateValues"],setup(e){const t=fi(e,"selectedStateValues"),n=we(!1),i=we(null),o=we(null),r=he(()=>t.value.length),s=he(()=>r.value>0),a=he(()=>{const m=[];for(const v of t.value){const w=LD.find(b=>b.value===v);w&&m.push(w)}return m}),l=he(()=>s.value?a.value.map(m=>m.label).join(", "):"Select states"),u=()=>{n.value=!n.value},h=()=>{n.value=!1},f=(m,v)=>{m.stopPropagation(),t.value=t.value.filter(w=>w!==v)},g=m=>{if(n.value){{const v=m.target;if(o.value?.contains(v)||i.value?.contains(v))return}h()}};return Ir(()=>{document.addEventListener("click",g)}),Es(()=>{document.removeEventListener("click",g)}),(m,v)=>{const w=Ds("font-awesome-icon");return ae(),ve("section",yX,[v[2]||(v[2]=q("span",{class:"states-field-label","aria-description":"states field label"},"US States",-1)),q("section",{class:"states-dropdown","aria-description":"states checkbox dropdown",onKeydown:Xt(h,["esc"])},[q("div",{ref_key:"dropdownControlRef",ref:i,class:ft(["states-dropdown-control",{"states-dropdown-control-open":n.value}]),role:"combobox",tabindex:"0","aria-expanded":n.value,"aria-haspopup":"listbox","aria-label":`U.S. states, ${l.value}`,onClick:xt(u,["stop"]),onKeydown:[Xt(xt(u,["prevent"]),["enter"]),Xt(xt(u,["prevent"]),["space"])],"aria-description":"Dropdown control for selecting U.S. states"},[q("div",RX,[s.value?(ae(),ve("ul",FX,[(ae(!0),ve(wt,null,Ti(a.value,b=>(ae(),ve("li",{key:b.value,class:"states-selected-item",role:"listitem"},[q("span",PX,[Xi(Je(b.label)+" ",1),q("button",{type:"button",class:"states-selected-remove","aria-label":`Remove ${b.label}`,onClick:y=>f(y,b.value)},[Le(w,{class:"states-selected-remove-icon",icon:["fas","xmark"],size:"xs"})],8,EX)])]))),128))])):(ae(),ve("span",xX,"Select states"))]),q("i",{class:ft(["fa-solid fa-chevron-down states-dropdown-chevron",{"states-dropdown-chevron-open":n.value}]),"aria-hidden":"true"},null,2)],42,SX),Le(Rd,{name:"states-dropdown"},{default:Vn(()=>[n.value?(ae(),ve("section",{key:0,ref_key:"dropdownPanelRef",ref:o,class:"states-dropdown-panel","aria-description":"states checkbox list panel",role:"listbox","aria-multiselectable":"true","aria-label":l.value,onClick:v[1]||(v[1]=xt(()=>{},["stop"]))},[q("section",TX,[q("ul",AX,[(ae(!0),ve(wt,null,Ti(ni(LD),b=>(ae(),ve("li",{key:b.value,class:"states-list-item",role:"option","aria-selected":t.value.includes(b.value)},[q("label",MX,[Fs(q("input",{id:`contribution-search-state-${b.value}`,"onUpdate:modelValue":v[0]||(v[0]=y=>t.value=y),type:"checkbox",name:"states",value:b.value},null,8,kX),[[up,t.value]]),q("span",LX,Je(b.label),1)])],8,IX))),128))])])],8,DX)):gt("",!0)]),_:1})],32)])}}}),[["styles",[`.states-checkbox-label[data-v-943025f6]{align-items:center;color:var(--color-primary-black);cursor:pointer;display:flex;font-size:.75rem;gap:.375rem;line-height:1.35;padding:.125rem}.states-checkbox-label[data-v-943025f6]:hover{background-color:var(--color-green-50)}.states-checkbox-label input[type=checkbox][data-v-943025f6]{appearance:none;background-color:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.125rem;cursor:pointer;flex-shrink:0;height:1rem;margin-top:.125rem;width:1rem}.states-checkbox-label input[type=checkbox][data-v-943025f6]:checked{background-color:var(--color-primary-green);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M1 5l3 3 7-7'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:.625rem .5rem;border-color:var(--color-primary-green)}.states-dropdown[data-v-943025f6]{position:relative}.states-dropdown-chevron[data-v-943025f6]{flex-shrink:0;font-size:.75rem;opacity:.85;transform:rotate(0);transition:transform .2s ease}.states-dropdown-chevron-open[data-v-943025f6]{transform:rotate(180deg)}.states-dropdown-control[data-v-943025f6]{align-items:center;background:var(--color-white);border:.0625rem solid var(--color-green-400);border-radius:.25rem;box-sizing:border-box;color:var(--color-grey-600);cursor:pointer;display:flex;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:.9375rem;gap:.375rem;min-height:3rem;padding:.45rem 1rem;width:100%}.states-dropdown-control-open[data-v-943025f6],.states-dropdown-control[data-v-943025f6]:focus-visible{border:.125rem solid var(--color-brand-bright-200);outline:0}.states-dropdown-control[data-v-943025f6]:hover{background-color:var(--color-green-50)}.states-dropdown-enter-active[data-v-943025f6],.states-dropdown-leave-active[data-v-943025f6]{transition:opacity .2s ease,transform .2s ease}.states-dropdown-enter-from[data-v-943025f6],.states-dropdown-leave-to[data-v-943025f6]{opacity:0;transform:translateY(-.25rem)}.states-dropdown-panel[data-v-943025f6]{background:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.375rem;box-shadow:0 .625rem 1.5rem #00000014;left:0;margin-top:.375rem;max-height:min(70vh,24rem);max-width:36rem;overflow-x:hidden;overflow-y:auto;padding:.75rem;position:absolute;top:100%;width:100%;z-index:3}.states-dropdown-placeholder[data-v-943025f6]{color:var(--color-grey-600);display:block;font-size:.875rem}.states-dropdown-value[data-v-943025f6]{flex:1;min-width:0}.states-field-label[data-v-943025f6]{color:var(--color-primary-black);font-size:.875rem}.states-list[data-v-943025f6]{display:grid;gap:.5rem 1rem;grid-template-columns:1fr 1fr;list-style:none;margin:0;padding:0}.states-list-item[data-v-943025f6]{list-style:none;margin:0;min-width:0;padding:0}.states-options[data-v-943025f6]{display:flex;flex-direction:column;gap:.5rem}.states-select[data-v-943025f6]{display:flex;flex-direction:column;gap:.35rem;margin-top:1rem;min-width:0;width:100%}.states-selected-chip[data-v-943025f6]{align-items:center;background-color:var(--color-green-100);border-radius:.25rem;box-sizing:border-box;color:var(--color-grey-900);display:inline-flex;font-size:.875rem;gap:.125rem;height:1.75rem;line-height:1.25;max-width:100%;padding:.25rem .5rem}.states-selected-item[data-v-943025f6]{list-style:none;margin:0;max-width:100%;padding:0}.states-selected-list[data-v-943025f6]{display:flex;flex-wrap:wrap;gap:.625rem;list-style:none;margin:0;max-width:100%;min-width:0;padding:0}.states-selected-remove[data-v-943025f6]{align-items:center;background:transparent;border:none;border-radius:.125rem;color:var(--color-primary-black);cursor:pointer;display:inline-flex;flex-shrink:0;font-size:.75rem;height:1.25rem;justify-content:center;padding:0;width:1.25rem}.states-selected-remove[data-v-943025f6]:hover{color:var(--color-red)}.states-selected-remove-icon[data-v-943025f6]{height:.75rem;width:.75rem}`]],["__scopeId","data-v-943025f6"]]);function _X(e){return{id:e.contribution.id,contributor:e.contribution.contributor,employeeStatus:e.match?.employee?.status??"",address:e.contribution.address,state:e.contribution.state,zipCode:e.contribution.zipCode,date:e.contribution.date,dateDetected:e.match?.created??"",amount:e.contribution.amount,employer:e.contribution.employer,occupation:e.contribution.occupation,recipient:e.contribution.recipient,amended:e.contribution.amended,jurisdiction:e.contribution.jurisdiction,sources:e.contribution.source,status:e.match?.status??"",reconciliationStatus:e.match?.preclearance?.reconciliationStatus??"",preclearance:e.match?.preclearance?.name??"",approvalDate:e.match?.preclearance?.approvalDate??"",approvedAmount:e.match?.preclearance?.amount??null,lastUpdated:e.match?.modified??"",lastUpdatedBy:e.match?.modifiedBy??"",notes:e.match?.notes.map(t=>t.text).join(";")??"",tags:e.match?.employee?.tags.map(t=>t.name).join(";")??"",groups:e.match?.employee?.groups.map(t=>t.name).join(";")??""}}var sn=(e=>(e[e.NULL=0]="NULL",e[e.OR=1]="OR",e[e.AND=2]="AND",e))(sn||{}),an=(e=>(e[e.EQUALS=1]="EQUALS",e[e.NOT_EQUALS=2]="NOT_EQUALS",e[e.LESS_THAN=3]="LESS_THAN",e[e.GREATER_THAN=4]="GREATER_THAN",e[e.LESS_THAN_OR_EQUAL=5]="LESS_THAN_OR_EQUAL",e[e.GREATER_THAN_OR_EQUAL=6]="GREATER_THAN_OR_EQUAL",e[e.CONTAINS=7]="CONTAINS",e[e.DOES_NOT_CONTAIN=8]="DOES_NOT_CONTAIN",e[e.STARTS_WITH=9]="STARTS_WITH",e[e.ENDS_WITH=10]="ENDS_WITH",e))(an||{});const NX=Hi.injectEndpoints({endpoints:e=>({searchContributions:e.mutation({query:({user:t,company:n,stack:i,username:o,page:r,limit:s,sortColumn:a=null,sortOrder:l=null,match:u=!1,body:h})=>({url:`/contributions/search?user=${encodeURIComponent(t)}&company=${encodeURIComponent(n)}&stack=${encodeURIComponent(i)}&username=${encodeURIComponent(o)}&page=${r}&limit=${s}${a&&l?`&sortColumn=${a}&sortOrder=${l}`:""}&match=${u}`,method:"POST",body:h}),transformResponse:(t,n)=>({page:t.page,totalPages:t.totalPages,limit:t.limit,total:t.total,results:t.results.map(_X)})})})});function BX(){return pa(NX.endpoints.searchContributions)}function HX(){let e=1;return()=>e++}const GX=HX(),VX={NULL:sn.NULL,OR:sn.OR,AND:sn.AND},OD={equals:an.EQUALS,notEqual:an.NOT_EQUALS,lessThan:an.LESS_THAN,greaterThan:an.GREATER_THAN,lessThanOrEqual:an.LESS_THAN_OR_EQUAL,greaterThanOrEqual:an.GREATER_THAN_OR_EQUAL,contains:an.CONTAINS,notContains:an.DOES_NOT_CONTAIN,startsWith:an.STARTS_WITH,endsWith:an.ENDS_WITH};function WX(e="",t=[]){const n=VX?.[e];return!n||t.length<2?sn.NULL:n}function zX(e=""){const t=OD?.[e];return t||an.EQUALS}function Qn(e,t){if(Re.isNil(OD[e]))throw Error("Invalid Comparator...");return{id:GX(),comparator:zX(e),value:t}}const UX={class:"search-fieldset"},$X={class:"form-row","aria-description":"first name and last name fields"},jX={class:"form-row","aria-description":"postal codes and contributor employer fields"},KX={class:"form-row","aria-description":"record from and to date fields"},qX={class:"actions","aria-description":"form submit actions"},_D="This field is required.",ND="Record dates require both a start date and an end date.",BD="Record start date must be on or before the end date.",QX="Enter a valid 5-digit ZIP code",HD=Ht(Ct({__name:"ContributionSearchForm",props:{contributionSearchPresets:{default:null,type:[Object,null]},hideBorder:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["search"],setup(e,{emit:t}){const n=e,i=t,o=we(""),r=we(""),s=we([]),a=we([]),l=we([]),u=we(""),h=we(""),f=we([]),g=we(0),m=we(""),v=we(null),w=we(""),b=we(""),y=we(""),R=(M,E)=>{const I=M.target,B=I.value.replace(/[^A-Za-z\s-]/g,"").replace(/-{2,}/g,"-").replace(/\s{2,}/g," ").replace(/^[\s-]+/,"");E==="firstName"?o.value=B:E==="lastName"&&(r.value=B),I.value=B},S=(M,E)=>{M.target.value=M.target.value.replace(/[\s-]+$/,""),R(M,E)},P=he(()=>m.value===ND||m.value===BD),F=he(()=>{const M=["record-dates-hint"];return P.value&&M.push("contribution-search-form-error"),M.join(" ")}),A=M=>{const E=M.contributor?.query?.find(oe=>oe.comparator===an.STARTS_WITH),I=M.contributor?.query?.find(oe=>oe.comparator===an.ENDS_WITH);o.value=Re.isNil(E?.value)?"":String(E?.value),r.value=Re.isNil(I?.value)?"":String(I?.value);const B=(M.state?.query??[]).filter(oe=>oe.comparator===an.EQUALS);s.value=B.map(oe=>Re.isNil(oe.value)?"":String(oe.value)).filter(oe=>!Re.isEmpty(oe));const W=(M.zipCode?.query??[]).filter(oe=>oe.comparator===an.EQUALS);a.value=W.map(oe=>Re.isNil(oe.value)?"":String(oe.value)).filter(oe=>!Re.isEmpty(oe));const X=(M.employer?.query??[]).filter(oe=>oe.comparator===an.STARTS_WITH);l.value=X.map(oe=>Re.isNil(oe.value)?"":String(oe.value)).filter(oe=>!Re.isEmpty(oe));const pe=M.date?.query?.find(oe=>oe.comparator===an.GREATER_THAN_OR_EQUAL),fe=M.date?.query?.find(oe=>oe.comparator===an.LESS_THAN_OR_EQUAL);u.value=Re.isNil(pe?.value)?"":String(pe?.value),h.value=Re.isNil(fe?.value)?"":String(fe?.value);const De=(M.sources?.query??[]).filter(oe=>oe.comparator===an.EQUALS).map(oe=>Re.isNil(oe.value)?"":String(oe.value)).filter(oe=>!Re.isEmpty(oe));f.value=De,De.length>0&&(g.value+=1),m.value="",w.value="",b.value=""};Jt(()=>n.contributionSearchPresets,async M=>{M===null||Re.isEmpty(M)||(A(M),await xs())},{deep:!0,immediate:!0});const k=()=>{m.value="",w.value="",b.value="",y.value="";let M=!0;if(Re.isEmpty(o.value.trim())&&(w.value=_D,M=!1),Re.isEmpty(r.value.trim())&&(b.value=_D,M=!1),a.value.some(B=>String(B).length!==5)&&(y.value=QX,M=!1),!M)return!1;const E=!Re.isEmpty(u.value),I=!Re.isEmpty(h.value);if(E!==I)return m.value=ND,!1;if(E&&I){const B=TD(u.value),W=TD(h.value);if(kJ(B,W))return m.value=BD,!1}return!0},L=()=>{const M={},E=o.value.trim(),I=r.value.trim();M.contributor={conjunction:sn.AND,query:[Qn("startsWith",E),Qn("endsWith",I)]},Re.isEmpty(s.value)||(M.state={conjunction:s.value.length>1?sn.OR:sn.NULL,query:s.value.map(X=>Qn("equals",X))});const B=a.value.map(X=>X.trim()).filter(X=>!Re.isEmpty(X));Re.isEmpty(B)||(M.zipCode={conjunction:B.length>1?sn.OR:sn.NULL,query:B.map(X=>Qn("equals",X))});const W=l.value.map(X=>X.trim()).filter(X=>!Re.isEmpty(X));return Re.isEmpty(W)||(M.employer={conjunction:W.length>1?sn.OR:sn.NULL,query:W.map(X=>Qn("startsWith",X))}),!Re.isEmpty(u.value)&&!Re.isEmpty(h.value)&&(M.date={conjunction:sn.AND,query:[Qn("greaterThanOrEqual",u.value),Qn("lessThanOrEqual",h.value)]}),Re.isEmpty(f.value)||(M.sources={conjunction:f.value.length>1?sn.OR:sn.NULL,query:f.value.map(X=>Qn("equals",X))}),M},N=()=>{if(!n.loading){if(!k()){xs(()=>{if(w.value){document.getElementById("contribution-search-first-name")?.focus();return}if(b.value){document.getElementById("contribution-search-last-name")?.focus();return}v.value?.focus()});return}i("search",L())}};return(M,E)=>(ae(),ve("section",{class:ft(["search-layout",{"search-layout--borderless":e.hideBorder}]),"aria-description":"contribution search form layout"},[q("form",{class:"search-form",role:"search","aria-label":"Contribution search",novalidate:"",onSubmit:xt(N,["prevent"])},[q("fieldset",UX,[E[13]||(E[13]=q("legend",{class:"visually-hidden"},"Contribution search filters",-1)),q("div",$X,[Le(uo,{id:"contribution-search-first-name",modelValue:o.value,"onUpdate:modelValue":E[0]||(E[0]=I=>o.value=I),class:"field",label:"First Name",required:"",name:"firstName",autocomplete:"given-name",placeholder:"Enter First Name with only letters, spaces, and hyphens (-).",error:w.value,"aria-invalid":w.value?!0:void 0,"aria-describedby":w.value?"contribution-search-first-name-error":void 0,"label-aria-description":"first name field label",onInput:E[1]||(E[1]=I=>R(I,"firstName")),onBlur:E[2]||(E[2]=I=>S(I,"firstName"))},null,8,["modelValue","error","aria-invalid","aria-describedby"]),Le(uo,{id:"contribution-search-last-name",modelValue:r.value,"onUpdate:modelValue":E[3]||(E[3]=I=>r.value=I),class:"field",label:"Last Name",required:"",name:"lastName",autocomplete:"family-name",placeholder:"Enter Last Name with only letters, spaces, and hyphens (-).",error:b.value,"aria-invalid":b.value?!0:void 0,"aria-describedby":b.value?"contribution-search-last-name-error":void 0,"label-aria-description":"last name field label",onInput:E[4]||(E[4]=I=>R(I,"lastName")),onBlur:E[5]||(E[5]=I=>S(I,"lastName"))},null,8,["modelValue","error","aria-invalid","aria-describedby"])]),Le(OX,{"selected-state-values":s.value,"onUpdate:selectedStateValues":E[6]||(E[6]=I=>s.value=I)},null,8,["selected-state-values"]),q("div",jX,[Le(uo,{id:"contribution-search-postal",modelValue:a.value,"onUpdate:modelValue":E[7]||(E[7]=I=>a.value=I),type:"number",class:"field",label:"Postal Codes",multiple:"",name:"postalCode",autocomplete:"postal-code",placeholder:"Enter postal codes",error:y.value,"label-aria-description":"postal codes field label",onKeydown:E[8]||(E[8]=I=>["e","E","+","-"].includes(I.key)&&I.preventDefault())},null,8,["modelValue","error"]),Le(uo,{id:"contribution-search-employer",modelValue:l.value,"onUpdate:modelValue":E[9]||(E[9]=I=>l.value=I),class:"field",label:"Contributor Employer",multiple:"",name:"employer",placeholder:"Enter contributor employer names","label-aria-description":"contributor employer field label",onInput:R,onBlur:S},null,8,["modelValue"])]),q("div",KX,[Le(uo,{id:"contribution-search-date-from",modelValue:u.value,"onUpdate:modelValue":E[10]||(E[10]=I=>u.value=I),class:"field",label:"Record From Date",type:"date",name:"recordDateFrom",invalid:P.value,"aria-invalid":P.value?!0:void 0,"aria-describedby":F.value,"described-by":F.value},null,8,["modelValue","invalid","aria-invalid","aria-describedby","described-by"]),Le(uo,{id:"contribution-search-date-to",modelValue:h.value,"onUpdate:modelValue":E[11]||(E[11]=I=>h.value=I),class:"field field-date",label:"Record To Date",type:"date",name:"recordDateTo",invalid:P.value,"aria-invalid":P.value?!0:void 0,"aria-describedby":F.value,"described-by":F.value},null,8,["modelValue","invalid","aria-invalid","aria-describedby","described-by"])]),(ae(),rn(bX,{key:g.value,"selected-source-indexes":f.value,"onUpdate:selectedSourceIndexes":E[12]||(E[12]=I=>f.value=I)},null,8,["selected-source-indexes"])),m.value?(ae(),ve("p",{key:0,id:"contribution-search-form-error",ref_key:"formErrorMessageRef",ref:v,class:"form-error",role:"alert",tabindex:"-1"},Je(m.value),513)):gt("",!0)]),q("footer",qX,[Le(ds,{type:"submit","aria-label":"Search contributions",disabled:e.loading,label:"Search"},null,8,["disabled"])])],32)],2))}}),[["styles",[".actions[data-v-848536e5]{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:flex-end;margin-top:1.5rem}.field-half[data-v-848536e5]{max-width:none;width:100%}.form-error[data-v-848536e5]{color:var(--color-red);font-size:.875rem;margin:.75rem 0 0}.form-row[data-v-848536e5]{display:grid;gap:.75rem 1rem;grid-template-columns:1fr 1fr;margin-top:1rem;min-width:0}.form-row .ui-input[data-v-848536e5]{margin-top:0}.search-fieldset>.form-row[data-v-848536e5]:first-of-type{margin-top:0}.search-form fieldset[data-v-848536e5]{border:none;margin:0;padding:0}.search-form legend[data-v-848536e5]{font-weight:600;padding:0 .35rem}.search-form legend.visually-hidden[data-v-848536e5]{border:0;clip-path:inset(50%);height:.0625rem;margin:-.0625rem;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:.0625rem}.search-layout[data-v-848536e5]{border:1px solid var(--color-primary-grey);border-radius:.5rem;display:flex;flex-direction:column;min-height:0;padding:1.5rem}.search-layout--borderless[data-v-848536e5]{border:none}"]],["__scopeId","data-v-848536e5"]]);var YX=Object.defineProperty,ZX=(e,t,n)=>t in e?YX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ma=(e,t,n)=>ZX(e,typeof t!="symbol"?t+"":t,n);const GD=class CI{static getComponentDefinition(t,n){let i;return typeof t=="string"?i=this.searchForComponentInstance(n,t):i={extends:Ct({...t})},i||mt(114,{component:t}),i.extends?(i.extends.setup&&(i.setup=i.extends.setup),i.extends.props=this.addParamsToProps(i.extends.props)):i.props=this.addParamsToProps(i.props),i}static addParamsToProps(t){return!t||Array.isArray(t)&&t.indexOf("params")===-1?t=["params",...t||[]]:typeof t=="object"&&!t.params&&(t.params={type:Object}),t}static createAndMountComponent(t,n,i,o){const r=CI.getComponentDefinition(t,i);if(!r)return;const{vNode:s,destroy:a,el:l}=this.mount(r,{params:Object.freeze(n)},i,o||{});return{componentInstance:s.component.proxy,element:l,destroy:a}}static mount(t,n,i,o){let r=Le(t,n);r.appContext={...i.appContext,provides:o};let s=document.createDocumentFragment();return dp(r,s),{vNode:r,destroy:()=>{s&&dp(null,s),s=null,r=null},el:s}}static searchForComponentInstance(t,n,i=10,o=!1){let r=this.componentCache.get(t);if(r){const u=r.get(n);if(u!==void 0)return u}let s=null,a=0,l=t.parent;for(;!s&&l&&l.components&&++a<i;)l.components&&l.components[n]&&(s=l.components[n]),l=l.parent;for(a=0,l=t.parent;!s&&l&&l.$options&&++a<i;){const u=l;u.$options&&u.$options.components&&u.$options.components[n]?s=u.$options.components[n]:u[n]&&(s=u[n]),l=l.parent}for(a=0,l=t.parent;!s&&l&&++a<i;){if(l.exposed){const u=l;u.exposed&&u.exposed[n]?s=u.exposed[n]:u[n]&&(s=u[n])}l=l.parent}if(!s){const u=t.appContext.components;u&&u[n]&&(s=u[n])}return!s&&!o?(mt(114,{component:n}),null):(s&&(r||(r=new Map,this.componentCache.set(t,r)),r.set(n,s)),s)}};ma(GD,"componentCache",new WeakMap);let dw=GD;class JX extends OU{constructor(t,n){super(),ma(this,"parent"),ma(this,"provides"),this.parent=t,this.provides=n}createWrapper(t){const n=this;class i extends XX{init(s){super.init(s)}hasMethod(s){var a,l;const u=o.getFrameworkComponentInstance();return u[s]?!0:((a=u.$.exposed)==null?void 0:a[s])!=null||((l=u.exposed)==null?void 0:l[s])!=null||u.$.setupState[s]!=null}callMethod(s,a){var l,u;const h=this.getFrameworkComponentInstance(),f=o.getFrameworkComponentInstance();if(f[s])return f[s].apply(h,a);{const g=((l=h.$.exposed)==null?void 0:l[s])||((u=h.exposed)==null?void 0:u[s])||h.$.setupState[s];return g?.apply(h,a)}}addMethod(s,a){o[s]=a}processMethod(s,a){return s==="refresh"&&(this.getFrameworkComponentInstance().params=Object.freeze(a[0])),this.hasMethod(s)?this.callMethod(s,a):s==="refresh"}createComponent(s){return n.createComponent(t,s)}}const o=new i;return o}createComponent(t,n){return dw.createAndMountComponent(t,n,this.parent,this.provides)}createMethodProxy(t,n,i){return function(){return t.hasMethod(n)?t.callMethod(n,arguments):(i&&le(233,{methodName:n}),null)}}destroy(){this.parent=null}}class XX{constructor(){ma(this,"componentInstance"),ma(this,"element"),ma(this,"unmount")}getGui(){return this.element}destroy(){var t;this.getFrameworkComponentInstance()&&typeof this.getFrameworkComponentInstance().destroy=="function"&&this.getFrameworkComponentInstance().destroy(),(t=this.unmount)==null||t.call(this)}getFrameworkComponentInstance(){return this.componentInstance}init(t){const{componentInstance:n,element:i,destroy:o}=this.createComponent(t);this.componentInstance=n,this.unmount=o,this.element=i.firstElementChild??i}}class eee extends iF{constructor(t){super("vue"),ma(this,"parent"),this.parent=t}frameworkComponent(t,n){let i=dw.searchForComponentInstance(this.parent,t,10,!0)?t:null;if(!i&&n&&n[t]){const o=n[t];i=dw.searchForComponentInstance(this.parent,o,10,!0)?o:null}return i}isFrameworkComponent(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}}function tee(){return{gridOptions:{},modules:[],statusBar:void 0,sideBar:void 0,suppressContextMenu:void 0,preventDefaultOnContextMenu:void 0,allowContextMenuWithControlKey:void 0,columnMenu:void 0,suppressMenuHide:void 0,enableBrowserTooltips:void 0,tooltipTrigger:void 0,tooltipShowDelay:void 0,tooltipSwitchShowDelay:void 0,tooltipHideDelay:void 0,tooltipMouseTrack:void 0,tooltipShowMode:void 0,tooltipInteraction:void 0,popupParent:void 0,copyHeadersToClipboard:void 0,copyGroupHeadersToClipboard:void 0,clipboardDelimiter:void 0,suppressCopyRowsToClipboard:void 0,suppressCopySingleCellRanges:void 0,suppressLastEmptyLineOnPaste:void 0,suppressClipboardPaste:void 0,suppressClipboardApi:void 0,suppressCutToClipboard:void 0,columnDefs:void 0,defaultColDef:void 0,defaultColGroupDef:void 0,columnTypes:void 0,dataTypeDefinitions:void 0,maintainColumnOrder:void 0,enableStrictPivotColumnOrder:void 0,suppressFieldDotNotation:void 0,headerHeight:void 0,groupHeaderHeight:void 0,floatingFiltersHeight:void 0,pivotHeaderHeight:void 0,pivotGroupHeaderHeight:void 0,hidePaddedHeaderRows:void 0,allowDragFromColumnsToolPanel:void 0,suppressMovableColumns:void 0,suppressColumnMoveAnimation:void 0,suppressMoveWhenColumnDragging:void 0,suppressDragLeaveHidesColumns:void 0,suppressGroupChangesColumnVisibility:void 0,suppressMakeColumnVisibleAfterUnGroup:void 0,suppressRowGroupHidesColumns:void 0,colResizeDefault:void 0,suppressAutoSize:void 0,autoSizePadding:void 0,skipHeaderOnAutoSize:void 0,autoSizeStrategy:void 0,animateColumnResizing:void 0,components:void 0,editType:void 0,suppressStartEditOnTab:void 0,getFullRowEditValidationErrors:void 0,invalidEditValueMode:void 0,singleClickEdit:void 0,suppressClickEdit:void 0,readOnlyEdit:void 0,stopEditingWhenCellsLoseFocus:void 0,enterNavigatesVertically:void 0,enterNavigatesVerticallyAfterEdit:void 0,enableCellEditingOnBackspace:void 0,undoRedoCellEditing:void 0,undoRedoCellEditingLimit:void 0,defaultCsvExportParams:void 0,suppressCsvExport:void 0,defaultExcelExportParams:void 0,suppressExcelExport:void 0,excelStyles:void 0,findSearchValue:void 0,findOptions:void 0,quickFilterText:void 0,cacheQuickFilter:void 0,includeHiddenColumnsInQuickFilter:void 0,quickFilterParser:void 0,quickFilterMatcher:void 0,applyQuickFilterBeforePivotOrAgg:void 0,excludeChildrenWhenTreeDataFiltering:void 0,enableAdvancedFilter:void 0,alwaysPassFilter:void 0,includeHiddenColumnsInAdvancedFilter:void 0,advancedFilterParent:void 0,advancedFilterBuilderParams:void 0,advancedFilterParams:void 0,suppressAdvancedFilterEval:void 0,suppressSetFilterByDefault:void 0,enableFilterHandlers:void 0,filterHandlers:void 0,enableCharts:void 0,chartThemes:void 0,customChartThemes:void 0,chartThemeOverrides:void 0,chartToolPanelsDef:void 0,chartMenuItems:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,localeText:void 0,masterDetail:void 0,keepDetailRows:void 0,keepDetailRowsCount:void 0,detailCellRenderer:void 0,detailCellRendererParams:void 0,detailRowHeight:void 0,detailRowAutoHeight:void 0,context:void 0,alignedGrids:void 0,tabIndex:void 0,rowBuffer:void 0,valueCache:void 0,valueCacheNeverExpires:void 0,enableCellExpressions:void 0,suppressTouch:void 0,suppressFocusAfterRefresh:void 0,suppressBrowserResizeObserver:void 0,suppressPropertyNamesCheck:void 0,suppressChangeDetection:void 0,debug:void 0,loading:void 0,overlayLoadingTemplate:void 0,loadingOverlayComponent:void 0,loadingOverlayComponentParams:void 0,suppressLoadingOverlay:void 0,overlayNoRowsTemplate:void 0,noRowsOverlayComponent:void 0,noRowsOverlayComponentParams:void 0,suppressNoRowsOverlay:void 0,suppressOverlays:void 0,overlayComponent:void 0,overlayComponentParams:void 0,overlayComponentSelector:void 0,activeOverlay:void 0,activeOverlayParams:void 0,pagination:void 0,paginationPageSize:void 0,paginationPageSizeSelector:void 0,paginationAutoPageSize:void 0,paginateChildRows:void 0,suppressPaginationPanel:void 0,pivotMode:void 0,pivotPanelShow:void 0,pivotMaxGeneratedColumns:void 0,pivotDefaultExpanded:void 0,pivotColumnGroupTotals:void 0,pivotRowTotals:void 0,pivotSuppressAutoColumn:void 0,suppressExpandablePivotGroups:void 0,functionsReadOnly:void 0,aggFuncs:void 0,formulaDataSource:void 0,formulaFuncs:void 0,suppressAggFuncInHeader:void 0,alwaysAggregateAtRootLevel:void 0,aggregateOnlyChangedColumns:void 0,suppressAggFilteredOnly:void 0,removePivotHeaderRowWhenSingleValueColumn:void 0,animateRows:void 0,cellFlashDuration:void 0,cellFadeDuration:void 0,allowShowChangeAfterFilter:void 0,domLayout:void 0,ensureDomOrder:void 0,enableCellSpan:void 0,enableRtl:void 0,suppressColumnVirtualisation:void 0,suppressMaxRenderedRowRestriction:void 0,suppressRowVirtualisation:void 0,rowDragManaged:void 0,refreshAfterGroupEdit:void 0,rowDragInsertDelay:void 0,suppressRowDrag:void 0,suppressMoveWhenRowDragging:void 0,rowDragEntireRow:void 0,rowDragMultiRow:void 0,rowDragText:void 0,dragAndDropImageComponent:void 0,dragAndDropImageComponentParams:void 0,fullWidthCellRenderer:void 0,fullWidthCellRendererParams:void 0,embedFullWidthRows:void 0,groupDisplayType:void 0,groupDefaultExpanded:void 0,autoGroupColumnDef:void 0,groupMaintainOrder:void 0,groupSelectsChildren:void 0,groupLockGroupColumns:void 0,groupAggFiltering:void 0,groupTotalRow:void 0,grandTotalRow:void 0,suppressStickyTotalRow:void 0,groupSuppressBlankHeader:void 0,groupSelectsFiltered:void 0,showOpenedGroup:void 0,groupHideParentOfSingleChild:void 0,groupRemoveSingleChildren:void 0,groupRemoveLowestSingleChildren:void 0,groupHideOpenParents:void 0,groupHideColumnsUntilExpanded:void 0,groupAllowUnbalanced:void 0,rowGroupPanelShow:void 0,groupRowRenderer:void 0,groupRowRendererParams:void 0,treeData:void 0,treeDataChildrenField:void 0,treeDataParentIdField:void 0,rowGroupPanelSuppressSort:void 0,suppressGroupRowsSticky:void 0,groupHierarchyConfig:void 0,pinnedTopRowData:void 0,pinnedBottomRowData:void 0,enableRowPinning:void 0,isRowPinnable:void 0,isRowPinned:void 0,rowModelType:void 0,rowData:void 0,asyncTransactionWaitMillis:void 0,suppressModelUpdateAfterUpdateTransaction:void 0,datasource:void 0,cacheOverflowSize:void 0,infiniteInitialRowCount:void 0,serverSideInitialRowCount:void 0,suppressServerSideFullWidthLoadingRow:void 0,cacheBlockSize:void 0,maxBlocksInCache:void 0,maxConcurrentDatasourceRequests:void 0,blockLoadDebounceMillis:void 0,purgeClosedRowNodes:void 0,serverSideDatasource:void 0,serverSideSortAllLevels:void 0,serverSideEnableClientSideSort:void 0,serverSideOnlyRefreshFilteredGroups:void 0,serverSidePivotResultFieldSeparator:void 0,viewportDatasource:void 0,viewportRowModelPageSize:void 0,viewportRowModelBufferSize:void 0,alwaysShowHorizontalScroll:void 0,alwaysShowVerticalScroll:void 0,debounceVerticalScrollbar:void 0,suppressHorizontalScroll:void 0,suppressScrollOnNewData:void 0,suppressScrollWhenPopupsAreOpen:void 0,suppressAnimationFrame:void 0,suppressMiddleClickScrolls:void 0,suppressPreventDefaultOnMouseWheel:void 0,scrollbarWidth:void 0,rowSelection:void 0,cellSelection:void 0,rowMultiSelectWithClick:void 0,suppressRowDeselection:void 0,suppressRowClickSelection:void 0,suppressCellFocus:void 0,suppressHeaderFocus:void 0,selectionColumnDef:void 0,rowNumbers:void 0,suppressMultiRangeSelection:void 0,enableCellTextSelection:void 0,enableRangeSelection:void 0,enableRangeHandle:void 0,enableFillHandle:void 0,fillHandleDirection:void 0,suppressClearOnFillReduction:void 0,sortingOrder:void 0,accentedSort:void 0,unSortIcon:void 0,suppressMultiSort:void 0,alwaysMultiSort:void 0,multiSortKey:void 0,suppressMaintainUnsortedOrder:void 0,icons:void 0,rowHeight:void 0,rowStyle:void 0,rowClass:void 0,rowClassRules:void 0,suppressRowHoverHighlight:void 0,suppressRowTransform:void 0,columnHoverHighlight:void 0,gridId:void 0,deltaSort:void 0,treeDataDisplayType:void 0,enableGroupEdit:void 0,initialState:void 0,theme:void 0,loadThemeGoogleFonts:void 0,themeCssLayer:void 0,styleNonce:void 0,themeStyleContainer:void 0,getContextMenuItems:void 0,getMainMenuItems:void 0,postProcessPopup:void 0,processUnpinnedColumns:void 0,processCellForClipboard:void 0,processHeaderForClipboard:void 0,processGroupHeaderForClipboard:void 0,processCellFromClipboard:void 0,sendToClipboard:void 0,processDataFromClipboard:void 0,isExternalFilterPresent:void 0,doesExternalFilterPass:void 0,getChartToolbarItems:void 0,createChartContainer:void 0,focusGridInnerElement:void 0,navigateToNextHeader:void 0,tabToNextHeader:void 0,navigateToNextCell:void 0,tabToNextCell:void 0,tabToNextGridContainer:void 0,getLocaleText:void 0,getDocument:void 0,paginationNumberFormatter:void 0,getGroupRowAgg:void 0,isGroupOpenByDefault:void 0,ssrmExpandAllAffectsAllRows:void 0,initialGroupOrderComparator:void 0,processPivotResultColDef:void 0,processPivotResultColGroupDef:void 0,getDataPath:void 0,getChildCount:void 0,getServerSideGroupLevelParams:void 0,isServerSideGroupOpenByDefault:void 0,isApplyServerSideTransaction:void 0,isServerSideGroup:void 0,getServerSideGroupKey:void 0,getBusinessKeyForNode:void 0,getRowId:void 0,resetRowDataOnUpdate:void 0,processRowPostCreate:void 0,isRowSelectable:void 0,isRowMaster:void 0,fillOperation:void 0,postSortRows:void 0,getRowStyle:void 0,getRowClass:void 0,getRowHeight:void 0,isFullWidthRow:void 0,isRowValidDropPosition:void 0,"onColumn-everything-changed":void 0,"onNew-columns-loaded":void 0,"onColumn-pivot-mode-changed":void 0,"onPivot-max-columns-exceeded":void 0,"onColumn-row-group-changed":void 0,"onExpand-or-collapse-all":void 0,"onColumn-pivot-changed":void 0,"onGrid-columns-changed":void 0,"onColumn-value-changed":void 0,"onColumn-moved":void 0,"onColumn-visible":void 0,"onColumn-pinned":void 0,"onColumn-group-opened":void 0,"onColumn-resized":void 0,"onDisplayed-columns-changed":void 0,"onVirtual-columns-changed":void 0,"onColumn-header-mouse-over":void 0,"onColumn-header-mouse-leave":void 0,"onColumn-header-clicked":void 0,"onColumn-header-context-menu":void 0,"onAsync-transactions-flushed":void 0,"onRow-group-opened":void 0,"onRow-data-updated":void 0,"onPinned-row-data-changed":void 0,"onPinned-rows-changed":void 0,"onRange-selection-changed":void 0,"onCell-selection-changed":void 0,"onChart-created":void 0,"onChart-range-selection-changed":void 0,"onChart-options-changed":void 0,"onChart-destroyed":void 0,"onTool-panel-visible-changed":void 0,"onTool-panel-size-changed":void 0,"onModel-updated":void 0,"onCut-start":void 0,"onCut-end":void 0,"onPaste-start":void 0,"onPaste-end":void 0,"onFill-start":void 0,"onFill-end":void 0,"onCell-selection-delete-start":void 0,"onCell-selection-delete-end":void 0,"onRange-delete-start":void 0,"onRange-delete-end":void 0,"onUndo-started":void 0,"onUndo-ended":void 0,"onRedo-started":void 0,"onRedo-ended":void 0,"onCell-clicked":void 0,"onCell-double-clicked":void 0,"onCell-mouse-down":void 0,"onCell-context-menu":void 0,"onCell-value-changed":void 0,"onCell-edit-request":void 0,"onRow-value-changed":void 0,"onHeader-focused":void 0,"onCell-focused":void 0,"onRow-selected":void 0,"onSelection-changed":void 0,"onTooltip-show":void 0,"onTooltip-hide":void 0,"onCell-key-down":void 0,"onCell-mouse-over":void 0,"onCell-mouse-out":void 0,"onFilter-changed":void 0,"onFilter-modified":void 0,"onFilter-ui-changed":void 0,"onFilter-opened":void 0,"onFloating-filter-ui-changed":void 0,"onAdvanced-filter-builder-visible-changed":void 0,"onSort-changed":void 0,"onVirtual-row-removed":void 0,"onRow-clicked":void 0,"onRow-double-clicked":void 0,"onGrid-ready":void 0,"onGrid-pre-destroyed":void 0,"onGrid-size-changed":void 0,"onViewport-changed":void 0,"onFirst-data-rendered":void 0,"onDrag-started":void 0,"onDrag-stopped":void 0,"onDrag-cancelled":void 0,"onRow-editing-started":void 0,"onRow-editing-stopped":void 0,"onCell-editing-started":void 0,"onCell-editing-stopped":void 0,"onBody-scroll":void 0,"onBody-scroll-end":void 0,"onPagination-changed":void 0,"onComponent-state-changed":void 0,"onStore-refreshed":void 0,"onState-updated":void 0,"onColumn-menu-visible-changed":void 0,"onContext-menu-visible-changed":void 0,"onRow-drag-enter":void 0,"onRow-drag-move":void 0,"onRow-drag-leave":void 0,"onRow-drag-end":void 0,"onRow-drag-cancel":void 0,"onFind-changed":void 0,"onRow-resize-started":void 0,"onRow-resize-ended":void 0,"onColumns-reset":void 0,"onBulk-editing-started":void 0,"onBulk-editing-stopped":void 0,"onBatch-editing-started":void 0,"onBatch-editing-stopped":void 0}}const nee=(e,t)=>{let n;const i=()=>{window.clearTimeout(n),n=window.setTimeout(e,t)};return i.cancel=()=>{window.clearTimeout(n)},i};function iee(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype}function Fu(e){if(e==null||typeof e!="object")return e;const t=new WeakSet,n=i=>{if(i==null||typeof i!="object")return i;if(Yt(i))return n(i.value);if(Ko(i)||Ia(i))return n(ut(i));if(iee(i))return ut(i);if(Array.isArray(i)){let s=!1;for(let a=0;a<i.length;a++){const l=i[a];if(l!==null&&typeof l=="object"){if(Yt(l)||Ko(l)||Ia(l)){s=!0;break}s=!0;break}}return s?i.map(a=>n(a)):i}if(t.has(i))return i;t.add(i);const o=Object.keys(i),r={};for(let s=0;s<o.length;s++)r[o[s]]=n(i[o[s]]);return r};return n(e)}const oee={ref:"root"},ree=Ct({__name:"AgGridVue",props:Jo(VM({gridOptions:{},modules:{},statusBar:{},sideBar:{type:[Object,String,Array,Boolean,null]},suppressContextMenu:{type:Boolean},preventDefaultOnContextMenu:{type:Boolean},allowContextMenuWithControlKey:{type:Boolean},columnMenu:{},suppressMenuHide:{type:Boolean},enableBrowserTooltips:{type:Boolean},tooltipTrigger:{},tooltipShowDelay:{},tooltipSwitchShowDelay:{},tooltipHideDelay:{},tooltipMouseTrack:{type:Boolean},tooltipShowMode:{},tooltipInteraction:{type:Boolean},popupParent:{},copyHeadersToClipboard:{type:Boolean},copyGroupHeadersToClipboard:{type:Boolean},clipboardDelimiter:{},suppressCopyRowsToClipboard:{type:Boolean},suppressCopySingleCellRanges:{type:Boolean},suppressLastEmptyLineOnPaste:{type:Boolean},suppressClipboardPaste:{type:Boolean},suppressClipboardApi:{type:Boolean},suppressCutToClipboard:{type:Boolean},columnDefs:{},defaultColDef:{},defaultColGroupDef:{},columnTypes:{},dataTypeDefinitions:{},maintainColumnOrder:{type:Boolean},enableStrictPivotColumnOrder:{type:Boolean},suppressFieldDotNotation:{type:Boolean},headerHeight:{},groupHeaderHeight:{},floatingFiltersHeight:{},pivotHeaderHeight:{},pivotGroupHeaderHeight:{},hidePaddedHeaderRows:{type:Boolean},allowDragFromColumnsToolPanel:{type:Boolean},suppressMovableColumns:{type:Boolean},suppressColumnMoveAnimation:{type:Boolean},suppressMoveWhenColumnDragging:{type:Boolean},suppressDragLeaveHidesColumns:{type:Boolean},suppressGroupChangesColumnVisibility:{type:[Boolean,String]},suppressMakeColumnVisibleAfterUnGroup:{type:Boolean},suppressRowGroupHidesColumns:{type:Boolean},colResizeDefault:{},suppressAutoSize:{type:Boolean},autoSizePadding:{},skipHeaderOnAutoSize:{type:Boolean},autoSizeStrategy:{},animateColumnResizing:{type:Boolean},components:{},editType:{},suppressStartEditOnTab:{type:Boolean},getFullRowEditValidationErrors:{type:Function},invalidEditValueMode:{},singleClickEdit:{type:Boolean},suppressClickEdit:{type:Boolean},readOnlyEdit:{type:Boolean},stopEditingWhenCellsLoseFocus:{type:Boolean},enterNavigatesVertically:{type:Boolean},enterNavigatesVerticallyAfterEdit:{type:Boolean},enableCellEditingOnBackspace:{type:Boolean},undoRedoCellEditing:{type:Boolean},undoRedoCellEditingLimit:{},defaultCsvExportParams:{},suppressCsvExport:{type:Boolean},defaultExcelExportParams:{},suppressExcelExport:{type:Boolean},excelStyles:{},findSearchValue:{},findOptions:{},quickFilterText:{},cacheQuickFilter:{type:Boolean},includeHiddenColumnsInQuickFilter:{type:Boolean},quickFilterParser:{type:Function},quickFilterMatcher:{type:Function},applyQuickFilterBeforePivotOrAgg:{type:Boolean},excludeChildrenWhenTreeDataFiltering:{type:Boolean},enableAdvancedFilter:{type:Boolean},alwaysPassFilter:{type:Function},includeHiddenColumnsInAdvancedFilter:{type:Boolean},advancedFilterParent:{},advancedFilterBuilderParams:{},advancedFilterParams:{},suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},enableFilterHandlers:{type:Boolean},filterHandlers:{},enableCharts:{type:Boolean},chartThemes:{},customChartThemes:{},chartThemeOverrides:{},chartToolPanelsDef:{},chartMenuItems:{type:[Array,Function]},loadingCellRenderer:{},loadingCellRendererParams:{},loadingCellRendererSelector:{type:Function},localeText:{},masterDetail:{type:Boolean},keepDetailRows:{type:Boolean},keepDetailRowsCount:{},detailCellRenderer:{},detailCellRendererParams:{},detailRowHeight:{},detailRowAutoHeight:{type:Boolean},context:{},alignedGrids:{type:[Array,Function]},tabIndex:{},rowBuffer:{},valueCache:{type:Boolean},valueCacheNeverExpires:{type:Boolean},enableCellExpressions:{type:Boolean},suppressTouch:{type:Boolean},suppressFocusAfterRefresh:{type:Boolean},suppressBrowserResizeObserver:{type:Boolean},suppressPropertyNamesCheck:{type:Boolean},suppressChangeDetection:{type:Boolean},debug:{type:Boolean},loading:{type:Boolean},overlayLoadingTemplate:{},loadingOverlayComponent:{},loadingOverlayComponentParams:{},suppressLoadingOverlay:{type:Boolean},overlayNoRowsTemplate:{},noRowsOverlayComponent:{},noRowsOverlayComponentParams:{},suppressNoRowsOverlay:{type:Boolean},suppressOverlays:{},overlayComponent:{},overlayComponentParams:{},overlayComponentSelector:{type:Function},activeOverlay:{},activeOverlayParams:{},pagination:{type:Boolean},paginationPageSize:{},paginationPageSizeSelector:{type:[Array,Boolean]},paginationAutoPageSize:{type:Boolean},paginateChildRows:{type:Boolean},suppressPaginationPanel:{type:Boolean},pivotMode:{type:Boolean},pivotPanelShow:{},pivotMaxGeneratedColumns:{},pivotDefaultExpanded:{},pivotColumnGroupTotals:{},pivotRowTotals:{},pivotSuppressAutoColumn:{type:Boolean},suppressExpandablePivotGroups:{type:Boolean},functionsReadOnly:{type:Boolean},aggFuncs:{},formulaDataSource:{},formulaFuncs:{},suppressAggFuncInHeader:{type:Boolean},alwaysAggregateAtRootLevel:{type:Boolean},aggregateOnlyChangedColumns:{type:Boolean},suppressAggFilteredOnly:{type:Boolean},removePivotHeaderRowWhenSingleValueColumn:{type:Boolean},animateRows:{type:Boolean},cellFlashDuration:{},cellFadeDuration:{},allowShowChangeAfterFilter:{type:Boolean},domLayout:{},ensureDomOrder:{type:Boolean},enableCellSpan:{type:Boolean},enableRtl:{type:Boolean},suppressColumnVirtualisation:{type:Boolean},suppressMaxRenderedRowRestriction:{type:Boolean},suppressRowVirtualisation:{type:Boolean},rowDragManaged:{type:Boolean},refreshAfterGroupEdit:{type:Boolean},rowDragInsertDelay:{},suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},dragAndDropImageComponent:{},dragAndDropImageComponentParams:{},fullWidthCellRenderer:{},fullWidthCellRendererParams:{},embedFullWidthRows:{type:Boolean},groupDisplayType:{},groupDefaultExpanded:{},autoGroupColumnDef:{},groupMaintainOrder:{type:Boolean},groupSelectsChildren:{type:Boolean},groupLockGroupColumns:{},groupAggFiltering:{type:[Boolean,Function]},groupTotalRow:{type:[String,Function]},grandTotalRow:{},suppressStickyTotalRow:{type:[Boolean,String]},groupSuppressBlankHeader:{type:Boolean},groupSelectsFiltered:{type:Boolean},showOpenedGroup:{type:Boolean},groupHideParentOfSingleChild:{type:[Boolean,String]},groupRemoveSingleChildren:{type:Boolean},groupRemoveLowestSingleChildren:{type:Boolean},groupHideOpenParents:{type:Boolean},groupHideColumnsUntilExpanded:{type:Boolean},groupAllowUnbalanced:{type:Boolean},rowGroupPanelShow:{},groupRowRenderer:{},groupRowRendererParams:{},treeData:{type:Boolean},treeDataChildrenField:{},treeDataParentIdField:{},rowGroupPanelSuppressSort:{type:Boolean},suppressGroupRowsSticky:{type:Boolean},groupHierarchyConfig:{},pinnedTopRowData:{},pinnedBottomRowData:{},enableRowPinning:{type:[Boolean,String]},isRowPinnable:{type:Function},isRowPinned:{type:Function},rowModelType:{},rowData:{},asyncTransactionWaitMillis:{},suppressModelUpdateAfterUpdateTransaction:{type:Boolean},datasource:{},cacheOverflowSize:{},infiniteInitialRowCount:{},serverSideInitialRowCount:{},suppressServerSideFullWidthLoadingRow:{type:Boolean},cacheBlockSize:{},maxBlocksInCache:{},maxConcurrentDatasourceRequests:{},blockLoadDebounceMillis:{},purgeClosedRowNodes:{type:Boolean},serverSideDatasource:{},serverSideSortAllLevels:{type:Boolean},serverSideEnableClientSideSort:{type:Boolean},serverSideOnlyRefreshFilteredGroups:{type:Boolean},serverSidePivotResultFieldSeparator:{},viewportDatasource:{},viewportRowModelPageSize:{},viewportRowModelBufferSize:{},alwaysShowHorizontalScroll:{type:Boolean},alwaysShowVerticalScroll:{type:Boolean},debounceVerticalScrollbar:{type:Boolean},suppressHorizontalScroll:{type:Boolean},suppressScrollOnNewData:{type:Boolean},suppressScrollWhenPopupsAreOpen:{type:Boolean},suppressAnimationFrame:{type:Boolean},suppressMiddleClickScrolls:{type:Boolean},suppressPreventDefaultOnMouseWheel:{type:Boolean},scrollbarWidth:{},rowSelection:{},cellSelection:{type:[Boolean,Object]},rowMultiSelectWithClick:{type:Boolean},suppressRowDeselection:{type:Boolean},suppressRowClickSelection:{type:Boolean},suppressCellFocus:{type:Boolean},suppressHeaderFocus:{type:Boolean},selectionColumnDef:{},rowNumbers:{type:[Boolean,Object]},suppressMultiRangeSelection:{type:Boolean},enableCellTextSelection:{type:Boolean},enableRangeSelection:{type:Boolean},enableRangeHandle:{type:Boolean},enableFillHandle:{type:Boolean},fillHandleDirection:{},suppressClearOnFillReduction:{type:Boolean},sortingOrder:{},accentedSort:{type:Boolean},unSortIcon:{type:Boolean},suppressMultiSort:{type:Boolean},alwaysMultiSort:{type:Boolean},multiSortKey:{},suppressMaintainUnsortedOrder:{type:Boolean},icons:{},rowHeight:{},rowStyle:{},rowClass:{},rowClassRules:{},suppressRowHoverHighlight:{type:Boolean},suppressRowTransform:{type:Boolean},columnHoverHighlight:{type:Boolean},gridId:{},deltaSort:{type:Boolean},treeDataDisplayType:{},enableGroupEdit:{type:Boolean},initialState:{},theme:{},loadThemeGoogleFonts:{type:Boolean},themeCssLayer:{},styleNonce:{},themeStyleContainer:{type:Function},getContextMenuItems:{type:Function},getMainMenuItems:{type:Function},postProcessPopup:{type:Function},processUnpinnedColumns:{type:Function},processCellForClipboard:{type:Function},processHeaderForClipboard:{type:Function},processGroupHeaderForClipboard:{type:Function},processCellFromClipboard:{type:Function},sendToClipboard:{type:Function},processDataFromClipboard:{type:Function},isExternalFilterPresent:{type:Function},doesExternalFilterPass:{type:Function},getChartToolbarItems:{type:Function},createChartContainer:{type:Function},focusGridInnerElement:{type:Function},navigateToNextHeader:{type:Function},tabToNextHeader:{type:Function},navigateToNextCell:{type:Function},tabToNextCell:{type:Function},tabToNextGridContainer:{type:Function},getLocaleText:{type:Function},getDocument:{type:Function},paginationNumberFormatter:{type:Function},getGroupRowAgg:{type:Function},isGroupOpenByDefault:{type:Function},ssrmExpandAllAffectsAllRows:{type:Boolean},initialGroupOrderComparator:{type:Function},processPivotResultColDef:{type:Function},processPivotResultColGroupDef:{type:Function},getDataPath:{type:Function},getChildCount:{type:Function},getServerSideGroupLevelParams:{type:Function},isServerSideGroupOpenByDefault:{type:Function},isApplyServerSideTransaction:{type:Function},isServerSideGroup:{type:Function},getServerSideGroupKey:{type:Function},getBusinessKeyForNode:{type:Function},getRowId:{type:Function},resetRowDataOnUpdate:{type:Boolean},processRowPostCreate:{type:Function},isRowSelectable:{type:Function},isRowMaster:{type:Function},fillOperation:{type:Function},postSortRows:{type:Function},getRowStyle:{type:Function},getRowClass:{type:Function},getRowHeight:{type:Function},isFullWidthRow:{type:Function},isRowValidDropPosition:{type:Function},"onTool-panel-visible-changed":{},"onTool-panel-size-changed":{},"onColumn-menu-visible-changed":{},"onContext-menu-visible-changed":{},"onCut-start":{},"onCut-end":{},"onPaste-start":{},"onPaste-end":{},"onColumn-visible":{},"onColumn-pinned":{},"onColumn-resized":{},"onColumn-moved":{},"onColumn-value-changed":{},"onColumn-pivot-mode-changed":{},"onColumn-pivot-changed":{},"onColumn-group-opened":{},"onNew-columns-loaded":{},"onGrid-columns-changed":{},"onDisplayed-columns-changed":{},"onVirtual-columns-changed":{},"onColumn-everything-changed":{},"onColumns-reset":{},"onColumn-header-mouse-over":{},"onColumn-header-mouse-leave":{},"onColumn-header-clicked":{},"onColumn-header-context-menu":{},"onComponent-state-changed":{},"onCell-value-changed":{},"onCell-edit-request":{},"onRow-value-changed":{},"onCell-editing-started":{},"onCell-editing-stopped":{},"onRow-editing-started":{},"onRow-editing-stopped":{},"onBulk-editing-started":{},"onBulk-editing-stopped":{},"onBatch-editing-started":{},"onBatch-editing-stopped":{},"onUndo-started":{},"onUndo-ended":{},"onRedo-started":{},"onRedo-ended":{},"onCell-selection-delete-start":{},"onCell-selection-delete-end":{},"onRange-delete-start":{},"onRange-delete-end":{},"onFill-start":{},"onFill-end":{},"onFilter-opened":{},"onFilter-changed":{},"onFilter-modified":{},"onFilter-ui-changed":{},"onFloating-filter-ui-changed":{},"onAdvanced-filter-builder-visible-changed":{},"onFind-changed":{},"onChart-created":{},"onChart-range-selection-changed":{},"onChart-options-changed":{},"onChart-destroyed":{},"onCell-key-down":{},"onGrid-ready":{},"onGrid-pre-destroyed":{},"onFirst-data-rendered":{},"onGrid-size-changed":{},"onModel-updated":{},"onVirtual-row-removed":{},"onViewport-changed":{},"onBody-scroll":{},"onBody-scroll-end":{},"onDrag-started":{},"onDrag-stopped":{},"onDrag-cancelled":{},"onState-updated":{},"onPagination-changed":{},"onRow-drag-enter":{},"onRow-drag-move":{},"onRow-drag-leave":{},"onRow-drag-end":{},"onRow-drag-cancel":{},"onRow-resize-started":{},"onRow-resize-ended":{},"onColumn-row-group-changed":{},"onRow-group-opened":{},"onExpand-or-collapse-all":{},"onPivot-max-columns-exceeded":{},"onPinned-row-data-changed":{},"onPinned-rows-changed":{},"onRow-data-updated":{},"onAsync-transactions-flushed":{},"onStore-refreshed":{},"onHeader-focused":{},"onCell-clicked":{},"onCell-double-clicked":{},"onCell-focused":{},"onCell-mouse-over":{},"onCell-mouse-out":{},"onCell-mouse-down":{},"onRow-clicked":{},"onRow-double-clicked":{},"onRow-selected":{},"onSelection-changed":{},"onCell-context-menu":{},"onRange-selection-changed":{},"onCell-selection-changed":{},"onTooltip-show":{},"onTooltip-hide":{},"onSort-changed":{}},tee()),{modelValue:{},modelModifiers:{}}),emits:Jo(["update:modelValue"],["update:modelValue"]),setup(e,{expose:t,emit:n}){const i=e,o=PM("root"),r=yo(void 0),s=yo(!1),a=yo(!1),l=yo(!1);let u={},h=!1;const f=nM(i),g=new Set(h5());Qm().filter(M=>M!="gridOptions").forEach(M=>{const E=f[M];E&&Jt(E,(I,B)=>{(M==="rowData"&&!b.value||M!=="rowData")&&L(M,I),M==="rowData"&&(b.value=!1)},g.has(M)?void 0:{deep:!0})});const m=new Set(["rowDataUpdated","cellValueChanged","rowValueChanged"]),v=fi(e,"modelValue"),w=yo(!1),b=yo(!1),y=n;Jt(v,(M,E)=>{s.value&&(b.value||(w.value=!0,L("rowData",Fu(M),Fu(E))),b.value=!1)},{deep:!0});const R=nee(()=>{b.value=!0,y("update:modelValue",A())},10),S=Xo(),P=M=>{var E,I;l.value&&m.has(M)&&(I=(E=S?.vnode)==null?void 0:E.props)!=null&&I["onUpdate:modelValue"]&&R()},F=()=>v.value||i.rowData||i.gridOptions.rowData,A=()=>{const M=[];return r?.value.forEachLeafNode(E=>{M.push(E.data)}),M},k=M=>E=>{if(a.value)return;E==="gridReady"&&(l.value=!0);const I=Nc.has(E);I&&!M||!I&&M||m.has(E)&&(!w.value&&s.value&&P(E),w.value=!1)},L=(M,E,I)=>{if(s.value){let B=E;M==="rowData"&&B!=null&&(B=Fu(B)),u[M]=B,h||(h=!0,queueMicrotask(()=>{h=!1,!a.value&&r.value&&AO(u,r.value),u={}}))}},N=()=>Object.create(Xo().provides);return Ir(()=>{Ua(uF,void 0,!0);const M=new JX(Xo(),N()),E={globalListener:k(),globalSyncListener:k(!0),frameworkOverrides:new eee(Xo()),providedBeanInstances:{frameworkCompWrapper:M},modules:i.modules},I=ty(TO(Fu(i.gridOptions),i,[...Qm(),...Object.values(wh)])),B=F();B!==void 0&&(w.value=!0,I.rowData=Fu(B)),r.value=TW(o.value,I,E),s.value=!0}),pd(()=>{var M;s.value&&(R.cancel(),(M=r?.value)==null||M.destroy(),a.value=!0)}),t({api:r}),(M,E)=>(ae(),ve("div",oee,null,512))}}),see=["role","aria-hidden"],aee={key:0},lee=Ht(Ct({__name:"ArrowDownToLineIcon",props:{title:{default:void 0,type:String}},setup(e){return(t,n)=>(ae(),ve("svg",{class:"arrow-down-to-line-icon",viewBox:"0 0 24 24",fill:"currentColor",focusable:"false",role:e.title?"img":void 0,"aria-hidden":e.title?void 0:!0},[e.title?(ae(),ve("title",aee,Je(e.title),1)):gt("",!0),n[0]||(n[0]=q("path",{d:"M9.5 3h5v7.2h4.3L12 17.9l-6.8-7.7h4.3V3Z"},null,-1)),n[1]||(n[1]=q("rect",{x:"4.5",y:"19.4",width:"15",height:"2.2",rx:"1.1"},null,-1))],8,see))}}),[["styles",[".arrow-down-to-line-icon[data-v-bdee15f5]{display:block;height:1em;width:1em}"]],["__scopeId","data-v-bdee15f5"]]),cee=["aria-label","aria-description"],uee=["id","aria-label","aria-description"],dee={key:0,class:"ui-select-req",title:"required"},hee=["aria-label","aria-description"],fee=["id","disabled","aria-expanded","aria-controls","aria-activedescendant","aria-label","aria-labelledby","aria-description","aria-invalid","aria-describedby"],gee=["aria-label","aria-description"],pee=["id","aria-label","aria-labelledby","aria-description"],mee=["id","aria-selected","aria-disabled","aria-description","data-active","data-value","onClick","onMousemove"],vee=["name","value"],Cee=["id","aria-label","aria-description"],Pu=Ht(Ct({inheritAttrs:!1,__name:"Select",props:Jo({describedBy:{default:void 0,type:String},direction:{default:"down",type:String},disabled:{type:Boolean,default:!1},error:{default:"",type:String},id:{default:void 0,type:String},inline:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},label:{default:void 0,type:String},name:{default:void 0,type:String},options:{default:()=>[],type:Array},placeholder:{default:"Select an option",type:String},required:{type:Boolean,default:!1},size:{default:"md",type:String}},{modelValue:{default:null},modelModifiers:{}}),emits:Jo(["change"],["update:modelValue"]),setup(e,{emit:t}){const n=e,i=fi(e,"modelValue"),o=t,r=$g(),s=he(()=>n.id??r),a=he(()=>`${s.value}-error`),l=he(()=>`${s.value}-label`),u=he(()=>`${s.value}-listbox`),h=W=>`${s.value}-option-${W}`,f=we(null),g=we(null),m=we(null),v=we(!1),w=we(-1),b=he(()=>n.invalid||!!n.error),y=he(()=>{const W=[];return n.error&&W.push(a.value),n.describedBy&&W.push(...n.describedBy.split(/\s+/).filter(Boolean)),W.length>0?W.join(" "):void 0}),R=he(()=>n.options.map(W=>typeof W=="object"?W:{label:String(W),value:W})),S=he(()=>R.value.findIndex(W=>String(W.value)===String(i.value??""))),P=he(()=>R.value[S.value]?.label??""),F=he(()=>S.value>=0),A=(W,X)=>{const pe=R.value;for(let fe=W;fe>=0&&fe<pe.length;fe+=X)if(!pe[fe]?.disabled)return fe;return-1},k=async()=>{await xs(),m.value?.querySelector('[data-active="true"]')?.scrollIntoView?.({block:"nearest"})},L=()=>{n.disabled||v.value||(v.value=!0,w.value=F.value?S.value:A(0,1),k())},N=(W=!0)=>{v.value&&(v.value=!1,w.value=-1,W&&g.value?.focus())},M=W=>{if(W.disabled)return;const X=String(W.value)!==String(i.value??"");i.value=W.value,N(),X&&o("change",W.value)},E=W=>{const X=A(w.value+W,W);X<0||(w.value=X,k())},I=W=>{if(!n.disabled)switch(W.key){case"ArrowDown":W.preventDefault(),v.value?E(1):L();break;case"ArrowUp":W.preventDefault(),v.value?E(-1):L();break;case"Home":v.value&&(W.preventDefault(),w.value=A(0,1),k());break;case"End":v.value&&(W.preventDefault(),w.value=A(R.value.length-1,-1),k());break;case"Enter":case" ":{W.preventDefault();const X=R.value[w.value];v.value&&X?M(X):L();break}case"Escape":v.value&&(W.preventDefault(),N());break;case"Tab":N(!1);break}},B=W=>{f.value?.contains(W.target)||N(!1)};return Jt(v,W=>{if(W){document.addEventListener("pointerdown",B);return}document.removeEventListener("pointerdown",B)}),Es(()=>{document.removeEventListener("pointerdown",B)}),(W,X)=>(ae(),ve("div",{ref_key:"root",ref:f,class:ft(["ui-select",{"ui-select-inline":e.inline,"ui-select-open":v.value,"ui-select-sm":e.size==="sm"}]),"aria-label":e.label??e.placeholder,"aria-description":e.label?`${e.label} select field`:"select field"},[e.label?(ae(),ve("span",{key:0,id:l.value,class:"ui-select-label","aria-label":e.label,"aria-description":`${e.label} field label`},[Xi(Je(e.label)+" ",1),e.required?(ae(),ve("abbr",dee,"*")):gt("",!0)],8,uee)):gt("",!0),q("div",{class:"ui-select-field","aria-label":e.label?`${e.label} field`:"Select field","aria-description":e.label?`${e.label} select control`:"select control"},[q("button",nc({id:s.value,ref_key:"trigger",ref:g,type:"button",class:"ui-select-control",role:"combobox",disabled:e.disabled,"aria-expanded":v.value,"aria-controls":u.value,"aria-activedescendant":v.value&&w.value>=0?h(w.value):void 0,"aria-label":e.label?void 0:e.placeholder,"aria-labelledby":e.label?l.value:void 0,"aria-description":e.label?`${e.label} select`:"select","aria-invalid":b.value?!0:void 0,"aria-describedby":y.value},W.$attrs,{onClick:X[0]||(X[0]=pe=>v.value?N():L()),onKeydown:I}),[q("span",{class:ft(["ui-select-value",{"ui-select-value-placeholder":!F.value}]),"aria-label":F.value?P.value:e.placeholder,"aria-description":F.value?"selected value":"placeholder"},Je(F.value?P.value:e.placeholder),11,gee),q("span",{class:ft(["ui-select-chevron",{"ui-select-chevron-open":v.value}]),"aria-hidden":"true"},null,2)],16,fee),Fs(q("ul",{id:u.value,ref_key:"listbox",ref:m,class:ft(["ui-select-listbox",`ui-select-listbox-${e.direction}`]),role:"listbox","aria-label":e.label??e.placeholder,"aria-labelledby":e.label?l.value:void 0,"aria-description":e.label?`${e.label} options`:"select options"},[(ae(!0),ve(wt,null,Ti(R.value,(pe,fe)=>(ae(),ve("li",{id:h(fe),key:String(pe.value),class:ft(["ui-select-option",{"ui-select-option-active":fe===w.value,"ui-select-option-selected":fe===S.value,"ui-select-option-disabled":pe.disabled}]),role:"option","aria-selected":fe===S.value,"aria-disabled":pe.disabled?!0:void 0,"aria-description":`${pe.label} option`,"data-active":fe===w.value?"true":void 0,"data-value":String(pe.value),onClick:me=>M(pe),onMousemove:me=>w.value=pe.disabled?w.value:fe},Je(pe.label),43,mee))),128))],10,pee),[[rp,v.value]])],8,hee),e.name?(ae(),ve("input",{key:1,type:"hidden",name:e.name,value:i.value??""},null,8,vee)):gt("",!0),e.error?(ae(),ve("p",{key:2,id:a.value,class:"ui-select-error",role:"alert","aria-label":e.error,"aria-description":e.label?`${e.label} error`:"select error"},Je(e.error),9,Cee)):gt("",!0)],10,cee))}}),[["styles",[".ui-select[data-v-45911d40]{display:flex;flex-direction:column;gap:.35rem;min-width:0;position:relative}.ui-select-chevron[data-v-45911d40]{border-left:.3125rem solid transparent;border-right:.3125rem solid transparent;border-top:.375rem solid var(--color-grey-900);flex-shrink:0;height:0;transition:transform .15s ease;width:0}.ui-select-chevron-open[data-v-45911d40]{transform:rotate(180deg)}.ui-select-control[data-v-45911d40]{align-items:center;background-color:var(--color-white);border:.0625rem solid var(--color-green-400);border-radius:.25rem;box-sizing:border-box;color:var(--color-grey-900);cursor:pointer;display:flex;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:.875rem;gap:.5rem;height:3rem;justify-content:space-between;padding:.75rem 1rem;text-align:left;width:100%}.ui-select-control[data-v-45911d40]:disabled{cursor:not-allowed;opacity:.65}.ui-select-control[data-v-45911d40]:focus-visible,.ui-select-control[aria-expanded=true][data-v-45911d40]{border:.125rem solid var(--color-brand-bright-200);outline:0}.ui-select-control[data-v-45911d40]:hover:not(:disabled),.ui-select-control[data-v-45911d40]:active:not(:disabled){background-color:var(--color-green-50)}.ui-select-control[aria-invalid=true][data-v-45911d40]{border-color:var(--color-red)}.ui-select-control[aria-invalid=true][data-v-45911d40]:focus-visible,.ui-select-control[aria-invalid=true][aria-expanded=true][data-v-45911d40]{border-color:var(--color-red)}.ui-select-error[data-v-45911d40]{color:var(--color-red);font-size:.75rem;line-height:1.125rem;margin:0}.ui-select-field[data-v-45911d40]{min-width:0;position:relative}.ui-select-inline[data-v-45911d40]{align-items:center;display:inline-flex;flex-direction:row;gap:.5rem}.ui-select-inline .ui-select-control[data-v-45911d40]{width:auto}.ui-select-sm .ui-select-control[data-v-45911d40]{height:2.5rem;padding:.5rem .75rem}.ui-select-sm .ui-select-option[data-v-45911d40]{padding:.5rem .75rem}.ui-select-label[data-v-45911d40]{color:var(--color-grey-900);font-size:.875rem;line-height:1.25rem;white-space:nowrap}.ui-select-listbox[data-v-45911d40]{background-color:var(--color-white);border:.0625rem solid var(--color-green-400);border-radius:.25rem;box-shadow:0 .25rem .75rem #00000014;list-style:none;margin:0;max-height:14rem;min-width:100%;overflow-y:auto;padding:0;position:absolute;right:0;z-index:20}.ui-select-listbox-down[data-v-45911d40]{top:calc(100% + .25rem)}.ui-select-listbox-up[data-v-45911d40]{bottom:calc(100% + .25rem)}.ui-select-open[data-v-45911d40]{z-index:21}.ui-select-option[data-v-45911d40]{background-color:var(--color-white);border-bottom:.0625rem solid var(--color-green-400);color:var(--color-grey-900);cursor:pointer;font-size:.875rem;line-height:1.25;padding:.75rem 1rem;white-space:nowrap}.ui-select-option[data-v-45911d40]:hover:not(.ui-select-option-disabled):not(.ui-select-option-selected),.ui-select-option-active[data-v-45911d40]:not(.ui-select-option-selected){background-color:var(--color-green-50)}.ui-select-option[data-v-45911d40]:last-child{border-bottom:none}.ui-select-option-disabled[data-v-45911d40]{color:var(--color-grey-600);cursor:not-allowed;opacity:.65}.ui-select-option-disabled[data-v-45911d40]:hover{background-color:var(--color-white)}.ui-select-option-selected[data-v-45911d40]{background-color:var(--color-green-100);color:var(--color-grey-900)}.ui-select-req[data-v-45911d40]{color:var(--color-red);cursor:help;text-decoration:none}.ui-select-value[data-v-45911d40]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-select-value-placeholder[data-v-45911d40]{color:var(--color-grey-600)}"]],["__scopeId","data-v-45911d40"]]),wee={class:"ag-cf9a-filter","aria-description":"filter modal",role:"dialog"},bee={class:"ag-cf9a-title-row","aria-description":"container for title and close buttton"},yee={class:"ag-cf9a-title"},See={class:"ag-cf9a-condition-container","aria-description":"container for filter condition fields"},Ree={key:1,class:"ag-cf9a-condition-container","aria-description":"container for condition 2 inputs"},xee={class:"ag-cf9a-actions","aria-description":"container for buttons"},Ut=Ct({__name:"BaseColumnFilter",props:{params:{type:Object}},setup(e){const t=we(null),n=we(""),i=we("equals"),o=we(""),r=we("equals"),s=we(""),a=we("AND"),l=he(()=>e.params.filterKind??"text"),u=he(()=>l.value==="number"?"number":l.value==="date"?"date":"text"),h=he(()=>i.value==="inRange"&&l.value!=="text"),f=he(()=>e.params.title??e.params.column?.getColDef().headerName??e.params.column?.getColDef().field??""),g=[{label:"And",value:"AND"},{label:"Or",value:"OR"}],m=he(()=>l.value==="text"?[{label:"is equal to",value:"equals"},{label:"is not equal to",value:"notEqual"},{label:"contains",value:"contains"},{label:"does not contain",value:"notContains"},{label:"begins with",value:"startsWith"},{label:"ends with",value:"endsWith"}]:[{label:"is equal to",value:"equals"},{label:"is not equal to",value:"notEqual"},{label:"is less than",value:"lessThan"},{label:"is greater than",value:"greaterThan"},{label:"is less than or equal to",value:"lessThanOrEqual"},{label:"is greater than or equal to",value:"greaterThanOrEqual"},{label:"is between",value:"inRange"}]),v=()=>{e.params.hidePopup?.(),e.params.api?.hidePopupMenu?.()},w=async()=>{await xs(),t.value?.$el?.querySelector(".ui-input-control")?.focus()},b=F=>{if(!F){a.value="AND",n.value="",i.value="equals",o.value="",r.value="equals",s.value="";return}if("condition1"in F){a.value=F.operator??"AND",n.value=String(F.condition1?.filterTo??F.condition1?.dateTo??""),i.value=F.condition1?.type??"equals",o.value=String(F.condition1?.filter??F.condition1?.dateFrom??""),r.value=F.condition2?.type??"equals",s.value=String(F.condition2?.filter??F.condition2?.dateFrom??"");return}n.value=String(F.filterTo??F.dateTo??""),i.value=F.type??"equals",o.value=String(F.filter??F.dateFrom??""),r.value="equals",s.value=""},y=(F,A,k="")=>{const L=Re.isString(A)?A.trim():A,N=Re.isString(k)?k.trim():k;return Re.isNil(L)||Re.isString(L)&&Re.isEmpty(L)?null:l.value==="number"?F==="inRange"?Re.isNil(N)?null:{filter:Number(L),filterTo:Number(N),filterType:"number",type:F}:{filter:Number(L),filterType:"number",type:F}:l.value==="date"?F==="inRange"?Re.isNil(N)?null:{dateFrom:L,dateTo:N,filterType:"date",type:F}:{dateFrom:L,filterType:"date",type:F}:{filter:L,filterType:"text",type:F}},R=F=>{e.params.onStateChange?.({model:F}),e.params.onModelChange?.(F)},S=()=>{const F=y(i.value,o.value,n.value),A=y(r.value,s.value);if(!F&&!A){R(null),e.params.onAction?.("apply"),v();return}if(F&&A){R({condition1:F,condition2:A,filterType:l.value,operator:a.value}),e.params.onAction?.("apply"),v();return}if(i.value==="inRange"){F&&R({condition1:F,filterType:l.value,operator:a.value}),e.params.onAction?.("apply"),v();return}R(F??A),e.params.onAction?.("apply"),v()},P=()=>{b(null),R(null),e.params.onAction?.("clear"),v()};return Jt(()=>e.params.model,F=>b(F),{immediate:!0}),Ir(()=>{w()}),(F,A)=>{const k=Ds("font-awesome-icon");return ae(),ve("div",wee,[q("div",bee,[q("header",yee,[q("h3",null,Je(f.value),1)]),q("button",{class:"ag-cf9a-close-button",onClick:v,"aria-label":"Close Filter"},[Le(k,{class:"ag-cf9a-close-icon",icon:["fas","xmark"],size:"xs","aria-hidden":"true"})])]),A[6]||(A[6]=q("p",{class:"ag-cf9a-helper-text"}," Show items with value that ",-1)),q("div",See,[Le(Pu,{modelValue:i.value,"onUpdate:modelValue":A[0]||(A[0]=L=>i.value=L),class:"ag-cf9a-select",options:m.value,"aria-label":"First condition operator",onKeydown:[Xt(xt(v,["prevent","stop"]),["esc"]),Xt(xt(S,["prevent","stop"]),["enter"])]},null,8,["modelValue","options","onKeydown"]),Le(uo,{ref_key:"condition1Input",ref:t,modelValue:o.value,"onUpdate:modelValue":A[1]||(A[1]=L=>o.value=L),class:"ag-cf9a-input",placeholder:"Enter value",type:u.value,"aria-label":"First condition value",onKeydown:[Xt(xt(v,["prevent","stop"]),["esc"]),Xt(xt(S,["prevent","stop"]),["enter"])]},null,8,["modelValue","type","onKeydown"]),h.value?(ae(),rn(uo,{key:0,modelValue:n.value,"onUpdate:modelValue":A[2]||(A[2]=L=>n.value=L),class:"ag-cf9a-input",placeholder:"Enter end value",type:u.value,"aria-label":"First condition end value",onKeydown:[Xt(xt(v,["prevent","stop"]),["esc"]),Xt(xt(S,["prevent","stop"]),["enter"])]},null,8,["modelValue","type","onKeydown"])):gt("",!0),h.value?gt("",!0):(ae(),ve("div",Ree,[Le(Pu,{modelValue:a.value,"onUpdate:modelValue":A[3]||(A[3]=L=>a.value=L),class:"ag-cf9a-select",options:g,"aria-label":"Condition join operator",onKeydown:[Xt(xt(v,["prevent","stop"]),["esc"]),Xt(xt(S,["prevent","stop"]),["enter"])]},null,8,["modelValue","onKeydown"]),Le(Pu,{modelValue:r.value,"onUpdate:modelValue":A[4]||(A[4]=L=>r.value=L),class:"ag-cf9a-select",options:m.value,"aria-label":"Second condition operator",onKeydown:[Xt(xt(v,["prevent","stop"]),["esc"]),Xt(xt(S,["prevent","stop"]),["enter"])]},null,8,["modelValue","options","onKeydown"]),Le(uo,{modelValue:s.value,"onUpdate:modelValue":A[5]||(A[5]=L=>s.value=L),class:"ag-cf9a-input",placeholder:"Enter value",type:u.value,"aria-label":"Second condition value",onKeydown:[Xt(xt(v,["prevent","stop"]),["esc"]),Xt(xt(S,["prevent","stop"]),["enter"])]},null,8,["modelValue","type","onKeydown"])]))]),q("div",xee,[Le(ds,{class:"ag-cf9a-button ag-cf9a-button-secondary",label:"Clear",variant:"secondary",onClick:P}),Le(ds,{class:"ag-cf9a-button ag-cf9a-button-primary",label:"Filter",onClick:S})])])}}}),kf={filterKind:"date"},VD={filterKind:"number"},Cn={filterKind:"text"},hw=e=>{const t=e.value;if(Re.isNil(t)||t==="")return;const n=String(t).split(";").map(i=>i.trim()).filter(i=>i.length>0);return n.length>0?n.join(`
|
|
667
|
-
`):void 0},WD=e=>{if(Re.isNil(e))return"";const t=Number(e);return Number.isNaN(t)?"":t.toLocaleString("en-US",{currency:"USD",style:"currency"})},fw=[{headerName:"Details",field:"id",sortable:!1,filter:!1,resizable:!0,width:120,suppressHeaderMenuButton:!0,cellRenderer:e=>{const t=e.data?.id;return t?`<a id="contribution-details-link-${t}" class="contribution-details-link" style="color:var(--color-primary-green)" href="/PoliticalContributionVerification/Contribution/${t}">View</a>`:""}},{field:"contributor",headerName:"Contributor",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"employer",headerName:"Employer",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"employeeStatus",headerName:"Employee Status",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"occupation",headerName:"Occupation",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"address",headerName:"Address",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"state",headerName:"State",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"zipCode",headerName:"Zip Code",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"date",headerName:"Date",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:kf},{field:"dateDetected",headerName:"Date Detected",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:kf},{field:"amount",headerName:"Amount",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:VD,valueFormatter:e=>WD(e.value),cellClass:"ag-cf9a-currency-cell"},{field:"recipient",headerName:"Recipient",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"status",headerName:"Status",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"reconciliationStatus",headerName:"Reconciliation Status",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"preclearance",headerName:"Preclearance",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn,cellRenderer:e=>{const t=e.data?.preclearance;return t?`<a id="contribution-preclearance-link-${t}" class="contribution-preclearance-link" style="color:var(--color-primary-green)" href="/preclearance/${t}">${t}</a>`:""}},{field:"approvalDate",headerName:"Approval Date",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:kf},{field:"approvedAmount",headerName:"Approved Amount",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:VD,valueFormatter:e=>WD(e.value),cellClass:"ag-cf9a-currency-cell"},{field:"amended",headerName:"Amended",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"jurisdiction",headerName:"Jurisdiction",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"lastUpdated",headerName:"Last Updated",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:kf},{field:"lastUpdatedBy",headerName:"Last Updated By",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"notes",headerName:"Notes",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn,sortable:!1,tooltipValueGetter:hw},{field:"tags",headerName:"Tags",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn,tooltipValueGetter:hw},{field:"groups",headerName:"Groups",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn,tooltipValueGetter:hw},{field:"sources",headerName:"Source",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn}],Fee={comparator:()=>0,filter:!0,flex:1,floatingFilter:!1,minWidth:180,resizable:!0,sortable:!0},Pee={maxWidth:56,minWidth:56,pinned:"left",resizable:!1,sortable:!1,suppressHeaderMenuButton:!0,width:56},Eee={mode:"multiRow",checkboxes:!0,headerCheckbox:!0,enableClickSelection:!1,selectAll:"all"},Dee={class:"toolbar-left","aria-description":"selection summary"},Tee={key:0,class:"selection-count","aria-description":"container for number of selected rows"},Aee={class:"toolbar-actions","aria-description":"table toolbar actions"},Iee={ref:"bulkStatusSelect",class:"bulk-status-select-wrap","aria-description":"container for bulk status select"},Mee={ref:"bulkNoteButton",class:"bulk-note-button-wrap","aria-description":"container for add notes button"},kee={class:"export-controls","aria-description":"container for export controls"},Lee=["disabled"],Oee={class:"column-controls","aria-description":"container for column controls"},_ee={"aria-description":"container for column visibility modal content"},Nee=["id","name","checked","onClick"],Bee=["for"],Hee={class:"contributions-table-footer","aria-description":"container for pagination controls",role:"footer"},Gee={class:"footer-left","aria-description":"container for page size controls"},Vee={class:"footer-count","aria-description":"container for record count data"},Wee={class:"footer-right","aria-label":"Pagination","aria-description":"container for page navigation controls"},zee=["disabled"],Uee=["disabled"],$ee={key:0,class:"pagination-ellipsis","aria-hidden":"true"},jee=["aria-current","aria-label","aria-description","onClick"],Kee=["disabled"],qee=["disabled"],Qee={"aria-description":"bulk status confirmation message"},zD=Ht(Ct({__name:"ContributionsTable",props:Jo({disabledColumns:{default:()=>[],type:Array},disableSelection:{type:Boolean,default:!1},match:{type:Boolean,default:!0},page:{type:String},presets:{default:()=>({}),type:Object},user:{type:String},company:{type:String},stack:{type:String},username:{type:String}},{columnsState:{default:()=>[]},columnsStateModifiers:{},loading:{type:Boolean,default:!1},loadingModifiers:{},resultsTotal:{default:0},resultsTotalModifiers:{},sortColumn:{default:null},sortColumnModifiers:{},sortOrder:{default:null},sortOrderModifiers:{}}),emits:["update:columnsState","update:loading","update:resultsTotal","update:sortColumn","update:sortOrder"],setup(e){const t=fi(e,"columnsState"),n=fi(e,"loading"),i=fi(e,"resultsTotal"),o=fi(e,"sortColumn"),r=fi(e,"sortOrder"),s=EY(),a=vD(xe=>xe.ContributionSearchReducer?.[e.page]),{trigger:l}=yJ(),{trigger:u,isLoading:h}=SD(),{trigger:f}=RJ(),{trigger:g,isLoading:m}=BX(),{data:v}=ow({user:e.user,company:e.company,stack:e.stack,username:e.username}),w=we(null),b=he(()=>fw.reduce((xe,_e)=>{const lt=_e.field;if(e.disabledColumns.includes(lt)||!k.value[lt])return xe;let Ne=!1;return e.presets&&!Re.isEmpty(e.presets)&&(Ne=!!e.presets[lt]?.query?.length),[...xe,{..._e,filter:Ne?!1:_e.filter}]},[])),y=we(Fee),R={filter:QP(eq,{classes:["grid-filter-icon"]}).html[0]??""},S=we(null),P=we([]),F=we(null),A=we(null),k=we(fw.reduce((xe,_e)=>e.disabledColumns.includes(_e.field)?xe:{...xe,[_e.field]:!0},{})),L=we(!1),N=he(()=>i.value===0?0:Math.min(E.value*M.value,i.value)),M=we(100),E=we(1),I=[10,25,50,100],B=he(()=>i.value===0?0:(E.value-1)*M.value+1),W=we(1),X=he(()=>{const xe=W.value,_e=E.value;if(xe<=7)return Array.from({length:xe},(kt,dn)=>dn+1);const lt=new Set([1,xe]);let Ne=Math.max(1,_e-2);const je=Math.min(xe,Ne+4);Ne=Math.max(1,je-4);for(let kt=Ne;kt<=je;kt+=1)lt.add(kt);const yn=[...lt].sort((kt,dn)=>kt-dn),fo=[];return yn.forEach((kt,dn)=>{const Go=yn[dn-1];dn>0&&Go!==void 0&&kt-Go>1&&fo.push("ellipsis"),fo.push(kt)}),fo});let pe;const fe=we(Eee),me=he(()=>oe.value.length),De=we(Pee),oe=we([]),H=we(""),Q=we(null),j=we(!1),ce=he(()=>(v.value??[]).map(xe=>({label:xe.name,value:xe.id}))),Ee=we(null),Ie=we(null),Fe=we(!1),ke=we(null),$e=we(null),Ve=we(!1),bt=he(()=>i.value>0&&!!a.value),O=()=>{j.value||(Q.value?.open(),j.value=!0)},V=()=>{H.value="",j.value=!1},U=xe=>{const _e=Re.isNil(xe)||xe===""?null:Number(xe);Ee.value=_e===null||Number.isNaN(_e)?null:_e,!Fe.value&&!Re.isNil(Ee.value)&&(Ie.value?.open(),Fe.value=!0)},ne=()=>{Ee.value=null,Fe.value=!1},te=xe=>{if(!xe.finished||!w.value)return;const _e=xe.api.getAllDisplayedColumns().map(lt=>lt.getColId()).filter(lt=>k.value[lt]);t.value=_e},Z=xe=>{const _e=xe.target;Ve.value&&!ke.value?.contains(_e)&&!$e.value?.contains(_e)&&(ke.value?.close(),Ve.value=!1),L.value&&!A.value?.contains(_e)&&!F.value?.contains(_e)&&(A.value?.close(),L.value=!1)};Ir(()=>document.addEventListener("pointerdown",Z)),Es(()=>document.removeEventListener("pointerdown",Z));const ye=xe=>{xe.stopPropagation(),L.value?(xe.target===A.value||xe.currentTarget===F.value)&&(A.value?.close(),L.value=!1):(A.value?.show(),L.value=!0)},Ce=(xe="xlsx")=>{!a.value||!bt.value||(ke.value?.close(),Ve.value=!1,console.log("Exporting contributions with subsequent search body:"),console.log(a.value),u({user:e.user,company:e.company,stack:e.stack,username:e.username,format:xe,columnsState:t.value,sortColumn:o.value,sortOrder:r.value,match:e.match,body:a.value}))},de=xe=>{xe.stopPropagation(),!(!bt.value||h.value)&&(Ve.value?(xe.target===ke.value||xe.currentTarget===$e.value)&&(ke.value?.close(),Ve.value=!1):(ke.value?.show(),Ve.value=!0))},ie=async()=>{E.value=1,await yt()},Me=async()=>{E.value<=1||(E.value=1,await yt())},Te=async()=>{E.value<=1||(E.value-=1,await yt())},He=async()=>{E.value>=W.value||(E.value+=1,await yt())},ze=async()=>{E.value>=W.value||(E.value=W.value,await yt())},Xe=async xe=>{xe<1||xe>W.value||xe===E.value||(E.value=xe,await yt())},rt=xe=>xe?.conditions?.length?xe.conditions:xe?.condition1||xe?.condition2?[xe.condition1,xe.condition2].filter(_e=>!Re.isNil(_e)):[xe],et=xe=>(_e,lt)=>{const Ne=rt(lt).reduce(xe,[]),je={page:e.page,filterName:_e},yn=WX(lt?.operator,Ne);s(mD({...je,conjunction:yn})),Ne.forEach(fo=>s(gD({...je,query:fo})))},$t=(xe,_e)=>{et((Ne,je)=>Re.isEmpty(je?.dateFrom)?Ne:je.type==="inRange"&&!Re.isEmpty(je.dateFrom)&&!Re.isEmpty(je.dateTo)?[...Ne,Qn("greaterThanOrEqual",Re.isDate(je.dateFrom)?je.dateFrom.toISOString().slice(0,10):je.dateFrom),Qn("lessThanOrEqual",Re.isDate(je.dateTo)?je.dateTo.toISOString().slice(0,10):je.dateTo)]:[...Ne,Qn(je.type,Re.toString(je.dateFrom))])(xe,_e)},jt=(xe,_e)=>{et((Ne,je)=>Re.isNil(je?.filter)?Ne:je.type==="inRange"&&!Re.isNil(je.filter)&&!Re.isNil(je.filterTo)?[...Ne,Qn("greaterThanOrEqual",Re.toNumber(je.filter)),Qn("lessThanOrEqual",Re.toNumber(je.filterTo))]:[...Ne,Qn(je.type,Re.toNumber(je.filter))])(xe,_e)},ln=(xe,_e)=>{et((Ne,je)=>Re.isEmpty(je?.filter)?Ne:[...Ne,Qn(je.type,Re.toString(je.filter))])(xe,_e)},wn=()=>{Re.entries(e.presets).forEach(([xe,_e])=>{const lt=_e.query;if(!(Re.isArray(lt)&<.every(yn=>Re.isObject(yn)&&Re.has(yn,"comparator")&&Re.has(yn,"value"))))return;const Ne=!lt?.length||lt.length<2?sn.NULL:_e.conjunction;if(Ne!==sn.NULL&&Ne!==sn.AND&&Ne!==sn.OR)return;const je={page:e.page,filterName:xe};s(pD({...je})),s(mD({...je,conjunction:Ne})),lt.forEach(yn=>s(gD({...je,query:yn})))})},yi=xe=>{const _e=new Set(["date","dateDetected","approvalDate","lastUpdated"]),lt=new Set(["amount","approvalAmount"]),Ne=new Set(["contributor","employer","employeeStatus","occupation","address","state","zipCode","recipient","status","reconciliationStatus","preclearance","amended","jurisdiction","lastUpdatedBy","notes","tags","groups","sources"]),je=[...Array.from(_e),...Array.from(lt),...Array.from(Ne)],yn=Re.entries(e.presets).reduce((kt,[dn,Go])=>Go?.query?.length?[...kt,dn]:kt,[]),fo=Re.difference(je,yn);wn(),fo.forEach(kt=>{const dn={page:e.page,filterName:kt};s(pD({...dn}))}),Re.entries(xe).forEach(([kt,dn])=>{_e.has(kt)?$t(kt,dn):lt.has(kt)?jt(kt,dn):Ne.has(kt)&&ln(kt,dn)})};function ho(){return w.value?w.value.getColumnState().filter(xe=>xe.sort).sort((xe,_e)=>(xe.sortIndex??0)-(_e.sortIndex??0)).map(xe=>({column:xe.colId,direction:xe.sort})):[]}const yt=async()=>{if(!e.user||!e.company||!e.stack||!e.username)return;const xe=w.value?.getFilterModel()??{};yi(xe);const lt=ho()[0],Ne=Re.entries(a.value).reduce((yn,[fo,kt])=>{const dn=kt.query.filter(va=>(Re.isString(va.value)&&!Re.isEmpty(va.value)||!Re.isNil(va.value))&&va.value!=="undefined"&&va.value!=="null"),Go=dn?.length?kt.conjunction:sn.NULL;return{...yn,[fo]:{conjunction:Go,query:dn}}},{}),je=await g({user:e.user,company:e.company,stack:e.stack,username:e.username,page:E.value,limit:M.value,sortColumn:lt?.column,sortOrder:lt?.direction,match:e.match,body:Ne});P.value=je?.results??[],E.value=je?.page??1,M.value=je?.limit??M.value,i.value=je?.total??0,W.value=je?.totalPages??1,oe.value=[]},bn=()=>{window.clearTimeout(pe),pe=window.setTimeout(async()=>{E.value=1,await yt()},500)},hs=async()=>{const _e=ho()[0];o.value=_e?.column??null,r.value=_e?.direction??null,E.value=1,await yt()},Rl=async xe=>{w.value=xe.api,t.value=xe.api.getAllDisplayedColumns().map(_e=>_e.getColId()).filter(_e=>k.value[_e]),await yt()},gw=xe=>{oe.value=xe.api.getSelectedRows()},pw=async()=>{const xe=H.value.trim().replace(/ +/g," ");if(!xe.length)return;const _e={contributions:oe.value.map(lt=>lt.id),note:xe,type:"user"};await l({user:e.user,company:e.company,stack:e.stack,username:e.username,body:_e}),Q.value?.close(),H.value="",await yt()},Lf=async()=>{if(Re.isNil(Ee.value))return;const xe={contributions:oe.value.map(_e=>_e.id),status:Ee.value};await f({user:e.user,company:e.company,stack:e.stack,username:e.username,body:xe}),Ie.value?.close(),await yt()};return Jt(m,xe=>{n.value=!!xe}),Jt(()=>[e.match,e.presets,e.user,e.company,e.stack,e.username],async()=>{w.value&&(E.value=1,await yt())}),Jt(k,xe=>{if(!w.value)return;const _e=w.value.getAllDisplayedColumns().map(lt=>lt.getColId()).filter(lt=>xe[lt]);t.value=_e}),(xe,_e)=>{const lt=Ds("font-awesome-icon");return ae(),ve("div",{ref_key:"popupParent",ref:S,class:"contributions-table","aria-description":"container for table and related controls"},[q("div",{class:ft(["contributions-table-toolbar",{"contributions-table-toolbar-no-selection":e.disableSelection}]),"aria-description":"container for bulk and column controls"},[q("div",Dee,[e.disableSelection?gt("",!0):(ae(),ve("span",Tee,Je(me.value)+" selected",1))]),q("div",Aee,[oe.value.length?(ae(),ve(wt,{key:0},[q("span",Iee,[Le(Pu,{id:"bulk-status-select",modelValue:Ee.value,"onUpdate:modelValue":_e[0]||(_e[0]=Ne=>Ee.value=Ne),inline:"",label:"Change Status",options:ce.value,placeholder:"Select an option",size:"sm",onChange:U},null,8,["modelValue","options"])],512),q("span",Mee,[Le(ds,{label:"Add Notes","aria-description":"add notes button",onClick:O})],512)],64)):gt("",!0),q("div",kee,[q("button",{type:"button",class:ft(["toolbar-icon-button",{"is-active":Ve.value}]),ref_key:"exportModalButton",ref:$e,disabled:ni(h)||!bt.value,"aria-label":"Export","aria-description":"export button",onClick:xt(de,["prevent"])},[Le(lee,{class:"toolbar-icon"})],10,Lee),q("dialog",{class:"contributions-export-modal",ref_key:"exportModal",ref:ke,onClick:de},[q("button",{type:"button",onClick:_e[1]||(_e[1]=xt(Ne=>Ce("xlsx"),["stop"]))}," Export to Excel ")],512)]),q("div",Oee,[q("button",{type:"button",class:ft(["toolbar-icon-button",{"is-active":L.value}]),ref_key:"columnsVisibilityButton",ref:F,"aria-label":"Toggle Columns","aria-description":"toggle columns button",onClick:ye},[Le(lt,{class:"toolbar-icon",icon:["fas","ellipsis-h"],"aria-hidden":"true"})],2),q("dialog",{ref_key:"columnsVisibilityModal",ref:A,class:"columns-visibility-modal",onClick:ye},[q("ul",_ee,[(ae(!0),ve(wt,null,Ti(ni(fw).filter(Ne=>!e.disabledColumns.includes(Ne.field)),Ne=>(ae(),ve("li",{key:Ne.field},[q("input",{id:`column-visibility-${Ne.field}`,class:"column-visibility-checkbox",name:Ne.field,type:"checkbox",checked:k.value?.[Ne.field],onClick:je=>k.value={...k.value,[Ne.field]:!k.value[Ne.field]}},null,8,Nee),_e[4]||(_e[4]=Xi(" ",-1)),q("label",{for:`column-visibility-${Ne.field}`},Je(Ne.headerName),9,Bee)]))),128))])],512)])])],2),Le(ni(ree),{class:"ag-theme-alpine contributions-grid",style:{height:"38.75rem",width:"100%"},"aria-description":"contributions data grid",columnDefs:b.value,defaultColDef:y.value,enableFilterHandlers:!0,icons:R,loading:ni(m),loadingOverlayComponent:aw,popupParent:S.value??void 0,rowData:P.value,rowSelection:e.disableSelection?void 0:fe.value,selectionColumnDef:e.disableSelection?void 0:De.value,tooltipHideDelay:2e4,tooltipInteraction:!0,tooltipShowDelay:500,onColumnMoved:te,onGridReady:Rl,onFilterChanged:bn,onSortChanged:hs,onSelectionChanged:gw},null,8,["columnDefs","defaultColDef","loading","popupParent","rowData","rowSelection","selectionColumnDef"]),q("div",Hee,[q("div",Gee,[Le(Pu,{id:"contributions-table-page-size",modelValue:M.value,"onUpdate:modelValue":_e[2]||(_e[2]=Ne=>M.value=Ne),direction:"up",inline:"",label:"Items per page:",options:I,size:"sm",onChange:ie},null,8,["modelValue"]),q("div",Vee,Je(B.value)+" - "+Je(N.value)+" of "+Je(i.value)+" items ",1)]),q("nav",Wee,[q("button",{type:"button",class:"pagination-nav",disabled:E.value<=1,onClick:Me,"aria-label":"Go to first page","aria-description":"go to first page"},"|<",8,zee),q("button",{type:"button",class:"pagination-nav",disabled:E.value<=1,onClick:Te,"aria-label":"Go to previous page","aria-description":"go to previous page"},"<",8,Uee),(ae(!0),ve(wt,null,Ti(X.value,(Ne,je)=>(ae(),ve(wt,{key:`page-item-${Ne}-${je}`},[Ne==="ellipsis"?(ae(),ve("span",$ee,"...")):(ae(),ve("button",{key:1,type:"button",class:ft(["pagination-page",{"is-active":Ne===E.value}]),"aria-current":Ne===E.value?"page":void 0,"aria-label":`Go to page ${Ne}`,"aria-description":`go to page ${Ne}`,onClick:yn=>Xe(Ne)},Je(Ne),11,jee))],64))),128)),q("button",{type:"button",class:"pagination-nav",disabled:E.value>=W.value,onClick:He,"aria-label":"Go to next page","aria-description":"go to next page"},">",8,Kee),q("button",{type:"button",class:"pagination-nav",disabled:E.value>=W.value,onClick:ze,"aria-label":"Go to last page","aria-description":"go to last page"},">|",8,qee)])]),Le(rw,{ref_key:"bulkStatusModal",ref:Ie,class:"bulk-status-modal","cancel-button-label":"Cancel","content-width":"min(45rem, calc(100vw - 2rem))","primary-button-disabled":!oe.value.length,"primary-button-label":"Update",title:"Change Status",onClose:ne,onPrimaryClick:Lf},{default:Vn(()=>[q("p",Qee,[Xi("Are you sure that you want to change the status of "+Je(oe.value.length)+" Contribution"+Je(oe.value.length===1?"":"s")+" to ",1),q("strong",null,Je(ce.value.reduce((Ne,je)=>je.value===Ee.value?`${Ne}${je.label}`:Ne,"")),1),_e[5]||(_e[5]=Xi("?",-1))])]),_:1},8,["primary-button-disabled"]),Le(rw,{ref_key:"bulkNoteModal",ref:Q,class:"bulk-note-modal","cancel-button-label":"Cancel","content-width":"min(45rem, calc(100vw - 2rem))","primary-button-disabled":!(H.value.trim().length&&oe.value.length),"primary-button-label":"Add",title:`Add Note To ${oe.value.length} Contribution${oe.value.length===1?"":"s"}`,onClose:V,onPrimaryClick:pw},{default:Vn(()=>[Le(uo,{id:"bulk-note-textfield",modelValue:H.value,"onUpdate:modelValue":_e[3]||(_e[3]=Ne=>H.value=Ne),label:"Note","label-aria-description":"bulk note field label",placeholder:"Enter note text here...",rows:8,type:"textarea"},null,8,["modelValue"])]),_:1},8,["primary-button-disabled","title"])],512)}}}),[["styles",['[data-v-67562cab]{font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif}.ag-theme-alpine[data-v-67562cab]{--ag-accent-color: var(--color-primary-green);--ag-background-color: var(--color-white);--ag-checkbox-unchecked-border-color: var(--color-grey-900);--ag-cell-font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;--ag-header-background-color: var(--color-green-50);--ag-header-font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;--ag-row-hover-color: var(--color-green-50);--ag-selected-row-background-color: transparent}.bulk-status-modal p[data-v-67562cab]{margin:.5rem 0}.column-visibility-checkbox[data-v-67562cab]:checked{accent-color:var(--color-primary-green)}.columns-columns-icon[data-v-67562cab]{height:1rem;width:1.25rem}.columns-visibility-modal[data-v-67562cab]{border:.0625rem solid var(--color-green-400);border-radius:.25rem;left:auto;margin:.5rem 0 0;min-width:12rem;padding:0;position:absolute;right:0;transform:translateY(-.25rem);transition:opacity .2s ease,transform .2s ease,overlay .2s ease allow-discrete;top:100%;z-index:10}.columns-visibility-modal[open][data-v-67562cab]{opacity:1;transform:translateY(0)}.columns-visibility-modal ul[data-v-67562cab]{box-sizing:border-box;color:var(--color-grey-900);cursor:pointer;font-size:.875rem;list-style-type:none;margin:0;padding-left:0}.columns-visibility-modal ul li[data-v-67562cab]{padding:.5rem .75rem}.columns-visibility-modal ul li[data-v-67562cab]:hover{background:var(--color-green-50)}.contributions-export-modal[data-v-67562cab]{border:.0625rem solid var(--color-green-400);border-radius:.25rem;left:auto;margin:.5rem 0 0;min-width:10rem;opacity:0;padding:0;position:absolute;right:0;top:100%;transform:translateY(-.25rem);transition:opacity .2s ease,transform .2s ease,overlay .2s ease allow-discrete;width:max-content;z-index:10}.contributions-export-modal[open][data-v-67562cab]{opacity:1;transform:translateY(0)}.contributions-export-modal button[data-v-67562cab]{background:transparent;border:none;color:var(--color-grey-900);cursor:pointer;display:block;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:.875rem;padding:.5rem 1rem;text-align:left;white-space:nowrap;width:100%}.contributions-export-modal button[data-v-67562cab]:hover{background:var(--color-green-50)}.contributions-export-modal button svg[data-v-67562cab]{margin-right:.5rem}.contributions-export-modal button .export-excel-icon[data-v-67562cab]{color:var(--color-green)}.contributions-grid[data-v-67562cab]{width:100%}.contributions-table[data-v-67562cab]{border:.0625rem solid var(--color-green-200);border-radius:.25rem;display:flex;flex-direction:column;gap:0rem;height:100%;position:relative}.contributions-table-footer[data-v-67562cab]{align-items:center;background:var(--color-green-50);border-radius:0 0 .25rem .25rem;border-top:.0625rem solid var(--color-green-200);box-sizing:border-box;display:flex;font-size:.875rem;gap:1rem;height:3.5rem;justify-content:space-between;padding:0 .75rem}.contributions-table-footer .footer-count[data-v-67562cab],.contributions-table-footer .footer-left[data-v-67562cab],.contributions-table-footer .footer-right[data-v-67562cab]{align-items:center;color:var(--color-grey-900);display:flex;gap:.5rem}.contributions-table-footer .footer-left[data-v-67562cab]{padding-bottom:.5rem;padding-top:.5rem}.contributions-table-footer .footer-right[data-v-67562cab]{font-size:1rem;gap:.25rem}.contributions-table-footer .footer-right .pagination-ellipsis[data-v-67562cab],.contributions-table-footer .footer-right .pagination-nav[data-v-67562cab],.contributions-table-footer .footer-right .pagination-page[data-v-67562cab]{font-size:inherit;min-width:1.75rem}.contributions-table-footer .footer-right .pagination-nav[data-v-67562cab],.contributions-table-footer .footer-right .pagination-page[data-v-67562cab]{align-items:center;background:transparent;border:none;border-radius:0;color:var(--color-grey-900);cursor:pointer;display:inline-flex;height:3.5rem;justify-content:center;padding:0 .375rem}.contributions-table-footer .footer-right .pagination-nav[data-v-67562cab]:disabled{color:var(--color-grey-300);cursor:not-allowed;opacity:1}.contributions-table-footer .footer-right .pagination-page[data-v-67562cab]{border-top:.1875rem solid transparent;font-weight:500}.contributions-table-footer .footer-right .pagination-page.is-active[data-v-67562cab]{border-top-color:var(--color-brand-medium-600);color:var(--color-brand-medium-600)}.contributions-table-footer .footer-right .pagination-ellipsis[data-v-67562cab]{text-align:center}.contributions-table-toolbar[data-v-67562cab]{align-items:center;background:var(--color-green-50);border-bottom:.0625rem solid var(--color-green-200);box-sizing:border-box;color:var(--color-grey-900);display:flex;font-size:.875rem;gap:.75rem;height:4.5rem;justify-content:space-between;line-height:1.25;padding:.5rem .75rem}.contributions-table-toolbar .column-controls[data-v-67562cab],.contributions-table-toolbar .export-controls[data-v-67562cab]{position:relative}.contributions-table-toolbar-no-selection[data-v-67562cab]{height:3.5rem}.selection-count[data-v-67562cab]{white-space:nowrap}.toolbar-actions[data-v-67562cab]{align-items:center;display:flex;flex-shrink:0;gap:.75rem}.toolbar-icon[data-v-67562cab]{height:1.5rem;width:1.5rem}.toolbar-icon-button[data-v-67562cab]{align-items:center;background:transparent;border:none;border-radius:50%;color:var(--color-grey-500);cursor:pointer;display:inline-flex;flex-shrink:0;height:2rem;justify-content:center;min-width:2rem;padding:0}.toolbar-icon-button[data-v-67562cab]:disabled{cursor:not-allowed;opacity:.5}.toolbar-icon-button[data-v-67562cab]:hover:not(:disabled){background:var(--color-green-100)}.toolbar-icon-button.is-active[data-v-67562cab]{background:var(--color-green-100)}.toolbar-icon-button.is-active .toolbar-icon[data-v-67562cab]{color:var(--color-brand-medium-500)}.toolbar-left[data-v-67562cab]{align-items:center;display:flex;min-width:0}[data-v-67562cab] .ag-cell-focus:not(.ag-cell-range-selected):focus-within{border-color:transparent;border-right:.0625rem solid var(--color-green-200)}[data-v-67562cab] .ag-checkbox-input-wrapper:has(:focus-visible){box-shadow:var(--ag-focus-shadow)}[data-v-67562cab] .ag-checkbox-input-wrapper:where(:focus-within,:active){box-shadow:none}[data-v-67562cab] .ag-checkbox-input-wrapper.ag-checked{background:var(--color-primary-green)}[data-v-67562cab] .ag-filter-apply-panel .ag-button:last-child{background:var(--color-primary-green);color:#fff}[data-v-67562cab] .ag-header-cell .ag-sort-indicator-container{margin:.2rem}[data-v-67562cab] .ag-root-wrapper{border:none}[data-v-67562cab] .ag-theme-alpine,[data-v-67562cab] .ag-theme-alpine .ag-root-wrapper{border-radius:0}[data-v-67562cab] .ag-tooltip{max-width:24rem;white-space:pre-wrap;word-break:break-word}[data-v-67562cab] .grid-filter-icon{color:var(--color-grey-500);font-size:.875rem;height:1em;width:1em}[data-v-67562cab] .grid-filter-icon:hover{color:var(--color-primary-green)}[data-v-67562cab]::backdrop{background:transparent}@starting-style{.columns-export-modal[open][data-v-67562cab],.columns-visibility-modal[open][data-v-67562cab]{opacity:0;transform:translateY(-.25rem)}}']],["__scopeId","data-v-67562cab"]]),Yee={class:"contribution-search-content","aria-description":"contribution search page content"},Zee={key:0,class:"contribution-search-initial","aria-description":"initial contribution search form"},Jee=["aria-expanded","onKeydown"],Xee={class:"criteria-accordion-trigger","aria-description":"modify search accordion label"},ete={key:0,id:"criteria-accordion-panel",class:"criteria-accordion-panel","aria-labelledby":"criteria-accordion-trigger","aria-description":"modify search form panel"},tte=Ht(Ct({__name:"ContributionSearch",props:{user:{type:String},company:{type:String},stack:{type:String},username:{type:String}},setup(e){const t=we({}),n=we(["id","employeeStatus","dateDetected","status","reconciliationStatus","preclearance","approvalDate","approvedAmount","lastUpdated","lastUpdatedBy","notes","tags","groups"]),i=we(!1),o=we(null),r=we(!1),s=we(0),a=we(!1),l=we(0),u=we(null),h=we(null),f=()=>{r.value=!1},g=()=>{r.value=!r.value},m=b=>{a.value=!0,l.value=0,t.value=b,i.value=!0},v=b=>{a.value=!0,l.value=0,t.value=b,f()},w=()=>{a.value||(i.value=!1,t.value={},a.value=!1,l.value=0,f(),s.value+=1)};return(b,y)=>(ae(),rn(sw,{title:"Contribution Search",user:e.user,company:e.company,stack:e.stack,username:e.username,"columns-state":o.value,"sort-column":u.value,"sort-order":h.value,"show-export":!1,"disable-export":l.value===0},{content:Vn(()=>[q("section",Yee,[i.value?(ae(),ve("section",{key:1,class:"criteria-accordion","aria-description":"search criteria accordion",onKeydown:Xt(f,["esc"])},[q("div",{id:"criteria-accordion-trigger",class:"criteria-accordion-header",role:"button",tabindex:"0","aria-label":"Modify Search","aria-description":"modify search accordion header","aria-expanded":r.value,"aria-controls":"criteria-accordion-panel",onClick:g,onKeydown:[Xt(xt(g,["prevent"]),["enter"]),Xt(xt(g,["prevent"]),["space"])]},[q("span",Xee,[q("i",{class:ft(["fa-solid fa-chevron-down criteria-accordion-chevron",{"criteria-accordion-chevron-open":r.value}]),"aria-hidden":"true"},null,2),y[5]||(y[5]=Xi(" Modify Search ",-1))]),Le(ds,{label:"New Search",onClick:xt(w,["stop"]),disabled:a.value},null,8,["disabled"])],40,Jee),Le(Rd,{name:"criteria-accordion"},{default:Vn(()=>[r.value?(ae(),ve("section",ete,[Le(HD,{"hide-border":"","contribution-search-presets":t.value,onSearch:v},null,8,["contribution-search-presets"])])):gt("",!0)]),_:1})],32)):(ae(),ve("section",Zee,[(ae(),rn(HD,{key:s.value,loading:a.value,onSearch:m},null,8,["loading"]))])),i.value?(ae(),rn(zD,{key:2,user:e.user,company:e.company,stack:e.stack,username:e.username,page:"contribution-search",match:!1,"disabled-columns":n.value,presets:t.value,"disable-selection":"","columns-state":o.value,"onUpdate:columnsState":y[0]||(y[0]=R=>o.value=R),loading:a.value,"onUpdate:loading":y[1]||(y[1]=R=>a.value=R),"results-total":l.value,"onUpdate:resultsTotal":y[2]||(y[2]=R=>l.value=R),"sort-column":u.value,"onUpdate:sortColumn":y[3]||(y[3]=R=>u.value=R),"sort-order":h.value,"onUpdate:sortOrder":y[4]||(y[4]=R=>h.value=R)},null,8,["user","company","stack","username","disabled-columns","presets","columns-state","loading","results-total","sort-column","sort-order"])):gt("",!0)])]),_:1},8,["user","company","stack","username","columns-state","sort-column","sort-order","disable-export"]))}}),[["styles",[".contribution-search-content[data-v-f54a89a0]{display:flex;flex-direction:column;gap:1.5rem;min-height:0}.criteria-accordion[data-v-f54a89a0]{background:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.25rem;width:100%}.criteria-accordion-chevron[data-v-f54a89a0]{font-size:.75rem;opacity:.85;transform:rotate(0);transition:transform .2s ease}.criteria-accordion-chevron-open[data-v-f54a89a0]{transform:rotate(180deg)}.criteria-accordion-enter-active[data-v-f54a89a0],.criteria-accordion-leave-active[data-v-f54a89a0]{overflow:hidden;transition:max-height .25s ease,opacity .2s ease}.criteria-accordion-enter-from[data-v-f54a89a0],.criteria-accordion-leave-to[data-v-f54a89a0]{max-height:0;opacity:0}.criteria-accordion-enter-to[data-v-f54a89a0],.criteria-accordion-leave-from[data-v-f54a89a0]{max-height:80rem;opacity:1}.criteria-accordion-header[data-v-f54a89a0]{align-items:center;box-sizing:border-box;cursor:pointer;display:flex;height:3.5rem;justify-content:space-between;padding:1rem;width:100%}.criteria-accordion-header[data-v-f54a89a0]:hover{background:var(--color-green-50)}.criteria-accordion-panel[data-v-f54a89a0]{border-top:.0625rem solid var(--color-primary-grey)}.criteria-accordion-trigger[data-v-f54a89a0]{align-items:center;color:var(--color-grey-900);display:inline-flex;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:1rem;gap:.5rem;pointer-events:none}"]],["__scopeId","data-v-f54a89a0"]]),nte={class:"body"},ite=Ct({__name:"ContributionSearch.ce",props:{user:{type:String},company:{type:String},stack:{type:String},username:{type:String}},setup(e){return(t,n)=>(ae(),ve("div",nte,[Le(tte,{user:e.user,company:e.company,stack:e.stack,username:e.username},null,8,["user","company","stack","username"])]))}}),UD=".ag-cf9a-actions{display:flex;gap:.625rem;padding-top:.75rem;width:100%}.ag-cf9a-button{width:100%}.ag-cf9a-close-button{align-items:center;background:transparent;border:0;border-radius:.25rem;color:var(--color-grey-700);cursor:pointer;display:flex;font-family:inherit;font-size:1rem;font-weight:500;height:1.5rem;justify-content:center;padding:0;transition:color .2s ease;width:1.5rem}.ag-cf9a-close-button:hover{background:var(--color-green-50)}.ag-cf9a-close-icon{height:.75rem;width:.75rem}.ag-cf9a-condition-container{display:flex;flex-direction:column;gap:.75rem}.ag-cf9a-currency-cell{font-weight:600}.ag-cf9a-filter{background:var(--color-white);border:.0625rem solid var(--color-green-400);border-radius:.5rem;box-shadow:0 .125rem .5rem #0000001f;box-sizing:border-box;display:flex;flex-direction:column;font-family:Poppins,sans-serif;padding:1rem;width:21.25rem}.ag-cf9a-helper-text{color:var(--color-grey-900);font-size:.875rem;margin:0 0 .75rem}.ag-cf9a-title h3{color:var(--color-grey-900);font-size:1rem;font-weight:500;margin:0}.ag-cf9a-title-row{align-items:center;border-bottom:.0625rem solid var(--color-primary-grey);display:flex;justify-content:space-between;margin-bottom:1rem;padding-bottom:1rem}.contributions-table .ag-menu{border:none;border-radius:.5rem}",ote=Ht(ite,[["styles",[lw,UD,".body>*{width:100%}"]]]),rte=Ct({__name:"DetectedContributions",props:{user:{type:String},company:{type:String},stack:{type:String},username:{type:String}},setup(e){const t=we(["reconciliationStatus","preclearance","approvalDate","approvedAmount"]),n=we(null),i=we(0),o=we(null),r=we(null);return(s,a)=>(ae(),rn(sw,{title:"Detected Contributions",page:"detected-contributions",user:e.user,company:e.company,stack:e.stack,username:e.username,"columns-state":n.value,"sort-column":o.value,"sort-order":r.value,"show-export":!1,"disable-export":i.value===0},{content:Vn(()=>[Le(zD,{user:e.user,company:e.company,stack:e.stack,username:e.username,page:"detected-contributions",match:!0,"disabled-columns":t.value,"columns-state":n.value,"onUpdate:columnsState":a[0]||(a[0]=l=>n.value=l),"results-total":i.value,"onUpdate:resultsTotal":a[1]||(a[1]=l=>i.value=l),"sort-column":o.value,"onUpdate:sortColumn":a[2]||(a[2]=l=>o.value=l),"sort-order":r.value,"onUpdate:sortOrder":a[3]||(a[3]=l=>r.value=l)},null,8,["user","company","stack","username","disabled-columns","columns-state","results-total","sort-column","sort-order"])]),_:1},8,["user","company","stack","username","columns-state","sort-column","sort-order","disable-export"]))}}),ste={class:"body"},ate=Ht(Ct({__name:"DetectedContributions.ce",props:{user:{type:String},company:{type:String},stack:{type:String},username:{type:String}},setup(e){return(t,n)=>(ae(),ve("div",ste,[Le(rte,{user:e.user,company:e.company,stack:e.stack,username:e.username},null,8,["user","company","stack","username"])]))}}),[["styles",[lw,UD,".body>*{width:100%}"]]]);sO.registerModules([LU]),wl.add(oq),wl.add(sq),wl.add(nq),wl.add(XK),wl.add(aq),wl.add(rq);const lte=lp(MJ,{configureApp(e){e.component("font-awesome-icon",PC),EC(e,{store:us})}}),cte=lp(ote,{configureApp(e){e.component("font-awesome-icon",PC),EC(e,{store:us})}}),ute=lp(ate,{configureApp(e){e.component("font-awesome-icon",PC),EC(e,{store:us})}});customElements.define("contribution-details",lte),customElements.define("contribution-search",cte),customElements.define("detected-contributions",ute)}));
|
|
667
|
+
`):void 0},WD=e=>{if(Re.isNil(e))return"";const t=Number(e);return Number.isNaN(t)?"":t.toLocaleString("en-US",{currency:"USD",style:"currency"})},fw=[{headerName:"Details",field:"id",sortable:!1,filter:!1,resizable:!0,width:120,suppressHeaderMenuButton:!0,cellRenderer:e=>{const t=e.data?.id;return t?`<a id="contribution-details-link-${t}" class="contribution-details-link" style="color:var(--color-primary-green)" href="/PoliticalContributionVerification/Contribution/${t}">View</a>`:""}},{field:"contributor",headerName:"Contributor",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"employer",headerName:"Employer",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"employeeStatus",headerName:"Employee Status",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"occupation",headerName:"Occupation",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"address",headerName:"Address",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"state",headerName:"State",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"zipCode",headerName:"Zip Code",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"date",headerName:"Date",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:kf},{field:"dateDetected",headerName:"Date Detected",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:kf},{field:"amount",headerName:"Amount",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:VD,valueFormatter:e=>WD(e.value),cellClass:"ag-cf9a-currency-cell"},{field:"recipient",headerName:"Recipient",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"status",headerName:"Status",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"reconciliationStatus",headerName:"Reconciliation Status",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"preclearance",headerName:"Preclearance",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn,cellRenderer:e=>{const t=e.data?.preclearance;return t?`<a id="contribution-preclearance-link-${t}" class="contribution-preclearance-link" style="color:var(--color-primary-green)" href="/preclearance/${t}">${t}</a>`:""}},{field:"approvalDate",headerName:"Approval Date",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:kf},{field:"approvedAmount",headerName:"Approved Amount",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:VD,valueFormatter:e=>WD(e.value),cellClass:"ag-cf9a-currency-cell"},{field:"amended",headerName:"Amended",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"jurisdiction",headerName:"Jurisdiction",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"lastUpdated",headerName:"Last Updated",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:kf},{field:"lastUpdatedBy",headerName:"Last Updated By",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn},{field:"notes",headerName:"Notes",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn,sortable:!1,tooltipValueGetter:hw},{field:"tags",headerName:"Tags",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn,tooltipValueGetter:hw},{field:"groups",headerName:"Groups",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn,tooltipValueGetter:hw},{field:"sources",headerName:"Source",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Cn}],Fee={comparator:()=>0,filter:!0,flex:1,floatingFilter:!1,minWidth:180,resizable:!0,sortable:!0},Pee={maxWidth:56,minWidth:56,pinned:"left",resizable:!1,sortable:!1,suppressHeaderMenuButton:!0,width:56},Eee={mode:"multiRow",checkboxes:!0,headerCheckbox:!0,enableClickSelection:!1,selectAll:"all"},Dee={class:"toolbar-left","aria-description":"selection summary"},Tee={key:0,class:"selection-count","aria-description":"container for number of selected rows"},Aee={class:"toolbar-actions","aria-description":"table toolbar actions"},Iee={ref:"bulkStatusSelect",class:"bulk-status-select-wrap","aria-description":"container for bulk status select"},Mee={ref:"bulkNoteButton",class:"bulk-note-button-wrap","aria-description":"container for add notes button"},kee={class:"export-controls","aria-description":"container for export controls"},Lee=["disabled"],Oee={class:"column-controls","aria-description":"container for column controls"},_ee={"aria-description":"container for column visibility modal content"},Nee=["id","name","checked","onClick"],Bee=["for"],Hee={class:"contributions-table-footer","aria-description":"container for pagination controls",role:"footer"},Gee={class:"footer-left","aria-description":"container for page size controls"},Vee={class:"footer-count","aria-description":"container for record count data"},Wee={class:"footer-right","aria-label":"Pagination","aria-description":"container for page navigation controls"},zee=["disabled"],Uee=["disabled"],$ee={key:0,class:"pagination-ellipsis","aria-hidden":"true"},jee=["aria-current","aria-label","aria-description","onClick"],Kee=["disabled"],qee=["disabled"],Qee={"aria-description":"bulk status confirmation message"},zD=Ht(Ct({__name:"ContributionsTable",props:Jo({disabledColumns:{default:()=>[],type:Array},disableSelection:{type:Boolean,default:!1},match:{type:Boolean,default:!0},page:{type:String},presets:{default:()=>({}),type:Object},user:{type:String},company:{type:String},stack:{type:String},username:{type:String}},{columnsState:{default:()=>[]},columnsStateModifiers:{},loading:{type:Boolean,default:!1},loadingModifiers:{},resultsTotal:{default:0},resultsTotalModifiers:{},sortColumn:{default:null},sortColumnModifiers:{},sortOrder:{default:null},sortOrderModifiers:{}}),emits:["update:columnsState","update:loading","update:resultsTotal","update:sortColumn","update:sortOrder"],setup(e){const t=fi(e,"columnsState"),n=fi(e,"loading"),i=fi(e,"resultsTotal"),o=fi(e,"sortColumn"),r=fi(e,"sortOrder"),s=EY(),a=vD(xe=>xe.ContributionSearchReducer?.[e.page]),{trigger:l}=yJ(),{trigger:u,isLoading:h}=SD(),{trigger:f}=RJ(),{trigger:g,isLoading:m}=BX(),{data:v}=ow(he(()=>({user:e.user,company:e.company,stack:e.stack,username:e.username}))),w=we(null),b=he(()=>fw.reduce((xe,_e)=>{const lt=_e.field;if(e.disabledColumns.includes(lt)||!k.value[lt])return xe;let Ne=!1;return e.presets&&!Re.isEmpty(e.presets)&&(Ne=!!e.presets[lt]?.query?.length),[...xe,{..._e,filter:Ne?!1:_e.filter}]},[])),y=we(Fee),R={filter:QP(eq,{classes:["grid-filter-icon"]}).html[0]??""},S=we(null),P=we([]),F=we(null),A=we(null),k=we(fw.reduce((xe,_e)=>e.disabledColumns.includes(_e.field)?xe:{...xe,[_e.field]:!0},{})),L=we(!1),N=he(()=>i.value===0?0:Math.min(E.value*M.value,i.value)),M=we(100),E=we(1),I=[10,25,50,100],B=he(()=>i.value===0?0:(E.value-1)*M.value+1),W=we(1),X=he(()=>{const xe=W.value,_e=E.value;if(xe<=7)return Array.from({length:xe},(kt,dn)=>dn+1);const lt=new Set([1,xe]);let Ne=Math.max(1,_e-2);const je=Math.min(xe,Ne+4);Ne=Math.max(1,je-4);for(let kt=Ne;kt<=je;kt+=1)lt.add(kt);const yn=[...lt].sort((kt,dn)=>kt-dn),fo=[];return yn.forEach((kt,dn)=>{const Go=yn[dn-1];dn>0&&Go!==void 0&&kt-Go>1&&fo.push("ellipsis"),fo.push(kt)}),fo});let pe;const fe=we(Eee),me=he(()=>oe.value.length),De=we(Pee),oe=we([]),H=we(""),Q=we(null),j=we(!1),ce=he(()=>(v.value??[]).map(xe=>({label:xe.name,value:xe.id}))),Ee=we(null),Ie=we(null),Fe=we(!1),ke=we(null),$e=we(null),Ve=we(!1),bt=he(()=>i.value>0&&!!a.value),O=()=>{j.value||(Q.value?.open(),j.value=!0)},V=()=>{H.value="",j.value=!1},U=xe=>{const _e=Re.isNil(xe)||xe===""?null:Number(xe);Ee.value=_e===null||Number.isNaN(_e)?null:_e,!Fe.value&&!Re.isNil(Ee.value)&&(Ie.value?.open(),Fe.value=!0)},ne=()=>{Ee.value=null,Fe.value=!1},te=xe=>{if(!xe.finished||!w.value)return;const _e=xe.api.getAllDisplayedColumns().map(lt=>lt.getColId()).filter(lt=>k.value[lt]);t.value=_e},Z=xe=>{const _e=xe.target;Ve.value&&!ke.value?.contains(_e)&&!$e.value?.contains(_e)&&(ke.value?.close(),Ve.value=!1),L.value&&!A.value?.contains(_e)&&!F.value?.contains(_e)&&(A.value?.close(),L.value=!1)};Ir(()=>document.addEventListener("pointerdown",Z)),Es(()=>document.removeEventListener("pointerdown",Z));const ye=xe=>{xe.stopPropagation(),L.value?(xe.target===A.value||xe.currentTarget===F.value)&&(A.value?.close(),L.value=!1):(A.value?.show(),L.value=!0)},Ce=(xe="xlsx")=>{!a.value||!bt.value||(ke.value?.close(),Ve.value=!1,console.log("Exporting contributions with subsequent search body:"),console.log(a.value),u({user:e.user,company:e.company,stack:e.stack,username:e.username,format:xe,columnsState:t.value,sortColumn:o.value,sortOrder:r.value,match:e.match,body:a.value}))},de=xe=>{xe.stopPropagation(),!(!bt.value||h.value)&&(Ve.value?(xe.target===ke.value||xe.currentTarget===$e.value)&&(ke.value?.close(),Ve.value=!1):(ke.value?.show(),Ve.value=!0))},ie=async()=>{E.value=1,await yt()},Me=async()=>{E.value<=1||(E.value=1,await yt())},Te=async()=>{E.value<=1||(E.value-=1,await yt())},He=async()=>{E.value>=W.value||(E.value+=1,await yt())},ze=async()=>{E.value>=W.value||(E.value=W.value,await yt())},Xe=async xe=>{xe<1||xe>W.value||xe===E.value||(E.value=xe,await yt())},rt=xe=>xe?.conditions?.length?xe.conditions:xe?.condition1||xe?.condition2?[xe.condition1,xe.condition2].filter(_e=>!Re.isNil(_e)):[xe],et=xe=>(_e,lt)=>{const Ne=rt(lt).reduce(xe,[]),je={page:e.page,filterName:_e},yn=WX(lt?.operator,Ne);s(mD({...je,conjunction:yn})),Ne.forEach(fo=>s(gD({...je,query:fo})))},$t=(xe,_e)=>{et((Ne,je)=>Re.isEmpty(je?.dateFrom)?Ne:je.type==="inRange"&&!Re.isEmpty(je.dateFrom)&&!Re.isEmpty(je.dateTo)?[...Ne,Qn("greaterThanOrEqual",Re.isDate(je.dateFrom)?je.dateFrom.toISOString().slice(0,10):je.dateFrom),Qn("lessThanOrEqual",Re.isDate(je.dateTo)?je.dateTo.toISOString().slice(0,10):je.dateTo)]:[...Ne,Qn(je.type,Re.toString(je.dateFrom))])(xe,_e)},jt=(xe,_e)=>{et((Ne,je)=>Re.isNil(je?.filter)?Ne:je.type==="inRange"&&!Re.isNil(je.filter)&&!Re.isNil(je.filterTo)?[...Ne,Qn("greaterThanOrEqual",Re.toNumber(je.filter)),Qn("lessThanOrEqual",Re.toNumber(je.filterTo))]:[...Ne,Qn(je.type,Re.toNumber(je.filter))])(xe,_e)},ln=(xe,_e)=>{et((Ne,je)=>Re.isEmpty(je?.filter)?Ne:[...Ne,Qn(je.type,Re.toString(je.filter))])(xe,_e)},wn=()=>{Re.entries(e.presets).forEach(([xe,_e])=>{const lt=_e.query;if(!(Re.isArray(lt)&<.every(yn=>Re.isObject(yn)&&Re.has(yn,"comparator")&&Re.has(yn,"value"))))return;const Ne=!lt?.length||lt.length<2?sn.NULL:_e.conjunction;if(Ne!==sn.NULL&&Ne!==sn.AND&&Ne!==sn.OR)return;const je={page:e.page,filterName:xe};s(pD({...je})),s(mD({...je,conjunction:Ne})),lt.forEach(yn=>s(gD({...je,query:yn})))})},yi=xe=>{const _e=new Set(["date","dateDetected","approvalDate","lastUpdated"]),lt=new Set(["amount","approvalAmount"]),Ne=new Set(["contributor","employer","employeeStatus","occupation","address","state","zipCode","recipient","status","reconciliationStatus","preclearance","amended","jurisdiction","lastUpdatedBy","notes","tags","groups","sources"]),je=[...Array.from(_e),...Array.from(lt),...Array.from(Ne)],yn=Re.entries(e.presets).reduce((kt,[dn,Go])=>Go?.query?.length?[...kt,dn]:kt,[]),fo=Re.difference(je,yn);wn(),fo.forEach(kt=>{const dn={page:e.page,filterName:kt};s(pD({...dn}))}),Re.entries(xe).forEach(([kt,dn])=>{_e.has(kt)?$t(kt,dn):lt.has(kt)?jt(kt,dn):Ne.has(kt)&&ln(kt,dn)})};function ho(){return w.value?w.value.getColumnState().filter(xe=>xe.sort).sort((xe,_e)=>(xe.sortIndex??0)-(_e.sortIndex??0)).map(xe=>({column:xe.colId,direction:xe.sort})):[]}const yt=async()=>{if(!e.user||!e.company||!e.stack||!e.username)return;const xe=w.value?.getFilterModel()??{};yi(xe);const lt=ho()[0],Ne=Re.entries(a.value).reduce((yn,[fo,kt])=>{const dn=kt.query.filter(va=>(Re.isString(va.value)&&!Re.isEmpty(va.value)||!Re.isNil(va.value))&&va.value!=="undefined"&&va.value!=="null"),Go=dn?.length?kt.conjunction:sn.NULL;return{...yn,[fo]:{conjunction:Go,query:dn}}},{}),je=await g({user:e.user,company:e.company,stack:e.stack,username:e.username,page:E.value,limit:M.value,sortColumn:lt?.column,sortOrder:lt?.direction,match:e.match,body:Ne});P.value=je?.results??[],E.value=je?.page??1,M.value=je?.limit??M.value,i.value=je?.total??0,W.value=je?.totalPages??1,oe.value=[]},bn=()=>{window.clearTimeout(pe),pe=window.setTimeout(async()=>{E.value=1,await yt()},500)},hs=async()=>{const _e=ho()[0];o.value=_e?.column??null,r.value=_e?.direction??null,E.value=1,await yt()},Rl=async xe=>{w.value=xe.api,t.value=xe.api.getAllDisplayedColumns().map(_e=>_e.getColId()).filter(_e=>k.value[_e]),await yt()},gw=xe=>{oe.value=xe.api.getSelectedRows()},pw=async()=>{const xe=H.value.trim().replace(/ +/g," ");if(!xe.length)return;const _e={contributions:oe.value.map(lt=>lt.id),note:xe,type:"user"};await l({user:e.user,company:e.company,stack:e.stack,username:e.username,body:_e}),Q.value?.close(),H.value="",await yt()},Lf=async()=>{if(Re.isNil(Ee.value))return;const xe={contributions:oe.value.map(_e=>_e.id),status:Ee.value};await f({user:e.user,company:e.company,stack:e.stack,username:e.username,body:xe}),Ie.value?.close(),await yt()};return Jt(m,xe=>{n.value=!!xe}),Jt(()=>[e.match,e.presets,e.user,e.company,e.stack,e.username],async()=>{w.value&&(E.value=1,await yt())}),Jt(k,xe=>{if(!w.value)return;const _e=w.value.getAllDisplayedColumns().map(lt=>lt.getColId()).filter(lt=>xe[lt]);t.value=_e}),(xe,_e)=>{const lt=Ds("font-awesome-icon");return ae(),ve("div",{ref_key:"popupParent",ref:S,class:"contributions-table","aria-description":"container for table and related controls"},[q("div",{class:ft(["contributions-table-toolbar",{"contributions-table-toolbar-no-selection":e.disableSelection}]),"aria-description":"container for bulk and column controls"},[q("div",Dee,[e.disableSelection?gt("",!0):(ae(),ve("span",Tee,Je(me.value)+" selected",1))]),q("div",Aee,[oe.value.length?(ae(),ve(wt,{key:0},[q("span",Iee,[Le(Pu,{id:"bulk-status-select",modelValue:Ee.value,"onUpdate:modelValue":_e[0]||(_e[0]=Ne=>Ee.value=Ne),inline:"",label:"Change Status",options:ce.value,placeholder:"Select an option",size:"sm",onChange:U},null,8,["modelValue","options"])],512),q("span",Mee,[Le(ds,{label:"Add Notes","aria-description":"add notes button",onClick:O})],512)],64)):gt("",!0),q("div",kee,[q("button",{type:"button",class:ft(["toolbar-icon-button",{"is-active":Ve.value}]),ref_key:"exportModalButton",ref:$e,disabled:ni(h)||!bt.value,"aria-label":"Export","aria-description":"export button",onClick:xt(de,["prevent"])},[Le(lee,{class:"toolbar-icon"})],10,Lee),q("dialog",{class:"contributions-export-modal",ref_key:"exportModal",ref:ke,onClick:de},[q("button",{type:"button",onClick:_e[1]||(_e[1]=xt(Ne=>Ce("xlsx"),["stop"]))}," Export to Excel ")],512)]),q("div",Oee,[q("button",{type:"button",class:ft(["toolbar-icon-button",{"is-active":L.value}]),ref_key:"columnsVisibilityButton",ref:F,"aria-label":"Toggle Columns","aria-description":"toggle columns button",onClick:ye},[Le(lt,{class:"toolbar-icon",icon:["fas","ellipsis-h"],"aria-hidden":"true"})],2),q("dialog",{ref_key:"columnsVisibilityModal",ref:A,class:"columns-visibility-modal",onClick:ye},[q("ul",_ee,[(ae(!0),ve(wt,null,Ti(ni(fw).filter(Ne=>!e.disabledColumns.includes(Ne.field)),Ne=>(ae(),ve("li",{key:Ne.field},[q("input",{id:`column-visibility-${Ne.field}`,class:"column-visibility-checkbox",name:Ne.field,type:"checkbox",checked:k.value?.[Ne.field],onClick:je=>k.value={...k.value,[Ne.field]:!k.value[Ne.field]}},null,8,Nee),_e[4]||(_e[4]=Xi(" ",-1)),q("label",{for:`column-visibility-${Ne.field}`},Je(Ne.headerName),9,Bee)]))),128))])],512)])])],2),Le(ni(ree),{class:"ag-theme-alpine contributions-grid",style:{height:"38.75rem",width:"100%"},"aria-description":"contributions data grid",columnDefs:b.value,defaultColDef:y.value,enableFilterHandlers:!0,icons:R,loading:ni(m),loadingOverlayComponent:aw,popupParent:S.value??void 0,rowData:P.value,rowSelection:e.disableSelection?void 0:fe.value,selectionColumnDef:e.disableSelection?void 0:De.value,tooltipHideDelay:2e4,tooltipInteraction:!0,tooltipShowDelay:500,onColumnMoved:te,onGridReady:Rl,onFilterChanged:bn,onSortChanged:hs,onSelectionChanged:gw},null,8,["columnDefs","defaultColDef","loading","popupParent","rowData","rowSelection","selectionColumnDef"]),q("div",Hee,[q("div",Gee,[Le(Pu,{id:"contributions-table-page-size",modelValue:M.value,"onUpdate:modelValue":_e[2]||(_e[2]=Ne=>M.value=Ne),direction:"up",inline:"",label:"Items per page:",options:I,size:"sm",onChange:ie},null,8,["modelValue"]),q("div",Vee,Je(B.value)+" - "+Je(N.value)+" of "+Je(i.value)+" items ",1)]),q("nav",Wee,[q("button",{type:"button",class:"pagination-nav",disabled:E.value<=1,onClick:Me,"aria-label":"Go to first page","aria-description":"go to first page"},"|<",8,zee),q("button",{type:"button",class:"pagination-nav",disabled:E.value<=1,onClick:Te,"aria-label":"Go to previous page","aria-description":"go to previous page"},"<",8,Uee),(ae(!0),ve(wt,null,Ti(X.value,(Ne,je)=>(ae(),ve(wt,{key:`page-item-${Ne}-${je}`},[Ne==="ellipsis"?(ae(),ve("span",$ee,"...")):(ae(),ve("button",{key:1,type:"button",class:ft(["pagination-page",{"is-active":Ne===E.value}]),"aria-current":Ne===E.value?"page":void 0,"aria-label":`Go to page ${Ne}`,"aria-description":`go to page ${Ne}`,onClick:yn=>Xe(Ne)},Je(Ne),11,jee))],64))),128)),q("button",{type:"button",class:"pagination-nav",disabled:E.value>=W.value,onClick:He,"aria-label":"Go to next page","aria-description":"go to next page"},">",8,Kee),q("button",{type:"button",class:"pagination-nav",disabled:E.value>=W.value,onClick:ze,"aria-label":"Go to last page","aria-description":"go to last page"},">|",8,qee)])]),Le(rw,{ref_key:"bulkStatusModal",ref:Ie,class:"bulk-status-modal","cancel-button-label":"Cancel","content-width":"min(45rem, calc(100vw - 2rem))","primary-button-disabled":!oe.value.length,"primary-button-label":"Update",title:"Change Status",onClose:ne,onPrimaryClick:Lf},{default:Vn(()=>[q("p",Qee,[Xi("Are you sure that you want to change the status of "+Je(oe.value.length)+" Contribution"+Je(oe.value.length===1?"":"s")+" to ",1),q("strong",null,Je(ce.value.reduce((Ne,je)=>je.value===Ee.value?`${Ne}${je.label}`:Ne,"")),1),_e[5]||(_e[5]=Xi("?",-1))])]),_:1},8,["primary-button-disabled"]),Le(rw,{ref_key:"bulkNoteModal",ref:Q,class:"bulk-note-modal","cancel-button-label":"Cancel","content-width":"min(45rem, calc(100vw - 2rem))","primary-button-disabled":!(H.value.trim().length&&oe.value.length),"primary-button-label":"Add",title:`Add Note To ${oe.value.length} Contribution${oe.value.length===1?"":"s"}`,onClose:V,onPrimaryClick:pw},{default:Vn(()=>[Le(uo,{id:"bulk-note-textfield",modelValue:H.value,"onUpdate:modelValue":_e[3]||(_e[3]=Ne=>H.value=Ne),label:"Note","label-aria-description":"bulk note field label",placeholder:"Enter note text here...",rows:8,type:"textarea"},null,8,["modelValue"])]),_:1},8,["primary-button-disabled","title"])],512)}}}),[["styles",['[data-v-e3810045]{font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif}.ag-theme-alpine[data-v-e3810045]{--ag-accent-color: var(--color-primary-green);--ag-background-color: var(--color-white);--ag-checkbox-unchecked-border-color: var(--color-grey-900);--ag-cell-font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;--ag-header-background-color: var(--color-green-50);--ag-header-font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;--ag-row-hover-color: var(--color-green-50);--ag-selected-row-background-color: transparent}.bulk-status-modal p[data-v-e3810045]{margin:.5rem 0}.column-visibility-checkbox[data-v-e3810045]:checked{accent-color:var(--color-primary-green)}.columns-columns-icon[data-v-e3810045]{height:1rem;width:1.25rem}.columns-visibility-modal[data-v-e3810045]{border:.0625rem solid var(--color-green-400);border-radius:.25rem;left:auto;margin:.5rem 0 0;min-width:12rem;padding:0;position:absolute;right:0;transform:translateY(-.25rem);transition:opacity .2s ease,transform .2s ease,overlay .2s ease allow-discrete;top:100%;z-index:10}.columns-visibility-modal[open][data-v-e3810045]{opacity:1;transform:translateY(0)}.columns-visibility-modal ul[data-v-e3810045]{box-sizing:border-box;color:var(--color-grey-900);cursor:pointer;font-size:.875rem;list-style-type:none;margin:0;padding-left:0}.columns-visibility-modal ul li[data-v-e3810045]{padding:.5rem .75rem}.columns-visibility-modal ul li[data-v-e3810045]:hover{background:var(--color-green-50)}.contributions-export-modal[data-v-e3810045]{border:.0625rem solid var(--color-green-400);border-radius:.25rem;left:auto;margin:.5rem 0 0;min-width:10rem;opacity:0;padding:0;position:absolute;right:0;top:100%;transform:translateY(-.25rem);transition:opacity .2s ease,transform .2s ease,overlay .2s ease allow-discrete;width:max-content;z-index:10}.contributions-export-modal[open][data-v-e3810045]{opacity:1;transform:translateY(0)}.contributions-export-modal button[data-v-e3810045]{background:transparent;border:none;color:var(--color-grey-900);cursor:pointer;display:block;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:.875rem;padding:.5rem 1rem;text-align:left;white-space:nowrap;width:100%}.contributions-export-modal button[data-v-e3810045]:hover{background:var(--color-green-50)}.contributions-export-modal button svg[data-v-e3810045]{margin-right:.5rem}.contributions-export-modal button .export-excel-icon[data-v-e3810045]{color:var(--color-green)}.contributions-grid[data-v-e3810045]{width:100%}.contributions-table[data-v-e3810045]{border:.0625rem solid var(--color-green-200);border-radius:.25rem;display:flex;flex-direction:column;gap:0rem;height:100%;position:relative}.contributions-table-footer[data-v-e3810045]{align-items:center;background:var(--color-green-50);border-radius:0 0 .25rem .25rem;border-top:.0625rem solid var(--color-green-200);box-sizing:border-box;display:flex;font-size:.875rem;gap:1rem;height:3.5rem;justify-content:space-between;padding:0 .75rem}.contributions-table-footer .footer-count[data-v-e3810045],.contributions-table-footer .footer-left[data-v-e3810045],.contributions-table-footer .footer-right[data-v-e3810045]{align-items:center;color:var(--color-grey-900);display:flex;gap:.5rem}.contributions-table-footer .footer-left[data-v-e3810045]{padding-bottom:.5rem;padding-top:.5rem}.contributions-table-footer .footer-right[data-v-e3810045]{font-size:1rem;gap:.25rem}.contributions-table-footer .footer-right .pagination-ellipsis[data-v-e3810045],.contributions-table-footer .footer-right .pagination-nav[data-v-e3810045],.contributions-table-footer .footer-right .pagination-page[data-v-e3810045]{font-size:inherit;min-width:1.75rem}.contributions-table-footer .footer-right .pagination-nav[data-v-e3810045],.contributions-table-footer .footer-right .pagination-page[data-v-e3810045]{align-items:center;background:transparent;border:none;border-radius:0;color:var(--color-grey-900);cursor:pointer;display:inline-flex;height:3.5rem;justify-content:center;padding:0 .375rem}.contributions-table-footer .footer-right .pagination-nav[data-v-e3810045]:disabled{color:var(--color-grey-300);cursor:not-allowed;opacity:1}.contributions-table-footer .footer-right .pagination-page[data-v-e3810045]{border-top:.1875rem solid transparent;font-weight:500}.contributions-table-footer .footer-right .pagination-page.is-active[data-v-e3810045]{border-top-color:var(--color-brand-medium-600);color:var(--color-brand-medium-600)}.contributions-table-footer .footer-right .pagination-ellipsis[data-v-e3810045]{text-align:center}.contributions-table-toolbar[data-v-e3810045]{align-items:center;background:var(--color-green-50);border-bottom:.0625rem solid var(--color-green-200);box-sizing:border-box;color:var(--color-grey-900);display:flex;font-size:.875rem;gap:.75rem;height:4.5rem;justify-content:space-between;line-height:1.25;padding:.5rem .75rem}.contributions-table-toolbar .column-controls[data-v-e3810045],.contributions-table-toolbar .export-controls[data-v-e3810045]{position:relative}.contributions-table-toolbar-no-selection[data-v-e3810045]{height:3.5rem}.selection-count[data-v-e3810045]{white-space:nowrap}.toolbar-actions[data-v-e3810045]{align-items:center;display:flex;flex-shrink:0;gap:.75rem}.toolbar-icon[data-v-e3810045]{height:1.5rem;width:1.5rem}.toolbar-icon-button[data-v-e3810045]{align-items:center;background:transparent;border:none;border-radius:50%;color:var(--color-grey-500);cursor:pointer;display:inline-flex;flex-shrink:0;height:2rem;justify-content:center;min-width:2rem;padding:0}.toolbar-icon-button[data-v-e3810045]:disabled{cursor:not-allowed;opacity:.5}.toolbar-icon-button[data-v-e3810045]:hover:not(:disabled){background:var(--color-green-100)}.toolbar-icon-button.is-active[data-v-e3810045]{background:var(--color-green-100)}.toolbar-icon-button.is-active .toolbar-icon[data-v-e3810045]{color:var(--color-brand-medium-500)}.toolbar-left[data-v-e3810045]{align-items:center;display:flex;min-width:0}[data-v-e3810045] .ag-cell-focus:not(.ag-cell-range-selected):focus-within{border-color:transparent;border-right:.0625rem solid var(--color-green-200)}[data-v-e3810045] .ag-checkbox-input-wrapper:has(:focus-visible){box-shadow:var(--ag-focus-shadow)}[data-v-e3810045] .ag-checkbox-input-wrapper:where(:focus-within,:active){box-shadow:none}[data-v-e3810045] .ag-checkbox-input-wrapper.ag-checked{background:var(--color-primary-green)}[data-v-e3810045] .ag-filter-apply-panel .ag-button:last-child{background:var(--color-primary-green);color:#fff}[data-v-e3810045] .ag-header-cell .ag-sort-indicator-container{margin:.2rem}[data-v-e3810045] .ag-root-wrapper{border:none}[data-v-e3810045] .ag-theme-alpine,[data-v-e3810045] .ag-theme-alpine .ag-root-wrapper{border-radius:0}[data-v-e3810045] .ag-tooltip{max-width:24rem;white-space:pre-wrap;word-break:break-word}[data-v-e3810045] .grid-filter-icon{color:var(--color-grey-500);font-size:.875rem;height:1em;width:1em}[data-v-e3810045] .grid-filter-icon:hover{color:var(--color-primary-green)}[data-v-e3810045]::backdrop{background:transparent}@starting-style{.columns-export-modal[open][data-v-e3810045],.columns-visibility-modal[open][data-v-e3810045]{opacity:0;transform:translateY(-.25rem)}}']],["__scopeId","data-v-e3810045"]]),Yee={class:"contribution-search-content","aria-description":"contribution search page content"},Zee={key:0,class:"contribution-search-initial","aria-description":"initial contribution search form"},Jee=["aria-expanded","onKeydown"],Xee={class:"criteria-accordion-trigger","aria-description":"modify search accordion label"},ete={key:0,id:"criteria-accordion-panel",class:"criteria-accordion-panel","aria-labelledby":"criteria-accordion-trigger","aria-description":"modify search form panel"},tte=Ht(Ct({__name:"ContributionSearch",props:{user:{type:String},company:{type:String},stack:{type:String},username:{type:String}},setup(e){const t=we({}),n=we(["id","employeeStatus","dateDetected","status","reconciliationStatus","preclearance","approvalDate","approvedAmount","lastUpdated","lastUpdatedBy","notes","tags","groups"]),i=we(!1),o=we(null),r=we(!1),s=we(0),a=we(!1),l=we(0),u=we(null),h=we(null),f=()=>{r.value=!1},g=()=>{r.value=!r.value},m=b=>{a.value=!0,l.value=0,t.value=b,i.value=!0},v=b=>{a.value=!0,l.value=0,t.value=b,f()},w=()=>{a.value||(i.value=!1,t.value={},a.value=!1,l.value=0,f(),s.value+=1)};return(b,y)=>(ae(),rn(sw,{title:"Contribution Search",user:e.user,company:e.company,stack:e.stack,username:e.username,"columns-state":o.value,"sort-column":u.value,"sort-order":h.value,"show-export":!1,"disable-export":l.value===0},{content:Vn(()=>[q("section",Yee,[i.value?(ae(),ve("section",{key:1,class:"criteria-accordion","aria-description":"search criteria accordion",onKeydown:Xt(f,["esc"])},[q("div",{id:"criteria-accordion-trigger",class:"criteria-accordion-header",role:"button",tabindex:"0","aria-label":"Modify Search","aria-description":"modify search accordion header","aria-expanded":r.value,"aria-controls":"criteria-accordion-panel",onClick:g,onKeydown:[Xt(xt(g,["prevent"]),["enter"]),Xt(xt(g,["prevent"]),["space"])]},[q("span",Xee,[q("i",{class:ft(["fa-solid fa-chevron-down criteria-accordion-chevron",{"criteria-accordion-chevron-open":r.value}]),"aria-hidden":"true"},null,2),y[5]||(y[5]=Xi(" Modify Search ",-1))]),Le(ds,{label:"New Search",onClick:xt(w,["stop"]),disabled:a.value},null,8,["disabled"])],40,Jee),Le(Rd,{name:"criteria-accordion"},{default:Vn(()=>[r.value?(ae(),ve("section",ete,[Le(HD,{"hide-border":"","contribution-search-presets":t.value,onSearch:v},null,8,["contribution-search-presets"])])):gt("",!0)]),_:1})],32)):(ae(),ve("section",Zee,[(ae(),rn(HD,{key:s.value,loading:a.value,onSearch:m},null,8,["loading"]))])),i.value?(ae(),rn(zD,{key:2,user:e.user,company:e.company,stack:e.stack,username:e.username,page:"contribution-search",match:!1,"disabled-columns":n.value,presets:t.value,"disable-selection":"","columns-state":o.value,"onUpdate:columnsState":y[0]||(y[0]=R=>o.value=R),loading:a.value,"onUpdate:loading":y[1]||(y[1]=R=>a.value=R),"results-total":l.value,"onUpdate:resultsTotal":y[2]||(y[2]=R=>l.value=R),"sort-column":u.value,"onUpdate:sortColumn":y[3]||(y[3]=R=>u.value=R),"sort-order":h.value,"onUpdate:sortOrder":y[4]||(y[4]=R=>h.value=R)},null,8,["user","company","stack","username","disabled-columns","presets","columns-state","loading","results-total","sort-column","sort-order"])):gt("",!0)])]),_:1},8,["user","company","stack","username","columns-state","sort-column","sort-order","disable-export"]))}}),[["styles",[".contribution-search-content[data-v-f54a89a0]{display:flex;flex-direction:column;gap:1.5rem;min-height:0}.criteria-accordion[data-v-f54a89a0]{background:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.25rem;width:100%}.criteria-accordion-chevron[data-v-f54a89a0]{font-size:.75rem;opacity:.85;transform:rotate(0);transition:transform .2s ease}.criteria-accordion-chevron-open[data-v-f54a89a0]{transform:rotate(180deg)}.criteria-accordion-enter-active[data-v-f54a89a0],.criteria-accordion-leave-active[data-v-f54a89a0]{overflow:hidden;transition:max-height .25s ease,opacity .2s ease}.criteria-accordion-enter-from[data-v-f54a89a0],.criteria-accordion-leave-to[data-v-f54a89a0]{max-height:0;opacity:0}.criteria-accordion-enter-to[data-v-f54a89a0],.criteria-accordion-leave-from[data-v-f54a89a0]{max-height:80rem;opacity:1}.criteria-accordion-header[data-v-f54a89a0]{align-items:center;box-sizing:border-box;cursor:pointer;display:flex;height:3.5rem;justify-content:space-between;padding:1rem;width:100%}.criteria-accordion-header[data-v-f54a89a0]:hover{background:var(--color-green-50)}.criteria-accordion-panel[data-v-f54a89a0]{border-top:.0625rem solid var(--color-primary-grey)}.criteria-accordion-trigger[data-v-f54a89a0]{align-items:center;color:var(--color-grey-900);display:inline-flex;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:1rem;gap:.5rem;pointer-events:none}"]],["__scopeId","data-v-f54a89a0"]]),nte={class:"body"},ite=Ct({__name:"ContributionSearch.ce",props:{user:{type:String},company:{type:String},stack:{type:String},username:{type:String}},setup(e){return(t,n)=>(ae(),ve("div",nte,[Le(tte,{user:e.user,company:e.company,stack:e.stack,username:e.username},null,8,["user","company","stack","username"])]))}}),UD=".ag-cf9a-actions{display:flex;gap:.625rem;padding-top:.75rem;width:100%}.ag-cf9a-button{width:100%}.ag-cf9a-close-button{align-items:center;background:transparent;border:0;border-radius:.25rem;color:var(--color-grey-700);cursor:pointer;display:flex;font-family:inherit;font-size:1rem;font-weight:500;height:1.5rem;justify-content:center;padding:0;transition:color .2s ease;width:1.5rem}.ag-cf9a-close-button:hover{background:var(--color-green-50)}.ag-cf9a-close-icon{height:.75rem;width:.75rem}.ag-cf9a-condition-container{display:flex;flex-direction:column;gap:.75rem}.ag-cf9a-currency-cell{font-weight:600}.ag-cf9a-filter{background:var(--color-white);border:.0625rem solid var(--color-green-400);border-radius:.5rem;box-shadow:0 .125rem .5rem #0000001f;box-sizing:border-box;display:flex;flex-direction:column;font-family:Poppins,sans-serif;padding:1rem;width:21.25rem}.ag-cf9a-helper-text{color:var(--color-grey-900);font-size:.875rem;margin:0 0 .75rem}.ag-cf9a-title h3{color:var(--color-grey-900);font-size:1rem;font-weight:500;margin:0}.ag-cf9a-title-row{align-items:center;border-bottom:.0625rem solid var(--color-primary-grey);display:flex;justify-content:space-between;margin-bottom:1rem;padding-bottom:1rem}.contributions-table .ag-menu{border:none;border-radius:.5rem}",ote=Ht(ite,[["styles",[lw,UD,".body>*{width:100%}"]]]),rte=Ct({__name:"DetectedContributions",props:{user:{type:String},company:{type:String},stack:{type:String},username:{type:String}},setup(e){const t=we(["reconciliationStatus","preclearance","approvalDate","approvedAmount"]),n=we(null),i=we(0),o=we(null),r=we(null);return(s,a)=>(ae(),rn(sw,{title:"Detected Contributions",page:"detected-contributions",user:e.user,company:e.company,stack:e.stack,username:e.username,"columns-state":n.value,"sort-column":o.value,"sort-order":r.value,"show-export":!1,"disable-export":i.value===0},{content:Vn(()=>[Le(zD,{user:e.user,company:e.company,stack:e.stack,username:e.username,page:"detected-contributions",match:!0,"disabled-columns":t.value,"columns-state":n.value,"onUpdate:columnsState":a[0]||(a[0]=l=>n.value=l),"results-total":i.value,"onUpdate:resultsTotal":a[1]||(a[1]=l=>i.value=l),"sort-column":o.value,"onUpdate:sortColumn":a[2]||(a[2]=l=>o.value=l),"sort-order":r.value,"onUpdate:sortOrder":a[3]||(a[3]=l=>r.value=l)},null,8,["user","company","stack","username","disabled-columns","columns-state","results-total","sort-column","sort-order"])]),_:1},8,["user","company","stack","username","columns-state","sort-column","sort-order","disable-export"]))}}),ste={class:"body"},ate=Ht(Ct({__name:"DetectedContributions.ce",props:{user:{type:String},company:{type:String},stack:{type:String},username:{type:String}},setup(e){return(t,n)=>(ae(),ve("div",ste,[Le(rte,{user:e.user,company:e.company,stack:e.stack,username:e.username},null,8,["user","company","stack","username"])]))}}),[["styles",[lw,UD,".body>*{width:100%}"]]]);sO.registerModules([LU]),wl.add(oq),wl.add(sq),wl.add(nq),wl.add(XK),wl.add(aq),wl.add(rq);const lte=lp(MJ,{configureApp(e){e.component("font-awesome-icon",PC),EC(e,{store:us})}}),cte=lp(ote,{configureApp(e){e.component("font-awesome-icon",PC),EC(e,{store:us})}}),ute=lp(ate,{configureApp(e){e.component("font-awesome-icon",PC),EC(e,{store:us})}});customElements.define("contribution-details",lte),customElements.define("contribution-search",cte),customElements.define("detected-contributions",ute)}));
|