ag-grid-community
Version:
Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
119 lines • 1.32 MB
JavaScript
var Aw=b0,Iw=N0,kw=y1,Lw=R1,Vw=E1,Hw=D1,Bw=L3,Ow=y2,Gw=oE,Nw=hx,_w=Cx,zw=KF,Ww=C4,Uw=PM,qw=$M,$w=_5,Kw=V5,jw=$T,Qw=HV,Zw=BV;import{LocalEventService as Yw,_escapeString as Jw}from"ag-stack";var Ad={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};import{_doOnce as Xw,_missing as Id}from"ag-stack";import{_areEqual as e0}from"ag-stack";var Ho=e=>e==="__proto__"||e==="constructor"||e==="prototype",Pi=e=>{const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},Bo=e=>e!==null&&typeof e=="object"&&Pi(e),kd=(e,t,i,o,s)=>{let r=e[t];if(r!==i){if(i===null||typeof i!="object"){(o||i!==void 0)&&(e[t]=i);return}s&&r==null&&Pi(i)&&(r={},e[t]=r),r!==null&&typeof r=="object"&&!Array.isArray(r)?he(r,i,o,s):e[t]=i}},he=(e,t,i=!0,o=!1)=>{if(!(t==null||t==="")){if(Array.isArray(t)){for(let s=0,r=t.length;s<r;++s)kd(e,s,t[s],i,o);return}for(const s of Object.keys(t))Ho(s)||kd(e,s,t[s],i,o)}},Oo=e=>{if(e===null||typeof e!="object")return e;if(Array.isArray(e)){const i=e.length,o=new Array(i);for(let s=0;s<i;++s)o[s]=Oo(e[s]);return o}if(!Pi(e))return e;const t={};for(const i of Object.keys(e))Ho(i)||(t[i]=Oo(e[i]));return t},si=(e,t,i)=>{if(e===t)return!0;if(e===null||t===null||typeof e!="object"||typeof t!="object")return!1;const o=Array.isArray(e);if(o!==Array.isArray(t))return!1;if(o)return e0(e,t);if(!Pi(e)||!Pi(t))return!1;const s=Object.keys(e),r=Object.keys(t),n=s.length,a=r.length;if(i===void 0){if(n!==a)return!1;for(let c=0;c<n;++c){const u=s[c];if(!(u in t)||!si(e[u],t[u]))return!1}return!0}let l=0;for(let c=0;c<n;++c){const u=s[c];if(l===0&&u===i){l=1;continue}if(!(u in t)||!si(e[u],t[u]))return!1}const d=i in t?1:0;return n-l===a-d},br=class ct{static applyGlobalGridOptions(t){if(!ct.gridOptions)return{...t};let i={};return he(i,ct.gridOptions,!0,!0),ct.mergeStrategy==="deep"?he(i,t,!0,!0):i={...i,...t},ct.gridOptions.context&&(i.context=ct.gridOptions.context),t.context&&(ct.mergeStrategy==="deep"&&i.context&&he(t.context,i.context,!0,!0),i.context=t.context),i}static applyGlobalGridOption(t,i){if(ct.mergeStrategy==="deep"){const o=yr(t);if(o&&typeof o=="object"&&typeof i=="object")return ct.applyGlobalGridOptions({[t]:i})[t]}return i}};br.gridOptions=void 0,br.mergeStrategy="shallow";var Di=br;function t0(e,t="shallow"){Di.gridOptions=e,Di.mergeStrategy=t}function yr(e){return Di.gridOptions?.[e]}var Ld={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipSwitchShowDelay:200,tooltipHideDelay:1e4,noteTrigger:"hover",noteShowDelay:180,noteHideDelay:220,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,loadingRows:!1,suppressPdfExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,includeHiddenColumnsInCharts:!0,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,suppressInputClearButton:!1,enableInputAutoComplete:!1,rowBuffer:10,stickyRowsMaxViewportRatio:.5,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,refreshAfterGroupEdit:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupHideColumnsUntilExpanded:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,pivotPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,suppressContentVisibilityAuto:!0,contentVisibilityAutoDelay:1e3,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,enableFilterHandlers:!1};function Go(e){return typeof e=="number"&&Number.isFinite(e)}function Vd(e){const t=Number(e);return Number.isFinite(t)?t:null}function Dt(e,t,i){return Math.max(t,Math.min(e,i))}function Hd(e,t){if(typeof e!="number")return"";const i=t(),o=i("thousandSeparator",","),s=i("decimalSeparator","."),[r,n]=e.toString().split("."),a=r.replace(/(\d)(?=(\d{3})+(?!\d))/g,l=>l+o);return n===void 0?a:`${a}${s}${n}`}function Bd(e,t){return e.get("rowModelType")===t}function ae(e,t){return Bd(e,"clientSide")}function Rr(e){return ae(e)&&e.get("loading")===!0&&!!e.get("loadingRows")}function ut(e,t){return!!t.stub&&ae(e)}function i0(e){const t=e.get("loadingRows");return!t||typeof t!="object"||t.rowCount==null?10:Number.isInteger(t.rowCount)&&t.rowCount>0?t.rowCount:10}function ri(e,t){return Bd(e,"serverSide")}function oe(e,t){return e.get("domLayout")===t}function No(e){const{gos:t,environment:i}=e;return oe(t,"normal")||oe(t,"autoHeight")&&i.getAutoHeightMaxBodyHeight()!=null}function Ye(e){return ki(e)!==void 0}function Er(e){return typeof e.get("getRowHeight")=="function"}function o0(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function Od({gos:e,formula:t}){const i=e.get("rowNumbers");return i||!!t?.active&&i!==!1}function Je(e,t,i=!1,o){const{gos:s,environment:r}=e;if(o==null&&(o=r.getDefaultRowHeight()),Er(s)){if(i)return{height:o,estimated:!0};const l={node:t,data:t.data},d=s.getCallback("getRowHeight")(l);if(Go(d))return d===0&&e.log.warn(23),{height:Math.max(1,d),estimated:!1}}if(t.detail&&s.get("masterDetail"))return s0(s);const n=s.get("rowHeight");return{height:n&&Go(n)?n:o,estimated:!1}}function s0(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return Go(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function Mi(e,t){e.addManagedEventListeners({stylesChanged:i=>{i.rowHeightChanged&&t()}})}function Ne(e){const{environment:t,gos:i}=e,o=i.get("rowHeight");if(!o||Id(o))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(e.log.warn(24),t.getDefaultRowHeight())}function Gd(e,t,i){const o=t[e.getDomDataKey()];return o?o[i]:void 0}function Mt(e,t,i,o){const s=e.getDomDataKey();let r=t[s];Id(r)&&(r={},t[s]=r),r[i]=o}function Tt(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function xr(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||oe(e,"print"))}function Xe(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function Ti(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function Fr(e){return e.get("grandTotalRow")}function Nd(e){switch(e){case"pinnedTop":return"top";case"pinnedBottom":return"bottom";default:return null}}function r0(e){const t=e.get("groupTotalRow");return typeof t=="function"?e.getCallback("groupTotalRow"):()=>t??void 0}function _d(e){return e.get("groupHideOpenParents")?!0:e.get("groupDisplayType")==="multipleColumns"}function zd(e){return _d(e)&&e.get("groupHideColumnsUntilExpanded")&&ae(e)}function Pr(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function Dr(e,t,i){return!!t.group&&!t.footer&&Pr(e,i)}function At(e){const t=e.gos.getCallback("getRowId");return t===void 0?t:i=>{let o=t(i);return typeof o!="string"&&(Xw(()=>e.log.warn(25,{id:o}),`getRowIdString:${e.context.getId()}`),o=String(o)),o}}function Wd(e,t){const i=e.get("groupHideParentOfSingleChild");return!!(i===!0||i==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function Ud(e,t){return t.allChildrenCount===1&&t.childrenAfterGroup?.length===1&&Wd(e,t)}function qd(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function n0(e,t){const i=e.get("suppressGroupChangesColumnVisibility");if(i===!0||t&&i==="suppressHideOnGroup"||!t&&i==="suppressShowOnUngroup")return!1;const o=e.get("suppressRowGroupHidesColumns");if(t&&o===!0)return!1;const s=e.get("suppressMakeColumnVisibleAfterUnGroup");return!(!t&&s===!0)}function It(e){return e?.checkboxes??!0}function Ai(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function Ii(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function Mr(e){return e?.hideDisabledCheckboxes??!1}function $d(e){return typeof e.get("rowSelection")!="string"}function a0(e){return e.get("cellSelection")!==void 0}function l0(e){const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?t?.suppressMultiRanges??!1:!1:e.get("suppressMultiRangeSelection")}function _e(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function d0(e){const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"&&t.handle?.mode==="fill"?t.handle:void 0:{mode:"fill",setFillValue:e.get("fillOperation"),direction:e.get("fillHandleDirection"),suppressClearOnFillReduction:e.get("suppressClearOnFillReduction")}}function ht(e){const t=e.get("cellSelection")??!1;return(typeof t=="object"&&t.enableColumnSelection)??!1}function Kd(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const i=e.get("suppressRowClickSelection"),o=e.get("suppressRowDeselection");return i&&o?!1:i?"enableDeselection":o?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function c0(e){const t=Kd(e);return t===!0||t==="enableSelection"}function u0(e){const t=Kd(e);return t===!0||t==="enableDeselection"}function _o(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function ki(e){const t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t?.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function ni(e){return ki(e)==="multiRow"}function h0(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function Li(e){const t=e.get("rowSelection");if(typeof t=="string"){const i=e.get("groupSelectsChildren"),o=e.get("groupSelectsFiltered");return i&&o?"filteredDescendants":i?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function jd(e,t=!0){const i=e.get("rowSelection");return typeof i!="object"?t?"all":void 0:i.mode==="multiRow"?i.selectAll:"all"}function g0(e){const t=e.get("rowSelection");return typeof t=="string"?!1:t?.mode==="multiRow"?t.ctrlASelectsRows??!1:!1}function ai(e){const t=Li(e);return t==="descendants"||t==="filteredDescendants"}function Qd(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function Zd(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function ge(e){return e.get("columnMenu")==="legacy"}function Yd(e){return!ge(e)}function Jd(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function p0(e,t,i){typeof e!="object"&&(e={});const o={...e};for(const s of i){const r=t[s];typeof r<"u"&&(o[s]=r)}return o}function f0(e,t){if(!e)return;const i={};let o=!1;for(const n of Object.keys(e))i[n]=e[n],o=!0;if(!o)return;const s={type:"gridOptionsChanged",options:i};t.dispatchEvent(s);const r={type:"componentStateChanged",...i};t.dispatchEvent(r)}function G(e,t){return e.addCommon(t)}function m0(e,t){return e[t]??e.gridOptions?.[t]??yr(t)??Ld[t]}function Xd({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}function Tr(e,t,i,o,s){const r=zo(e,t,i),n=new kt(r,t,i,o,"user");return n.buildToken=s,e.context.createBean(n),n}function zo(e,t,i,o){const{gos:s,dataTypeSvc:r}=e,n={},a=s.get("defaultColDef");he(n,a,!1,!0);const l=r?.updateColDefAndGetColumnType(n,t,i),d=t.type??l??n.type;n.type=d,d&&C0(e,$o(d),n);const c=n.cellDataType;he(n,t,!1,!0),c!==void 0&&(n.cellDataType=c);const u=s.get("autoGroupColumnDef");return u&&t.rowGroup&&Xe(s)&&he(n,{sort:u.sort,initialSort:u.initialSort},!1,!0),r?.postProcess(n),r?.validateColDef(n,t,a,i),s.validateColDef(n,i,o),n}function C0(e,t,i){const o=t.length;if(o===0)return;const s=e.gos.get("columnTypes");if(s==null){ec(e,i,t,o,Ad);return}const r={...Ad},n=Object.keys(s);for(let a=0,l=n.length;a<l;++a){const d=n[a],c=s[d];d in r?e.log.warn(34,{key:d}):(c.type&&e.log.warn(35),r[d]=c)}ec(e,i,t,o,r)}function ec(e,t,i,o,s){for(let r=0;r<o;++r){const n=i[r].trim(),a=s[n];a?he(t,a,!1,!0):e.log.warn(36,{type:n})}}import{_areEqual as v0,_symmetricDiff as w0}from"ag-stack";import{_indexMap as S0}from"ag-stack";import{AgBeanStub as b0}from"ag-stack";var y=class extends Aw{warn(...e){this.beans.log.warn(...e)}error(...e){this.beans.log.error(...e)}deprecated(...e){this.beans.log.deprecated(...e)}};function Vi(e){return e instanceof Hi}var Hi=class extends y{constructor(e,t,i,o){super(),this.colGroupDef=e,this.groupId=t,this.padding=i,this.level=o,this.isColumn=!1,this.expandable=!1,this.expanded=!1,this.buildToken=0,this.displayInstances=null,this.lastVisible=!1,this.instanceId=vc(),this.expanded=!!e?.openByDefault}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){const e=this.children;for(let t=0,i=e.length;t<i;++t)if(e[t].isVisible())return!0;return!1}isPadding(){return this.padding}setExpanded(e){return e=!!e,this.expanded===e?!1:(this.expanded=e,this.dispatchLocalEvent({type:"expandedChanged"}),!0)}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.groupId}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}addLeafColumns(e){const t=this.children;for(let i=0,o=t.length;i<o;++i){const s=t[i];s.isColumn?e.push(s):s.addLeafColumns(e)}}getColumnGroupShow(){return this.colGroupDef?.columnGroupShow}setExpandable(){if(this.padding)return!0;const e=rc(this.children,0),t=e===sc;this.expandable!==t&&(this.expandable=t,this.dispatchLocalEvent({type:"expandableChanged"}));const i=e!==0;return this.lastVisible===i?!1:(this.lastVisible=i,!0)}},tc=1,ic=2,oc=4,sc=7,rc=(e,t)=>{for(let i=0,o=e.length;i<o;++i){const s=e[i];if(Vi(s)&&s.padding)t=rc(s.children,t);else if(s.isVisible()){const r=s.getColumnGroupShow();r==="open"?t|=tc|oc:r==="closed"?t|=ic|oc:t|=tc|ic}if(t===sc)return t}return t};function nc(e,t){let i=0,o=0;const s=e.length;let r=s,n=-1,a=s,l=-1;for(let g=0;g<s;++g){const p=e[g].colDef.lockPosition;p==="right"?(++o,a===s&&(a=g),l=g):(p==="left"||p===!0)&&(++i,r===s&&(r=g),n=g)}if(i===0&&o===0)return e;let d,c,u;if(t.get("enableRtl")){if(l===o-1&&r===s-i)return e;u=0,c=o,d=s-i}else{if(n===i-1&&a===s-o)return e;d=0,c=i,u=s-o}const h=new Array(s);for(let g=0;g<s;++g){const p=e[g],f=p.colDef.lockPosition;let m;f==="right"?m=u++:f==="left"||f===!0?m=d++:m=c++,h[m]=p}return h}function ac(e,t){const i=S0(e);let o=0,s=0,r=0;const n=l=>{for(let d=0,c=l.length;d<c;++d){const u=l[d];if(Vi(u)){n(u.children);continue}const h=i.get(u)??-1;r===0?(o=h,s=h):h<o?o=h:h>s&&(s=h),++r}},a=l=>{for(let d=0,c=l.length;d<c;++d){const u=l[d];if(Vi(u)&&(u.colGroupDef?.marryChildren&&(r=0,n(u.children),r>1&&s-o>r-1)||!a(u.children)))return!1}return!0};return a(t)}function lc(e,t){if(!e||e.length==0)return;const i=t(e[0]);for(let o=1;o<e.length;o++)if(i!==t(e[o]))return;return i}function dc(e,t,i){if(!t.length)return;const o=t.length===1?t[0]:null,s=lc(t,r=>r.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:o,source:i})}function Ar(e,t,i){if(!t.length)return;const o=t.length===1?t[0]:null,s=lc(t,r=>r.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:o,source:i})}function Wo(e,t,i,o){e.dispatchEvent({type:t,columns:i,column:i?.length==1?i[0]:null,source:o})}function li(e,t,i,o,s=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:s,finished:i,source:o})}var cc=(e,t,i,o,s,r,n,a)=>{const{sortSvc:l,pinnedCols:d,colFlex:c}=e;i!==void 0&&t.setVisible(!i,a),l&&(l.updateColSort(t,o,a),s!==void 0&&l.setColSortIndex(t,s)),r!==void 0&&d?.setColPinned(t,r),n!==void 0&&c?.setColFlex(t,n)};function Bi(e,t,i=!1,o,s=!1){const r=e.colModel,n=i===!0;let a=null;for(let l=0,d=t.length;l<d;++l){const c=t[l],u=typeof c=="string"?r.getCol(c):c;u===void 0||s&&u.colDef.lockVisible||u.visible!==n&&(u.setVisible(n,o),a??(a=[]),a.push(u))}if(a){const{colAnimation:l,eventSvc:d}=e;l?.start();try{r.refreshColsDerivedState(),e.visibleCols.refresh(o,!1),d.dispatchEvent({type:"columnEverythingChanged",source:o}),Ar(d,a,o)}finally{l?.finish()}}}function et(e,t,i){const{colModel:o,colAnimation:s,calculatedColsSvc:r}=e,n=t.state;if(n&&!Array.isArray(n))return e.log.warn(32),!1;n&&r?.restoreDynamicColumnDefs(n)&&r.refreshDynamicColumns(i);const a=o.colDefList,l=e.selectionColSvc?.column;if(!a.length&&!l)return!1;s?.start();try{const d=kr(e);let c=Ir(e,n??null,a,t,i,!0);if(c!==null||t.defaultState){const u=e.pivotResultCols?.pivotCols;c=Ir(e,c,u,t,i,!1)}return gc(e,t,i,d),c===null}finally{s?.finish()}}function Ir(e,t,i,o,s,r){const n=e.colModel,a=o.defaultState;let l=null,d=null,c=null;const u=a?new Set:null;if(t)for(let h=0,g=t.length;h<g;++h){const p=t[h],f=p.colId;let m;if(f!=null){if(f.startsWith(Ht)){l??(l=[]),l.push(p);continue}if(f.startsWith(qo)){d??(d=[]),d.push(p);continue}if(r)m=n.getNonPivotColById(f);else{const C=n.getCol(f);m=C?.colDef.pivotKeys==null?null:C}}m?(Uo(e,m,p,a,s),u?.add(m)):(c??(c=[]),c.push(p))}if(u!==null&&i)for(let h=0,g=i.length;h<g;++h){const p=i[h];u.has(p)||Uo(e,p,null,a,s)}return r&&y0(e,l,d,a,s),c}function y0(e,t,i,o,s){const{autoColSvc:r,selectionColSvc:n,rowGroupColsSvc:a,pivotColsSvc:l,valueColsSvc:d}=e;a?.sortByPendingState(),l?.sortByPendingState(),d?.sortByPendingState(),e.colModel.refreshCols(!1,s);const c=n?.column;uc(e,t,r?.columns??[],o,s),uc(e,i,c?[c]:[],o,s)}function uc(e,t,i,o,s){let r=null;if(t!==null){r=new Set;for(let n=0,a=t.length;n<a;++n){const l=t[n],d=l.colId;for(let c=0,u=i.length;c<u;++c){const h=i[c];if(h.colId===d){r.add(h),Uo(e,h,l,o,s);break}}}}if(o)for(let n=0,a=i.length;n<a;++n){const l=i[n];r?.has(l)||Uo(e,l,null,o,s)}}function Uo(e,t,i,o,s){const r=tt(i?.flex,o?.flex),n=tt(i?.sort,o?.sort),a=tt(i?.sortType,o?.sortType),d=pt(n)||Vr(a)?{type:ze(a),direction:Vt(n)}:void 0;cc(e,t,tt(i?.hide,o?.hide),d,tt(i?.sortIndex,o?.sortIndex),tt(i?.pinned,o?.pinned),r,s);const c=tt(i?.headerName,o?.headerName);if(c!==void 0&&t.setHeaderNameOverride(c),r==null){const h=tt(i?.width,o?.width);if(h!=null){const g=t.colDef.minWidth??e.environment.getDefaultColumnMinWidth();g!=null&&h>=g&&(t.setUserSized(!0),t.setActualWidth(h,s))}}if(t.colKind==="auto-group"||!t.primary)return;e.valueColsSvc?.syncColState(t,i,o,s),e.rowGroupColsSvc?.syncColState(t,i,o,s),e.pivotColsSvc?.syncColState(t,i,o,s),e.showValuesAsSvc?.syncColState(t,i,o,s);const u=tt(i?.pivotSort,o?.pivotSort);u!==void 0&&(t.pivotSort=Vt(u))}function hc(e,t){const{colModel:i,autoColSvc:o,selectionColSvc:s,eventSvc:r,gos:n,colAnimation:a,calculatedColsSvc:l}=e,d=e.userColumnSvc?.clear()??!1;if(l?(l.resetDynamicColumnDefs(!0)||d)&&l.refreshDynamicColumns(t):d&&i.rebuildCols(t),!i.colDefList.length)return;const c=s?.column??null,u=o?.columns,h=u?.length??0,g=new Array(h+(c?1:0)+i.colDefList.length);let p=0,f=-1,m=-1;const C=v=>{const S=Cc(e,v),{rowGroupIndex:w,pivotIndex:b}=S;w!=null&&w>f&&(f=w),b!=null&&b>m&&(m=b),g[p++]=S};if(u)for(let v=0;v<h;++v)C(u[v]);c&&C(c),Lr(i.colDefTree,C);for(let v=0,S=g.length;v<S;++v){const w=g[v];w.rowGroup&&w.rowGroupIndex==null&&(w.rowGroupIndex=++f),w.pivot&&w.pivotIndex==null&&(w.pivotIndex=++m)}a?.start();try{const v=kr(e);Ir(e,g,i.colDefList,{},t,!0);const S=i.colDefList;for(let T=0,B=S.length;T<B;++T){const W=S[T];W.pivotSort=Hr(W.colDef),W.resetWidthOwnership()}const w=o?.columns,b=w?.length??0,R=new Array((c?1:0)+b+i.colDefList.length);let x=0;c&&(R[x++]={colId:c.colId});for(let T=0;T<b;++T)R[x++]={colId:w[T].colId};Lr(i.colDefTree,T=>{R[x++]={colId:T.colId}});const D=i.groupHeaderNameOverrides;D.size&&(D.clear(),r.dispatchEvent({type:"columnHeaderNameChanged",column:null,columns:null,columnGroup:null,source:t})),gc(e,{state:R,applyOrder:!0},t,v)}finally{a?.finish()}r.dispatchEvent(G(n,{type:"columnsReset",source:t}))}function gc(e,t,i,o){R0(e,t),e.visibleCols.refresh(i,!1),e.eventSvc.dispatchEvent({type:"columnEverythingChanged",source:i}),pc(e,i,o)}function R0(e,t){const i=e.colModel,o=t.state;if(!t.applyOrder||!o||!i.ready)return;const s=i.colsById,r=i.colsList,n=new Set,a=[];for(let c=0,u=o.length;c<u;++c){const h=o[c].colId;if(h==null)continue;const g=s[h];g!=null&&g.inColsList&&!n.has(g)&&(a.push(g),n.add(g))}let l=null;for(let c=0,u=r.length;c<u;++c){const h=r[c];n.has(h)||(h.colKind==="auto-group"?(l??(l=[]),l.push(h)):a.push(h))}l!==null&&E0(a,l);const d=nc(a,e.gos);if(!v0(d,r)){if(i.hasMarryChildren&&!ac(d,i.colsTree)){e.log.warn(39);return}i.colsList=d,i.markColsListIndexDirty()}}function E0(e,t){let i=0;for(let s=0,r=e.length;s<r;++s)e[s].colKind==="auto-group"&&(i=s+1);const o=t.length;for(let s=e.length-1;s>=i;--s)e[s+o]=e[s];for(let s=0;s<o;++s)e[i+s]=t[s]}function kr(e){const{rowGroupColsSvc:t,pivotColsSvc:i,colModel:o}=e,s=t?.columns,r=i?.columns,n=o.getColsInStateOrder(),a=new Map;for(let l=0,d=n.length;l<d;++l){const c=n[l],u=c.sortDef,h=u.direction;a.set(c.colId,{width:c.actualWidth,hide:!c.visible,pinned:c.pinned,sort:h,sortType:h?u.type:void 0,sortIndex:c.sortIndex??null,aggFunc:c.aggregationActive?c.aggFunc:null,pivotSort:c.pivotSort})}return{rowGroupColumns:s?.length?s.slice():void 0,pivotColumns:r?.length?r.slice():void 0,before:a,colsList:o.colsList}}function pc(e,t,i){const o=e.rowGroupColsSvc?.columns,s=e.pivotColsSvc?.columns;fc(e,t,"columnRowGroupChanged",i.rowGroupColumns,o),fc(e,t,"columnPivotChanged",i.pivotColumns,s),x0(e,t,i.before),F0(e,t,i)}function fc(e,t,i,o,s){M0(o,s)||Wo(e.eventSvc,i,w0(o,s),t)}function x0(e,t,i){const{eventSvc:o,sortSvc:s}=e,r=e.colModel.getAllCols();let n=null,a=null,l=null,d=null,c=null,u=null;for(let h=0,g=r.length;h<g;++h){const p=r[h],f=i.get(p.colId);f&&(f.width!=p.actualWidth&&(a??(a=[]),a.push(p)),f.pinned!=p.pinned&&(l??(l=[]),l.push(p)),f.hide==p.visible&&(d??(d=[]),d.push(p)),P0(p,f)&&(n??(n=[]),n.push(p)),s&&D0(p,f)&&(c??(c=[]),c.push(p)),f.pivotSort!==p.pivotSort&&(u??(u=[]),u.push(p)))}n&&Wo(o,"columnValueChanged",n,t),a&&li(o,a,!0,t),l&&dc(o,l,t),d&&Ar(o,d,t),c&&s?.dispatchSortChangedEvents(t,c),u&&Wo(o,"columnPivotChanged",u,t)}function F0(e,t,i){const o=e.colModel,s=o.colsList;if(s===i.colsList)return;const r=i.before,n=o.colsById;let a;for(const u of r.keys()){const h=n[u];h?.inColsList&&(a??(a=[]),a.push(h))}if(!a)return;let l=0,d;const c=a.length;for(let u=0,h=s.length;u<h&&l<c;++u){const g=s[u];if(r.has(g.colId)){const p=a[l++];p!==g&&(d??(d=[]),d.push(p))}}d&&e.eventSvc.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,finished:!0,source:t})}var mc=e=>{const t=e.colModel;if(!t.isAlive())return[];const i=t.getColsInStateOrder(),o=Br(e),s=new Array(i.length);for(let r=0,n=i.length;r<n;++r){const a=i[r],l=a.rowGroupActive,d=a.pivotActive,c=a.sortDef,u=c.direction;s[r]={colId:a.colId,width:a.actualWidth,hide:!a.visible,pinned:a.pinned,sort:u,sortType:u?c.type??null:null,sortIndex:a.sortIndex??null,aggFunc:a.aggregationActive?a.aggFunc:null,valueIndex:a.aggregationActive?a.aggregationActiveIndex:null,rowGroup:l,rowGroupIndex:l?a.rowGroupActiveIndex:null,pivot:d,pivotIndex:d?a.pivotActiveIndex:null,pivotSort:a.pivotSort===void 0?o:a.pivotSort,flex:a.flex??null,showValuesAs:e.showValuesAsSvc?.toColState(a)??null,headerName:a.headerNameOverride}}return s};function Cc(e,t){const i=t.colDef,o=Ce(i.sort??i.initialSort??null),s=i.rowGroupIndex??i.initialRowGroupIndex??null;let r=i.rowGroup??i.initialRowGroup??null;s==null&&r===!1&&(r=null);const n=i.pivotIndex??i.initialPivotIndex??null;let a=i.pivot??i.initialPivot??null;return n==null&&a===!1&&(a=null),{colId:t.colId,sort:o.direction,sortType:o.type,sortIndex:i.sortIndex??i.initialSortIndex??null,hide:i.hide??i.initialHide??null,pinned:i.pinned??i.initialPinned??null,width:i.width??i.initialWidth??null,flex:i.flex??i.initialFlex??null,rowGroup:r,rowGroupIndex:s,pivot:a,pivotIndex:n,pivotSort:Hr(i),aggFunc:i.aggFunc??i.initialAggFunc??null,showValuesAs:e.showValuesAsSvc?.colDefSelection(i)??null,headerName:null}}var tt=(e,t)=>e!==void 0?e:t,Lr=(e,t)=>{for(let i=0,o=e.length;i<o;++i){const s=e[i],r=s.children;r?Lr(r,t):t(s)}},P0=(e,t)=>{const i=t.aggFunc,o=i!=null;return o!==e.aggregationActive||o&&i!=e.aggFunc},D0=(e,t)=>{if(t.sortIndex!=e.sortIndex)return!0;const i=e.getSortDef(),o=t.sortType??"default";return i?i.direction!==t.sort||i.type!==o:t.sort!==null},M0=(e,t)=>{if(e===t)return!0;const i=e?.length??0;if(i!==(t?.length??0))return!1;for(let o=0;o<i;++o){const s=e[o],r=t[o];if(s!==r&&s.colId!==r.colId)return!1}return!0},T0=0;function vc(){return T0++}var wc=e=>e instanceof kt,gt=(e,t)=>{if(!t.group&&!t.rowPinned){const i=e.pivotValueColumn;if(i)return i}return e},A0=["asc","desc",null],I0=[{type:"absolute",direction:"asc"},{type:"absolute",direction:"desc"},null],kt=class extends y{constructor(e,t,i,o,s){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=o,this.colKind=s,this.isColumn=!0,this.instanceId=vc(),this.aggFunc=void 0,this.isCalculatedCol=!1,this.field=void 0,this.fieldPath=null,this.valueGetter=void 0,this.allowFormula=!1,this.showRowGroup=void 0,this.pivotValueColumn=void 0,this.valueFormatter=void 0,this.refData=void 0,this.enableCellChangeFlash=void 0,this.colSpan=void 0,this.rowSpan=void 0,this.calculatedExpression=void 0,this.actualWidth=0,this.minWidth=0,this.maxWidth=0,this.userSized=!1,this.flex=null,this.pinned=null,this.left=null,this.oldLeft=null,this.visible=!1,this.displayed=!1,this.filterActive=!1,this.sortDef=Ce(),this.sortIndex=void 0,this.pivotSort=void 0,this.autoHeaderHeight=null,this.tooltipEnabled=!1,this.tooltipFieldContainsDots=!1,this.sortCycleIndex=void 0,this.frameworkEventListenerService=void 0,this.colEventSvc=null,this.buildToken=0,this.allColsIndex=-1,this.inColsList=!1,this.ariaColIndex=0,this.colsListIndex=-1,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.highlighted=null,this.formulaRef=null,this.showValuesAsDef=void 0,this.showValuesAs=null,this.anchoredToColId=void 0,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.rowGroupActive=!1,this.rowGroupActiveIndex=-1,this.pivotActive=!1,this.pivotActiveIndex=-1,this.aggregationActive=!1,this.aggregationActiveIndex=-1,this.showRowGroupCol=null,this.parent=null,this.originalParent=null,this.cachedSortTypes=null,this.headerNameOverride=null,this.colIdSanitised=Jw(i)}destroy(){super.destroy(),this.allColsIndex=-1,this.displayed=!1,this.colsListIndex=-1,this.inColsList=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}initState(){const{beans:e,colDef:t}=this,{sortSvc:i,pinnedCols:o,colFlex:s}=e;i?.initCol(this);const r=t.hide;this.visible=r!==void 0?!r:!t.initialHide,this.pivotSort=Hr(t),o?.initCol(this),s?.initCol(this)}setColDef(e,t,i){const o=this.colDef;return this.userProvidedColDef=t,this.colDef=e,si(e,o)?(this.initCalculatedColumnState(e),!1):(++this.beans.colModel.colDefsVersion,this.cachedSortTypes=null,this.sortCycleIndex=void 0,this.initColDefHotFields(),this.beans.showValuesAsSvc?.resolveColumn(this,!1),this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),e.spanRows!==o.spanRows&&this.beans.rowSpanSvc?.columnRowSpanChanged(this),this.dispatchColEvent("colDefChanged",i),this.beans.pivotResultCols?.recreateColDefsForSource(this,i),!0)}reapplyColDef(e,t,i){const o=zo(this.beans,e,this.colId);if(this.setColDef(o,e,t),i){cc(this.beans,this,o.hide,o.sort,o.sortIndex,o.pinned,o.flex,t);const s=o.pivotSort;s!==void 0&&(this.pivotSort=Vt(s));const r=this.flex;(r==null||r<=0)&&this.setActualWidth(o.width??this.actualWidth,t)}}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.initColDefHotFields(),this.beans.showValuesAsSvc?.resolveColumn(this,!0),this.initState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()}initDotNotation(){const{field:e,tooltipField:t}=this.colDef;this.field=e,this.gos.get("suppressFieldDotNotation")?(this.fieldPath=null,this.tooltipFieldContainsDots=!1):(this.fieldPath=typeof e=="string"&&e.includes(".")?e.split("."):null,this.tooltipFieldContainsDots=typeof t=="string"&&t.includes("."))}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.beans.tooltipSvc?.initCol(this)}resetWidthOwnership(){this.userSized=!1}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){const t=e.width??e.initialWidth??200;return Dt(t,this.minWidth,this.maxWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){return this.beans.showRowGroupCols?.isRowGroupDisplayed(this,e)??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldPath!==null}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}getColEventSvc(){let e=this.colEventSvc;return e||(e=new Yw,this.colEventSvc=e),e}__addEventListener(e,t){this.getColEventSvc().addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc?.removeEventListener(e,t)}addEventListener(e,t){const i=this.getColEventSvc();this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,i);const o=this.frameworkEventListenerService?.wrap(e,t)??t;i.addEventListener(e,o)}removeEventListener(e,t){const i=this.frameworkEventListenerService?.unwrap(e,t)??t;this.colEventSvc?.removeEventListener(e,i)}createColumnFunctionCallbackParams(e){return G(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){return this.beans.cellNavigation?.isSuppressNavigable(this,e)??!1}isCellEditable(e){return this.beans.editSvc?.isCellEditable({rowNode:e,column:this})??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){return this.beans.selectionSvc?.isCellCheckboxSelection(this,e)??!1}isSuppressPaste(e){return this.isCalculatedCol||this.isColumnFunc(e,this.colDef.suppressPaste??null)}initColDefHotFields(){const e=this.colDef;this.valueGetter=e.valueGetter,this.allowFormula=e.allowFormula===!0,this.showRowGroup=e.showRowGroup,this.pivotValueColumn=e.pivotValueColumn,this.valueFormatter=e.valueFormatter,this.refData=e.refData,this.enableCellChangeFlash=e.enableCellChangeFlash,this.colSpan=e.colSpan,this.rowSpan=e.rowSpan,this.initCalculatedColumnState(e)}initCalculatedColumnState(e){this.calculatedExpression=e.calculatedExpression,this.isCalculatedCol=this.calculatedExpression!==void 0&&this.beans.calculatedColsSvc?.isEnabled()===!0}isResizable(){return this.colDef.resizable??!0}isColumnFunc(e,t){return typeof t=="boolean"?t:typeof t=="function"&&t(this.createColumnFunctionCallbackParams(e))}isMoving(){return this.moving}getSort(){return this.sortDef.direction}getSortDef(){const e=this.sortDef;return e.direction?e:null}setSortDef(e){this.sortDef=e}isSortable(){return this.colDef.sortable??!0}isSortAscending(){return this.getSort()==="asc"}isSortDescending(){return this.getSort()==="desc"}isSortNone(){return!this.getSort()}isSorting(){return this.getSort()!=null}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getShowValuesAs(){return this.showValuesAs}getShowValuesAsDef(){return this.showValuesAsDef??null}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){const i=this.left;this.oldLeft=i,i!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){return this.warn(261),!!this.beans.colHover?.isHovered(this)}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const i=e===!0;if(this.visible!==i){this.visible=i;let o=this.originalParent;for(;o&&o.setExpandable();)o=o.originalParent;this.dispatchColEvent("visibleChanged",t)}this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.colDef.suppressSpanHeaderHeight}getFirstRealParent(){let e=this.originalParent;for(;e?.padding;)e=e.originalParent;return e}getColumnGroupPaddingInfo(){let e=this.parent;if(!e?.providedColumnGroup.padding)return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let i=!0;for(;e;){if(!e.providedColumnGroup.padding){i=!1;break}e=e.parent}return{numberOfParents:t,isSpanningTotal:i}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getDisplayName(e="columnDrop"){return this.beans.colNames.getDisplayNameForColumn(this,e)||this.colDef.headerName||this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}isUserSized(){return this.userSized}setUserSized(e){this.userSized=e}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){return this.autoHeaderHeight!==e?(this.autoHeaderHeight=e,!0):!1}getColSpan(e){const t=this.colSpan;if(t==null)return 1;const i=this.createColumnFunctionCallbackParams(e),o=t(i);return o<1?1:o}getRowSpan(e){const t=this.rowSpan;if(t==null)return 1;const i=this.createColumnFunctionCallbackParams(e),o=t(i);return o<1?1:o}setActualWidth(e,t,i=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),t==="uiColumnResized"&&(this.userSized=!0),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),i||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.pivotActive||this.rowGroupActive||this.aggregationActive}isAnyFunctionAllowed(){const e=this.colDef;return e.enablePivot===!0||e.enableRowGroup===!0||e.enableValue===!0}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}isAllowFormula(){return this.allowFormula}setHeaderNameOverride(e,t="api"){this.headerNameOverride!==e&&(this.headerNameOverride=e,this.dispatchColEvent("headerNameChanged",t),this.beans.eventSvc.dispatchEvent({type:"columnHeaderNameChanged",column:this,columns:null,columnGroup:null,source:t}))}dispatchColEvent(e,t,i){this.colEventSvc?.dispatchEvent(G(this.gos,{type:e,column:this,columns:[this],source:t,...i}))}dispatchStateUpdatedEvent(e){this.colEventSvc?.dispatchEvent({type:"columnStateUpdated",key:e})}},Ce=e=>Lt(e)?{direction:e.direction,type:e.type}:{direction:Vt(e),type:ze(e)},Sc=e=>{const t=[],{sort:i,initialSort:o}=e.colDef;return i!==null&&t.push(ze(i?.type)),o!==null&&t.push(ze(o?.type)),t},bc=(e,t,i)=>t.colDef.sortingOrder??e.get("sortingOrder")??(i.includes("absolute")?I0:A0),k0=(e,t)=>{const i=bc(e,t,Sc(t)),o=new Array(i.length);for(let s=0,r=i.length;s<r;++s)o[s]=Ce(i[s]);return o},L0=(e,t)=>{const i=e.get("sortingOrder")==null,o=t.cachedSortTypes;if(i&&o)return o;const s=Sc(t),r=new Set(s),n=bc(e,t,s);for(let a=0,l=n.length;a<l;++a){const d=n[a];if(!Lt(d)){Vt(d)&&r.add(ze(d));continue}d.direction&&r.add(d.type)}return i&&(t.cachedSortTypes=r),r},pt=e=>e==="asc"||e==="desc"||e===null,Vr=e=>e==="default"||e==="absolute",Lt=e=>{if(!e||typeof e!="object")return!1;const t=e;return Vr(t.type)&&pt(t.direction)},Hr=e=>{const t=e.pivotSort!==void 0?e.pivotSort:e.initialPivotSort;return t===void 0?void 0:Vt(t)},Br=e=>e.pivotResultCols?.suppliedColDefs!=null?null:"asc",V0=(e,t)=>t===void 0?Br(e):t,Vt=e=>pt(e)?e:null,ze=e=>Vr(e)?e:"default",yc=(e,t,i)=>{const o=i?.(),s=o!==void 0?o:t.sortSvc?.getDisplaySort(e),r=ze(s?.type),n=Vt(s?.direction);return{isAbsoluteSort:r==="absolute",isDefaultSort:r==="default",isAscending:n==="asc",isDescending:n==="desc",direction:n}},Ht="ag-Grid-AutoColumn",qo="ag-Grid-SelectionColumn",Rc="ag-Grid-RowNumbersColumn",H0="ag-Grid-HierarchyColumn";function ft(e){let t=0;for(let i=0,o=e.length;i<o;++i)t+=e[i].actualWidth;return t}function Or(e){return e.colKind==="auto-group"}function Oi(e){return e.colKind==="selection"}function Re(e){return e.colKind==="row-number"}function Gr(e){const t=e.colKind;return t==="selection"||t==="row-number"}function $o(e){return Array.isArray(e)?e:typeof e=="string"?e.split(","):[]}function Bt(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function Ec(e,t,i){const o=xc(t),s=e.showValuesAsSvc?.colDefSelection(t)??void 0;return o?{...t,colId:i,sort:o.direction,sortType:o.type,showValuesAs:s}:{...t,colId:i,sort:void 0,showValuesAs:s}}function xc(e){const{sort:t,initialSort:i}=e,o=Lt(t)||pt(t),s=Lt(i)||pt(i);return o?Ce(t):s?Ce(i):null}var Fc=(e,t)=>{if(e)for(let i=0,o=e.length;i<o;++i){const s=e[i];s.isAlive()&&s.destroy()}if(t)for(let i=0,o=t.length;i<o;++i){const s=t[i];s.isAlive()&&s.destroy()}},Pc=(e,t,i)=>{for(let o=0,s=e.length;o<s;++o){const r=e[o];r.buildToken!==i&&r.isAlive()&&r.destroy()}for(let o=0,s=t.length;o<s;++o){const r=t[o];r.buildToken!==i&&r.isAlive()&&r.destroy()}};function Nr(e,t){for(let i=0,o=e.length;i<o;++i){const s=e[i];"children"in s?Nr(s.children,t):t(s)}}import{_escapeString as B0}from"ag-stack";var Ee=e=>e instanceof di,di=class extends y{constructor(e,t,i,o){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=i,this.pinned=o,this.isColumn=!1,this.children=null,this.displayedChildren=[],this.autoHeaderHeight=null,this.left=null,this.oldLeft=null,this.parent=null,this.buildToken=0,this.uniqueId=`${t}_${i}`,this.colIdSanitised=B0(this.uniqueId)}getParent(){return this.parent}getUniqueId(){return this.uniqueId}isEmptyGroup(){return!this.displayedChildren?.length}isMoving(){return Dc(this.providedColumnGroup)===!0}checkLeft(){const e=this.displayedChildren;let t=null;if(e)for(let i=0,o=e.length;i<o;++i){const s=e[i];Ee(s)&&s.checkLeft();const r=s.left;r!=null&&(t==null||r<t)&&(t=r)}this.setLeft(t)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getDisplayName(e="columnDrop"){return this.beans.colNames.getDisplayNameForColumnGroup(this,e)||this.getColGroupDef()?.headerName||this.getGroupId()}getPartId(){return this.partId}getActualWidth(){let e=0;const t=this.displayedChildren;if(t)for(let i=0,o=t.length;i<o;++i)e+=t[i].getActualWidth();return e}isResizable(){const e=this.displayedChildren;if(e){for(let t=0,i=e.length;t<i;++t)if(e[t].isResizable())return!0}return!1}getMinWidth(){const e=this.displayedChildren;if(!e)return 0;let t=0;for(let i=0,o=e.length;i<o;++i){const s=e[i];t+=s.getMinWidth()}return t}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}get ariaColIndex(){return Ot(this,!1,!1)?.ariaColIndex??0}getDefinition(){return this.providedColumnGroup.colGroupDef}getColGroupDef(){return this.providedColumnGroup.colGroupDef}isPadding(){return this.providedColumnGroup.padding}isExpandable(){return this.providedColumnGroup.expandable}isExpanded(){return!!this.providedColumnGroup.expanded}isAutoHeaderHeight(){return!!this.providedColumnGroup.colGroupDef?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){return e===this.autoHeaderHeight?!1:(this.autoHeaderHeight=e,!0)}addDisplayedLeafColumns(e){const t=this.displayedChildren;if(t)for(let i=0,o=t.length;i<o;++i){const s=t[i];s.isColumn?e.push(s):Ee(s)&&s.addDisplayedLeafColumns(e)}}addLeafColumns(e){const t=this.children;if(t)for(let i=0,o=t.length;i<o;++i){const s=t[i];s.isColumn?e.push(s):Ee(s)&&s.addLeafColumns(e)}}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){let e=0,t=this;for(;t?.providedColumnGroup.padding&&t.parent?.providedColumnGroup.padding;)++e,t=t.parent;return e}},Ot=(e,t,i)=>{const o=t?e.displayedChildren:e.children;if(o)for(let s=0,r=o.length;s<r;++s){const n=o[i?r-1-s:s];if(n.isColumn)return n;const a=Ot(n,t,i);if(a)return a}return null},Dc=e=>{let t=!1;const i=e.children;for(let o=0,s=i.length;o<s;++o){const r=i[o];if(r.isColumn){if(t=!0,!r.moving)return!1;continue}const n=Dc(r);if(n===!1)return!1;n===!0&&(t=!0)}return t||null},Mc=(e,t)=>{let i=e.parent;if(i){let o=i.getPaddingLevel();for(;i&&i.providedColumnGroup.level+o>t;)i=i.parent,o=o>0?o-1:0}return i},Gi="ROOT_NODE_ID",Ko="rowGroupFooter_",_r="detail_",Tc=Ko+Gi;import{AgPromise as O0,KeyCode as G0}from"ag-stack";import{BaseDragAndDropService as N0}from"ag-stack";function Ac(e){return typeof e=="object"&&!!e.component}import{AgPromise as _0}from"ag-stack";function z0(e){return e?e.prototype&&"getGui"in e.prototype:!1}function Ic(e,t,i,o){const{name:s}=i;let r,n,a,l,d,c;if(t){const u=t,h=u[s+"Selector"],g=h?h(o):null,p=f=>{typeof f=="string"?r=f:f!=null&&f!==!0&&(e.isFrameworkComponent(f)?a=f:n=f)};g?(p(g.component),l=g.params,d=g.popup,c=g.popupPosition):p(u[s])}return{compName:r,jsComp:n,fwComp:a,paramsFromSelector:l,popupFromSelector:d,popupPositionFromSelector:c}}var W0=class extends y{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.frameworkCompWrapper?.setGridId?.(e.context.getId()),this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,i,o=!1){return this.getCompDetails(this.gridOptions,e,t,i,o)}getCompDetails(e,t,i,o,s=!1){const{name:r,supportsJsFunction:n}=t;let{compName:a,jsComp:l,fwComp:d,paramsFromSelector:c,popupFromSelector:u,popupPositionFromSelector:h}=Ic(this.beans.frameworkOverrides,e,t,o),g,p;const f=S=>{const w=this.registry.getUserComponent(r,S);w&&(l=w.componentFromFramework?void 0:w.component,d=w.componentFromFramework?w.component:void 0,g=w.params,p=w.processParams)};if(a!=null&&f(a),l==null&&d==null&&i!=null&&f(i),l&&n&&!z0(l)&&(l=this.agCompUtils?.adaptFunction(t,l)),!l&&!d){const{validation:S}=this.beans;s&&(a!==i||!i)?a?S?.isProvidedUserComp(a)||this.error(50,{compName:a}):i?S||this.error(260,{...this.gos.getModuleErrorParams(),propName:r,compName:i}):this.error(216,{name:r}):i&&!S&&this.error(146,{comp:i});return}const m=this.mergeParams(e,t,o,c,g,p),C=l==null,v=l??d;return{componentFromFramework:C,componentClass:v,params:m,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(v,C,m,t)}}newAgStackInstance(e,t,i,o){const s=!t;let r;s?r=new e:r=this.frameworkCompWrapper.wrap(e,o.mandatoryMethods,o.optionalMethods,o),this.createBean(r);const n=r.init?.(i);return n==null?_0.resolve(r):n.then(()=>r)}mergeParams(e,t,i,o=null,s,r){const n={...i,...s},l=e?.[t.name+"Params"];if(typeof l=="function"){const d=l(i);he(n,d)}else typeof l=="object"&&he(n,l);return he(n,o),r?r(n,this.beans):n}},U0={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},q0={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"],requiresBlockWrapper:!0},$0={name:"headerComponent",optionalMethods:["refresh"]},K0={name:"innerHeaderComponent"},j0={name:"innerHeaderGroupComponent"},Q0={name:"headerGroupComponent"},Z0={name:"innerRenderer",supportsJsFunction:!0,optionalMethods:["afterGuiAttached"]},Y0={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],supportsJsFunction:!0},J0={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],supportsJsFunction:!0},X0={name:"loadingCellRenderer",supportsJsFunction:!0},e1={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh","getValidationErrors","getValidationElement"]},t1={name:"tooltipComponent",requiresBlockWrapper:!0},zr={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},i1={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},o1={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],supportsJsFunction:!0},s1={name:"loadingCellRenderer",supportsJsFunction:!0},r1={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],supportsJsFunction:!0},n1={name:"detailCellRenderer",optionalMethods:["refresh"],supportsJsFunction:!0};function a1(e,t){return e.getCompDetailsFromGridOptions(q0,"agDragAndDropImage",t,!0)}function l1(e,t,i){return e.getCompDetails(t,Z0,void 0,i)}function d1(e,t,i){return e.getCompDetails(t,$0,"agColumnHeader",i)}function c1(e,t,i){return e.getCompDetails(t,K0,void 0,i)}function u1(e,t){const i=t.columnGroup.getColGroupDef();return e.getCompDetails(i,Q0,"agColumnGroupHeader",t)}function h1(e,t,i){return e.getCompDetails(t,j0,void 0,i)}function g1(e,t){return e.getCompDetailsFromGridOptions(o1,void 0,t,!0)}function p1(e,t){return e.getCompDetailsFromGridOptions(s1,"agLoadingCellRenderer",t,!0)}function f1(e,t){return e.getCompDetailsFromGridOptions(r1,"agGroupRowRenderer",t,!0)}function m1(e,t){return e.getCompDetailsFromGridOptions(n1,"agDetailCellRenderer",t,!0)}function Wr(e,t,i){return e.getCompDetails(t,Y0,void 0,i)}function C1(e,t,i){return e.getCompDetails(t,J0,void 0,i)}function kc(e,t,i){return e.getCompDetails(t,X0,"agSkeletonCellRenderer",i,!0)}function Lc(e,t,i){return e.getCompDetails(t,e1,"agCellEditor",i,!0)}function Vc(e,t,i,o){const s=t.filter;return Ac(s)&&(t={filter:s.component,filterParams:t.filterParams}),e.getCompDetails(t,zr,o,i,!0)}function v1(e,t,i){return e.getCompDetails(t,U0,"agDateInput",i,!0)}function w1(e,t,i){return e.getCompDetails(i??{},t1,"agTooltipComponent",t,!0)}function Hc(e,t,i,o){return e.getCompDetails(t,i1,o,i)}function Bc(e,t){return Ic(e,t,zr)}function jo(e,t,i){return e.mergeParams(t,zr,i)}var Oc=(e=>(e[e.ToolPanel=0]="ToolPanel",e[e.HeaderCell=1]="HeaderCell",e[e.RowDrag=2]="RowDrag",e[e.ChartPanel=3]="ChartPanel",e[e.AdvancedFilterBuilder=4]="AdvancedFilterBuilder",e))(Oc||{}),S1=class extends Iw{createEvent(e){return G(this.gos,e)}createDragImageComp(e){const{gos:t,beans:i}=this;return a1(i.userCompFactory,G(t,{dragSource:e}))?.newAgStackInstance()}handleEnter(e,t){e?.onGridEnter?.(t)}handleExit(e,t){e?.onGridExit?.(t)}warnNoBody(){this.beans.log.warn(54)}isDropZoneWithinThisGrid(e){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(e.dropZoneTarget)}registerGridDropTarget(e,t){const i={getContainer:e,isInterestedIn:o=>o===1||o===0,getIconName:()=>"notAllowed"};this.addDropTarget(i),t.addDestroyFunc(()=>this.removeDropTarget(i))}};function Ur(e){return!!e.operator}import{_debounce as b1}from"ag-stack";import{AgPositionableFeature as y1}from"ag-stack";var Gc=class extends kw{};import{AgComponentStub as R1}from"ag-stack";var K=class extends Lw{};import{AgManagedFocusFeature as E1}from"ag-stack";var Nc="__ag_Grid_Stop_Propagation";function mt(e){e[Nc]=!0}function We(e){return e[Nc]===!0}var Ni={isStopPropagation:We,stopPropagation:mt},ci=class extends Vw{constructor(e,t){super(e,Ni,t)}};import{_hasOwn as x1,_translate as F1}from"ag-stack";var _c={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",bigintFilter:"BigInt Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd",filterSummaryInactive:"is (All)",filterSummaryContains:"contains",filterSummaryNotContains:"does not contain",filterSummaryTextEquals:"equals",filterSummaryTextNotEqual:"does not equal",filterSummaryStartsWith:"begins with",filterSummaryEndsWith:"ends with",filterSummaryBlank:"is blank",filterSummaryNotBlank:"is not blank",filterSummaryEquals:"=",filterSummaryNotEqual:"!=",filterSummaryGreaterThan:">",filterSummaryGreaterThanOrEqual:">=",filterSummaryLessThan:"<",filterSummaryLessThanOrEqual:"<=",filterSummaryInRange:"between",yesterday:"Yesterday",today:"Today",tomorrow:"Tomorrow",last7Days:"Last 7 Days",lastWeek:"Last Week",thisWeek:"This Week",nextWeek:"Next Week",last30Days:"Last 30 Days",lastMonth:"Last Month",thisMonth:"This Month",nextMonth:"Next Month",last90Days:"Last 90 Days",lastQuarter:"Last Quarter",thisQuarter:"This Quarter",nextQuarter:"Next Quarter",lastYear:"Last Year",thisYear:"This Year",yearToDate:"Year To Date",nextYear:"Next Year",last6Months:"Last 6 Months",last12Months:"Last 12 Months",last24Months:"Last 24 Months",filterSummaryInRangeValues:e=>`(${e[0]}, ${e[1]})`,filterSummaryTextQuote:e=>`"${e[0]}"`,minDateValidation:e=>`Date must be after ${e[0]}`,maxDateValidation:e=>`Date must be before ${e[0]}`,minDateInclusiveValidation:e=>`Date must be on or after ${e[0]}`,maxDateInclusiveValidation:e=>`Date must be on or before ${e[0]}`,strictMinValueValidation:e=>`Must be greater than ${e[0]}`,strictMaxValueValidation:e=>`Must be less than ${e[0]}`,minValueValidation:e=>`Must be greater than or equal to ${e[0]}`,maxValueValidation:e=>`Must be less than or equal to ${e[0]}`};function zc(e){return x1(_c,e)}function Wc(e,t){return t==null?"":zc(t)?ke(e,t):e.getLocaleTextFunc()(t,t)}function ke(e,t,i){return F1(e,_c,t,i)}function qr(e,t,i){const{debounceMs:o}=t;return ui(t)?(o!=null&&e.warn(71),0):o??i}function ui(e){return(e.buttons?.indexOf("apply")??-1)>=0}function Uc(e,t,i){const o=t.getCustomOption(i);return o?e.getLocaleTextFunc()(o.displayKey,o.displayName):Wc(e,i)}function qc(e,t,i,o,s){let r=ke(e,i);if(typeof t=="function"){const n=Uc(e,s,o);r=t({filterOptionKey:o,filterOption:n,placeholder:r})}else typeof t=="string"&&(r=t);return r}var $c=class extends K{constructor(e,t){super(),this.filterNameKey=e,this.cssIdentifier=t,this.applyActive=!1,this.debouncePending=!1,this.defaultDebounceMs=0}postConstruct(){const e={tag:"div",cls:`ag-filter-body-wrapper ag-${this.cssIdentifier}-body-wrapper`,children:[this.createBodyTemplate()]};this.setTemplate(e,this.getAgComponents()),this.createManagedBean(new ci(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new Gc(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(e){}init(e){const t=e;this.setParams(t),this.setModelIntoUi(t.state.model,!0).then(()=>this.updateUiVisibility())}areStatesEqual(e,t){return e===t}refresh(e){const t=e,i=this.params;this.params=t;const{source:o,state:s,additionalEventAttributes:r}=t;o==="colDef"&&this.updateParams(t,i);const n=this.state;this.state=s;const a=r?.fromAction;return(a&&a!=="apply"||s.model!==n.model||!this.areStatesEqual(s.state,n.state))&&this.setModelIntoUi(s.model),!0}setParams(e){this.params=e,this.state=e.state,this.commonUpdateParams(e)}updateParams(e,t){this.commonUpdateParams(e,t)}commonUpdateParams(e,t){this.applyActive=ui(e),this.setupApplyDebounced()}doesFilterPass(e){this.beans.log.warn(283);const{getHandler:t,model:i,column:o}=this.params;return t().doesFilterPass({...e,model:i,handlerParams:this.beans.colFilter.getHandlerParams(o)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return this.beans.log.warn(284),this.params.model!=null}setupApplyDebounced(){const e=qr(this.beans.log,this.params,this.defaultDebounceMs),t=b1(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return this.beans.log.warn(285),this.params.model}setModel(e,t){t||this.beans.log.warn(286);const{beans:i,params:o}=this;return i.colFilter.setModelForColumnLegacy(o.column,e)}applyModel(e="api"){return this.doApplyModel()}canApply(e){return!0}doApplyModel(e){const{params:t,state:{valid:i=!0,model:o}}=this;if(!i)return!1;const s=!this.areModelsEqual(t.model,o);return s&&t.onAction("apply",e),s}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();const i=this.getModelFromUi(),o={model:i,state:this.getState(),valid:this.canApply(i)};this.state=o;const{params:s,gos:r,eventSvc:n,applyActive:a}=this;s.onStateChange(o),s.onUiChange(this.getUiChangeEventParams()),r.get("enableFilterHandlers")||n.dispatchEvent({type:"filterModified",column:s.column,filterInstance:this}),o.valid&&(e??(e=a?void 0:"debounce"),e==="immediately"?(this.debouncePending=!1,this.doApplyModel({afterFloatingFilter:t,afterDataChange:!1})):e==="debounce"&&this.applyDebounced())}onUiCleared(){this.onUiChanged(this.applyActive?"prevent":"immediately")}getState(){}getUiChangeEventParams(){}afterGuiAttached(e){this.lastContainerType=e?.container,this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:i}=this;if(!t)return;const o=e==="floatingFilter"||e==="columnFilter";o?(t.restoreLastSize(),t.setResizable(i.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(o)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(e,t){return ke(this,e,t)}getPositionableElement(){return this.getGui()}areModelsEqual(e,t){return e===t||e==null&&t==null?!0:e==null||t==null?!1:this.areNonNullModelsEqual(e,t)}},P1=["aggregation","filter","sort","pivot","columnVisibility","columnSizing","rowGroup"];import{AgPopupComponent as D1}from"ag-stack";var _i=class extends Hw{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.eEditor.destroy(),this.errorMessages=null,super.destroy()}};function xe(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function Qo(e){const t=e.rowModel;return t.getType()==="infinite"?t:void 0}function Kc(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}function M1(e){const t=e.rowModel;return t.getType()==="viewport"?t:void 0}import{LocalEventService as jc}from"ag-stack";var $r="row-group-",Zo="t-",Yo="b-",T1=0,Ue=class{constructor(e){this.id=void 0,this.destroyed=!1,this._groupData=void 0,this.master=!1,this.detail=void 0,this.rowIndex=null,this.field=null,this.rowGroupColumn=null,this.key=null,this.sourceRowIndex=-1,this._leafs=void 0,this.childrenAfterGroup=null,this.childrenAfterFilter=null,this.childrenAfterAggFilter=null,this.childrenAfterSort=null,this.allChildrenCount=null,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this._expanded=void 0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=T1++,this.alreadyRendered=!1,this.formulaRowIndex=null,this.hovered=!1,this.__selected=!1,this.beans=e}get groupData(){const e=this._groupData;return e!==void 0?e:this.footer?this.sibling?.groupData??null:this.beans.groupStage?.loadGroupData(this)??null}set groupData(e){this._groupData=e}get primaryRow(){let e=this.footer&&this.sibling||this;if(e.rowPinned){const t=e.pinnedSibling;t&&(e=t,e.footer&&(e=e.sibling??e))}return e}get allLeafChildren(){const e=this._leafs;return e===void 0?this.beans.groupStage?.loadLeafs?.(this)??null:e}set allLeafChildren(e){this._leafs=e}get expanded(){const e=this.beans.expansionSvc;return e?e.isExpanded(this):this.level===-1?!0:!!this._expanded}set expanded(e){this._expanded=e}setData(e){this.setDataCommon(e,"set")}updateData(e){this.setDataCommon(e,"update")}_updateDataNoSibling(e){this.setDataCommon(e,"updateNoSibling")}setDataCommon(e,t){const{valueCache:i,eventSvc:o}=this.beans,s=this.data,r=t!=="set";this.data=e,i?.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,s,r);if(this.__localEventService?.dispatchEvent(n),t!=="updateNoSibling"){const l=this.sibling;if(l){l.data=e;const d=l.createDataChangedEvent(e,s,r);l.__localEventService?.dispatchEvent(d)}}o.dispatchEvent({type:"rowNodeDataChanged",node:this});const a=this.pinnedSibling;a&&(a.data=e,a.__localEventService?.dispatchEvent(a.createDataChangedEvent(e,s,r)),o.dispatchEvent({type:"rowNodeDataChanged",node:a}))}updateDataOnDetailNode(){const e=this.detailNode;e&&(e.data=this.data)}createDataChangedEvent(e,t,i){return{type:"dataChanged",node:this,oldData:t,newData:e,update:i}}getRowIndexString(){return this.rowIndex==null?(this.beans.log.error(13),null):this.rowPinned==="top"?Zo+this.rowIndex:this.rowPinned==="bottom"?Yo+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){const i=this.beans.selectionSvc,o=i?.createDaemonNode?.(this),s=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),i?.syncInRowNode(this,o);const r=this.__localEventService;if(r){const n=this.createDataChangedEvent(e,s,!1);r.dispatchEvent(n)}}setId(e){const t=this.beans,i=At(t);if(!i){this.id=e;return}const o=this.data;if(o==null){this.id=void 0;return}const s=this.parent?.getRoute()??[],r=i({data:o,parentKeys:s.length>0?s:void 0,level:this.level,rowPinned:this.rowPinned});this.id=r,r.startsWith($r)?t.log.error(14,{groupPrefix:$r}):r===Gi&&t.log.error(331,{rowId:r})}setRowTop(e){if(this.oldRowTop=this.rowTop,this.rowTop===e)return;this.rowTop=e,this.dispatchRowEvent("topChanged");const t=e!==null;this.displayed!==t&&(this.displayed=t,this.dispatchRowEvent("displayedChanged"))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,i){this.beans.expansionSvc?.setExpanded(this,e,t,i)}setDataValue(e,t,i){const{colModel:o,valueSvc:s,gos:r,editSvc:n}=this.beans;if(e==null)return!1;let a=o.getCol(e);if(!a)return!1;a=gt(a,this);const l=s.getDisplayValue(a,this,"data",!1);if(r.get("readOnlyEdit")){const{beans:{eventSvc:c},data:u,rowIndex:h,rowPinned:g}=this;return c.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:h,rowPinned:g,column:a,colDef:a.colDef,data:u,node:this,oldValue:l,newValue:t,value:t,source:i}),!1}if(i!=="data"&&n&&!n.committing){const c=n.setDataValue({rowNode:this,column:a},t,i);if(c!=null)return c}const d=s.setValue(this,a,t,i);return this.dispatchCellChangedEvent(a,t,l),d&&this.pinnedSibling?.dispatchCellChangedEvent(a,t,l),d}getDataValue(e,t){const i=this.beans,o=i.colModel.getCol(e);if(!o)return;let s;if(t==="data"||!t){if(s=i.valueSvc.getValueFromData(gt(o,this),this,!1),s==null)return s}else{if(t==="transformed")return i.valueSvc.getTransformedValue(gt(o,this),this);const r=t==="data-raw",n=r||t==="value"?"data":t;if(s=i.valueSvc.getValue(gt(o,this),this,n,r),r||s==null)return s;if(typeof s=="object"&&o.aggFunc){if(typeof s.toNumber=="function")return s.toNumber();if("value"in s)return s.value}if(t!=="value")return s}if(o.allowFormula){const r=i.formula;r?.isFormula(s)&&(s=r.resolveValue(o,this))}return s}updateHasChildren(){let e=this.group&&!this.footer||!!this.childrenAfterGroup?.length;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,i){const o={type:"cellChanged",node:this,column:e,newValue:t,oldValue:i};this.__localEventService?.dispatchEvent(o)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){if(this.footer){const t=this.sibling;return t?t.isSelected():!1}const e=this.rowPinned&&this.pinnedSibling;return e?e.isSelected():this.__selected}depthFirstSearch(e){const t=this.childrenAfterGroup;if(t)for(let i=0,o=t.length;i<o;++i)t[i].depthFirstSearch(e);e(this)}getAggregatedChildren(e,t){const i=this.beans;return i.aggChildrenSvc?.getAggregatedChildren(this,i.colModel.getCol(e),t)??[]}dispatchRowEvent(e){this.__localEventService?.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,i="api"){this.beans.selectionSvc?.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:i})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){(this.__localEventService??(this.__localEventService=new jc)).addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){this.beans.validation?.checkRowEvents(e);const i=this.__localEventService??(this.__localEventService=new jc);this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,i);const o=this.frameworkEventListenerService?.wrap(e,t)??t;i.addEventListener(e,o)}removeEventListener(e,t){const i=this.frameworkEventListenerService?.unwrap(e,t)??t;this.removeLocalListener(e,i)}removeLocalListener(e,t){const i=this.__localEventService;i&&(i.removeEventListener(e,t),i.noRegisteredListenersExist()&&(this.__localEventService=null))}isFullWidthCell(){if(this.beans.log.warn(61),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;const e=[];let t=this;for(;t?.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}getFirstChild(){const e=this.childStore;return e?e.getFirstNode():this.childrenAfterSort?.[0]??null}_destroy(e){if(this.destroyed)return!1;this.destroyed=!0;const t=this.beans;t.editSvc?.releaseRowEdits(this);const i=this.pinnedSibling;if(i?.rowPinned&&t.pinnedRowModel?.pinRow(i,null),e===!0?this.clearRowTopAndRowIndex():e===!1?(this.setRowTop(null),this.setRowIndex(null)):(this.oldRowTop=null,this.rowTop=null,this.rowIndex=null,this.displayed=!1),!this.footer){const o=this.detailNode;o&&o._destroy(e);const s=this.sibling;s&&s._destroy(e)}return!0}};function Kr(e,t,i){return G(t,{type:i,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var A1=new Set(["__autoHeights","__checkAutoHeightsDebounced","__localEventService","__objectId","_groupData","_leafs","childStore","destroyed","groupValue","oldRowTop","pinnedSibling","rowPinned","sticky","treeNodeFlags","treeParent"]),Qc=(e,t)=>{const i=new Ue(t);for(const o of Object.keys(e))A1.has(o)||(i[o]=e[o]);return i.oldRowTop=null,i},Jo=(e,t,i)=>{if(!i)return;let o=i.rowIndex;if(o==null)return;o+=t;const s=e.getRowCount();for(;o>=0&&o<s;){const r=e.getRow(o);if(!r||!r.footer&&!r.detail)return r;o+=t}},jr=e=>{let t=e;for(;t;){if(t.footer){t=t.sibling??t.parent;continue}if(t.rowIndex!=null&&!t.detail&&t.parent)return t;t=t.parent}return null};import{_removeFromArray as I1}from"ag-stack";var Zc=class{constructor(e,t){this.beans=e,this.floating=t,this.all=new Set,this.visible=new Set,this.order=[],this.queued=new Set}size(){return this.visible.size}add(e){const{all:t,visible:i,order:o}=this;t.has(e)||(t.add(e),i.add(e),o.push(e),this.sort())}delete(e){this.beans.editSvc?.releaseRowEdits(e),this.all.delete(e),this.visible.delete(e),this.queued.delete(e.id),I1(this.order,e)}has(e){return this.visible.has(e)}forEach(e){this.order.forEach(e)}getByIndex(e){return this.order[e]}getById(e){for(const t of this.visible)if(t.id==e)return t}clear(){const{all:e,visible:t,order:i,queued:o}=this;e.clear(),o.clear(),t.clear(),i.length=0}sort(){const{sortSvc:e,rowNodeSorter:t,gos:i}=this.beans,o=e?.getSortOptions()??[],s=this.order,r=L1(s);if(s.sort((a,l)=>t?.compareRowNodes(o,a,l)||(a.pinnedSibling?.rowIndex??0)-(l.pinnedSibling?.rowIndex??0)),!r)return;const n=Fr(i);n==="bottom"||n==="pinnedBottom"?this.order.push(r):this.order.unshift(r)}hide(e){const{all:t,visible:i}=this,o=i.size;return t.forEach(s=>e(s)?i.delete(s):i.add(s)),this.order=Array.from(i),this.sort(),o!=i.size}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function Yc(e){if(e.level===-1)return!0;const t=e.parent;return t?.childrenAfterSort?.some(i=>i==e)?Yc(t):!1}function Qr(e,t){const{gos:i,rowModel:o,filterManager:s}=e;return ri(i,o)?!o.getRowNode(t.id):s?.isAnyFilterPresent()?!Yc(t):i.get("pivotMode")?!t.group:!1}function k1(e){return!!e.footer&&e.level===-1}function Zr(e){return!!e.pinnedSibling&&k1(e.pinnedSibling)}function L1(e){const t=e.findIndex(Zr);if(t>-1)return e.splice(t,1)?.[0]}var Jc=class extends y{constructor(){super(...arguments),this.csrm=null,this.ssrm=!1}postConstruct(){const{gos:e,beans:t}=this;this.top=new Zc(t,"top"),this.bottom=new Zc(t,"bottom"),this.csrm=xe(t)??null,this.ssrm=t.rowModel.getType()==="serverSide";const i=s=>Qr(t,s.pinnedSibling),o=()=>{const s=e.get("isRowPinned");s&&e.get("enableRowPinning")&&t.rowModel.forEachNode(r=>this.pinRow(r,s(r)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};Mi(this,()=>this.estimateRowHeights()),this.addManagedEventListeners({modelUpdated:({keepRenderedRows:s})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow();let r=!1;this.forContainers(a=>{r||(r=a.hide(i))});const n=this.refreshRowPositions();(!s||n||r)&&this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(H1),this.refreshRowPositions()},rowNodeDataChanged:({node:s})=>{(e.get("isRowPinnable")?.(s)??!0)||this.pinRow(s,null)},firstDataRendered:o}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(s=>s.hide(i)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:s})=>{this._grandTotalPinned=Nd(s)}),this.addManagedPropertyListener("isRowPinned",o)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{const i=[];let o;t.forEach(s=>{e&&Zr(s)?o=s:i.push(s)}),i.forEach(s=>this.pinRow(s,null)),t.clear(),o&&t.add(o)}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,i){if(t!=null&&e.destroyed)return;if(e.footer){const n=e.level;if(n>-1)return;const a=t==null&&e.rowPinned!=null;if(n===-1&&!a){this._grandTotalPinned=t;const l=this.csrm;l?l.reMapRows():this.ssrm&&this.pinGrandTotalRow();return}}const o=e.rowPinned??e.pinnedSibling?.rowPinned;if(o!=null&&t!=null&&t!=o){const n=e.rowPinned?e:e.pinnedSibling,a=e.rowPinned?e.pinnedSibling:e;this.pinRow(n,null,i),this.pinRow(a,t,i);return}const r=i&&B1(this.beans,e,i);if(r){r.forEach(n=>this.pinRow(n,t));return}if(t==null){const n=e.rowPinned?e:e.pinnedSibling,a=this.findPinnedRowNode(n);if(!a)return;a.delete(n);const l=n.pinnedSibling;Yr(n),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(l)}else{const n=Xc(this.beans,e,t),a=this.getContainer(t);a.add(n),Qr(this.beans,e)&&a.hide(l=>Qr(this.beans,l.pinnedSibling)),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(e)}}isManual(){return!0}isEmpty(e){return this.getContainer(e).size()===0}isRowsToRender(e){return!this.isEmpty(e)}ensureRowHeightsValid(){let e=!1,t=0;const i=o=>{if(o.rowHeightEstimated){const s=Je(this.beans,o);o.setRowTop(t),o.setRowHeight(s.height),t+=s.height,e=!0}};return this.bottom.forEach(i),t=0,this.top.forEach(i),e&&this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return eu(this.top)}getPinnedBottomTotalHeight(){return eu(this.bottom)}getPinnedTopRowCount(){return this.top.size()}getPinnedBottomRowCount(){return this.bottom.size()}getPinnedTopRow(e){return this.top.getByIndex(e)}getPinnedBottomRow(e){return this.bottom.getByIndex(e)}getPinnedRowById(e,t){return this.getContainer(t).getById(e)}forEachPinnedRow(e,t){this.getContainer(e).forEach(t)}getPinnedState(){const e=t=>{const i=[];return this.forEachPinnedRow(t,o=>{if(Zr(o))return;const s=o.pinnedSibling?.id;s!=null&&i.push(s)}),i};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,i)=>{for(const o of e[i]){const s=this.beans.rowModel.getRowNode(o);s?this.pinRow(s,i):t.queue(o)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{const i=new Set;e.forEachQueued(o=>{const s=this.beans.rowModel.getRowNode(o);s&&i.add(s)});for(const o of i)e.unqueue(o.id),this.pinRow(o,t)})}pinGrandTotalRow(){const{beans:e,_grandTotalPinned:t}=this,i=this.csrm||this.ssrm?e.rowModel.rootNode?.sibling:void 0;if(!i)return;const o=i.pinnedSibling,s=o&&this.findPinnedRowNode(o);if(t){if(s&&s.floating!==t&&(Yr(o),s.delete(o)),s?.floating!==t){const r=Xc(e,i,t);this.getContainer(t).add(r)}}else{if(!s)return;Yr(o),s.delete(o)}}estimateRowHeights(){this.forContainers(e=>e.forEach(t=>t.setRowHeight(t.rowHeight,!0)))}getContainer(e){return e==="top"?this.top:this.bottom}findPinnedRowNode(e){if(this.top.has(e))return this.top;if(this.bottom.has(e))return this.bottom}refreshRowPositions(e){const t=o=>V1(this.beans,o);if(e)return t(this.getContainer(e));let i=!1;return this.forContainers(o=>{const s=t(o);i||(i=s)}),i}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e?.dispatchRowEvent("rowPinned")}};function V1(e,t){let i=0,o=!1;return t.forEach((s,r)=>{if(o||(o=s.rowTop!==i),s.setRowTop(i),s.rowHeightEstimated||s.rowHeight==null){const n=Je(e,s).height;o||(o=s.rowHeight!==n),s.setRowHeight(n)}s.setRowIndex(r),i+=s.rowHeight}),o}function Xc(e,t,i){if(t.pinnedSibling)return t.pinnedSibling;const o=Qc(t,e);o.setRowTop(null),o.setRowIndex(null),o.rowPinned=i;const s=i==="top"?Zo:Yo;return o.id=`${s}${i}-${t.id}`,o.pinnedSibling=t,t.pinnedSibling=o,o}function Yr(e){if(!e.pinnedSibling)return;e.rowPinned=null,e._destroy(!1);const t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function H1(e){const t=new Set;e.forEach(i=>{i.group&&t.add(i)}),t.forEach(i=>e.delete(i))}function B1(e,t,i){const{rowSpanSvc:o}=e,s=(i&&o?.isCellSpanning(i,t))??!1;if(i&&s)return o?.getCellSpan(i,t)?.spannedNodes}function eu(e){const t=e.size();if(t===0)return 0;const i=e.getByIndex(t-1);return i===void 0?0:i.rowTop+i.rowHeight}var tu=class extends y{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){const e=this.gos;this.setPinnedRowData(e.get("pinnedTopRowData"),"top"),this.setPinnedRowData(e.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",t=>this.setPinnedRowData(t.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",t=>this.setPinnedRowData(t.currentValue,"bottom")),Mi(this,()=>this.estimateRowHeights())}reset(){}isEmpty(e){return this.getCache(e).order.length===0}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}estimateRowHeights(){const e=t=>{t.setRowHeight(t.rowHeight,!0)};Wi(this.pinnedBottomRows,e),Wi(this.pinnedTopRows,e)}ensureRowHeightsValid(){let e=!1,t=0;const i=o=>{o.rowHeightEstimated&&(o.setRowHeight(Je(this.beans,o).height),e=!0),o.rowTop!==t&&(o.setRowTop(t),e=!0),t+=o.rowHeight};return Wi(this.pinnedBottomRows,i),t=0,Wi(this.pinnedTopRows,i),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){const i=this.getCache(t);if(e===void 0){i.order.length=0,i.cache={};return}const o=At(this.beans),s=t==="top"?Zo:Yo,r=new Set(i.order),n=[],a=new Set;let l=0,d=-1;for(const c of e){const u=o?.({data:c,level:0,rowPinned:t})??s+this.nextId++;if(a.has(u)){this.warn(96,{id:u,data:c});continue}d++,a.add(u),n.push(u);const h=zi(i,u);if(h!==void 0)h.data!==c&&h.updateData(c),l+=this.setRowTopAndRowIndex(h,l,d),r.delete(u);else{const g=new Ue(this.beans);g.id=u,g.data=c,g.rowPinned=t,l+=this.setRowTopAndRowIndex(g,l,d),i.cache[u]=g,i.order.push(u)}}for(const c of r)zi(i,c)?.clearRowTopAndRowIndex(),delete i.cache[c];i.order=n}setRowTopAndRowIndex(e,t,i){return e.setRowTop(t),e.setRowHeight(Je(this.beans,e).height),e.setRowIndex(i),e.rowHeight}getPinnedTopTotalHeight(){return iu(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return iu(this.pinnedBottomRows)}getPinnedTopRowCount(){return Xr(this.pinnedTopRows)}getPinnedBottomRowCount(){return Xr(this.pinnedBottomRows)}getPinnedTopRow(e){return Jr(this.pinnedTopRows,e)}getPinnedBottomRow(e){return Jr(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return zi(this.getCache(t),e)}forEachPinnedRow(e,t){return Wi(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function iu(e){const t=Xr(e);if(t===0)return 0;const i=Jr(e,t-1);return i===void 0?0:i.rowTop+i.rowHeight}function zi(e,t){return e.cache[t]}function Jr(e,t){return zi(e,e.order[t])}function Wi(e,t){e.order.forEach((i,o)=>{const s=zi(e,i);s&&t(s,o)})}function Xr(e){return e.order.length}var ou=class extends y{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,t=()=>{const i=e.get("enableRowPinning"),o=Fr(e),r=!!i||(o==="pinnedBottom"||o==="pinnedTop"),n=r?this.inner instanceof tu:this.inner instanceof Jc;this.inner&&n&&this.destroyBean(this.inner),(n||!this.inner)&&(this.inner=this.createManagedBean(r?new Jc:new tu))};this.addManagedPropertyListeners(["enableRowPinning","grandTotalRow"],t),t()}reset(){return this.inner.reset()}isEmpty(e){return this.inner.isEmpty(e)}isManual(){return this.inner.isManual()}isRowsToRender(e){return this.inner.isRowsToRender(e)}pinRow(e,t,i){return this.inner.pinRow(e,t,i)}ensureRowHeightsValid(){return this.inner.ensureRowHeightsValid()}getPinnedRowById(e,t){return this.inner.getPinnedRowById(e,t)}getPinnedTopTotalHeight(){return this.inner.getPinnedTopTotalHeight()}getPinnedBottomTotalHeight(){return this.inner.getPinnedBottomTotalHeight()}getPinnedTopRowCount(){return this.inner.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.inner.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.inner.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.inner.getPinnedBottomRow(e)}forEachPinnedRow(e,t){return this.inner.forEachPinnedRow(e,t)}getPinnedState(){return this.inner.getPinnedState()}setPinnedState(e){return this.inner.setPinnedState(e)}setGrandTotalPinned(e){return this.inner.setGrandTotalPinned(e)}getGrandTotalPinned(){return this.inner.getGrandTotalPinned()}},su=(e=>(e.Applied="Applied",e.StoreNotFound="StoreNotFound",e.StoreLoading="StoreLoading",e.StoreWaitingToLoad="StoreWaitingToLoad",e.StoreLoadingFailed="StoreLoadingFailed",e.StoreWrongType="StoreWrongType",e.Cancelled="Cancelled",e.StoreNotStarted="StoreNotStarted",e))(su||{});import{FAST_TEST_TIMINGS as O1,LocalEventService as G1,_areEventsNear as N1,_getFirstActiveTouch as en,addTempEventHandlers as _1,clearTempEventHandlers as z1,preventEventDefault as ru}from"ag-stack";var W1=500,U1=O1?0:550,nu="__ag_Grid_Touch_Listener_State",Ui=e=>{const t=e;return t[nu]??(t[nu]={})},q1=e=>{const t=Ui(e);return t.touchStartClaimed?!1:(t.touchStartClaimed=!0,!0)},tn=(e,t)=>{const i=Ui(e);let o=i.handledEvents;if(!o)o=new Set,i.handledEvents=o;else if(o.has(t))return!1;return o.add(t),!0},Ct=class{constructor(e,t){this.eElement=e,this.startListener=null,this.handlers=[],this.eventSvc=void 0,this.touchStart=null,this.lastTapTime=null,this.longPressTimer=0,this.moved=!1,this.longTapFired=!1,this.longTapTargetResolved=!1,this.touchStartEvent=null,this.listenerCounts={tap:0,doubleTap:0,longTap:0};const i=typeof t=="boolean"?{preventClick:t}:t;this.preventClick=i?.preventClick??!1,this.capture=i?.capture??!1,this.yieldsLongTap=i?.yieldsLongTap??!1,this.shouldHandleLongTap=i?.shouldHandleLongTap,this.onLongTapDetected=i?.onLongTapDetected,this.shouldTrackTouch=i?.shouldTrackTouch,this.getLongTapTarget=i?.getLongTapTarget}addEventListener(e,t){let i=this.eventSvc;if(!i){if(i===null)return;this.eventSvc=i=new G1;const o=this.onTouchStart.bind(this);this.startListener=o,this.eElement.addEventListener("touchstart",o,{passive:!0,capture:this.capture})}i.addEventListener(e,t),this.listenerCounts[e]++}removeEventListener(e,t){this.eventSvc?.removeEventListener(e,t),this.listenerCounts[e]--}onTouchStart(e){if(this.touchStart||this.shouldTrackTouch?.(e)===!1||!this.capture&&!q1(e))return;const t=e.touches[0];this.touchStart=t,this.touchStartEvent=e,this.registerLongTapCandidate(e);const i=this.handlers;if(!i.length){const o=this.eElement,s=o.ownerDocument??o,r=this.onTouchMove.bind(this),n=this.onTouchEnd.bind(this),a=this.onTouchCancel.bind(this),l=this.onContextMenu.bind(this),d={passive:!0},c={passive:!1};_1(i,[o,"touchmove",r,d],[s,"touchcancel",a,d],[s,"touchend",n,c],[s,"contextmenu",l,c])}this.clearLongPress(),this.longPressTimer=window.setTimeout(()=>{if(this.longPressTimer=0,this.touchStart===t&&!this.moved){const o=this.isLongTapOwner(e,t)&&tn(e,"longTap");this.moved=!0,this.longTapFired=o||!!this.onLongTapDetected;const s={type:"longTap",touchStart:t,touchEvent:e};this.onLongTapDetected?.(s),o&&this.eventSvc?.dispatchEvent(s)}},U1)}onTouchMove(e){const{moved:t,touchStart:i}=this;if(!t&&i){const o=en(i,e.touches);o&&!N1(o,i,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){const t=this.touchStart;if(!t||!en(t,e.changedTouches))return;const i=!!this.touchStartEvent&&Ui(this.touchStartEvent).handledEvents?.has("longTap");!this.moved&&!i&&(this.listenerCounts.tap>0&&tn(e,"tap")&&this.eventSvc?.dispatchEvent({type:"tap",touchStart:t}),this.checkDoubleTap(t,e)),(this.preventClick||this.longTapFired)&&ru(e),this.cancel()}onTouchCancel(e){const t=this.touchStart;!t||!en(t,e.changedTouches)||(this.lastTapTime=null,this.cancel())}onContextMenu(e){this.resolveLongTapTarget()&&this.canHandleLongTap()&&ru(e)}canHandleLongTap(){return this.longTapEligible??(this.longTapEligible=this.shouldHandleLongTap?.()??!0)}registerLongTapCandidate(e){if(this.listenerCounts.longTap===0)return;const t=Ui(e),i=t.longTapCandidates;i?i.push(this):t.longTapCandidates=[this]}isLongTapOwner(e,t){const i=Ui(e).longTapCandidates;let o;for(const s of i??[])if(s.canOwnLongTap(t))if(!o)o=s;else if(o.yieldsLongTap!==s.yieldsLongTap)o.yieldsLongTap&&(o=s);else{const r=o.resolveLongTapTarget(),n=s.resolveLongTapTarget();r!==n&&r.contains(n)&&(o=s)}return o===this}canOwnLongTap(e){return this.touchStart?.identifier===e.identifier&&!this.moved&&this.listenerCounts.longTap>0&&!!this.resolveLongTapTarget()&&this.canHandleLongTap()}resolveLongTapTarget(){if(!this.longTapTargetResolved){this.longTapTargetResolved=!0;const e=this.touchStart,t=this.touchStartEvent;this.longTapTarget=e&&t&&this.getLongTapTarget?this.getLongTapTarget(t,e):this.eElement instanceof Element?this.eElement:void 0}return this.longTapTarget}checkDoubleTap(e,t){let i=Date.now();const o=this.lastTapTime;o&&i-o<=W1&&this.listenerCounts.doubleTap>0&&tn(t,"doubleTap")&&(this.eventSvc?.dispatchEvent({type:"doubleTap",touchStart:e}),i=null),this.lastTapTime=i}cancel(){this.clearLongPress(),z1(this.handlers),this.touchStart=null,this.touchStartEvent=null}clearLongPress(){this.longPressTimer!==0&&(window.clearTimeout(this.longPressTimer),this.longPressTimer=0),this.moved=!1,this.longTapFired=!1,this.longTapEligible=void 0,this.longTapTarget=void 0,this.longTapTargetResolved=!1}destroy(){const e=this.startListener;e&&(this.startListener=null,this.eElement.removeEventListener("touchstart",e,this.capture)),this.cancel(),this.eElement=null,this.eventSvc=null}},au=(e=>(e[e.VALUE=0]="VALUE",e[e.DIMENSION=1]="DIMENSION",e))(au||{});import{AgContext as $1,_createStyledRootElements as K1,_missing as j1}from"ag-stack";function Q1(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var Z1=["log","licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","rowSpanSvc","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],lu=Object.fromEntries(Z1.map((e,t)=>[e,t]));function Y1(e,t){const i=(e.beanName?lu[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,o=(t.beanName?lu[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return i-o}function J1(e,t){return e?.beanName==="gridDestroySvc"?-1:t?.beanName==="gridDestroySvc"?1:0}import{RefPlaceholder as vt,_isVisible as X1}from"ag-stack";import{RefPlaceholder as it,_setAriaColCount as eS,_setAriaMultiSelectable as tS,_setAriaRole as iS,_setAriaRowCount as oS,_setDisplayed as sS}from"ag-stack";import{_createAgElement as rS}from"ag-stack";function V(e){return rS(e)}import{KeyCode as Xo,_exists as du,_getActiveDomElement as nS,_requestAnimationFrame as aS}from"ag-stack";import{KeyCode as lS,_findFocusableElements as dS,_findNextFocusableElement as cS,_isKeyboardMode as uS,_isNothingFocused as hS}from"ag-stack";import{_exists as gS}from"ag-stack";function cu(e){const{rowIndex:t,rowPinned:i,column:o}=e;return`${t}.${i??"null"}.${o.getId()}`}function es(e,t){const i=e.column===t.column,o=e.rowPinned===t.rowPinned,s=e.rowIndex===t.rowIndex;return i&&o&&s}function uu(e,t){switch(e.rowPinned){case"top":if(t.rowPinned!=="top")return!0;break;case"bottom":if(t.rowPinned!=="bottom")return!1;break;default:if(gS(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function hu(e,t){return!e&&!t?!0:!e||!t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}function on(e){let t=0,i;const{pinnedRowModel:o,rowModel:s,pageBounds:r}=e;return o?.getPinnedTopRowCount()?i="top":s.getRowCount()?(i=null,t=r.getFirstRow()):o?.getPinnedBottomRowCount()&&(i="bottom"),i===void 0?null:{rowIndex:t,rowPinned:i}}function sn(e){let t,i=null;const{pinnedRowModel:o,pageBounds:s}=e,r=o?.getPinnedBottomRowCount(),n=o?.getPinnedTopRowCount();return r?(i="bottom",t=r-1):e.rowModel.getRowCount()?t=s.getLastRow():n&&(i="top",t=n-1),t===void 0?null:{rowIndex:t,rowPinned:i}}function Fe(e,t){switch(t.rowPinned){case"top":return e.pinnedRowModel?.getPinnedTopRow(t.rowIndex);case"bottom":return e.pinnedRowModel?.getPinnedBottomRow(t.rowIndex);default:return e.rowModel.getRow(t.rowIndex)}}function Gt(e,t){const i=e.spannedRowRenderer?.getCellByPosition(t);if(i)return i;const o=e.rowRenderer.getRowByPosition(t);return o?o.getCellCtrl(t.column):null}function pS(e,t,i){const{rowModel:o,pinnedRowModel:s}=e;let r;return r??(r=o?.getRowNode(t)),i?r??(r=s?.getPinnedRowById(t,i)):(r??(r=s?.getPinnedRowById(t,"top")),r??(r=s?.getPinnedRowById(t,"bottom"))),r}function qi(e,t,i=!1){const{rowIndex:o,rowPinned:s}=t,{pageBounds:r,pinnedRowModel:n,rowModel:a}=e;if(o===0)return s==="top"?null:s==="bottom"&&a.isRowsToRender()?{rowIndex:r.getLastRow(),rowPinned:null}:n?.isRowsToRender("top")?{rowIndex:n.getPinnedTopRowCount()-1,rowPinned:"top"}:null;if(i){const l=s?void 0:a.getRow(o);return gu(e,l,!0)??{rowIndex:o-1,rowPinned:s}}return{rowIndex:o-1,rowPinned:s}}function rn(e,t){const{pinnedRowModel:i,rowModel:o}=e,s=i?.getPinnedTopRowCount()??0,r=o.getRowCount(),{rowPinned:n,rowIndex:a}=t;return n==="top"?a:n==="bottom"?s+r+a:s+a}function nn(e,t,i=!1){const{rowIndex:o,rowPinned:s}=t,{pageBounds:r,pinnedRowModel:n,rowModel:a}=e;if(fS(e,t))return s==="bottom"?null:s==="top"&&a.isRowsToRender()?{rowIndex:r.getFirstRow(),rowPinned:null}:n?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;if(i){const l=s?void 0:a.getRow(o);return gu(e,l)??{rowIndex:o+1,rowPinned:s}}return{rowIndex:o+1,rowPinned:s}}function gu(e,t,i=!1){const{gos:o,rowRenderer:s}=e;if(!t?.sticky||!xr(o))return;const r=s.getStickyTopRowCtrls(),n=s.getStickyBottomRowCtrls(),a=!n.some(u=>u.rowNode.rowIndex===t.rowIndex),l=a?r:n,d=(i?-1:1)*(a?-1:1);let c;for(let u=0;u<l.length;u++)if(l[u].rowNode.rowIndex===t.rowIndex){c=l[u+d];break}return c?{rowIndex:c.rowNode.rowIndex,rowPinned:null}:void 0}function fS(e,t){const{rowPinned:i,rowIndex:o}=t,{pinnedRowModel:s,pageBounds:r}=e;return i==="top"?(s?.getPinnedTopRowCount()??0)-1<=o:i==="bottom"?(s?.getPinnedBottomRowCount()??0)-1<=o:r.getLastRow()<=o}function pu(e,t,i){t.addManagedElementListeners(i,{keydown:o=>{if(!o.defaultPrevented&&!vS(o)&&o.key===lS.TAB){const s=o.shiftKey;cS({beans:e,rootNode:i,backwards:s})||Nt(e,s)&&o.preventDefault()}}})}function fu(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function ve(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.exclusive}function $i(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.exclusive}function Nt(e,t,i="auto"){const o=e.ctrlsSvc.get("gridCtrl"),s=o.focusNextInnerContainer(t);return s===!0?!0:s===!1?s:i==="direct"?o.focusNextElementOutsideContainer(t):((i==="force"||!t&&!o.isDetailGrid()&&o.isFocusInsideGridBody())&&o.forceFocusOutOfContainer(t),!1)}function mu(e,t){const i=e.focusSvc,o=i.getFocusedCell();if(o&&t&&es(o,t)){const{rowIndex:s,rowPinned:r,column:n}=t;hS(e)&&i.setFocusedCell({rowIndex:s,column:n,rowPinned:r,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!uS()})}}function mS(e,t){const i=e.getFocusableContainerName();return i==="gridBody"?t():Cu(e,()=>dS(e.getGui(),".ag-tab-guard").length>0)?i:null}function Cu(e,t){e.setAllowFocus?.(!0);try{return t()}finally{e.setAllowFocus?.(!1)}}var vu="__ag_Grid_Skip_Focusable_Container";function CS(e){e[vu]=!0}function vS(e){return e[vu]===!0}function wu(e){return e.ready?e.colsTreeDepth+1:-1}function Pe(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function an(e){const{ctrlsSvc:t,colModel:i,filterManager:o}=e,s=t.getHeaderRowContainerCtrl()?.getRowCount(),r=Math.max(wu(i),0)+(o?.hasFloatingFilters()?1:0);return(s??r)+(o?.getHeaderRowCount()??0)}function ln(e){const t=[],i=e.ctrlsSvc.getHeaderRowContainerCtrl();if(!i)return t;const o=i.getGroupRowCount()||0;for(let s=0;s<o;s++){const r=i.getGroupRowCtrlAtIndex(s),n=t[s];if(r){const a=wS(e,r);(n==null||a>n)&&(t[s]=a)}}return t}function wS(e,t){let o=e.colModel.pivotMode?bS(e):Su(e);const s=t.getHeaderCellCtrls();for(const r of s){const{column:n}=r,a=n.autoHeaderHeight;a!=null&&a>o&&n.isAutoHeaderHeight()&&(o=a)}return o}function dn(e){let i=e.colModel.pivotMode?SS(e):Ki(e);const o=e.colModel.getAllCols();for(let s=0,r=o.length;s<r;++s){const n=o[s],a=n.autoHeaderHeight;a!=null&&a>i&&n.isAutoHeaderHeight()&&(i=a)}return i}function Ki(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function cn(e){return e.gos.get("floatingFiltersHeight")??Ki(e)}function Su(e){return e.gos.get("groupHeaderHeight")??Ki(e)}function SS(e){return e.gos.get("pivotHeaderHeight")??Ki(e)}function bS(e){return e.gos.get("pivotGroupHeaderHeight")??Su(e)}function yS(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}function RS(e){return e?.headerRowIndex!=null}function un(e,t){const i=e.getLeftStickyColumnContainerWidth(),o=e.bodyWidth,s=e.getRightStickyColumnContainerWidth();return t?{leftWidth:0,centerWidth:o+i+s,rightWidth:0}:{leftWidth:i,centerWidth:o,rightWidth:s}}function bu(e,t,i,o){const{ePinnedLeft:s,eScrolling:r,ePinnedRight:n}=i,{leftWidth:a,centerWidth:l,rightWidth:d}=un(e,t);o.pinnedLeftWidth!==a&&(s.style.width=a+"px",s.style.display=a>0||t?"":"none",o.pinnedLeftWidth=a),o.centerWidth!==l&&(r.style.width=l+"px",o.centerWidth=l),o.pinnedRightWidth!==d&&(n.style.width=d+"px",n.style.display=d>0||t?"":"none",o.pinnedRightWidth=d)}function ts(e,t){return(e.column.getLeft()??0)-(t.column.getLeft()??0)}function ES(e){const{left:t,center:i,right:o}=hn(e,s=>s.column.getPinned());return t.sort(ts),i.sort(ts),o.sort(ts),[...t,...i,...o]}function hn(e,t){const i=[],o=[],s=[];for(const r of e){const n=t(r);n==="left"?i.push(r):n==="right"?s.push(r):o.push(r)}return{left:i,center:o,right:s}}var yu=class extends y{constructor(){super(...arguments),this.headerRowFocusFeatures=[]}setComp(e,t,i){this.comp=e,this.eGui=t,this.eGridViewport=i;const{beans:o}=this,{touchSvc:s,ctrlsSvc:r}=o;this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,o),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,o)}),this.onPivotModeChanged(o),this.setupHeaderHeight();const n=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:n}),s?.mockHeaderContextMenu(this,n),r.register("gridHeaderCtrl",this)}setHeaderRowFocusableElements(e){if(this.headerRowFocusFeatures=this.destroyBeans(this.headerRowFocusFeatures),!!this.beans.headerNavigation)for(const t of e)this.headerRowFocusFeatures.push(this.createManagedBean(new ci(t,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})))}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({headerRowsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>aS(this.beans,()=>e()),stylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const i=ln(e).reduce((s,r)=>s+r,0),o=dn(e);if(e.filterManager?.hasFloatingFilters()&&(t+=cn(e)),t+=i,t+=o,this.headerHeightWithBorder!==t){this.headerHeightWithBorder=t;const s=t+e.environment.getHeaderRowBorderWidth();this.eGridViewport.style.setProperty("--ag-internal-header-rows-height",`${s}px`),this.eGui.style.height=`${s}px`}this.headerHeight!==t&&(this.headerHeight=t,this.eventSvc.dispatchEvent({type:"headerHeightChanged"}))}onPivotModeChanged(e){const t=e.colModel.pivotMode;this.comp.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const i=e.visibleCols.allCols.some(o=>o.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",i)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),i=e.shiftKey,o=i!==t?"LEFT":"RIGHT",{beans:s}=this,{headerNavigation:r,focusSvc:n}=s;(r.navigateHorizontally(o,!0,e)||!i&&n.focusOverlay(!1)||Nt(s,i,"force"))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:i}=this.beans;switch(e.key){case Xo.LEFT:t="LEFT";case Xo.RIGHT:{du(t)||(t="RIGHT"),i.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case Xo.UP:t="UP";case Xo.DOWN:{du(t)||(t="DOWN"),i.navigateVertically(t,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:i,beans:o}=this;if(!t&&i.contains(nS(o)))return;t instanceof HTMLElement&&i.contains(t.closest(".ag-header-row"))||(o.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,i){const{menuSvc:o}=this.beans;if(!e&&!i||!o?.isHeaderContextMenuEnabled())return;const{target:s}=e??t;s instanceof Element&&!s.closest(".ag-header-cell, .ag-header-group-cell")&&o.showHeaderContextMenu(void 0,e,i)}};import{_ensureDomOrder as xS}from"ag-stack";import{_addOrRemoveAttribute as FS,_setAriaRowIndex as PS,_setDomChildOrder as is}from"ag-stack";import{RefPlaceholder as Ru,_addStylesToElement as DS,_removeAriaSort as MS,_setAriaSort as TS}from"ag-stack";var gn=class extends K{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},AS={tag:"div",cls:"ag-header-cell",role:"columnheader",children:[{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"},{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"}]},IS=class extends gn{constructor(e){super(AS,e),this.eResize=Ru,this.eHeaderCompWrapper=Ru,this.headerCompVersion=0}postConstruct(){const e=this.getGui(),t=()=>{const o=this.ctrl.getSelectAllGui();o&&(this.eResize.insertAdjacentElement("afterend",o),this.addDestroyFunc(()=>o.remove()))},i={setWidth:o=>e.style.width=o,toggleCss:(o,s)=>this.toggleCss(o,s),setUserStyles:o=>DS(e,o),setAriaSort:o=>o?TS(e,o):MS(e),setUserCompDetails:o=>this.setUserCompDetails(o),getUserCompInstance:()=>this.headerComp,refreshSelectAllGui:t,removeSelectAllGui:()=>this.ctrl.getSelectAllGui()?.remove()};this.ctrl.setComp(i,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0),t()}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.headerCompGui?.remove(),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;const t=this.headerCompVersion;e.newAgStackInstance().then(i=>this.afterCompCreated(t,i))}afterCompCreated(e,t){if(e!=this.headerCompVersion||!this.isAlive()){this.destroyBean(t);return}this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}};import{RefPlaceholder as Eu,_addStylesToElement as kS,_setDisplayed as LS}from"ag-stack";import{KeyCode as VS,_getActiveDomElement as HS,_last as BS}from"ag-stack";var pn=e=>{const t=e.colModel.colsAllGroups,i=t.length,o=e.colModel.groupHeaderNameOverrides,s=new Array(i);for(let r=0;r<i;++r){const n=t[r];s[r]={groupId:n.groupId,open:n.expanded,headerName:o.get(n.groupId)??null}}return s},ji=(e,t,i,o)=>{const s=Vi(t)?t.groupId:t||"";Qi(e,[{groupId:s,open:i}],o)},OS=(e,t)=>{const{groupId:i}=t,o=t.headerName??null;return(e.get(i)??null)===o?!1:(o==null?e.delete(i):e.set(i,o),!0)},Qi=(e,t,i)=>{const{colAnimation:o,visibleCols:s,eventSvc:r,colModel:n}=e,a=n.colsGroupsById,l=t.length;if(!(!a.size||!l)){o?.start();try{const d=n.groupHeaderNameOverrides;let c=null,u=null;for(let h=0;h<l;++h){const g=t[h],p=a.get(g.groupId);p&&(p.setExpanded(g.open)&&(c??(c=[]),c.push(p)),"headerName"in g&&OS(d,g)&&(u??(u=[]),u.push(p)))}u&&r.dispatchEvent({type:"columnHeaderNameChanged",column:null,columns:null,columnGroup:u.length===1?u[0]:null,source:i}),c&&(s.refresh(i,!0),r.dispatchEvent({type:"columnGroupOpened",columnGroup:c.length===1?c[0]:void 0,columnGroups:c}))}finally{o?.finish()}}},GS=(e,t)=>{const i=[];e.colModel.colDefGroupsById.forEach(o=>{i.push({groupId:o.groupId,open:!!o.colGroupDef?.openByDefault,headerName:null})}),Qi(e,i,t)},NS=class extends y{};function Zi(e,t,i){return i&&e.addDestroyFunc(()=>t.destroyBean(i)),i??e}var os=class{constructor(){this.nextId=0,this.invalidatedUpTo=0}claim(){return this.invalidatedUpTo=this.nextId,this.provisionalClaim()}provisionalClaim(){const e=++this.nextId;return{isCurrent:()=>e>this.invalidatedUpTo}}supersede(){this.invalidatedUpTo=Math.max(this.invalidatedUpTo,this.nextId-1)}invalidate(){this.invalidatedUpTo=this.nextId}};import{_exists as xu,_setAriaColSpan as _S}from"ag-stack";function ss(e){const{left:t,pinned:i,width:o,isPrintLayout:s,isRtl:r,visibleCols:n}=e;if(t==null||!s)return t;let a=t;if(r){let d;i==="left"?d=n.getLeftStickyColumnContainerWidth():i==="right"?d=n.getRightStickyColumnContainerWidth():d=n.bodyWidth,a=d-t-o}if(i==="left")return a;const l=n.getLeftStickyColumnContainerWidth();return i==="right"?l+n.bodyWidth+a:l+a}function Fu(e,t){const{offset:i,pinned:o,width:s,isPrintLayout:r,isRtl:n,visibleCols:a}=t;if(!r&&(n?o!=="left":o==="right")){if(n)e.style.right=`${i}px`;else{const d=a.getRightStickyColumnContainerWidth();e.style.right=`${d-i-s}px`}e.style.left="";return}e.style.left=`${i}px`,e.style.right=""}var fn=class extends y{constructor(e,t,i){super(),this.columnOrGroup=e,this.eCell=t,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=i}getColumnOrGroup(){return this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),Ee(this.columnOrGroup)&&this.addManagedListeners(this.columnOrGroup,{displayedChildrenChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const{gos:e,colAnimation:t}=this.beans,i=e.get("suppressColumnMoveAnimation"),o=xu(this.columnOrGroup.getOldLeft());t?.isActive()&&o&&!i?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),{gos:t,visibleCols:i}=this.beans,o=t.get("enableRtl"),s=oe(t,"print"),r=e.getActualWidth(),n=ss({left:e.getOldLeft(),pinned:e.getPinned(),width:r,isPrintLayout:s,isRtl:o,visibleCols:i}),a=ss({left:e.getLeft(),pinned:e.getPinned(),width:r,isPrintLayout:s,isRtl:o,visibleCols:i});this.setLeft(n),this.actualLeft=a,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===a&&this.setLeft(a)})}onLeftChanged(){const e=this.getColumnOrGroup(),{gos:t,visibleCols:i}=this.beans,o=e.getLeft();this.actualLeft=ss({left:o,pinned:e.getPinned(),width:e.getActualWidth(),isPrintLayout:oe(t,"print"),isRtl:t.get("enableRtl"),visibleCols:i}),this.setLeft(this.actualLeft)}setLeft(e){if(xu(e)){const t=this.getColumnOrGroup();this.setHorizontalPosition(t,e)}if(Ee(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&_S(this.ariaEl,t.length)}}setHorizontalPosition(e,t){const{gos:i,visibleCols:o}=this.beans;Fu(this.eCell,{offset:t,pinned:e.getPinned(),width:e.getActualWidth(),isPrintLayout:oe(i,"print"),isRtl:i.get("enableRtl"),visibleCols:o})}},Pu="ag-column-header-edit-highlighted";import{KeyCode as qe,_addOrRemoveAttribute as zS,_batchCall as WS,_exists as US,_getActiveDomElement as Du,_getDocument as qS,_getElementSize as $S,_normaliseQwertyAzerty as KS,_observeResize as jS,_setAriaColIndex as QS}from"ag-stack";import{_missing as mn}from"ag-stack";var Cn="ag-calculated-column",Mu="ag-calculated-column-highlighted",ZS=[],YS=[Cn],JS=[Cn,Mu];function Tu(e,t){return t==null||!e?.isCalculatedCol?ZS:t.isHighlightedColumn(e)?JS:YS}var XS="ag-column-first",eb="ag-column-last";function vn(e,t,i,o){const s=Tu(i,t.calculatedColsSvc);return mn(e)?s.length?[...s]:[]:[...s,...ku(e.headerClass,e,t.gos,i,o)]}function tb(e,t,i,o){return mn(e)?[]:ku(e.toolPanelClass,e,t.gos,i,o)}function Au(e,t,i){e.toggleCss(XS,i.isColAtEdge(t,"first")),e.toggleCss(eb,i.isColAtEdge(t,"last"))}function Iu(e,t,i){if(!i.length){if(t)for(const s of t)e.toggleCss(s,!1);return}if(!t){for(const s of i)e.toggleCss(s,!0);return new Set(i)}const o=t;for(const s of i)o.has(s)?o.delete(s):e.toggleCss(s,!0);for(const s of o)e.toggleCss(s,!1);return new Set(i)}function ib(e,t,i,o){return G(t,{colDef:e,column:i,columnGroup:o})}function ku(e,t,i,o,s){if(mn(e))return[];let r;if(typeof e=="function"){const n=ib(t,i,o,s);r=e(n)}else r=e;return typeof r=="string"?[r]:Array.isArray(r)?[...r]:[]}var ob=0,wn="headerCtrl",Sn=class extends y{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.reAttemptToFocus=!1,this.instanceId=e.getUniqueId()+"-"+ob++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,i,o,s){t.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(e,t,i,o,s),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus(this.lastFocusEvent??void 0))}shouldStopEventPropagation(e){const{headerRowIndex:t,column:i}=this.beans.focusSvc.focusedHeader??{headerRowIndex:this.rowCtrl.rowIndex,column:this.column},o=i.getDefinition(),s=o?.suppressHeaderKeyboardEvent;if(!US(s))return!1;const r=G(this.gos,{colDef:o,column:i,headerRowIndex:t,event:e});return!!s(r)}getWrapperHasFocus(){return Du(this.beans)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}refreshHeaderStyles(){const e=this.column.getDefinition();if(!e)return;const{headerStyle:t}=e;let i;if(typeof t=="function"){const o=this.getHeaderClassParams();i=t(o)}else i=t;i&&this.comp.setUserStyles(i)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:i,compBean:o}=e,{beans:s}=this,r=u=>{if(!this.isAlive()||!o.isAlive())return;const{paddingTop:h,paddingBottom:g,borderBottomWidth:p,borderTopWidth:f}=$S(this.eGui),m=h+g+p+f,v=t.offsetHeight+m;if(u<5){const w=!qS(s)?.contains(t),b=v==0;if(w||b){WS(()=>r(u+1),"raf",s);return}}this.setColHeaderHeight(this.column,v)};let n=!1,a;const l=()=>{const u=this.column.isAutoHeaderHeight();u&&!n&&d(),!u&&n&&c()},d=()=>{n=!0,this.comp.toggleCss("ag-header-cell-auto-height",!0),r(0),a=jS(this.beans,t,()=>r(0))},c=()=>{n=!1,a&&a(),this.comp.toggleCss("ag-header-cell-auto-height",!1),a=void 0,this.column.isAutoHeaderHeight()||this.setColHeaderHeight(this.column,null)};l(),o.addDestroyFunc(()=>c()),o.addManagedListeners(this.column,{widthChanged:()=>n&&r(0)}),o.addManagedEventListeners({sortChanged:()=>{n&&window.setTimeout(()=>r(0))}}),i&&i(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:i,eGui:o}=this;!e||!t||!o||(Au(e,t,i.visibleCols),QS(o,t.ariaColIndex))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=ve(this.beans);this.eGui&&zS(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=Du(this.beans),i=e.key===qe.LEFT||e.key===qe.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey)return;if((this.isResizing||i)&&(e.preventDefault(),e.stopImmediatePropagation()),(e.ctrlKey||e.metaKey)&&KS(e)===qe.C)return this.beans.clipboardSvc?.copyToClipboard();if(!i)return;const r=e.key===qe.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const n=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(n,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(r)}moveHeader(e){this.beans.colMoves?.moveHeader(e,this.eGui,this.column,this.column.getPinned(),this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:i}=this.beans;return i?i.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:i}=this;let o=e.key===qe.LEFT!==t.get("enableRtl");const s=i.getPinned(),r=t.get("enableRtl");return s&&r!==(s==="right")&&(o=!o),(o?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{this.resizeFeature?.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case qe.SPACE:case qe.PAGE_DOWN:case qe.PAGE_UP:case qe.PAGE_HOME:case qe.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=wn,{eGui:i,gos:o}=this;Mt(o,i,t,this),e.addDestroyFunc(()=>Mt(o,i,t,null))}focus(e){if(!this.isAlive())return!1;const{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus()):this.reAttemptToFocus=!0,!0}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop?.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,i){const o=e??t,{menuSvc:s,gos:r}=this.beans;r.get("preventDefaultOnContextMenu")&&o.preventDefault(),s?.isHeaderContextMenuEnabled(i)&&s.showHeaderContextMenu(i,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",i)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:i}=this;e.isColumn?i.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):i.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},sb=class extends y{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);for(const t of this.columnGroup.getLeafColumns())t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})}removeListenersOnChildrenColumns(){for(const e of this.removeChildListenersFuncs)e();this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.toggleCss("ag-hidden",e===0)}};function Lu(e,t){t?e.style.setProperty("display","none"):e.style.removeProperty("display")}function Vu(e,t){t==null?e.style.removeProperty("max-height"):e.style.setProperty("max-height",`${t}px`),e.classList.toggle("ag-header-cell-comp-wrapper-limited-height",t!=null)}var rb=class extends Sn{constructor(){super(...arguments),this.componentTooltip={},this.headerCompGuard=new os,this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,i,o,s){const{column:r,beans:n}=this,{context:a,colNames:l,colHover:d,rangeSvc:c,colResize:u}=n;this.comp=e,s=Zi(this,a,s),this.setGui(t,s),this.displayName=l.getDisplayNameForColumnGroup(r,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(s),this.setupExpandable(s),this.setupTooltip(),this.refreshAnnouncement(),this.setupAutoHeight({wrapperElement:o,compBean:s}),this.setupUserComp(),this.addHeaderMouseListeners(s,o),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const h=r.getProvidedColumnGroup().getLeafColumns();d?.createHoverFeature(s,h,t),c?.createRangeHighlightFeature(s,r,e),s.createManagedBean(new fn(r,t,n)),s.createManagedBean(new sb(e,r)),u?this.resizeFeature=s.createManagedBean(u.createGroupResizeFeature(e,i,r)):e.setResizableDisplayed(!1),s.createManagedBean(new ci(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(s,h),this.addManagedEventListeners({cellSelectionChanged:()=>this.refreshAnnouncement()}),s.addManagedPropertyListener("cellSelection",()=>this.refreshAnnouncement()),s.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(s),s.addDestroyFunc(()=>{this.headerCompGuard.invalidate(),this.clearComponentTooltip(),this.clearComponent()})}getHeaderClassParams(){const{column:e,beans:t}=this,i=e.getDefinition();return G(t.gos,{colDef:i,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,i=e.get("groupHeaderHeight");i!=null?i===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(i):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const i of t)e.addManagedListeners(i,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,i)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),i=t[0]===e,o=BS(t)===e;if(!i&&!o)return;const s=e.getHighlighted(),r=!!this.rowCtrl.getHeaderCellCtrls().find(l=>l.column.isMoving());let n=!1,a=!1;if(r){const l=this.beans.gos.get("enableRtl"),d=s===1,c=s===0;i&&(l?a=d:n=c),o&&(l?n=c:a=d)}this.comp.toggleCss("ag-header-highlight-before",n),this.comp.toggleCss("ag-header-highlight-after",a)}resizeHeader(e,t){const{resizeFeature:i}=this;if(!i)return;const o=i.getInitialValues(t);i.resizeColumns(o,o.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}createUserCompParams(){const{gos:e,enterpriseMenuFactory:t}=this.beans,i=this.column,o=i.getProvidedColumnGroup(),s=this.headerCompGuard.provisionalClaim();return G(e,{displayName:this.displayName,columnGroup:i,setExpanded:r=>{ji(this.beans,o,r,"gridInitializing")},setTooltip:(r,n)=>{e.assertModuleRegistered("Tooltip",3),s.isCurrent()&&this.setComponentTooltip(r,n)},showColumnMenu:(r,n)=>t?.showMenuAfterButtonClick(o,r,"columnMenu",n),showColumnMenuAfterMouseClick:(r,n)=>t?.showMenuAfterMouseEvent(o,r,"columnMenu",n),eGridHeader:this.eGui})}setupUserComp(){const e=u1(this.beans.userCompFactory,this.createUserCompParams());e&&(this.headerCompGuard.supersede(),this.comp.setUserCompDetails(e))}attemptUserCompRefresh(){const e=this.comp.getUserCompInstance();return e?.refresh?e.refresh(this.createUserCompParams()):!1}addHeaderMouseListeners(e,t){const{column:i,comp:o,beans:{rangeSvc:s},gos:r}=this,n=c=>this.handleMouseOverChange(c.type==="mouseenter"),a=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",i.getProvidedColumnGroup()),l=c=>this.handleContextMenuMouseEvent(c,void 0,i.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:n,mouseleave:n,click:a,contextmenu:l}),o.toggleCss("ag-header-group-cell-selectable",ht(r));const d=s?.createHeaderGroupCellMouseListenerFeature(this.column,t);d&&this.createManagedBean(d)}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderGroupTooltip(this,this.tooltipFeature,()=>this.componentTooltip)}setComponentTooltip(e,t){this.componentTooltip={value:e,shouldDisplay:t},this.tooltipFeature?.refreshTooltip()}clearComponentTooltip(){this.componentTooltip={}}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const i=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:i,expandableChanged:i});const o=t.groupId;e.addManagedEventListeners({columnHeaderNameChanged:s=>{(!s.columnGroup||s.columnGroup.getGroupId()===o)&&this.refreshDisplayName()},columnHeaderEditHighlightChanged:s=>{(!s.groupId||s.groupId===o)&&this.refreshEditHighlight()}}),this.refreshEditHighlight()}refreshEditHighlight(){this.comp.toggleCss(Pu,!!this.beans.colHeaderEditSvc?.isHighlightedGroup(this.column.getProvidedColumnGroup()))}refreshDisplayName(){this.displayName=this.beans.colNames.getDisplayNameForColumnGroup(this.column,"header"),this.attemptUserCompRefresh()||(this.clearComponentTooltip(),this.setupUserComp()),this.tooltipFeature?.refreshTooltip(),this.refreshAnnouncement()}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles(),this.refreshAnnouncement()}addClasses(){const{column:e}=this,t=e.getColGroupDef(),i=vn(t,this.beans,null,e);e.isPadding()?(i.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(s=>s.isSpanHeaderHeight())&&i.push("ag-header-span-height")):(i.push("ag-header-group-cell-with-group"),t?.wrapHeaderText&&i.push("ag-header-cell-wrap-text"));for(const o of i)this.comp.toggleCss(o,!0)}setupMovingCss(e){const{column:t}=this,o=t.getProvidedColumnGroup().getLeafColumns(),s=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());for(const r of o)e.addManagedListeners(r,{movingChanged:s});s()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription())}handleKeyDown(e){if(super.handleKeyDown(e),!this.getWrapperHasFocus())return;const{column:i,expandable:o,gos:s,beans:r}=this,n=ht(s);if(e.key==VS.ENTER){if(n&&!e.altKey)r.rangeSvc?.handleColumnSelection(i,e);else if(o){const a=!i.isExpanded();ji(r,i.getProvidedColumnGroup(),a,"uiColumnExpanded")}}}refreshAnnouncement(){let e;const{gos:t,expandable:i}=this,o=ht(t),s=this.getLocaleTextFunc();o&&i?e=s("ariaColumnGroupCellSelectionAndExpansion","Press Enter to toggle selection for all visible cells in this column group. Press ALT ENTER to expand or collapse this column group"):o?e=s("ariaColumnGroupCellSelection","Press Enter to toggle selection for all visible cells in this column group"):i&&(e=s("ariaColumnGroupExpansion","Press ENTER to expand or collapse this column group")),this.ariaAnnouncement=e}announceAriaDescription(){const{beans:e,eGui:t,ariaAnnouncement:i}=this;!i||!t.contains(HS(e))||e.ariaAnnounce?.announceValue(i,"columnHeader")}setDragSource(e){!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some(e=>e.colDef.suppressMovable||e.colDef.lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}},nb={tag:"div",cls:"ag-header-group-cell",role:"columnheader",children:[{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"},{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"}]},ab=class extends gn{constructor(e){super(nb,e),this.eResize=Eu,this.eHeaderCompWrapper=Eu}postConstruct(){const e=this.getGui(),t=(o,s)=>s!=null?e.setAttribute(o,s):e.removeAttribute(o),i={toggleCss:(o,s)=>this.toggleCss(o,s),setUserStyles:o=>kS(e,o),setHeaderWrapperHidden:o=>Lu(this.eHeaderCompWrapper,o),setHeaderWrapperMaxHeight:o=>Vu(this.eHeaderCompWrapper,o),setResizableDisplayed:o=>LS(this.eResize,o),setWidth:o=>e.style.width=o,setAriaExpanded:o=>t("aria-expanded",o),setUserCompDetails:o=>this.setUserCompDetails(o),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(i,e,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(e){e.newAgStackInstance().then(t=>this.afterHeaderCompCreated(t))}afterHeaderCompCreated(e){const t=()=>this.destroyBean(e);if(!this.isAlive()){t();return}const i=this.getGui(),o=e.getGui(),s=this.headerGroupComp;s&&(s.getGui().remove(),this.destroyBean(s)),this.eHeaderCompWrapper.appendChild(o),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(i)}};import{RefPlaceholder as bn,_addStylesToElement as lb,_setDisplayed as db}from"ag-stack";var cb={tag:"div",cls:"ag-header-cell ag-floating-filter",role:"gridcell",children:[{tag:"div",ref:"eFloatingFilterBody",role:"presentation"},{tag:"div",ref:"eButtonWrapper",cls:"ag-floating-filter-button ag-hidden",role:"presentation",children:[{tag:"button",ref:"eButtonShowMainFilter",cls:"ag-button ag-floating-filter-button-button",attrs:{type:"button",tabindex:"-1"}}]}]},ub=class extends gn{constructor(e){super(cb,e),this.eFloatingFilterBody=bn,this.eButtonWrapper=bn,this.eButtonShowMainFilter=bn}postConstruct(){const e=this.getGui(),t={toggleCss:(i,o)=>this.toggleCss(i,o),setUserStyles:i=>lb(e,i),addOrRemoveBodyCssClass:(i,o)=>this.eFloatingFilterBody.classList.toggle(i,o),setButtonWrapperDisplayed:i=>db(this.eButtonWrapper,i),setCompDetails:i=>this.setCompDetails(i),getFloatingFilterComp:()=>this.compPromise,setWidth:i=>e.style.width=i,setMenuIcon:i=>this.eButtonShowMainFilter.appendChild(i)};this.ctrl.setComp(t,e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(t=>this.afterCompCreated(t))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp?.getGui().remove(),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp)}afterCompCreated(e){if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached?.()}}},hb=class extends K{constructor(e){super({tag:"div",cls:e.headerRowClass,role:"row"}),this.ctrl=e,this.headerComps={},this.pinnedWidthsCache={pinnedLeftWidth:void 0,centerWidth:void 0,pinnedRightWidth:void 0},this.ePinnedLeftCells=V({tag:"div",cls:"ag-grid-pinned-left-cells",role:"presentation"}),this.ePinnedLeftWrapper=V({tag:"div",cls:"ag-grid-container-wrapper",role:"presentation"}),this.ePinnedLeftCells.appendChild(this.ePinnedLeftWrapper),this.eScrollingCells=V({tag:"div",cls:"ag-grid-scrolling-cells",role:"presentation"}),this.ePinnedRightCells=V({tag:"div",cls:"ag-grid-pinned-right-cells",role:"presentation"}),this.ePinnedRightWrapper=V({tag:"div",cls:"ag-grid-container-wrapper",role:"presentation"}),this.ePinnedRightCells.appendChild(this.ePinnedRightWrapper),this.getGui().append(this.ePinnedLeftCells,this.eScrollingCells,this.ePinnedRightCells)}postConstruct(){this.setRowIndex(this.ctrl.getAriaRowIndex());const e={setHeight:t=>this.getGui().style.height=t,setTop:t=>this.getGui().style.top=t,setHeaderCtrls:(t,i)=>this.setHeaderCtrls(t,i),refreshPinnedCellGroupWidths:()=>this.updatePinnedCellGroupWidths(),setWidth:t=>this.getGui().style.width=t,setRowIndex:t=>this.setRowIndex(t),setTabIndex:t=>FS(this.getGui(),"tabindex",t)};this.ctrl.setComp(e,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;const i=this.headerComps;this.headerComps={};for(const o of e){const s=o.instanceId;let r=i[s];delete i[s],r??(r=this.createHeaderComp(o));const n=this.getHeaderCellGroup(o);r.getGui().parentElement!==n&&n.appendChild(r.getGui()),this.headerComps[s]=r}if(Object.values(i).forEach(o=>{o.getGui().remove(),this.destroyBean(o)}),this.updatePinnedCellGroupWidths(),t){const o=(l,d)=>ts(l.getCtrl(),d.getCtrl());if(this.gos.get("domLayout")==="print"){const l=Object.values(this.headerComps).sort(o);is(this.eScrollingCells,l.map(d=>d.getGui()));return}const s=Object.values(this.headerComps),{left:r,center:n,right:a}=hn(s,l=>l.getCtrl().column.getPinned());r.sort(o),n.sort(o),a.sort(o),is(this.ePinnedLeftWrapper,r.map(l=>l.getGui())),is(this.eScrollingCells,n.map(l=>l.getGui())),is(this.ePinnedRightWrapper,a.map(l=>l.getGui()))}}getHeaderCellGroup(e){if(this.gos.get("domLayout")==="print")return this.eScrollingCells;const t=e.column.getPinned();return t==="left"?this.ePinnedLeftWrapper:t==="right"?this.ePinnedRightWrapper:this.eScrollingCells}updatePinnedCellGroupWidths(){const e=this.gos.get("domLayout")==="print";bu(this.beans.visibleCols,e,{ePinnedLeft:this.ePinnedLeftCells,eScrolling:this.eScrollingCells,ePinnedRight:this.ePinnedRightCells},this.pinnedWidthsCache)}setRowIndex(e){const t=this.getGui();PS(t,e),t.classList.toggle("ag-header-row-not-first",e!==1)}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new ab(e);break;case"filter":t=new ub(e);break;default:t=new IS(e);break}return this.createBean(t),t.setParentComponent(this),t}};import{KeyCode as yn,_getActiveDomElement as gb,_isKeyboardMode as pb,_setDisplayed as fb}from"ag-stack";var mb=class extends Sn{constructor(){super(...arguments),this.refreshFunctions={},this.ariaDescriptionProperties=new Map,this.componentTooltip={},this.headerCompGuard=new os}wireComp(e,t,i,o,s){this.comp=e;const{column:r,beans:n}=this,{colResize:a,context:l,colHover:d,rangeSvc:c}=n,u=Zi(this,l,s);this.setGui(t,u),this.updateState(),this.setupWidth(u),this.setupMovingCss(u),this.setupPinnedCss(u),this.setupMenuClass(u),this.setupSortableClass(u),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:o,checkMeasuringCallback:p=>this.setRefreshFunction("measuring",p),compBean:u}),this.addColumnHoverListener(u),this.setupFilterClass(u),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(u),this.setupSelectAll(u),this.setupUserComp(),this.refreshAria(),a?this.resizeFeature=u.createManagedBean(a.createResizeFeature(r,i,e,this)):fb(i,!1),d?.createHoverFeature(u,[r],t),c?.createRangeHighlightFeature(u,r,e),u.createManagedBean(new fn(r,t,n)),u.createManagedBean(new ci(t,{shouldStopEventPropagation:p=>this.shouldStopEventPropagation(p),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(u),u.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),u.addManagedPropertyListener("cellSelection",()=>this.refreshAria()),u.addManagedListeners(r,{colDefChanged:()=>this.refresh(),headerNameChanged:()=>this.refresh(),formulaRefChanged:()=>this.refresh(),headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const h=()=>this.checkDisplayName(),g=r.getColId();if(u.addManagedEventListeners({columnValueChanged:h,columnRowGroupChanged:h,columnPivotChanged:h,headerHeightChanged:this.onHeaderHeightChanged.bind(this),columnHeaderEditHighlightChanged:p=>{(!p.colId||p.colId===g)&&this.refreshEditHighlight()}}),this.refreshEditHighlight(),n.showValuesAsSvc){const p=()=>this.refreshAriaShowValuesAs();u.addManagedListeners(r,{columnStateUpdated:p}),u.addManagedEventListeners({columnRowGroupChanged:p,columnPivotChanged:p,columnPivotModeChanged:p})}u.addDestroyFunc(()=>{this.headerCompGuard.invalidate(),this.clearComponentTooltip(),this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses?.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){this.beans.colResize?.resizeHeader(this.column,e,t)}getHeaderClassParams(){const{column:e,beans:t}=this,i=e.colDef;return G(t.gos,{colDef:i,column:e,floatingFilter:!1})}setupUserComp(){const e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.headerCompGuard.supersede(),this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.headerCompGuard.provisionalClaim(),t=this.createParams(e),i=this.column.getColDef();return d1(this.beans.userCompFactory,i,t)}createParams(e){const{menuSvc:t,sortSvc:i,colFilter:o,gos:s}=this.beans;return G(s,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!t?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!o&&(!this.openFilterEnabled||ge(this.gos)),showColumnMenu:(n,a)=>{t?.showColumnMenu({column:this.column,buttonElement:n,positionBy:"button",onClosedCallback:a})},showColumnMenuAfterMouseClick:(n,a)=>{t?.showColumnMenu({column:this.column,mouseEvent:n,positionBy:"mouse",onClosedCallback:a})},showFilter:n=>{t?.showFilterMenu({column:this.column,buttonElement:n,containerType:"columnFilter",positionBy:"button"})},progressSort:n=>{i?.progressSort(this.column,!!n,"uiColumnSorted")},setSort:(n,a)=>{i?.setSortForColumn(this.column,Ce(n),!!a,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(n,a)=>{s.assertModuleRegistered("Tooltip",3),e.isCurrent()&&this.setComponentTooltip(n,a)}})}setupSelectAll(e){const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature?.setComp(this),e.addManagedPropertyListener("rowSelection",()=>{const i=t.createSelectAllFeature(this.column);i&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(i),this.selectAllFeature?.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!i&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===yn.SPACE?this.selectAllFeature?.onSpaceKeyDown(e):e.key===yn.ENTER?this.onEnterKeyDown(e):e.key===yn.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){const{column:t,gos:i,sortable:o,beans:s}=this;let r=!1;(e.ctrlKey||e.metaKey)&&(r=this.showMenuOnKeyPress(e,!0)),r||(!e.altKey&&ht(i)?s.rangeSvc?.handleColumnSelection(t,e):o&&s.sortSvc?.progressSort(t,e.shiftKey,"uiColumnSorted"))}showMenuOnKeyPress(e,t){const i=this.comp.getUserCompInstance();return Hu(i)&&i.onMenuKeyboardShortcut(t)?(e.preventDefault(),!0):!1}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),pb()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(){const e=this.beans.tooltipSvc?.setupHeaderTooltip(this,this.tooltipFeature,()=>this.componentTooltip);this.tooltipFeature=e,e&&this.setRefreshFunction("tooltip",()=>e.refreshTooltip())}setComponentTooltip(e,t){this.componentTooltip={value:e,shouldDisplay:t},this.tooltipFeature?.refreshTooltip()}clearComponentTooltip(){this.componentTooltip={}}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){const e=()=>{const t=this.column.colDef,i=vn(t,this.beans,this.column,null);this.userHeaderClasses=Iu(this.comp,this.userHeaderClasses,i)};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!e?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!e?.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria();for(const e of Object.values(this.refreshFunctions))e()}refreshEditHighlight(){this.comp.toggleCss(Pu,!!this.beans.colHeaderEditSvc?.isHighlightedColumn(this.column))}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):(this.clearComponentTooltip(),this.setCompDetails(e))}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.colDef;return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const t=()=>{const i=this.column.getActualWidth();this.comp.setWidth(`${i}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupPinnedCss(e){const t=()=>{this.comp.toggleCss("ag-header-cell-last-left-pinned",this.column.isLastLeftPinned()),this.comp.toggleCss("ag-header-cell-first-right-pinned",this.column.isFirstRightPinned())};e.addManagedListeners(this.column,{lastLeftPinnedChanged:t,firstRightPinnedChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp?.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.toggleCss("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const i=this.column.isFilterActive();this.comp.toggleCss("ag-header-cell-filtered",i),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.toggleCss("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=e===0,i=e===1;this.comp.toggleCss("ag-header-highlight-before",t),this.comp.toggleCss("ag-header-highlight-after",i)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:i,beans:o}=this,s=ln(this.beans),r=s.reduce((h,g)=>h+g,0)===0;if(i.toggleCss("ag-header-parent-hidden",r),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),i.toggleCss("ag-header-span-height",!1),i.toggleCss("ag-header-span-total",!1);return}const{numberOfParents:n,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();i.toggleCss("ag-header-span-height",n>0);const l=dn(o);if(n===0){i.toggleCss("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}i.toggleCss("ag-header-span-total",a);const d=(this.column.getFirstRealParent()?.getLevel()??-1)+1,c=s.length-d;let u=0;for(let h=0;h<c;h++)u+=s[s.length-1-h];e.style.setProperty("top",`${-u}px`),e.style.setProperty("height",`${l+u}px`)}refreshAriaSort(){let e=null;const{beans:t,column:i,comp:o,sortable:s,gos:r}=this;if(s){const n=this.getLocaleTextFunc(),a=t.sortSvc?.getDisplaySort(i)??null;o.setAriaSort(Cb(a)),e=ht(r)?n("ariaSortableColumnWithCellSelection","Press ALT ENTER to sort"):n("ariaSortableColumn","Press ENTER to sort")}else o.setAriaSort();this.setAriaDescriptionProperty("sort",e)}refreshAriaMenu(){let e=null;this.menuEnabled&&(e=this.getLocaleTextFunc()("ariaMenuColumn","Press ALT DOWN to open column menu")),this.setAriaDescriptionProperty("menu",e)}refreshAriaFilterButton(){let e=null;const{openFilterEnabled:t,gos:i}=this;t&&!ge(i)&&(e=this.getLocaleTextFunc()("ariaFilterColumn","Press CTRL ENTER to open filter")),this.setAriaDescriptionProperty("filterButton",e)}refreshAriaFiltered(){let e=null;this.column.isFilterActive()&&(e=this.getLocaleTextFunc()("ariaColumnFiltered","Column Filtered")),this.setAriaDescriptionProperty("filter",e)}refreshAriaShowValuesAs(){const e=this.getLocaleTextFunc(),t=this.beans.showValuesAsSvc?.getActiveModeLabel(this.column);this.setAriaDescriptionProperty("showValuesAs",t?`${e("ariaColumnShowValuesAs","Showing Values As")} ${t}`:null)}refreshAriaCellSelection(){let e=null;const{gos:t,column:i}=this;ht(t)&&!Re(i)&&(e=this.getLocaleTextFunc()("ariaColumnCellSelection","Press Enter to toggle selection for all visible cells in this column")),this.setAriaDescriptionProperty("cellSelection",e)}refreshAriaCalculatedColumn(){let e=null;this.column.isCalculatedCol&&(e=this.getLocaleTextFunc()("ariaCalculatedColumn","Calculated column")),this.setAriaDescriptionProperty("calculatedColumn",e)}setAriaDescriptionProperty(e,t){const i=this.ariaDescriptionProperties;t!=null?i.set(e,t):i.delete(e)}announceAriaDescription(){const{beans:e,eGui:t,ariaDescriptionProperties:i}=this;if(!t.contains(gb(e)))return;const o=Array.from(i.keys()).sort((s,r)=>s==="filter"?-1:r.charCodeAt(0)-s.charCodeAt(0)).map(s=>i.get(s)).join(". ");e.ariaAnnounce?.announceValue(o,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered(),this.refreshAriaShowValuesAs(),this.refreshAriaCellSelection(),this.refreshAriaCalculatedColumn()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=s=>this.handleMouseOverChange(s.type==="mouseenter"),i=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},o=s=>this.handleContextMenuMouseEvent(s,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:i,contextmenu:o})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.toggleCss("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return Hu(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function Hu(e){return typeof e?.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}function Cb(e){const t=e?.direction;return t==="asc"?"ascending":t==="desc"?"descending":t==="mixed"?"other":"none"}var vb=0,Rn=class extends y{constructor(e,t){super(),this.rowIndex=e,this.type=t,this.instanceId=vb++,this.comp=null,this.allCtrls=[];let i="ag-header-row-column";t==="group"?i="ag-header-row-group":t==="filter"&&(i="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${i}`}setRowIndex(e){this.rowIndex=e,this.comp?.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=oe(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.allCtrls.every(e=>e.eGui!=null):!1}setComp(e,t,i=!0){this.comp=e,t=Zi(this,this.beans.context,t),i&&(this.setRowIndex(this.rowIndex),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t),this.refreshTabIndex()}refreshTabIndex(){const{beans:e,gos:t}=this;this.comp?.setTabIndex(ve(e)?void 0:t.get("tabIndex"))}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this),i=this.onDisplayedColumnsChanged.bind(this),o=this.refreshTabIndex.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),leftPinnedWidthChanged:this.refreshPinnedCellGroupWidths.bind(this),rightPinnedWidthChanged:this.refreshPinnedCellGroupWidths.bind(this),displayedColumnsChanged:i,gridSizeChanged:this.setWidth.bind(this),gridViewportWidthChanged:this.setWidth.bind(this),virtualColumnsChanged:s=>this.onVirtualColumnsChanged(s.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,stylesChanged:t,advancedFilterEnabledChanged:t,overlayExclusiveChanged:o}),e.addManagedPropertyListeners(["suppressHeaderFocus"],o),e.addManagedPropertyListener("domLayout",i),e.addManagedPropertyListener("ensureDomOrder",s=>this.isEnsureDomOrder=s.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=oe(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;const e=this.getWidthForRow();this.comp.setWidth(`${e}px`),this.refreshPinnedCellGroupWidths()}refreshPinnedCellGroupWidths(){this.comp?.refreshPinnedCellGroupWidths()}getWidthForRow(){const{visibleCols:e}=this.beans,t=this.beans.ctrlsSvc.getGridBodyCtrl(),i=t?.getHorizontalContentWidth()??e.totalWidth,o=t?.getHorizontalViewportWidth()??0;return Math.max(i,o)}onRowHeightChanged(){if(!this.comp)return;const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(`${e}px`),this.comp.setHeight(t+"px")}getTopAndHeight(){let e=0;const t=ln(this.beans);for(let s=0;s<t.length;s++){if(s===this.rowIndex&&this.type==="group")return{topOffset:e,rowHeight:t[s]};e+=t[s]}const i=dn(this.beans);if(this.type==="column")return{topOffset:e,rowHeight:i};e+=i;const o=cn(this.beans);return{topOffset:e,rowHeight:o}}onVirtualColumnsChanged(e=!1){if(!this.comp)return;const t=this.getUpdatedHeaderCtrls(),i=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,i,e)}getUpdatedHeaderCtrls(){const e=this.ctrlsById;this.ctrlsById=new Map;const t=this.getColumnsInViewport();for(const s of t)this.recycleAndCreateHeaderCtrls(s,this.ctrlsById,e);const i=s=>s.column.displayed&&this.beans.focusSvc.isHeaderWrapperFocused(s);let o=!1;if(e)for(const[s,r]of e)i(r)?(this.ctrlsById.set(s,r),o=!0):this.destroyBean(r);return this.allCtrls=Array.from(this.ctrlsById.values()),o&&(this.allCtrls=ES(this.allCtrls)),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,i){if(e.isEmptyGroup())return;const o=e.getUniqueId();let s;if(i&&(s=i.get(o),i.delete(o)),s&&s.column!=e&&(this.destroyBean(s),s=void 0),s==null)switch(this.type){case"filter":{s=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":s=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:s=this.createBean(new mb(e,this));break}t.set(o,s)}getColumnsInViewport(){const e=[];for(const t of["left",null,"right"])e.push(...this.getComponentsToRender(t));return e}getComponentsToRender(e){return this.type==="group"?this.beans.colViewport.getHeadersToRender(e,this.rowIndex):this.beans.colViewport.getColumnHeadersToRender(e)}focusHeader(e,t){const i=this.allCtrls.find(s=>s.column==e);return i?i.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},Bu=class extends y{constructor(){super(...arguments),this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t,i=t){this.comp=e,this.eViewport=i;const{ctrlsSvc:o,colModel:s,colMoves:r}=this.beans;this.setupDragAndDrop(r,t);const n=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:n,advancedFilterEnabledChanged:n}),o.register("headerRowContainerCtrl",this),s.ready&&this.refresh()}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){const{focusSvc:t,filterManager:i,visibleCols:o}=this.beans;let s=0;const r=t.getFocusHeaderToUseAfterRefresh(),n=()=>{const u=o.headerGroupRowCount;s=u,e||(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls));const h=this.groupsRowCtrls.length;if(h!==u){if(h>u){for(let g=u;g<h;g++)this.destroyBean(this.groupsRowCtrls[g]);this.groupsRowCtrls.length=u;return}for(let g=h;g<u;g++){const p=this.createBean(new Rn(g,"group"));this.groupsRowCtrls.push(p)}}},a=()=>{const u=s++;this.columnsRowCtrl==null||!e?(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new Rn(u,"column"))):this.columnsRowCtrl.rowIndex!==u&&this.columnsRowCtrl.setRowIndex(u)},l=()=>{this.includeFloatingFilter=!!i?.hasFloatingFilters();const u=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){u();return}e||u();const h=s++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==h&&this.filtersRowCtrl.setRowIndex(h):this.filtersRowCtrl=this.createBean(new Rn(h,"filter"))},d=this.getAllCtrls();n(),a(),l();const c=this.getAllCtrls();this.comp.setCtrls(c),this.restoreFocusOnHeader(t,r),d.length!==c.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){const t=i=>i?.getHeaderCellCtrls().find(o=>o.column===e);if(e.isColumn)return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let i=0;i<this.groupsRowCtrls.length;i++){const o=t(this.groupsRowCtrls[i]);if(o)return o}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,i){const s=this.getAllCtrls()[e];return s?s.focusHeader(t,i):!1}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}destroy(){this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl),this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls),super.destroy()}setupDragAndDrop(e,t){const i=e?.createBodyDropTarget(t);i&&this.createManagedBean(i)}restoreFocusOnHeader(e,t){t&&e.focusHeaderPosition({headerPosition:t,scroll:!1})}},wb=class extends y{constructor(e,t,i){super(),this.eHeaderWrapper=e,this.eGridViewport=t,this.setHeaderRowFocusableElements=i,this.headerRowComps={}}postConstruct(){const e={setCtrls:i=>this.setCtrls(i),setViewportScrollLeft:i=>{}};this.createManagedBean(new Bu).setComp(e,this.eHeaderWrapper,this.eGridViewport)}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),e.getGui().remove()}setCtrls(e){const t=this.headerRowComps;this.headerRowComps={};let i=null;const o=[];for(const s of e){const r=s.instanceId,n=t[r];delete t[r];const a=n??this.createBean(new hb(s));this.headerRowComps[r]=a;const l=a.getGui();o.push(l),l.parentElement!==this.eHeaderWrapper&&this.eHeaderWrapper.appendChild(l),xS(this.eHeaderWrapper,l,i),i=l}this.setHeaderRowFocusableElements(o);for(const s of Object.values(t))this.destroyRowComp(s)}},Sb={tag:"div",cls:"ag-header",attrs:{role:"presentation"}},bb=class extends y{constructor(e,t){super(),this.eTopSection=e,this.eGridViewport=t,this.eHeaderWrapper=V(Sb)}postConstruct(){this.eTopSection.prepend(this.eHeaderWrapper);const e={toggleCss:(t,i)=>this.eHeaderWrapper.classList.toggle(t,i)};this.gridHeaderCtrl=this.createManagedBean(new yu),this.gridHeaderCtrl.setComp(e,this.eHeaderWrapper,this.eGridViewport),this.createManagedBean(new wb(this.eHeaderWrapper,this.eGridViewport,t=>this.gridHeaderCtrl?.setHeaderRowFocusableElements(t)))}destroy(){this.gridHeaderCtrl=void 0,this.eHeaderWrapper.remove(),super.destroy()}},Le={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},En=class extends y{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.gos.get("domLayout"),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},i=t.autoHeight?Le.AUTO_HEIGHT:t.print?Le.PRINT:Le.NORMAL;this.view.updateLayoutClasses(i,t)}};import{RefPlaceholder as yb,_getScrollLeft as Rb,_isVisible as Eb,_setFixedHeight as rs,_setFixedWidth as xb,_setScrollLeft as Fb}from"ag-stack";import{RefPlaceholder as Ou,_isIOSUserAgent as Pb,_isInvisibleScrollbar as Db,_isMacOsUserAgent as Mb,_isVisible as Tb,_requestAnimationFrame as Ab,_waitUntil as Ib}from"ag-stack";var xn=16,Gu=class extends K{constructor(e,t){super(),this.direction=t,this.eViewport=Ou,this.eContainer=Ou,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",Mb()||Pb())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=Db(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.toggleCss("ag-scrollbar-active",!0),i=()=>this.toggleCss("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:i,touchend:i})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),Ab(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.toggleCss("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.toggleCss("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;Ib(this,()=>Tb(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},kb={tag:"div",cls:"ag-body-horizontal-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eViewport",cls:"ag-body-horizontal-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-horizontal-scroll-container"}]},{tag:"div",ref:"eEndSpacer",cls:"ag-body-horizontal-scroll-end-spacer"}]},Nu=class extends Gu{constructor(){super(kb,"horizontal"),this.eEndSpacer=yb,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();const e=this.setContainerWidth.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,leftPinnedWidthChanged:e,rightPinnedWidthChanged:e,gridSizeChanged:e,scrollVisibilityChanged:e,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.setContainerWidth(),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){if(!this.invisibleScrollbar)return;const e=this.beans.pinnedRowModel?.getPinnedBottomTotalHeight()??0;this.getGui().style.bottom=`${e}px`}setContainerWidth(){const e=this.beans.ctrlsSvc.getGridBodyCtrl(),t=e?e.getHorizontalContentWidth()-e.getVerticalScrollbarWidth():this.visibleCols.bodyWidth+this.visibleCols.getLeftStickyColumnContainerWidth()+this.visibleCols.getRightStickyColumnContainerWidth();this.eContainer.style.width=`${Math.max(t,1)}px`}setScrollVisible(){this.enableRtl=this.gos.get("enableRtl");const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,i=this.gos.get("suppressHorizontalScroll"),o=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,r=i?0:o===0&&t?xn:o,n=()=>{if(!this.isAlive())return;this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),rs(this.getGui(),r),rs(this.eViewport,r),rs(this.eContainer,r),rs(this.eEndSpacer,r);const a=this.getVerticalSpacerWidth();xb(this.eEndSpacer,a),this.eEndSpacer.style.display=a>0?"":"none",this.eViewport.style.width=a>0?`calc(100% - ${a}px)`:"100%",r||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(n,100):n()}getVerticalSpacerWidth(){const e=this.beans.ctrlsSvc.getGridBodyCtrl();if(e)return e.getVerticalScrollbarWidth();const t=this.scrollVisibleSvc;if(!t.verticalScrollShowing)return 0;const i=t.getScrollbarWidth()||0;return i>0?i:this.invisibleScrollbar?16:0}getScrollPosition(){return Rb(this.eViewport,this.enableRtl)}setScrollPosition(e){Eb(this.eViewport)||this.attemptSettingScrollPosition(e),Fb(this.eViewport,e,this.enableRtl)}},Lb={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:Nu};import{RefPlaceholder as Vb,_isVisible as Hb,_requestAnimationFrame as Bb,_setFixedWidth as Fn}from"ag-stack";var Ob={tag:"div",cls:"ag-body-vertical-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eSpacer",cls:"ag-body-vertical-scroll-start-spacer"},{tag:"div",ref:"eViewport",cls:"ag-body-vertical-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-vertical-scroll-container"}]}]},_u=class extends Gu{constructor(){super(Ob,"vertical"),this.eSpacer=Vb}postConstruct(){super.postConstruct(),this.enableRtl=this.gos.get("enableRtl");const{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this);const t=this.queueContainerHeightSync.bind(this);this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e),headerHeightChanged:this.onScrollVisibilityChanged.bind(this),pinnedRowsChanged:t,pinnedHeightChanged:t,pinnedRowDataChanged:t}),this.addManagedPropertyListeners(["suppressHorizontalScroll","enableRtl"],this.onScrollVisibilityChanged.bind(this))}setScrollVisible(){const{scrollVisibleSvc:e}=this.beans;this.enableRtl=this.gos.get("enableRtl");const t=e.verticalScrollShowing,i=this.invisibleScrollbar,o=this.beans.ctrlsSvc.getGridBodyCtrl(),s=e.getScrollbarWidth()||0,r=t?o?.getVerticalScrollbarWidth()??s:0,n=r===0&&i?xn:r,a=o?.getHorizontalScrollbarHeight()??0,l=o?.getHeaderRowsOffset()??0,d=this.getGui();d.style.bottom=`${a}px`,this.eSpacer.style.height=`${l}px`,this.toggleCss("ag-scrollbar-invisible",i),Fn(d,n),Fn(this.eViewport,n),Fn(this.eContainer,n),this.setDisplayed(t,{skipAriaHidden:!0}),this.queueContainerHeightSync()}onRowContainerHeightChanged(e){const t=e.getGridBodyCtrl();if(!t)return;const i=t.eGridViewport;this.syncContainerHeight();const o=this.getScrollPosition(),s=i.scrollTop;o!=s&&this.setScrollPosition(s,!0)}queueContainerHeightSync(){Bb(this.beans,()=>this.syncContainerHeight())}syncContainerHeight(){const e=this.beans.ctrlsSvc.getGridBodyCtrl();if(!e)return;const t=e.getScrollContentHeight(),i=e.eGridViewport.clientHeight,o=this.eViewport.clientHeight,s=i-o;this.eContainer.style.height=`${Math.max(1,t-s)}px`}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!Hb(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},Gb={selector:"AG-FAKE-VERTICAL-SCROLL",component:_u};import{_getInnerWidth as zu,_getScrollLeft as Nb,_isElementChildOfClass as Pn,_isInvisibleScrollbar as _b,_setScrollLeft as zb}from"ag-stack";import{Direction as De,_debounce as ns,_getInnerHeight as Wb,_getInnerWidth as Ub,_getScrollLeft as wt,_isIOSUserAgent as qb,_setScrollLeft as as}from"ag-stack";var ot="Viewport",Wu="fakeVScrollComp",Dn=["fakeHScrollComp"],Uu=100,Mn=150,$b=class extends y{constructor(e){super(),this.clearRetryListenerFncs=[],this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isScrollActive=!1,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eGridViewport=e,this.resetLastHScrollDebounced=ns(this,()=>this.lastScrollSource[De.Horizontal]=null,Mn),this.resetLastVScrollDebounced=ns(this,()=>this.lastScrollSource[De.Vertical]=null,Mn)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc}destroy(){super.destroy(),this.clearRetryListenerFncs=[],window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),bodyHeightChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eGridViewport,{scroll:()=>{e(),t()}}),this.ctrlsSvc.whenReady(this,i=>{this.fakeVScrollComp=i.fakeVScrollComp,this.fakeHScrollComp=i.fakeHScrollComp,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.eGridViewport,{scroll:this.onHScroll.bind(this,ot)});for(const e of Dn){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.gos.get("debounceVerticalScrollbar"),t=e?ns(this,this.onVScroll.bind(this,ot),Uu):this.onVScroll.bind(this,ot),i=e?ns(this,this.onVScroll.bind(this,Wu),Uu):this.onVScroll.bind(this,Wu);this.addManagedElementListeners(this.eGridViewport,{scroll:t}),this.registerScrollPartner(this.fakeVScrollComp,i)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.fakeHScrollComp!=null&&(e===void 0&&(e=wt(this.eGridViewport,this.enableRtl)),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...Dn,ot]){if(this.lastScrollSource[De.Horizontal]===t)continue;const i=this.getViewportForSource(t);as(i,e,this.enableRtl)}}getViewportForSource(e){return e===ot?this.eGridViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===De.Vertical?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,De.Horizontal))return;let t=wt(this.getViewportForSource(e),this.enableRtl);const i=this.clampHorizontalScrollPosition(t);Math.abs(i-t)>.1&&(as(this.getViewportForSource(e),Math.abs(i),this.enableRtl),t=i),!this.shouldBlockScrollUpdate(De.Horizontal,t,!0)&&(e!==ot&&(as(this.eGridViewport,Math.abs(t),this.enableRtl),t=wt(this.eGridViewport,this.enableRtl)),this.doHorizontalScroll(t),this.resetLastHScrollDebounced())}onVScroll(e){if(!this.isControllingScroll(e,De.Vertical))return;const t=e===ot?this.eGridViewport.scrollTop:this.fakeVScrollComp.getScrollPosition();let i=t;if(this.shouldBlockScrollUpdate(De.Vertical,i,!0))return;e===ot?this.fakeVScrollComp.setScrollPosition(i):(this.eGridViewport.scrollTop=t,i=this.eGridViewport.scrollTop,this.invalidateVerticalScroll(),i!==t&&this.fakeVScrollComp.setScrollPosition(i,!0));const{animationFrameSvc:o}=this;o?.setScrollTop(i),this.nextScrollTop=i,o?.active?o.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.fakeHScrollComp.getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(De.Horizontal),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.ctrlsSvc.getGridBodyCtrl()?.updateColumnViewport(!0))}isScrolling(){return this.isScrollActive}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===De.Horizontal?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.isScrollActive=!0,this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.isScrollActive=!1,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},Mn)}shouldBlockScrollUpdate(e,t,i=!1){return i&&!qb()?!1:e===De.Vertical?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=Wb(this.eGridViewport),{scrollHeight:i}=this.eGridViewport;return e<0||e+t>i}shouldBlockHorizontalScroll(e){return Math.abs(this.clampHorizontalScrollPosition(e)-e)>.1}redrawRowsAfterScroll(){this.fireScrollEvent(De.Vertical)}checkScrollLeft(){const e=wt(this.eGridViewport,this.enableRtl);let t=!1;for(const i of Dn){const o=this.getViewportForSource(i);if(wt(o,this.enableRtl)!==e){t=!0;break}}t&&this.onHScroll(ot)}scrollGridIfNeeded(e=!1){const t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){e=this.clampHorizontalScrollPosition(e),as(this.eGridViewport,Math.abs(e),this.enableRtl),e=wt(this.eGridViewport,this.enableRtl),this.doHorizontalScroll(e)}getMaxHorizontalScrollLeft(){const e=Ub(this.eGridViewport),t=this.ctrlsSvc.getGridBodyCtrl();if(!t){const o=this.eGridViewport.scrollWidth;return Math.max(0,o-e)}const i=Math.max(t.getHorizontalContentWidth(),e);return Math.max(0,i-e)}clampHorizontalScrollPosition(e){const t=this.getMaxHorizontalScrollLeft();return Dt(e,0,t)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eGridViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){const{lastOffsetHeight:o,lastScrollTop:s}=this,r=this.getBodyViewportHeight(o);return{top:s,bottom:s+r}}this.isVerticalPositionInvalidated=!1;const{scrollTop:e,offsetHeight:t}=this.eGridViewport;this.lastScrollTop=e,this.lastOffsetHeight=t;const i=this.getBodyViewportHeight(t);return{top:e,bottom:e+i}}getApproximateVScollPosition(){if(this.lastScrollTop>=0&&this.lastOffsetHeight>=0){const e=this.getBodyViewportHeight(this.lastOffsetHeight);return{top:this.scrollTop,bottom:this.scrollTop+e}}return this.getVScrollPosition()}getBodyViewportHeight(e){const t=this.ctrlsSvc.getGridBodyCtrl();return t?t.getBodyViewportHeight(e):e}getHScrollPosition(){return this.ctrlsSvc.getGridBodyCtrl()?.getHorizontalScrollPosition()??{left:0,right:0}}isHorizontalScrollShowing(){return this.isHorizontalPositionInvalidated&&(this.lastIsHorizontalScrollShowing=this.beans.scrollVisibleSvc.isHorizontalScrollShowing(),this.isHorizontalPositionInvalidated=!1),this.lastIsHorizontalScrollShowing}scrollHorizontally(e){const t=wt(this.eGridViewport,this.enableRtl);return this.setHorizontalScrollPosition(t+e),wt(this.eGridViewport,this.enableRtl)-t}scrollToTop(){this.setVerticalScrollPosition(0)}ensureNodeVisible(e,t=null){const{rowModel:i}=this.beans,o=i.getRowCount();let s=-1;for(let r=0;r<o;r++){const n=i.getRow(r);if(typeof e=="function"){if(n&&e(n)){s=r;break}}else if(e===n||e===n.data){s=r;break}}s>=0&&this.ensureIndexVisible(s,t)}ensureIndexVisible(e,t,i=0){if(oe(this.gos,"print"))return;const{rowModel:o}=this.beans,s=o.getRowCount();if(typeof e!="number"||e<0||e>=s){this.warn(88,{index:e});return}this.clearRetryListeners();const{frameworkOverrides:r,pageBounds:n,rowContainerHeight:a,rowRenderer:l}=this.beans;r.wrapIncoming(()=>{const d=this.ctrlsSvc.getGridBodyCtrl(),c=o.getRow(e);let u,h,g=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:p,stickyBottomHeight:f}=d,m=c.rowTop,C=c.rowHeight,v=n.getPixelOffset(),S=c.rowTop-v,w=S+c.rowHeight,b=this.getVScrollPosition(),R=a.divStretchOffset,x=b.top+R,D=b.bottom+R,T=D-x,B=a.getScrollPositionForPixel(S),W=a.getScrollPositionForPixel(w-T),fe=Math.min((B+W)/2,S),ne=x+p>S,te=D-f<w;let O=null;t==="top"?O=B-p:t==="bottom"?O=W+f:t==="middle"?O=fe:ne?O=B-p:te&&(W-B>T?O=B-p:O=W+f),O!==null&&(this.setVerticalScrollPosition(O),l.redraw({afterScroll:!0})),u=m!==c.rowTop||C!==c.rowHeight,h=p!==d.stickyTopHeight||f!==d.stickyBottomHeight,g++}while((u||h)&&g<10);if(this.animationFrameSvc?.flushAllFrames(),i<10&&(c?.stub||!this.beans.rowAutoHeight?.areRowsMeasured())){const p=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{const f=this.getVScrollPosition().top;p!==f&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=o.getRowCount())&&this.ensureIndexVisible(e,t,i+1)}})}})}clearRetryListeners(){for(const e of this.clearRetryListenerFncs)e();this.clearRetryListenerFncs=[]}ensureColumnVisible(e,t="auto"){const{colModel:i,frameworkOverrides:o}=this.beans,s=i.getCol(e);if(!s||s.isPinned()||!s.displayed)return;const r=this.getPositionedHorizontalScroll(s,t);o.wrapIncoming(()=>{const n=this.ctrlsSvc.getGridBodyCtrl();r!==null&&n?.setHorizontalScrollLeft(r),n?.updateColumnViewport(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:i,columnAfterEnd:o}=this.isColumnOutsideViewport(e),s=this.ctrlsSvc.getGridBodyCtrl()?.getCenterWidth()??0,r=s<e.getActualWidth();let n=o||r,a=i;t!=="auto"&&(n=t==="start",a=t==="end");const l=t==="middle";if(n||a||l){const{colLeft:d,colMiddle:c,colRight:u}=this.getColumnBounds(e);return l?c-s/2:n?d:u-s}return null}isColumnOutsideViewport(e){const{start:t,end:i}=this.getViewportBounds(),{colLeft:o,colRight:s}=this.getColumnBounds(e),r=i<s,n=t>o;return{columnBeforeStart:r,columnAfterEnd:n}}getColumnBounds(e){const t=e.getLeft(),i=e.getActualWidth();return{colLeft:t,colMiddle:t+i/2,colRight:t+i}}getViewportBounds(){const e=this.ctrlsSvc.getGridBodyCtrl(),t=e?.getCenterWidth()??0,i=e?.getHorizontalScrollLeft()??0,o=i,s=t+i;return{start:o,end:s,width:t}}},Kb="ag-selectable",jb="ag-column-moving",qu=class extends y{constructor(){super(...arguments),this.topPinnedRowsHeight=0,this.bottomPinnedRowsHeight=0,this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,i,o,s,r,n){this.comp=e,this.eGridBody=t,this.eGridViewport=i,this.eScrollingRows=o,this.eTop=s,this.eTopExtraRows=r,this.eBottom=n,this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",a=>this.setCellTextSelection(a.currentValue)),this.createManagedBean(new En(this.comp)),this.scrollFeature=this.createManagedBean(new $b(i)),this.beans.rowDragSvc?.setupRowDrag(o,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([s,i,n]),this.setGridRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.filterManager?.mountAdvFilterTopSectionComp({mountComp:a=>r.appendChild(a),unmountComp:a=>a.remove()}),this.setPinnedRowsHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updatePinnedColumnStickyOffsets(),this.updateScrollingClasses(),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setPinnedRowsHeights.bind(this),t=this.setGridRole.bind(this),i=this.toggleRowResizeStyles.bind(this),o=this.updatePinnedColumnStickyOffsets.bind(this),s=this.onGridSizeChanged.bind(this),r=()=>{this.updateScrollableAreaWidth(),this.updateScrollingClasses()};this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),displayedColumnsWidthChanged:this.updateScrollableAreaWidth.bind(this),leftPinnedWidthChanged:r,rightPinnedWidthChanged:r,scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollbarWidthChanged:o,scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,pinnedRowsChanged:e,headerHeightChanged:e,gridSizeChanged:s,gridViewportWidthChanged:s,columnRowGroupChanged:t,columnPivotChanged:t,rowResizeStarted:i,rowResizeEnded:i}),this.addManagedPropertyListener("treeData",t),this.addManagedPropertyListener("enableRtl",o)}toggleRowResizeStyles(e){const t=e.type==="rowResizeStarted";this.comp.setPreventRowAnimationCssOnContainers(t)}onGridColumnsChanged(){const e=this.beans.colModel.colsList;this.comp.setColumnCount(e.length),this.updateScrollableAreaWidth(),this.setGridRole()}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setStickyWidth(t),this.updatePinnedColumnStickyOffsets(),this.updateScrollableAreaWidth(),this.updateScrollingClasses(),this.updateGridViewportWidth()}onGridSizeChanged(){this.updateScrollableAreaWidth(),this.updatePinnedColumnStickyOffsets(),this.updateGridViewportWidth()}updateScrollableAreaWidth(){const e=this.isPinnedWidthOverflowingViewport(),t=this.getHorizontalContentWidth(),i=this.getHorizontalViewportWidth();this.comp.setGridScrollableAreaWidth(`${Math.max(t,i,1)}px`),this.comp.setPinnedColumnsOverflowing(e),e&&this.getHorizontalScrollLeft()!==0&&this.setHorizontalScrollLeft(0)}getHorizontalContentWidth(e=this.scrollVisibleSvc.verticalScrollShowing){return this.isPinnedWidthOverflowingViewport(e)?0:this.getColumnsWidth()+this.getVerticalScrollbarWidth(e)}getColumnsWidth(){const{visibleCols:e}=this.beans;return e.bodyWidth+e.getLeftStickyColumnContainerWidth()+e.getRightStickyColumnContainerWidth()}isPinnedWidthOverflowingViewport(e=this.scrollVisibleSvc.verticalScrollShowing){if(oe(this.gos,"print"))return!1;const t=this.getPinnedWidth();return t>0&&t>=this.getViewportWidthWithoutScrollbar(e)}getPinnedWidth(){const{visibleCols:e}=this.beans;return e.getLeftStickyColumnContainerWidth()+e.getRightStickyColumnContainerWidth()}getHorizontalViewportWidth(){return zu(this.eGridViewport)}getViewportWidthWithoutScrollbar(e=this.scrollVisibleSvc.verticalScrollShowing){return Math.max(0,zu(this.eGridViewport)-this.getVerticalScrollbarWidth(e))}getCenterWidth(e=this.scrollVisibleSvc.verticalScrollShowing){return Math.max(0,this.getViewportWidthWithoutScrollbar(e)-this.getPinnedWidth())}getHorizontalScrollLeft(){return Nb(this.eGridViewport,this.gos.get("enableRtl"))}setHorizontalScrollLeft(e){zb(this.eGridViewport,e,this.gos.get("enableRtl"))}getHorizontalScrollPosition(){const e=this.getHorizontalScrollLeft();return{left:e,right:e+this.getCenterWidth()}}updateColumnViewport(e=!1){this.beans.colViewport.setScrollPosition(this.getCenterWidth(),this.getHorizontalScrollLeft(),e)}updateGridViewportWidth(){const e=this.getViewportWidthWithoutScrollbar();this.eGridViewport.style.setProperty("--ag-internal-grid-viewport-width",`${e}px`)}setGridRole(){const{rowGroupColsSvc:e,colModel:t,gos:i}=this;let o=i.get("treeData");if(!o){const s=t.pivotMode;o=(e?e.columns.length:0)>=(s?2:1)}this.comp.setGridRole(o?"treegrid":"grid")}addFocusListeners(e){for(const t of e)this.addManagedElementListeners(t,{focusin:i=>{const{target:o}=i,s=Pn(o,"ag-root",t);t.classList.toggle("ag-has-focus",!s)},focusout:i=>{const{target:o,relatedTarget:s}=i,r=t.contains(s),n=Pn(s,"ag-root",t);Pn(o,"ag-root",t)||(!r||n)&&t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss(jb,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(Kb,e)}updateScrollingClasses(){const{eGridBody:{classList:e},scrollVisibleSvc:t,beans:{visibleCols:i}}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap),e.toggle("ag-has-left-pinned-cols",i.getLeftStickyColumnContainerWidth()>0),e.toggle("ag-has-right-pinned-cols",i.getRightStickyColumnContainerWidth()>0)}updatePinnedColumnStickyOffsets(){const{scrollVisibleSvc:e,gos:t,eGridBody:i}=this,o=e.verticalScrollShowing?this.getVerticalScrollbarWidth():0,s=t.get("enableRtl"),r=s?o:0,n=s?0:o;i.style.setProperty("--ag-internal-pinned-left-sticky-offset",`${r}px`),i.style.setProperty("--ag-internal-pinned-right-sticky-offset",`${n}px`)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){this.beans.editSvc?.addStopEditingWhenGridLosesFocus([this.eGridViewport,this.eBottom,this.eTop])}updateRowCount(){const e=an(this.beans),{rowModel:t,pinnedRowModel:i}=this.beans,o=i?.getPinnedTopRowCount()??0,s=i?.getPinnedBottomRowCount()??0,r=t.isLastRowIndexKnown()?t.getRowCount():-1,n=r===-1?-1:e+o+r+s;this.comp.setRowCount(n)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let i=t.sizesMeasured;const o=()=>{const s=i&&Tt(this.gos)&&!e.stretching;this.comp.setRowAnimationCssOnScrollableArea(s)};o(),this.addManagedEventListeners({heightScaleChanged:o}),this.addManagedPropertyListener("animateRows",o),this.addManagedEventListeners({stylesChanged:()=>{!i&&t.sizesMeasured&&(i=!0,o())}})}addBodyViewportListener(){const{eGridViewport:e,eTop:t,eBottom:i,beans:{popupSvc:o,touchSvc:s}}=this,r=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:r}),s?.mockBodyContextMenu(this,r),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,o)});const n=this.onStickyWheel.bind(this);for(const a of[t,i])this.addManagedElementListeners(a,{wheel:n})}onStickyWheel(e){const{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onBodyViewportContextMenu(e,t,i){if(!e&&!i)return;this.gos.get("preventDefaultOnContextMenu")&&(e||i).preventDefault();const o=(e||t)?.target,s=o instanceof Element?o:null,r=s!=null&&(s===this.eGridViewport||this.eGridViewport.contains(s)),n=!!s?.closest(".ag-row, .ag-header-row"),a=!!s?.closest(".ag-grid-pinned-top-rows");r&&!n&&!a&&this.beans.contextMenuSvc?.showContextMenu({mouseEvent:e,touchEvent:i,value:null,anchorToElement:this.eGridBody,source:"ui"})}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e?.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eGridViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eGridViewport.scrollTop-t}setPinnedRowsHeights(){const{pinnedRowModel:e}=this,t=e?.getPinnedTopTotalHeight(),i=e?.getPinnedBottomTotalHeight(),{environment:o}=this.beans,s=o.getPinnedRowBorderWidth(),r=(t??0)+(t?s:0),n=(i??0)+(i?s:0);this.topPinnedRowsHeight=r,this.bottomPinnedRowsHeight=n,this.ctrlsSvc.get("pinnedTop")?.setContainerHeight(r),this.ctrlsSvc.get("pinnedBottom")?.setContainerHeight(n),this.refreshTopSection(),this.refreshBottomSection()}refreshTopSection(){const e=this.filterManager?.getHeaderHeight()??0,t=this.getHeaderRowsOffset();this.eTopExtraRows.style.top="var(--ag-internal-header-rows-height, 0px)";const i=t;this.ctrlsSvc.get("pinnedTop")?.setContainerTop(i);const o=i+this.topPinnedRowsHeight;this.ctrlsSvc.get("stickyTop")?.setContainerTop(o),this.comp.setPinnedSection("top",{height:this.topPinnedRowsHeight+e,invisible:this.topPinnedRowsHeight<=0})}refreshBottomSection(){this.ctrlsSvc.get("stickyBottom")?.setContainerTop(0),this.ctrlsSvc.get("pinnedBottom")?.setContainerTop(this.stickyBottomHeight),this.comp.setPinnedSection("bottom",{height:this.bottomPinnedRowsHeight,invisible:this.bottomPinnedRowsHeight<=0})}setStickyTopHeight(e=0){this.stickyTopHeight!==e&&(this.stickyTopHeight=e,this.ctrlsSvc.get("stickyTop")?.setContainerHeight(e),this.refreshTopSection())}setStickyBottomHeight(e=0){this.stickyBottomHeight!==e&&(this.stickyBottomHeight=e,this.ctrlsSvc.get("stickyBottom")?.setContainerHeight(e),this.comp.setStickyBottomHeight(`${e}px`),this.refreshBottomSection(),this.updateStickyRowsHeightAdjustment(),this.eventSvc.dispatchEvent({type:"stickyBottomOffsetChanged",offset:e}))}updateStickyRowsHeightAdjustment(){const{stickyBottomHeight:e,beans:{rowContainerHeight:t}}=this;t.stickyBottomRowsHeight!==e&&(t.stickyBottomRowsHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}setStickyWidth(e){this.comp.setStickyBottomWidth(e?`calc(100% - ${this.getVerticalScrollbarWidth()}px)`:"100%")}getHeaderRowsOffset(){const t=this.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight??0,i=this.filterManager?.getHeaderHeight()??0,o=this.beans.environment.getHeaderRowBorderWidth();return i+t+o}getTopPinnedRowsOffset(){return this.getHeaderRowsOffset()+this.topPinnedRowsHeight}getBottomPinnedRowsOffset(){return this.bottomPinnedRowsHeight}getBodyViewportHeight(e){const t=e-this.getTopPinnedRowsOffset()-this.bottomPinnedRowsHeight;return Math.max(0,t)}getScrollContentHeight(){const e=this.getTopPinnedRowsOffset(),t=this.beans.rowContainerHeight.getAdjustedUiContainerHeight()??0,i=this.bottomPinnedRowsHeight+this.stickyBottomHeight,o=e+t+i;return Math.max(o,this.eGridViewport.clientHeight)}getVerticalScrollbarWidth(e=this.scrollVisibleSvc.verticalScrollShowing){const{scrollVisibleSvc:t}=this;if(!e)return 0;const i=t.getScrollbarWidth()||0;return i===0?0:i}getHorizontalScrollbarHeight(){if(!(this.scrollVisibleSvc.horizontalScrollShowing&&!this.gos.get("suppressHorizontalScroll")))return 0;const i=this.ctrlsSvc.get("fakeHScrollComp")?.getGui().offsetHeight??0;if(i>0)return i;const o=this.scrollVisibleSvc.getScrollbarWidth()||0;return o===0&&_b()?xn:o}};import{RefPlaceholder as $u,_ensureDomOrder as Qb,_setDisplayed as Zb}from"ag-stack";import{_addStylesToElement as Yb,_setDomChildOrder as Tn}from"ag-stack";import{CssClassManager as Jb,_addStylesToElement as Xb,_clearElement as An,_getActiveDomElement as Ku,_missing as e3,_removeFromParent as Yi,_toString as t3}from"ag-stack";var i3=class extends K{constructor(e,t,i,o,s){super(),this.cellCtrl=t,this.rowResizerElement=null,this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.gos=e.gos,this.column=t.column,this.rowNode=t.rowNode,this.eRow=o;const r=V({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.column.colIdSanitised}});this.eCell=r;let n;t.isCellSpanning()?(n=V({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),n.appendChild(r),this.setTemplateFromElement(n)):this.setTemplateFromElement(r),this.cellCssManager=new Jb(()=>r),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);const a={toggleCss:(l,d)=>this.cellCssManager.toggleCss(l,d),setUserStyles:l=>Xb(r,l),getFocusableElement:()=>r,setIncludeSelection:l=>this.includeSelection=l,setIncludeRowDrag:l=>this.includeRowDrag=l,setIncludeDndSource:l=>this.includeDndSource=l,setRowResizerElement:l=>this.setRowResizerElement(l),setRenderDetails:(l,d,c)=>this.setRenderDetails(l,d,c),setEditDetails:(l,d,c)=>this.setEditDetails(l,d,c),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue(),refreshEditStyles:(l,d)=>this.refreshEditStyles(l,d)};t.setComp(a,r,n,this.eCellWrapper,i,s,void 0)}getParentOfValue(){return this.eCellValue??this.eCellWrapper??this.eCell}setRowResizerElement(e){this.rowResizerElement&&Yi(this.rowResizerElement),this.rowResizerElement=e,e&&this.eCell.appendChild(e)}setRenderDetails(e,t,i){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;const s=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(i||s)&&this.refreshCellRenderer(e)||(this.firstRender||this.destroyRenderer(),this.createCellRendererInstance(e)):(this.firstRender||this.destroyRenderer(),this.insertValueWithoutCellRenderer(t)),this.rowDraggingComp?.refreshVisibility(),this.rowResizerElement&&!this.rowResizerElement.parentElement&&this.eCell.appendChild(this.rowResizerElement)}setEditDetails(e,t,i){e?this.createCellEditorInstance(e,t,i):this.destroyEditor()}removeControls(){const e=this.beans.context;this.checkboxSelectionComp=e.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=e.destroyBean(this.dndSourceComp),this.rowDraggingComp=e.destroyBean(this.rowDraggingComp)}refreshWrapper(e){const t=this.includeRowDrag||this.includeDndSource||this.includeSelection,i=t||this.forceWrapper,o=i&&this.eCellWrapper==null;o&&(this.eCellWrapper=V({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));const s=!i&&this.eCellWrapper!=null;s&&(Yi(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssManager.toggleCss("ag-cell-value",!i);const r=!e&&i,n=r&&this.eCellValue==null;if(n){const d=this.cellCtrl.getCellValueClass();this.eCellValue=V({tag:"span",cls:d,role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue)}const a=!r&&this.eCellValue!=null;a&&(Yi(this.eCellValue),this.eCellValue=void 0);const l=o||s||n||a;return l&&this.removeControls(),!e&&t&&this.addControls(),l}addControls(){const{cellCtrl:e,eCellWrapper:t,eCellValue:i,includeRowDrag:o,includeDndSource:s,includeSelection:r}=this,n=a=>{a&&t.insertBefore(a.getGui(),i)};o&&this.rowDraggingComp==null&&(this.rowDraggingComp=e.createRowDragComp(),n(this.rowDraggingComp)),s&&this.dndSourceComp==null&&(this.dndSourceComp=e.createDndSource(),n(this.dndSourceComp)),r&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=e.createSelectionCheckbox(),n(this.checkboxSelectionComp))}createCellEditorInstance(e,t,i){const o=this.editorVersion,s=e.newAgStackInstance(),{params:r}=e;s.then(a=>this.afterCellEditorCreated(o,a,r,t,i)),e3(this.cellEditor)&&r.cellStartedEdit&&this.cellCtrl.focusCell({forceBrowserFocus:!0})}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();An(t);const i=t3(e);i!=null&&(t.textContent=i)}destroyRenderer(e=!0){const{context:t}=this.beans;this.cellRenderer=t.destroyBean(this.cellRenderer),Yi(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++,e&&this.cellCtrl.resetCellRendererTooltip()}destroyEditor(){const{context:e}=this.beans;(this.cellEditorPopupWrapper?.getGui().contains(Ku(this.beans))||this.cellCtrl.hasBrowserFocus())&&this.eCell.focus({preventScroll:!0}),this.hideEditorPopup?.(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),Yi(this.cellEditorGui),this.cellCtrl.disableEditorTooltipFeature(),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(this.cellRenderer?.refresh==null||this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return t===!0||t===void 0}createCellRendererInstance(e){const t=this.rendererVersion,i=r=>n=>{if(this.rendererVersion!==t||!this.isAlive())return;const l=r.newAgStackInstance(),d=this.afterCellRendererCreated.bind(this,t,r.componentClass);l?.then(d)},{animationFrameSvc:o}=this.beans;let s;if(o?.active&&this.firstRender?s=(r,n=!1)=>{o.createTask(i(r),this.rowNode.rowIndex,"p2",r.componentFromFramework,n)}:s=r=>i(r)(),e.params?.deferRender&&!this.cellCtrl.rowNode.group){const{loadingComp:r,onReady:n}=this.cellCtrl.getDeferLoadingCellRenderer();r&&(s(r),n.then(()=>s(e,!0)))}else s(e)}afterCellRendererCreated(e,t,i){if(!this.isAlive()||e!==this.rendererVersion){this.beans.context.destroyBean(i);return}this.cellRenderer=i,this.cellRendererClass=t;const s=i.getGui();if(this.cellRendererGui=s,s!=null){const r=this.getParentOfValue();An(r),r.appendChild(s)}}afterCellEditorCreated(e,t,i,o,s){const r=e!==this.editorVersion,{context:n}=this.beans;if(r){n.destroyBean(t);return}if(t.isCancelBeforeStart?.()){n.destroyBean(t),this.cellCtrl.stopEditing(!0);return}if(!t.getGui){this.beans.log.warn(97,{colId:this.column.getId()}),n.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();const l=o||t.isPopup?.();l?this.addPopupCellEditor(i,s):this.addInCellEditor(),this.refreshEditStyles(!0,l),t.afterGuiAttached?.(),this.cellCtrl.enableEditorTooltipFeature(t),this.beans.editSvc?.onEditorAttached(this.cellCtrl)}refreshEditStyles(e,t){const{cellCssManager:i}=this;i.toggleCss("ag-cell-inline-editing",e&&!t),i.toggleCss("ag-cell-popup-editing",e&&!!t),i.toggleCss("ag-cell-not-inline-editing",!e||!!t)}addInCellEditor(){const{eCell:e}=this;e.contains(Ku(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),An(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){const{gos:i,context:o,popupSvc:s,editSvc:r}=this.beans;i.get("editType")==="fullRow"&&this.beans.log.warn(98);const n=this.cellEditorPopupWrapper=o.createBean(r.createPopupEditorWrapper(e)),{cellEditor:a,cellEditorGui:l,eCell:d,rowNode:c,column:u,cellCtrl:h}=this,g=n.getGui();l&&g.appendChild(l);const p=i.get("stopEditingWhenCellsLoseFocus"),f=t??a.getPopupPosition?.()??"over",m=i.get("enableRtl"),C={ePopup:g,additionalParams:{column:u,rowNode:c},type:"popupCellEditor",eventSource:d,position:f,alignSide:m?"right":"left",keepWithinBounds:!0},v=s.positionPopupByComponent.bind(s,C),S=s.addPopup({modal:p,eChild:g,closeOnEsc:!0,closedCallback:w=>{r.onPopupEditorClosed(h,w)},anchorToElement:d,positionCallback:v,ariaOwns:d});S&&(this.hideEditorPopup=S.hideFunc)}detach(){this.getGui().remove()}destroy(){this.destroyRenderer(!1),this.destroyEditor(),this.removeControls(),super.destroy()}},o3=new Set(["CANVAS","IMG","SVG","VIDEO","AUDIO","INPUT","IFRAME","PICTURE"]),In=(e,t)=>{const i=V({tag:"div",cls:e,role:"presentation"});if(!t)return{container:i,wrapper:i};const o=V({tag:"div",role:"presentation",cls:"ag-grid-container-wrapper"});return i.appendChild(o),{container:i,wrapper:o}},s3=class extends K{constructor(e,t,i){super(),this.fullWidthCellRenderersBySection={},this.fullWidthCellRendererParamsBySection={},this.cellComps=new Map,this.beans=t,this.rowCtrl=e;const o=e.shouldCreateCellSections(),s=V({tag:"div",role:"row",attrs:{"comp-id":`${this.getCompId()}`}});if(o){const a=In("ag-grid-pinned-left-cells",!0),l=In("ag-grid-scrolling-cells",!1),d=In("ag-grid-pinned-right-cells",!0);this.ePinnedLeftSection=a.container,this.ePinnedLeftCells=a.wrapper,this.eScrollingCells=l.wrapper,this.ePinnedRightSection=d.container,this.ePinnedRightCells=d.wrapper,s.append(l.container)}this.setInitialStyle(s),this.setTemplateFromElement(s);const r=s.style;this.domOrder=this.rowCtrl.getDomOrder();const n={setDomOrder:a=>this.domOrder=a,setCellCtrls:a=>this.setCellCtrls(a),getPinnedLeftRowElement:()=>this.ePinnedLeftCells,getScrollingRowElement:()=>this.eScrollingCells,getPinnedRightRowElement:()=>this.ePinnedRightCells,refreshPinnedSections:()=>this.refreshPinnedSections(),showFullWidth:a=>this.showFullWidth(a),showEmbeddedFullWidth:a=>this.showEmbeddedFullWidth(a),getFullWidthCellRenderers:()=>this.getAllFullWidthCellRenderers(),getFullWidthCellRendererParams:()=>this.getPrimaryFullWidthCellRendererParams(),getFullWidthCellRendererParamsForPinned:a=>this.getFullWidthCellRendererParamsForPinned(a),toggleCss:(a,l)=>this.toggleCss(a,l),setUserStyles:a=>Yb(s,a),setTop:a=>r.top=a,setTransform:a=>r.transform=a,setRowIndex:a=>s.setAttribute("row-index",a),setRowId:a=>s.setAttribute("row-id",a),setRowBusinessKey:a=>s.setAttribute("row-business-key",a),refreshFullWidth:a=>{const l=a();return this.fullWidthCellRendererParams=l,this.fullWidthCellRenderer?.refresh?.(l)??!1},refreshEmbeddedFullWidth:a=>this.refreshEmbeddedFullWidth(a)};e.setComp(n,this.getGui(),i,void 0),this.addDestroyFunc(()=>{e.unsetComp(i)})}refreshPinnedSections(){const e=this.rowCtrl.getMappedPinnedCellGroupWidths(),t=this.eScrollingCells;t&&(t.style.width=`${e.centerWidth}px`);const i=(o,s,r,n)=>{if(o){if(!r){o.remove();return}o.style.width=`${s}px`,!o.parentNode&&t&&t[n](o)}};i(this.ePinnedLeftSection,e.leftWidth,e.renderLeft,"before"),i(this.ePinnedRightSection,e.rightWidth,e.renderRight,"after")}setInitialStyle(e){const t=this.rowCtrl.getInitialTransform();if(t)e.style.setProperty("transform",t);else{const i=this.rowCtrl.getInitialRowTop();i&&e.style.setProperty("top",i)}}showFullWidth(e){const t=this.getGui(),i=V({tag:"div",cls:"ag-full-width-anchor",role:this.rowCtrl.getFullWidthAnchorRole()});t.appendChild(i);const o=s=>{if(this.isAlive()){const r=s.getGui();i.appendChild(r),this.rowCtrl.setupDetailRowAutoHeight(r),this.setFullWidthRowComp(s,e.params)}else this.beans.context.destroyBean(s)};e.newAgStackInstance().then(o)}showEmbeddedFullWidth(e){this.showEmbeddedFullWidthSection("left",e.left,this.ePinnedLeftCells),this.showEmbeddedFullWidthSection("center",e.center,this.eScrollingCells),this.showEmbeddedFullWidthSection("right",e.right,this.ePinnedRightCells)}showEmbeddedFullWidthSection(e,t,i){const o=i??this.getGui(),s=r=>{if(!this.isAlive()){this.beans.context.destroyBean(r);return}const n=r.getGui();n?o.replaceChildren(n):o.replaceChildren();const a=o.firstElementChild,l=a!=null&&(a.childElementCount>0||!!a.textContent?.trim()||o3.has(a.tagName));this.rowCtrl.setEmbeddedSectionHasContent(e,l),this.setEmbeddedFullWidthRowComp(e,r,t.params),this.rowCtrl.refreshPinnedCellGroupWidths()};t.newAgStackInstance().then(s)}refreshEmbeddedFullWidth(e){let t=!0;const i=[["left","left"],["center",null],["right","right"]];for(const[o,s]of i){const r=e(s);this.fullWidthCellRendererParamsBySection[o]=r;const n=this.fullWidthCellRenderersBySection[o];n?.refresh&&!n.refresh(r)&&(t=!1)}return this.fullWidthCellRenderer=this.fullWidthCellRenderersBySection.center??null,this.fullWidthCellRendererParams=this.fullWidthCellRendererParamsBySection.center,t}getAllFullWidthCellRenderers(){if(this.rowCtrl.isEmbeddedFullWidth){const{left:e,center:t,right:i}=this.fullWidthCellRenderersBySection;return[e,t,i].filter(o=>o!=null)}return this.fullWidthCellRenderer?[this.fullWidthCellRenderer]:[]}getPrimaryFullWidthCellRendererParams(){return this.fullWidthCellRendererParams??this.fullWidthCellRendererParamsBySection.center}getFullWidthCellRendererParamsForPinned(e){return this.fullWidthCellRendererParamsBySection[this.getEmbeddedSectionForPinned(e)]}getEmbeddedSectionForPinned(e){return e==="left"?"left":e==="right"?"right":"center"}setCellCtrls(e){const t=new Map(this.cellComps);for(const i of e){const o=i.instanceId;this.cellComps.has(o)?t.delete(o):this.newCellComp(i)}this.destroyCells(t),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;const t=[],i=[],o=[];for(const s of e){const r=this.cellComps.get(s.instanceId);if(r){const n=this.rowCtrl.getCellLane(s);n==="left"?t.push(r.getGui()):n==="right"?o.push(r.getGui()):i.push(r.getGui())}}this.ePinnedLeftCells&&Tn(this.ePinnedLeftCells,t),this.eScrollingCells&&Tn(this.eScrollingCells,i),this.ePinnedRightCells&&Tn(this.ePinnedRightCells,o)}newCellComp(e){const t=this.beans.editSvc?.isEditing(e,{withOpenEditor:!0})??!1,i=this.rowCtrl.getCellLane(e);let o;i==="left"?o=this.ePinnedLeftCells:i==="right"?o=this.ePinnedRightCells:o=this.eScrollingCells;const s=o??this.getGui(),r=new i3(this.beans,e,this.rowCtrl.printLayout,s,t);this.cellComps.set(e.instanceId,r),s.appendChild(r.getGui())}destroy(){super.destroy(),this.destroyCells(this.cellComps)}setFullWidthRowComp(e,t){this.fullWidthCellRenderer=e,this.fullWidthCellRendererParams=t,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer),this.fullWidthCellRendererParams=void 0})}setEmbeddedFullWidthRowComp(e,t,i){this.fullWidthCellRenderersBySection[e]=t,this.fullWidthCellRendererParamsBySection[e]=i,e==="center"&&(this.fullWidthCellRenderer=t,this.fullWidthCellRendererParams=i),this.addDestroyFunc(()=>{this.fullWidthCellRenderersBySection[e]=this.beans.context.destroyBean(this.fullWidthCellRenderersBySection[e]),this.fullWidthCellRendererParamsBySection[e]=void 0,e==="center"&&(this.fullWidthCellRenderer=null,this.fullWidthCellRendererParams=void 0)})}destroyCells(e){for(const t of e.values()){if(!t)continue;const i=t.cellCtrl.instanceId;this.cellComps.get(i)===t&&(t.detach(),t.destroy(),this.cellComps.delete(i))}}};import{_getInnerWidth as r3,_isInDOM as n3,_observeResize as a3}from"ag-stack";var l3=class extends y{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){const e=oe(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:i}=this.beans,o=t.bodyWidth,s=t.getLeftStickyColumnContainerWidth(),r=t.getRightStickyColumnContainerWidth();let n;e?n=o+s+r:(n=o,this.addSpacer&&(this.gos.get("enableRtl")?s:r)===0&&i.verticalScrollShowing&&(n+=i.getScrollbarWidth())),this.callback(n)}};import{_getInnerHeight as d3,_observeResize as c3,_requestAnimationFrame as kn}from"ag-stack";var u3=class extends y{constructor(e){super(),this.centerContainerCtrl=e,this.centerViewportResizeQueued=!1,this.viewportGeometryRefreshQueued=!1,this.scrollVisibilityRefreshQueued=!1}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl,this.listenForResize()});const e=this.scheduleViewportGeometryRefresh.bind(this);this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this),scrollVisibilityChanged:this.onViewportGeometryChanged.bind(this),pinnedHeightChanged:e,pinnedRowsChanged:e,headerHeightChanged:e}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const{beans:e,centerContainerCtrl:t,gridBodyCtrl:i}=this;if(!i)return;const o=()=>this.scheduleCenterViewportResize();t.registerViewportResizeListener(o);const s=c3(e,t.eContainer,()=>this.scheduleScrollVisibilityRefresh());this.addDestroyFunc(()=>s())}scheduleCenterViewportResize(){if(this.centerViewportResizeQueued)return;this.centerViewportResizeQueued=!0;const{beans:e}=this;kn(e,()=>{this.centerViewportResizeQueued=!1,this.onCenterViewportResized()})}scheduleScrollVisibilityRefresh(){if(this.scrollVisibilityRefreshQueued)return;this.scrollVisibilityRefreshQueued=!0;const{beans:e}=this;kn(e,()=>{this.scrollVisibilityRefreshQueued=!1,this.scrollVisibleSvc.refresh()})}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}scheduleViewportGeometryRefresh(){if(this.viewportGeometryRefreshQueued)return;this.viewportGeometryRefreshQueued=!0;const{beans:e}=this;kn(e,()=>{this.viewportGeometryRefreshQueued=!1,this.onViewportGeometryChanged()})}onViewportGeometryChanged(){this.gridBodyCtrl&&this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.gridBodyCtrl)if(this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const i=this.gridBodyCtrl.getCenterWidth();i!==this.centerWidth&&(this.centerWidth=i,t?.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){const e=this.gridBodyCtrl;e&&(this.scrollVisibleSvc.refresh(),this.checkBodyHeight(),this.checkViewportWidth(),this.onHorizontalViewportChanged(),e.scrollFeature.checkScrollLeft())}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl;if(!e)return;const t=e.eGridViewport,i=e.getBodyViewportHeight(d3(t));this.bodyHeight!==i&&(this.bodyHeight=i,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}checkViewportWidth(){const e=this.gridBodyCtrl;if(!e)return;const t=e.getHorizontalViewportWidth();this.viewportWidth!==t&&(this.viewportWidth=t,this.eventSvc.dispatchEvent({type:"gridViewportWidthChanged"}))}onHorizontalViewportChanged(){this.gridBodyCtrl?.updateColumnViewport()}};import{KeyCode as le,_isEventFromPrintableCharacter as h3,_isEventFromThisInstance as ju,_isEventSupported as Qu,_normaliseQwertyAzerty as g3}from"ag-stack";function Ji(e,t,i,o){const s=t.getColDef().cellRendererParams?.suppressMouseEventHandling;return Zu(e,t,i,o,s)}function p3(e,t,i,o){const s=t?.suppressMouseEventHandling;return Zu(e,void 0,i,o,s)}function Zu(e,t,i,o,s){return s?s(G(e,{column:t,node:i,event:o})):!1}function Yu(e,t,i){let o=t;for(;o;){const s=Gd(e,o,i);if(s)return s;o=o.parentElement}return null}var ls="cellCtrl";function ds(e,t){return Yu(e,t,ls)}var cs="renderedRow";function Ju(e,t){return Yu(e,t,cs)}function Ln(e,t,i,o,s){const r=o?o.colDef.suppressKeyboardEvent:void 0;if(!r)return!1;const n=G(e,{event:t,editing:s,column:o,node:i,data:i.data,colDef:o.colDef});return!!(r&&r(n))}function Xu(e){const{pinnedRowModel:t,rowModel:i,rangeSvc:o,visibleCols:s}=e;if(!o||s.allCols.length===0)return;const r=t?.isEmpty("top")??!0,n=t?.isEmpty("bottom")??!0,a=r?null:"top";let l,d;n?(l=null,d=i.getRowCount()-1):(l="bottom",d=t?.getPinnedBottomRowCount()??-1),o.setCellRange({rowStartIndex:0,rowStartPinned:a,rowEndIndex:d,rowEndPinned:l})}var f3=class extends y{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){let e="mousedown";Qu("pointerdown")?e="pointerdown":Qu("touchstart")&&(e="touchstart");const t=["dblclick","contextmenu","mouseover","mouseout","click",e];for(const i of t){const o=this.processMouseEvent.bind(this,i);this.addManagedElementListeners(this.element,{[i]:o})}}processMouseEvent(e,t){if(!ju(this.beans,t)||We(t))return;const{cellCtrl:i,rowCtrl:o}=this.getControlsForEventTarget(t.target);if(e==="contextmenu"){if(!i&&!o)return;i?.column&&i.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,o,i)}else i&&i.onMouseEvent(e,t),o&&o.onMouseEvent(e,t)}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:ds(t,e),rowCtrl:Ju(t,e)}}processKeyboardEvent(e,t){const{cellCtrl:i,rowCtrl:o}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(i?this.processCellKeyboardEvent(i,e,t):o?.isFullWidth()&&this.processFullWidthRowKeyboardEvent(o,e,t))}processCellKeyboardEvent(e,t,i){const o=this.editSvc?.isEditing(e,{withOpenEditor:!0})??!1;!Ln(this.gos,i,e.rowNode,e.column,o)&&t==="keydown"&&(!o&&this.beans.navigation?.handlePageScrollingKey(i)||e.onKeyDown(i),this.doGridOperations(i,o),h3(i)&&e.processCharacter(i)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(i,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,i){const{rowNode:o}=e,r=this.beans.focusSvc.getFocusedCell()?.column;!Ln(this.gos,i,o,r,!1)&&t==="keydown"&&this.processFullWidthRowKeyDown(e,i,r),t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",i))}processFullWidthRowKeyDown(e,t,i){switch(t.key){case le.PAGE_HOME:case le.PAGE_END:case le.PAGE_UP:case le.PAGE_DOWN:this.beans.navigation?.handlePageScrollingKey(t,!0);return;case le.LEFT:case le.RIGHT:if(!this.gos.get("embedFullWidthRows"))return;case le.UP:case le.DOWN:e.onKeyboardNavigate(t);return;case le.F2:this.processFullWidthRowNoteShortcut(e,t,i,this.beans.notesSvc);return;case le.TAB:e.onTabKeyDown(t);return;case le.SPACE:if(t.target!==e.getCurrentRowElement())return;Ye(this.gos)&&this.beans.selectionSvc?.handleSelectionEvent(t,e.rowNode,"spaceKey"),t.preventDefault();return;default:}}processFullWidthRowNoteShortcut(e,t,i,o=this.beans.notesSvc){if(!t.shiftKey||!o?.hasDataSource())return;const s=e.rowNode,r=e.findInfoForEvent(t);let n;if(r){const{pinned:l}=r;n={rowNode:s,location:"fullWidthRow",pinned:l==="left"||l==="right"?l:void 0}}else i&&(n={rowNode:s,column:i});if(!n)return;const a=o.getNoteAccess(n);a&&(!a.isSuppressed||a.canView)&&(o.showNote(a.params,!0),t.preventDefault())}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!ju(this.beans,e))return;const i=g3(e),{clipboardSvc:o,undoRedo:s}=this.beans;if(i===le.A)return this.onCtrlAndA(e);if(i===le.C)return this.onCtrlAndC(o,e);if(i===le.D)return this.onCtrlAndD(o,e);if(i===le.V)return this.onCtrlAndV(o,e);if(i===le.X)return this.onCtrlAndX(o,e);if(i===le.Y)return this.onCtrlAndY(s);if(i===le.Z)return this.onCtrlAndZ(s,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:i,selectionSvc:o},gos:s}=this;i&&_e(s)&&!g0(s)&&t.isRowsToRender()?Xu(this.beans):o&&o.selectAllRowNodes({source:"keyboardSelectAll",selectAll:jd(s)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:i}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(i,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:i}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(i,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:i}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(i,{withOpenEditor:!0})||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){!this.gos.get("undoRedoCellEditing")||!e||(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e?.redo("ui")}},m3=class extends y{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){const t=e.getAdjustedUiContainerHeight(),i=t!=null?`${t}px`:"";this.eContainer.style.height=i,this.eViewport&&(this.eViewport.style.height=i)}},C3=e=>e.topRowCtrls,v3=e=>e.bottomRowCtrls,w3=e=>e.allRowCtrls,S3=e=>e.getStickyTopRowCtrls(),b3=e=>e.getStickyBottomRowCtrls(),y3=e=>e.getCtrls("top"),R3=e=>e.getCtrls("center"),E3=e=>e.getCtrls("bottom"),x3={scrolling:{type:"center",name:"grid-scrolling",getRowCtrls:w3,getSpannedRowCtrls:R3},pinnedTop:{type:"center",name:"grid-pinned-top-rows",getRowCtrls:C3,getSpannedRowCtrls:y3},pinnedBottom:{type:"center",name:"grid-pinned-bottom-rows",getRowCtrls:v3,getSpannedRowCtrls:E3},stickyTop:{type:"center",name:"grid-sticky-top-rows",getRowCtrls:S3},stickyBottom:{type:"center",name:"grid-sticky-bottom-rows",getRowCtrls:b3}};function eh(e){return`ag-${Xi(e).name}-container`}function th(e){return`ag-${Xi(e).name}-spanned-cells-container`}function Xi(e){return x3[e]}var F3="scrolling",P3=["stickyTop","stickyBottom"],ih=class extends y{constructor(e){super(),this.name=e,this.EMPTY_CTRLS=[],this.options=Xi(e)}postConstruct(){this.isScrollingCenterContainer()&&(this.viewportSizeFeature=this.createManagedBean(new u3(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)}))}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.beans.ctrlsSvc.register(this.name,this)}isScrollingCenterContainer(){return this.name==="scrolling"}isContainer(e){return Array.isArray(e)?e.includes(this.name):this.name===e}setComp(e,t,i,o){this.comp=e,this.eContainer=t,this.eViewport=o;const{rangeSvc:s}=this.beans;this.isScrollingCenterContainer()&&(this.createManagedBean(new f3(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),s&&this.createManagedBean(s.createDragListenerFeature(this.eViewport??this.eContainer))),this.listenOnDomOrder(),this.isContainer(F3)&&this.createManagedBean(new m3(this.eContainer));const r=this.updateContainerWidth.bind(this);this.createManagedBean(new l3(r)),this.registerViewportResizeListener(r),this.addListeners(),this.registerWithCtrlsService()}updateContainerWidth(){const{visibleCols:e,ctrlsSvc:t}=this.beans,i=t.getGridBodyCtrl(),o=e.bodyWidth+e.getLeftStickyColumnContainerWidth()+e.getRightStickyColumnContainerWidth(),s=i?.getHorizontalContentWidth()??o,r=i?.getHorizontalViewportWidth()??r3(this.eViewport),n=Math.max(s,r,1);this.comp.setContainerWidth(`${n}px`),this.eContainer.style.setProperty("--ag-pinned-row-border-width",`${this.beans.environment.getPinnedRowBorderWidth()}px`)}addListeners(){const{spannedRowRenderer:e,gos:t}=this.beans,i=this.onDisplayedColumnsChanged.bind(this),o=this.updateContainerWidth.bind(this);this.addManagedEventListeners({scrollVisibilityChanged:o,scrollbarWidthChanged:o,gridSizeChanged:o,displayedColumnsChanged:i,displayedColumnsWidthChanged:i,displayedRowsChanged:s=>this.onDisplayedRowsChanged(s.afterScroll)}),i(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const s=this.options.getSpannedRowCtrls(e);s&&this.comp.setSpannedRowCtrls(s,!1)}})}listenOnDomOrder(){if(this.isContainer(P3)){this.comp.setDomOrder(!0);return}const e=()=>{const t=this.gos.get("ensureDomOrder"),i=oe(this.gos,"print");this.comp.setDomOrder(t||i)};this.addManagedPropertyListener("domLayout",e),e()}onDisplayedColumnsChanged(){this.isScrollingCenterContainer()&&this.beans.ctrlsSvc.getGridBodyCtrl()?.updateColumnViewport()}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=o=>{e.dragging&&o.cancelable&&o.preventDefault()},i=this.eViewport??this.eContainer;i.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>i.removeEventListener("touchmove",t))}registerViewportResizeListener(e){const t=a3(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return n3(this.eViewport)}setContainerHeight(e){this.eContainer.style.height=e>0?`${e}px`:""}setContainerTop(e){this.eContainer.style.top=`${e}px`}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.beans.rowRenderer),i=t.length===0;this.comp.setRowCtrls({rowCtrls:i?this.EMPTY_CTRLS:t,useFlushSync:e}),this.comp.setHidden(i)}};function D3(e,t,i){const o=!!i.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls;return{tag:"div",ref:"eContainer",cls:eh(e),role:"presentation",children:[o?{tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${th(e)}`,role:"presentation"}:null]}}var M3=class extends K{constructor(e){super(),this.eContainer=$u,this.eSpannedContainer=$u,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.initialised=!1,this.name=e?.name,this.options=Xi(this.name)}postConstruct(){this.setTemplate(D3(this.name,this.options,this.beans)),this.initialiseComp()}initialiseComp(){if(this.initialised||!this.isAlive())return;let t=this.beans.ctrlsSvc.getGridBodyCtrl()?.eGridViewport;t||(t=this.getParentComponent()?.eGridViewport);const i=this.eContainer,o=this.eSpannedContainer,s=t??i,r={setRowCtrls:({rowCtrls:a})=>this.setRowCtrls(a),setSpannedRowCtrls:a=>this.setRowCtrls(a,!0),setDomOrder:a=>this.domOrder=a,setContainerWidth:a=>{i.style.width=a,o&&(o.style.width=a)},setOffsetTop:a=>{const l=`translateY(${a})`;i.style.transform=l,o&&(o.style.transform=l)},setHidden:a=>Zb(i,!a,{skipAriaHidden:!0})};this.createManagedBean(new ih(this.name)).setComp(r,i,o,s),this.initialised=!0}destroy(){this.setRowCtrls([]),this.setRowCtrls([],!0),super.destroy(),this.lastPlacedElement=null}setRowCtrls(e,t){const{beans:i,options:o}=this,s=t?this.eSpannedContainer:this.eContainer;if(!s)return;const r=t?{...this.rowCompsWithSpan}:{...this.rowCompsNoSpan},n={};t?this.rowCompsWithSpan=n:this.rowCompsNoSpan=n,this.lastPlacedElement=null;const a=[];for(const l of e){const d=l.instanceId,c=r[d];let u;if(c)u=c,delete r[d];else{if(!l.rowNode.displayed)continue;u=new s3(l,i,o.type)}n[d]=u,a.push([u,!c])}this.removeOldRows(Object.values(r)),this.addRowNodes(a,s)}addRowNodes(e,t){const{domOrder:i}=this;for(const[o,s]of e){const r=o.getGui();i?this.ensureDomOrder(r,t):s&&t.appendChild(r)}}removeOldRows(e){for(const t of e)t.getGui().remove(),t.destroy()}ensureDomOrder(e,t){Qb(t,e,this.lastPlacedElement),this.lastPlacedElement=e}},T3={selector:"AG-ROW-CONTAINER",component:M3};function Vn(e,t){return t.map(i=>{const o=`e${i[0].toUpperCase()+i.substring(1)}RowContainer`;return e[o]={name:i},{tag:"ag-row-container",ref:o,attrs:{name:i}}})}function A3(e){const t={},i={tag:"div",cls:"ag-root ag-unselectable",role:"presentation",children:[{tag:"div",ref:"eGridViewport",cls:"ag-grid-viewport",role:"presentation",children:[{tag:"div",ref:"eGridScrollableArea",cls:"ag-grid-scrollable-area",role:"rowgroup",children:[{tag:"div",ref:"eTop",cls:"ag-grid-pinned-top-rows",role:"presentation",children:[{tag:"div",ref:"eTopExtraRows",cls:"ag-extra-rows-container",role:"presentation"},...Vn(t,["pinnedTop","stickyTop"])]},{tag:"div",ref:"eBody",cls:"ag-grid-scrolling-rows",role:"presentation",children:Vn(t,["scrolling"])},{tag:"div",ref:"eBottom",cls:"ag-grid-pinned-bottom-rows",role:"presentation",children:Vn(t,["stickyBottom","pinnedBottom"])}]}]},{tag:"ag-fake-horizontal-scroll"},{tag:"ag-fake-vertical-scroll"},e?{tag:"ag-overlay-wrapper"}:null]};return{paramsMap:t,elementParams:i}}var I3=class extends K{constructor(){super(...arguments),this.eGridViewport=it,this.eGridScrollableArea=it,this.eTop=it,this.eTopExtraRows=it,this.eBottom=it,this.eBody=it,this.eScrollingRowContainer=it,this.ePinnedTopRowContainer=it,this.ePinnedBottomRowContainer=it,this.pinnedSectionState={top:{height:0,invisible:!0},bottom:{height:0,invisible:!0}},this.stickyBottomRowsHeight=0}postConstruct(){const{overlays:e,rangeSvc:t}=this.beans,i=e?.getOverlayWrapperSelector(),{paramsMap:o,elementParams:s}=A3(!!i);this.setTemplate(s,[...i?[i]:[],Lb,Gb,T3],o);const r={setRowAnimationCssOnScrollableArea:n=>{this.toggleClassForContainers("ag-row-animation",!!n),this.toggleClassForContainers("ag-row-no-animation",!n)},setPreventRowAnimationCssOnContainers:n=>{this.toggleClassForContainers("ag-prevent-animation",n)},setColumnCount:n=>eS(this.eGridViewport,n),setRowCount:n=>oS(this.eGridViewport,n),setPinnedSection:(n,a)=>this.setPinnedSection(n,a),setStickyBottomHeight:n=>{this.stickyBottomRowsHeight=Number.parseFloat(n)||0,this.refreshBottomSectionHeight()},setStickyBottomWidth:n=>this.eBottom.style.width=n,setColumnMovingCss:(n,a)=>this.toggleCss(n,a),updateLayoutClasses:(n,a)=>{const l=[this.eGridViewport.classList,this.eBody.classList];for(const d of l)d.toggle(Le.AUTO_HEIGHT,a.autoHeight),d.toggle(Le.NORMAL,a.normal),d.toggle(Le.PRINT,a.print);this.toggleCss(Le.AUTO_HEIGHT,a.autoHeight),this.toggleCss(Le.NORMAL,a.normal),this.toggleCss(Le.PRINT,a.print)},setCellSelectableCss:(n,a)=>{if(n)for(const l of[this.eTop,this.eBody,this.eBottom])l.classList.toggle(n,a)},setGridScrollableAreaWidth:n=>this.eGridScrollableArea.style.width=n,setPinnedColumnsOverflowing:n=>{this.eGridViewport.classList.toggle("ag-pinned-columns-overflow",n)},setGridRole:n=>iS(this.eGridViewport,n)};this.ctrl=this.createManagedBean(new qu),this.ctrl.setComp(r,this.getGui(),this.eGridViewport,this.eBody,this.eTop,this.eTopExtraRows,this.eBottom),this.createManagedBean(new bb(this.eTop,this.eGridViewport)),(t&&_e(this.gos)||ni(this.gos))&&tS(this.eGridViewport,!0)}toggleClassForContainers(e,t){for(const i of[this.eScrollingRowContainer,this.ePinnedTopRowContainer,this.ePinnedBottomRowContainer])i.getGui().classList.toggle(e,t)}setPinnedSection(e,t){this.pinnedSectionState[e]=t;const{height:i,invisible:o}=t,s=this.eGridScrollableArea;if(e==="top"){const r=this.eTop,n=`calc(var(--ag-internal-header-rows-height, 0px) + ${i}px)`;this.eGridViewport.style.setProperty("--ag-internal-top-rows-height",`${i}px`),r.style.minHeight=n,r.style.height=n,s.classList.toggle("ag-has-top-pinned-rows",!o)}else this.eGridViewport.style.setProperty("--ag-internal-bottom-rows-height",`${i}px`),s.classList.toggle("ag-has-bottom-pinned-rows",!o),this.refreshBottomSectionHeight()}refreshBottomSectionHeight(){const t=this.pinnedSectionState.bottom.height+this.stickyBottomRowsHeight,i=`${t}px`,o=this.eBottom;o.style.minHeight=i,o.style.height=i,sS(o,t>0,{skipAriaHidden:!0})}getFocusableContainerName(){return"gridBody"}},k3={selector:"AG-GRID-BODY",component:I3};import{_doOnce as oh}from"ag-stack";function St(e,t,...i){e.get("debug")&&console.log("AG Grid: "+t,...i)}function eo(e,...t){oh(()=>rh(e,...t),e+t?.join(""))}function bt(e,...t){oh(()=>sh(e,...t),e+t?.join(""))}function sh(e,...t){console.error("AG Grid: "+e,...t)}function rh(e,...t){console.warn("AG Grid: "+e,...t)}import{AgTabGuardComp as L3}from"ag-stack";var Hn=class extends Bw{initialiseTabGuard(e){super.initialiseTabGuard(e,Ni)}};import{Direction as nh,_findTabbableParent as V3,_focusInto as H3,_focusIntoTabbableFirst as B3,_getActiveDomElement as O3,_last as ah,_observeIntersection as G3,_observeResize as N3}from"ag-stack";var lh=(e,t)=>Cu(e,()=>B3(e.getGui(),t,!0)),dh=e=>e?.getFocusableContainerName()??"external",_3=e=>e==null?"external":typeof e=="string"?e:"gridBody",ch=class extends y{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,i){this.view=e,this.eGui=t,this.eGui.setAttribute("grid-id",this.beans.context.getId());const{dragAndDrop:o,ctrlsSvc:s,ariaAnnounce:r}=this.beans;if(o?.registerGridDropTarget(()=>this.eGui,this),r.setDescriptionContainer(i),this.createManagedBean(new En(this.view)),this.gos.get("enableContentVisibilityAuto")??this.gos.get("suppressContentVisibilityAuto")===!1){const[l]=this.addManagedEventListeners({firstDataRendered:()=>{l();const d=setTimeout(()=>{const c=G3(this.beans,t,u=>{u.isIntersecting?t.style.removeProperty("content-visibility"):t.style.setProperty("content-visibility","auto")},{rootMargin:"200px"});this.addDestroyFunc(()=>c())},this.gos.get("contentVisibilityAutoDelay"));this.addDestroyFunc(()=>clearTimeout(d))}})}const a=N3(this.beans,this.eGui,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>a()),s.register("gridCtrl",this)}isDetailGrid(){return V3(this.getGui())?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){const e=this.beans;return{paginationSelector:e.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:e.registry?.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:e.sideBar?.getSelector(),statusBarSelector:e.registry?.getSelector("AG-STATUS-BAR"),toolbarSelector:e.registry?.getSelector("AG-TOOLBAR"),watermarkSelector:e.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGui.clientWidth,clientHeight:this.eGui.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e,t=!1){const{view:i}=this;e===!1?i.setCursor(null):t?i.setCursor(e===nh.Horizontal?"col-resize":"row-resize"):i.setCursor(e===nh.Horizontal?"ew-resize":"ns-resize")}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:i,nextIndex:o}=this.getNextFocusableIndex(t,e),s=i===-1?e?t.length-1:0:o,{gos:r,beans:{focusSvc:n,navigation:a}}=this,l=r.getCallback("tabToNextGridContainer");if(l){const d=n.getDefaultTabToNextGridContainerTarget({backwards:e,focusableContainers:t,nextIndex:s}),c=dh(t[s]),u=d==null&&c==="gridBody"?"gridBody":_3(d),h=l({backwards:e,previousContainer:dh(t[i]),nextContainer:u,defaultTarget:d});if(h!==void 0){if(typeof h=="boolean")return h;if(typeof h=="string"){if(h==="gridBody")return this.focusGridBodyDefault(e)||void 0;const g=t.find(p=>p.getFocusableContainerName()===h);if(!g){rh(`tabToNextGridContainer - ${h} container not found`);return}return lh(g,e)?!0:void 0}return RS(h)?n.focusHeaderPosition({headerPosition:h})||void 0:(a?.ensureCellVisible(h),n.setFocusedCell({...h,forceBrowserFocus:!0}),n.isCellFocused(h)||void 0)}}return this.focusNextInnerContainerDefault({backwards:e,focusableContainers:t,indexWithFocus:i,nextIndex:s})||void 0}focusInnerElement(e){const{gos:t,beans:i,beans:{focusSvc:o,visibleCols:s}}=this;if(t.getCallback("focusGridInnerElement")?.({fromBottom:!!e}))return!0;const n=this.getFocusableContainers();if(e)return this.focusNextInnerContainerDefault({backwards:!0,focusableContainers:n,indexWithFocus:n.length,nextIndex:n.length-1})?!0:o.focusGridView({column:ah(s.allCols),backwards:!0});const a=s.allCols;if(t.get("headerHeight")===0||ve(i)){if(o.focusGridView({column:a[0],backwards:e}))return!0;for(let l=1;l<n.length;l++)if(H3(n[l].getGui(),e))return!0;return!1}return o.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}focusNextElementOutsideContainer(e=!1){const t=[...this.additionalFocusableContainers].map(i=>i.getGui());return this.view.focusNextElementOutsideContainer(e,t)}isFocusInsideGridBody(){const e=this.getFocusableContainers(),{indexWithFocus:t}=this.getNextFocusableIndex(e);return e[t]?.getFocusableContainerName()==="gridBody"}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){const t=this.view.getFocusableContainers(),{indexWithFocus:i,nextIndex:o}=this.getNextFocusableIndex(t,e);this.focusNextInnerContainerDefault({backwards:!!e,focusableContainers:t,indexWithFocus:i,nextIndex:o})||this.forceFocusOutOfContainer(e)}isFocusable(){const e=this.beans;return!$i(e)||!ve(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const i=O3(this.beans),o=e.findIndex(s=>s.getGui().contains(i));return{indexWithFocus:o,nextIndex:o+(t?-1:1)}}focusGridBodyDefault(e){const{gos:t,beans:i,beans:{focusSvc:o,visibleCols:{allCols:s}}}=this;return e?o.focusGridView({column:ah(s),backwards:!0}):t.get("headerHeight")===0||ve(i)?o.focusGridView({column:s[0]}):o.focusFirstHeader()}focusNextInnerContainerDefault(e){const{backwards:t,focusableContainers:i,indexWithFocus:o}=e,s=t?-1:1;for(let r=e.nextIndex;r>=0&&r<i.length;r+=s){const n=i[r];if(n.getFocusableContainerName()==="gridBody"&&(o===-1||(t?o>r:o<r))){if(this.focusGridBodyDefault(t))return!0;continue}if(lh(n,t))return!0}return!1}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},z3=class extends Hn{constructor(e){super(),this.gridBody=vt,this.toolbar=vt,this.gridHeaderDropZones=vt,this.sideBar=vt,this.statusBar=vt,this.pagination=vt,this.rootWrapperBody=vt,this.ariaDescription=vt,this.eGridDiv=e}postConstruct(){const e={destroyGridUi:()=>this.destroyBean(this),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),focusNextElementOutsideContainer:(r,n)=>this.focusNextElementOutsideContainer(r,[this.getGui(),...n]),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:r=>{this.getGui().style.userSelect=r??"",this.getGui().style.webkitUserSelect=r??""},setCursor:r=>{this.getGui().style.cursor=r??""}},t=this.createManagedBean(new ch),i=t.getOptionalSelectors(),o=this.createTemplate(i),s=[k3,...Object.values(i).filter(r=>!!r)];this.setTemplate(o,s),t.setComp(e,this.getGui(),this.ariaDescription),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:r=>t.focusInnerElement(r),forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:()=>!t.isFocusable()})}insertGridIntoDom(){const e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{e.remove(),St(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){const i=this.rootWrapperBody.classList,{AUTO_HEIGHT:o,NORMAL:s,PRINT:r}=Le,{autoHeight:n,normal:a,print:l}=t;i.toggle(o,n),i.toggle(s,a),i.toggle(r,l),this.toggleCss(o,n),this.toggleCss(s,a),this.toggleCss(r,l)}createTemplate(e){const t=e.toolbarSelector?{tag:"ag-toolbar",ref:"toolbar"}:null,i=e.gridHeaderDropZonesSelector?{tag:"ag-grid-header-drop-zones",ref:"gridHeaderDropZones"}:null,o=e.sideBarSelector?{tag:"ag-side-bar",ref:"sideBar"}:null,s=e.statusBarSelector?{tag:"ag-status-bar",ref:"statusBar"}:null,r=e.watermarkSelector?{tag:"ag-watermark"}:null,n=e.paginationSelector?{tag:"ag-pagination",ref:"pagination"}:null;return{tag:"div",cls:"ag-root-wrapper",role:"presentation",children:[t,i,{tag:"div",ref:"ariaDescription",cls:"ag-aria-description-container"},{tag:"div",ref:"rootWrapperBody",cls:"ag-root-wrapper-body",role:"presentation",children:[{tag:"ag-grid-body",ref:"gridBody"},o]},s,n,r]}}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){if(!e&&this.pagination?.isDisplayed()){this.pagination.forceFocusOutOfContainer(e);return}super.forceFocusOutOfContainer(e)}getFocusableContainers(){const e=[];this.toolbar&&e.push(this.toolbar),e.push(...this.gridHeaderDropZones?.getFocusableContainers?.()??[],this.gridBody);for(const t of[this.sideBar,this.statusBar,this.pagination])t&&e.push(t);return e.filter(t=>X1(t.getGui()))}},uh="https://www.ag-grid.com",hh=new Set,us={},_t={},hs,gh=!1,ph=!1;function W3(e){const[t,i]=e.version.split(".")||[],[o,s]=hs.split(".")||[];return t===o&&i===s}function U3(e){hs||(hs=e.version);const t=o=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${o} Please update all modules to the same version.`;e.version?W3(e)||bt(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${hs}.`)):bt(t(`'${e.moduleName}' is incompatible.`));const i=e.validate?.();i&&!i.isValid&&bt(`${i.message}`)}function zt(e,t){U3(e);const i=e.rowModels??["all"];hh.add(e);let o;t!==void 0?(gh=!0,_t[t]===void 0&&(_t[t]={}),o=_t[t]):o=us;for(const s of i)o[s]===void 0&&(o[s]={}),o[s][e.moduleName]=e;if(e.dependsOn)for(const s of e.dependsOn)zt(s,t);e.onRegister?.()}function q3(e){delete _t[e]}function fh(e,t,i){const o=s=>!!us[s]?.[e]||!!_t[t]?.[s]?.[e];return o(i)||o("all")}function mh(){return gh}function $3(e,t){const i=_t[e]??{};return[...Object.values(us.all??{}),...Object.values(i.all??{}),...Object.values(us[t]??{}),...Object.values(i[t]??{})]}function K3(){return new Set(hh)}function j3(e,t){const i=_t[e]??{};return[...Object.values(i.all??{}),...Object.values(i[t]??{})]}function Bn(){return ph}function Q3(){ph=!0}var Ch=class{static register(e){zt(e,void 0)}static registerModules(e){for(const t of e)zt(t,void 0)}};function vh(e){for(const t of e){if("setLicenseKey"in t)return t;if(t.dependsOn){const i=vh(t.dependsOn);if(i)return i}}}var E="36.2.0",wh=2e3,Sh=100,bh="_version_",yh=null,Wt=`${uh}/javascript-data-grid`;function Z3(e){yh=e}function Y3(e){Wt=e}function On(e,t){return t.includes(e)}function Rh(e,t){const{id:i,params:o}=e;if(o==null)return`${i}`;try{return`${i}:${JSON.stringify(o)}`}catch{return`${i}:unserialisable:${t}`}}var gs=new Set;function Eh(e,t){return t===void 0||e===void 0||e===t}var Ve=[],J3=100,xh=!1,Fh=[],Gn=new Set;function Ph(e){e.capture!==void 0&&(xh=e.capture),e.throwOn!==void 0&&(Fh=e.throwOn),e.suppress!==void 0&&(Gn=new Set(e.suppress))}function Dh(e,t){const i={gridId:e,listener:t};gs.add(i);for(let o=0,s=Ve.length;o<s;++o){const r=Ve[o];Eh(r.gridId,e)&&t(r)}return()=>{gs.delete(i),gs.size===0&&(Ve.length=0)}}var Nn=null;function X3(e){Nn=e}function ey(e){if(!Nn)return;const t=[];for(let i=0,o=Ve.length;i<o;++i)Ve[i].gridId===void 0&&t.push(Ve[i]);if(t.length!==0){for(let i=Ve.length-1;i>=0;--i)Ve[i].gridId===void 0&&Ve.splice(i,1);Nn(e,t)}}function Mh(e,t,i,o,s){if(!xh||Gn.has(e))return;const r={id:e,params:t,severity:i,gridId:s,defaultMessage:o};Ve.length<J3&&Ve.push(r);for(const n of gs)Eh(s,n.gridId)&&n.listener(r)}function Th(e,t){return!Gn.has(e)&&On(t,Fh)}function Ah(e,t,i,o){throw new Error(`${i} #${e} `+fs(e,t,o).join(" "))}function _n(e,t,i,o,s){Mh(e,t,i,o,s),Th(e,i)&&Ah(e,t,i,o)}var ps=200,ty=50,to=[],zn=new Set,yt;function iy(e){const t=Array.isArray(e.moduleName)?[...e.moduleName].sort():[e.moduleName];return`${e.gridId}::${t.join("|")}::${e.rowModelType}::${String(e.reasonOrId)}`}function oy(e){const t=e.map(({reasonOrId:i,moduleName:o,additionalText:s})=>JSON.stringify({reasonOrId:i,moduleName:o,additionalText:s}));return{...e[0],reports:t}}function Ih(e){const t=iy(e);zn.has(t)||(zn.add(t),Th(ps,"error")&&Ah(ps,e,"error"),to.push(e),yt===void 0&&(yt=setTimeout(sy,ty)))}function sy(){if(yt!==void 0&&(clearTimeout(yt),yt=void 0),to.length===0)return;const e=to.splice(0,to.length),t=new Map;for(let i=0,o=e.length;i<o;++i){const s=e[i],r=t.get(s.gridId);r?r.push(s):t.set(s.gridId,[s])}for(const[i,o]of t){const s=oy(o);ms(bt,ps,s,!1),Mh(ps,s,"error",void 0,i)}}function ry(){yt!==void 0&&(clearTimeout(yt),yt=void 0),to.length=0,zn.clear()}function io(e,t,i,o,s,r){ms(e,t,i,s),_n(t,i,o,void 0,r)}function fs(e,t,i){return yh?.(e,t)??[cy(e,t,i)]}function ms(e,t,i,o,s){e(`${o?"warning":"error"} #${t}`,...fs(t,i,s))}function kh(e){return typeof e!="object"&&typeof e!="function"}function ny(e){if(!e)return String(e);const t={};for(const i of Object.keys(e))kh(e[i])&&(t[i]=e[i]);return JSON.stringify(t)}function ay(e){const t=[];for(let i=0,o=e.length;i<o;++i){const s=e[i];kh(s)&&t.push(s)}return JSON.stringify(t)}function Lh(e){let t=e;return e instanceof Error?t=e.toString():Array.isArray(e)?t=ay(e):typeof e=="object"&&(t=ny(e)),t}function ly(e){const{id:t,params:i,defaultMessage:o}=e;return fs(t,i,o).map(Lh).join(" ")}function Wn(e){return e===void 0?"undefined":e===null?"null":e}function Un(e,t){return`${e}?${t.toString()}`}function dy(e,t,i){const o=Array.from(t.entries()).sort((r,n)=>n[1].length-r[1].length);let s=Un(e,t);for(const[r,n]of o){if(r===bh)continue;const a=s.length-i;if(a<=0)break;const l="...",d=a+l.length,c=n.length-d>Sh?n.slice(0,n.length-d)+l:n.slice(0,Sh)+l;t.set(r,c),s=Un(e,t)}return s}function Cs(e,t){const i=new URLSearchParams;if(i.append(bh,E),t)for(const r of Object.keys(t))i.append(r,Lh(t[r]));const o=`${Wt}/errors/${e}`,s=Un(o,i);return s.length<=wh?s:dy(o,i,wh)}var cy=(e,t,i)=>{const o=Cs(e,t),s=`${i?i+`
`:""}Visit ${o}`;return Bn()?s:`${s}${i?"":`
Alternatively register the ValidationModule to see the full message in the console.`}`};function qn(...e){io(eo,e[0],e[1],"warning",!0)}function $n(...e){io(bt,e[0],e[1],"error",!1)}function Kn(e,t,i){io(eo,t,i,"warning",!0,e)}function uy(e,t,i){io(eo,t,i,"deprecation",!0,e)}function Vh(e,t,i){io(bt,t,i,"error",!1,e)}function jn(e,t,i){ms(bt,e,t,!1,i),_n(e,t,"error",i)}function hy(e,t,i){ms(eo,e,t,!0,i),_n(e,t,"warning",i)}function Hh(e,t){const i=t[0];return`error #${i} `+fs(i,t[1],e).join(" ")}function Me(...e){return Hh(void 0,e)}function gy(...e){return Hh(`
`,e)}var L=(e,t)=>{for(const i of Object.keys(t))t[i]=e;return t},Bh={dispatchEvent:"CommunityCore",...L("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0,getGridElement:0}),...L("GridState",{getState:0,setState:0}),...L("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...L("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...L("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...L("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...L("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...L("ValueCache",{expireValueCache:0}),...L("CellApi",{getCellValue:0}),...L("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...L("Sort",{onSortChanged:0}),...L("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...L("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...L("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...L("HighlightChanges",{flashCells:0}),...L("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...L("ColumnApi",{getColumnDefs:0,getColumnDef:0,getDisplayNameForColumn:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnsVisible:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0}),...L("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...L("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...L("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...L("ColumnResize",{setColumnWidths:0}),...L("ColumnHover",{isColumnHovered:0}),...L("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0,getEditValidationErrors:0}),...L("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...L("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...L("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...L("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...L("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...L("Notes",{getNote:0,setNote:0,refreshNotes:0}),...L("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...L("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...L("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,resetRowGroupExpansion:0}),...L("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...L("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0,onRowHeightChanged:0,resetRowHeights:0}),...L("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...L("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...L("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...L("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...L("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...L("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...L("PdfExport",{getDataAsPdf:0,exportDataAsPdf:0}),...L("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...L("Formula",{refreshFormulas:0}),...L("ContextMenu",{showContextMenu:0}),...L("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...L("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...L("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...L("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...L("SharedPivot",{isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumns:0,addValueColumns:0,setPivotColumns:0,removePivotColumns:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...L("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...L("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...L("Toolbar",{getToolbarItemInstance:0}),...L("StatusBar",{getStatusPanel:0}),...L("AiToolkit",{getStructuredSchema:0})},Qn={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},py=(e,t)=>e.eventSvc.dispatchEvent(t),Oh=class{};Reflect.defineProperty(Oh,"name",{value:"GridApi"});var fy=class extends y{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new Oh,this.fns={...Qn,dispatchEvent:py},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(Bh))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){const{fns:i,beans:o}=this;i!==Qn&&(i[e]=o?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:i,fns:{[e]:o}}=this;return o?o(i,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:i,preDestroyLink:o}=this;if(!t){qn(26,{fnName:e,preDestroyLink:o});return}const s=Bh[e];i.assertModuleRegistered(s,`\`api.${e}\``)&&t.log.warn(27,{fnName:e,module:s})}destroy(){super.destroy(),this.fns=Qn,this.beans=null}};function Gh(e){return e.context.getId()}function my(e){e.gridDestroySvc.destroy()}function Cy(e){return e.gridDestroySvc.destroyCalled}function vy(e,t){return e.gos.get(t)}function wy(e,t,i){Nh(e,{[t]:i})}function Nh(e,t){e.gos.updateGridOptions({options:t})}function Sy(e){return wf(e.gridApi)}function by(e,t){const i=t.replace(/Module$/,"");return e.gos.isModuleRegistered(i)}function yy(e){e.expansionSvc?.expandAll(!0)}function Ry(e){e.expansionSvc?.expandAll(!1)}function Zn(e){e.rowModel?.onRowHeightChanged()}function Yn(e){if(e.rowAutoHeight?.active){e.log.warn(3);return}e.rowModel?.resetRowHeights()}function Ey(e){e.expansionSvc?.resetExpansion()}function xy(e,t,i){const o=Kc(e);if(o){if(e.rowGroupColsSvc?.columns.length===0){if(t<0){e.log.error(238);return}o.setRowCount(t,i);return}e.log.error(28);return}Qo(e)?.setRowCount(t,i)}function Fy(e){return ri(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}}function Py(e){return e.rowModel.isLastRowIndexKnown()}var _h={moduleName:"CsrmSsrmSharedApi",version:E,apiFunctions:{expandAll:yy,collapseAll:Ry,resetRowGroupExpansion:Ey}},zh={moduleName:"RowModelSharedApi",version:E,apiFunctions:{onRowHeightChanged:Zn,resetRowHeights:Yn}},Wh={moduleName:"SsrmInfiniteSharedApi",version:E,apiFunctions:{setRowCount:xy,getCacheBlockState:Fy,isLastRowIndexKnown:Py}};import{_defaultComparator as Uh}from"ag-stack";var oo=e=>{let t=e.childrenAfterGroup;for(;t?.length;){const i=t[0];if(i.sourceRowIndex>=0)return i;t=i.childrenAfterGroup}},qh=(e,t,i,o)=>{if(!t.size||!e)return!1;let s=!1;const r=e.length??0;let n=-1;i&&(n=i.sourceRowIndex,i=n<0?oo(i):null,i&&(n=i.sourceRowIndex)),n<0||n>=r?n=r:o||++n;let a=n,l=Math.min(n,r-1);for(const u of t){const h=u.sourceRowIndex;h<a&&(a=h),h>l&&(l=h)}let d=a;for(let u=a;u<n;++u){const h=e[u];t.has(h)||(h.sourceRowIndex!==d&&(h.sourceRowIndex=d,e[d]=h,s=!0),++d)}let c=l;for(let u=l;u>=n;--u){const h=e[u];t.has(h)||(h.sourceRowIndex!==c&&(h.sourceRowIndex=c,e[c]=h,s=!0),--c)}for(const u of t)u.sourceRowIndex!==d&&(u.sourceRowIndex=d,e[d]=u,s=!0),++d;return s},Dy=class extends y{constructor(){super(...arguments),this.beanName="rowNodeSorter",this.accentedSort=!1,this.primaryColumnsSortGroups=!1,this.pivotActive=!1}postConstruct(){this.firstLeaf=ae(this.gos)?oo:My;const e=()=>{this.pivotActive=this.colModel.isPivotActive()},t=()=>{const i=this.gos;this.accentedSort=!!i.get("accentedSort"),this.primaryColumnsSortGroups=Xe(i)};this.addManagedPropertyListeners(["accentedSort","autoGroupColumnDef","treeData"],t),this.addManagedEventListeners({columnPivotModeChanged:e,columnPivotChanged:e}),t(),e()}wireBeans(e){this.colModel=e.colModel,this.formula=e.formula,this.valueSvc=e.valueSvc}doFullSortInPlace(e,t){return e.sort((i,o)=>this.compareRowNodes(t,i,o))}compareRowNodes(e,t,i){const o=this.accentedSort;for(let s=0,r=e.length;s<r;++s){const n=e[s],a=n.column,l=n.descending,d=this.getValue(t,a),c=this.getValue(i,a),u=n.colComparator??(t.group?void 0:n.leafComparator);let h;if(u?h=u(d,c,t,i,l):n.absolute?h=Uh($h(d),$h(c),o):h=Uh(d,c,o),h)return l?-h:h}return 0}getValue(e,t){if(this.primaryColumnsSortGroups){if(e.rowGroupColumn===t)return this.getGroupDataValue(e,t);if(e.group&&t.showRowGroup)return}const i=this.valueSvc.getValueFromData(t,e);if(t.allowFormula){const o=this.formula;if(o?.isFormula(i))return o.resolveValue(t,e)}return i}getGroupDataValue(e,t){if(Pr(this.gos,this.pivotActive)){const o=this.firstLeaf(e);return o&&this.valueSvc.getValueFromData(t,o)}const i=t.showRowGroupCol;return i?e.groupData?.[i.colId]:void 0}},My=e=>{if(e.data)return e;let t=e.childrenAfterGroup;for(;t?.length;){const i=t[0];if(i.data)return i;t=i.childrenAfterGroup}},$h=e=>{if(!e)return e;if(typeof e=="bigint")return e<0n?-e:e;const t=Number(e);return isNaN(t)?e:Math.abs(t)};function Ty(e){e.sortSvc?.onSortChanged("api")}import{RefPlaceholder as Ut,_clearElement as Ay,_setDisplayed as qt}from"ag-stack";import{_isNodeOrElement as Iy,_loadTemplate as ky}from"ag-stack";function Kh(e,t,i){const o=X(e,t,i);if(o){const{className:r}=o;if(typeof r=="string"&&r.includes("ag-icon")||typeof r=="object"&&r["ag-icon"])return o}const s=V({tag:"span"});return s.appendChild(o),s}function X(e,t,i){let o=null;e==="smallDown"?t.log.warn(262):e==="smallLeft"?t.log.warn(263):e==="smallRight"&&t.log.warn(264);const s=i?.colDef.icons;if(s&&(o=s[e]),t.gos&&!o){const r=t.gos.get("icons");r&&(o=r[e])}if(o){let r;if(typeof o=="function")r=o();else if(typeof o=="string")r=o;else{t.log.warn(38,{iconName:e});return}if(typeof r=="string")return ky(r);if(Iy(r))return r;t.log.warn(133,{iconName:e});return}else{const r=t.registry.getIcon(e);return r||t.validation?.validateIcon(e),V({tag:"span",cls:`ag-icon ag-icon-${r??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var $t=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),Ly={tag:"span",cls:"ag-sort-indicator-container",children:[$t("Order","order"),$t("Asc","ascending-icon"),$t("Desc","descending-icon"),$t("Mixed","mixed-icon"),$t("AbsoluteAsc","absolute-ascending-icon"),$t("AbsoluteDesc","absolute-descending-icon"),$t("None","none-icon")]},Jn=class extends K{constructor(e){super(),this.eSortOrder=Ut,this.eSortAsc=Ut,this.eSortDesc=Ut,this.eSortMixed=Ut,this.eSortNone=Ut,this.eSortAbsoluteAsc=Ut,this.eSortAbsoluteDesc=Ut,e||this.setTemplate(Ly)}attachCustomElements(e,t,i,o,s,r,n){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=i,this.eSortMixed=o,this.eSortNone=s,this.eSortAbsoluteAsc=r,this.eSortAbsoluteDesc=n}setupSort(e,t=!1,i){if(this.column=e,this.suppressOrder=t,this.getSortDefOverride=i,this.setupMultiSortIndicator(),!e.isSortable()&&!e.showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addInIcon("sortAbsoluteAscending",this.eSortAbsoluteAsc,e),this.addInIcon("sortAbsoluteDescending",this.eSortAbsoluteDesc,e);const o=this.updateIcons.bind(this),s=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",o),this.addManagedEventListeners({newColumnsLoaded:o,sortChanged:s,columnRowGroupChanged:s}),this.onSortChanged()}addInIcon(e,t,i){if(t==null)return;const o=X(e,this.beans,i);o&&t.appendChild(o)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortAbsoluteAsc:i,eSortAbsoluteDesc:o,eSortNone:s,column:r,gos:n,beans:a}=this,{isAbsoluteSort:l,isDefaultSort:d,isAscending:c,isDescending:u,direction:h}=yc(r,a,this.getSortDefOverride);if(e&&qt(e,c&&d,{skipAriaHidden:!0}),t&&qt(t,u&&d,{skipAriaHidden:!0}),s){const g=!r.colDef.unSortIcon&&!n.get("unSortIcon");qt(s,!g&&!h,{skipAriaHidden:!0})}i&&qt(i,c&&l,{skipAriaHidden:!0}),o&&qt(o,u&&l,{skipAriaHidden:!0})}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:i}=this;this.addInIcon("sortUnSort",e,t);const o=t.showRowGroup;Xe(i)&&o&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:i}=this;if(e){const o=t.sortSvc.getDisplaySort(i)?.direction==="mixed";qt(e,o,{skipAriaHidden:!0})}}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:i}}=this;if(!e)return;const o=i.getDisplaySortIndex(t)??-1,s=o>=0&&i.isMultiSort();qt(e,s,{skipAriaHidden:!0}),o>=0?e.textContent=(o+1).toString():Ay(e)}refresh(){this.onSortChanged()}},Vy={selector:"AG-SORT-INDICATOR",component:Jn},jh=(e,t)=>{if(e!=null)return typeof e=="object"?e[ze(t)]:e},Qh=(e,t)=>{for(let i=0,o=e.length;i<o;++i){const s=e[i],r=s.column,n=s.type,a=jh(r.colDef.comparator,n);let l;if(!a&&r.showRowGroup){const d=r.field,c=d?t.getNonPivotCol(d):null;c&&(l=jh(c.colDef.comparator,n))}s.colComparator=a,s.leafComparator=l,s.descending=s.sort==="desc",s.absolute=n==="absolute"}},Hy=class extends y{constructor(){super(...arguments),this.beanName="sortSvc",this.SortIndicatorSelector=Vy,this.SortIndicatorComp=Jn,this.cols=null,this.map=null,this.opts=null,this.multi=!1}destroy(){super.destroy(),this.invalidate()}invalidate(){this.cols=null,this.map=null,this.opts=null}progressSort(e,t,i){const{sortDef:o,index:s}=this.getNextSortDefAndIndex(e,e.getSortDef(),e.sortCycleIndex);this.setSortForColumn(e,o,t,i,s)}progressSortFromEvent(e,t){const o=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,o,"uiColumnSorted")}setSortForColumn(e,t,i,o,s){const{gos:r,showRowGroupCols:n}=this.beans,a=Xe(r),l=[e];if(e.showRowGroup&&a){const h=n?.getSourceColumnsForGroupColumn?.(e);for(let g=0,p=h?.length??0;g<p;++g){const f=h[g];f.isSortable()&&l.push(f)}}for(let h=0,g=l.length;h<g;++h)this.setColSort(l[h],t,o,h===0?s:void 0);const d=a?e.showRowGroupCol:null;d&&l.push(d);const u=(i||r.get("alwaysMultiSort"))&&!r.get("suppressMultiSort")?[]:this.clearSortBarTheseColumns(l,o);d&&this.setColSort(d,this.getCoupledGroupSortDef(d),o),this.updateSortIndex(e);for(let h=0,g=l.length;h<g;++h)u.push(l[h]);this.dispatchSortChangedEvents(o,u)}getCoupledGroupSortDef(e){const t=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);for(let i=0,o=t?.length??0;i<o;++i){const s=t[i].getSortDef();if(s)return s}return Ce()}updateSortIndex(e){const{gos:t,colModel:i}=this.beans,o=Xe(t),s=o&&e.showRowGroupCol||e,r=this.getSortedCols(),n=new Map;let a=0;for(let d=0,c=r.length;d<c;++d){const u=r[d];o&&u.showRowGroup||u===s||n.set(u,a++)}s.getSortDef()&&n.set(s,a);const l=i.getAllCols();for(let d=0,c=l.length;d<c;++d){const u=l[d],h=n.get(u)??null;(u.sortIndex??null)!==h&&this.setColSortIndex(u,h)}}onSortChanged(e,t){this.invalidate(),this.dispatchSortChangedEvents(e,t)}dispatchSortChangedEvents(e,t){const i={type:"sortChanged",source:e,columns:t};this.eventSvc.dispatchEvent(i)}clearSortBarTheseColumns(e,t){const i=[],o=new Set(e),s=this.beans.colModel.getAllCols();for(let r=0,n=s.length;r<n;++r){const a=s[r];o.has(a)||(a.getSortDef()&&i.push(a),this.setColSort(a,Ce(),t))}return i}getNextSortDirection(e,t){const i=t===void 0,o=i?e.getSortDef():Ce(t);return this.getNextSortDefAndIndex(e,o,i?e.sortCycleIndex:0).sortDef}getNextSortDefAndIndex(e,t,i=0){const o=k0(this.gos,e),s=o.length;if(s===0)return{sortDef:Ce(),index:0};let r=-1;for(let a=i<s?i:0;a<s;++a)if(Xn(o[a],t)){r=a;break}const n=r===-1||r+1>=s?0:r+1;return{sortDef:Ce(o[n]),index:n}}getSortedCols(){return this.cols??this.loadSortedCols()}getIndexMap(){return this.map??this.loadIndexMap(this.getSortedCols())}loadSortedCols(){const{colModel:e,showRowGroupCols:t}=this.beans,i=Xe(this.gos),o=e.pivotMode,s=e.getAllCols(),r=[];for(let a=0,l=s.length;a<l;++a){const d=s[a];if(d.getSortDef()){if(o){const c=i?d.showRowGroupCol:d.showRowGroup;if(!d.aggFunc&&d.primary&&!c)continue}r.push(d)}}r.length>1&&r.sort(By);const n=i&&t?t.interleaveSortedColumns(r):r;return this.cols=n,n}loadIndexMap(e){const t=new Map,i=e.length,o=this.beans.showRowGroupCols;let s;if(Xe(this.gos)&&o)s=o.fillCoupledSortIndexMap(e,t);else{for(let r=0;r<i;++r)t.set(e[r],r);s=i-1}return this.multi=s>=1,this.map=t,t}getSortOptions(){let e=this.opts;if(e===null){e=[];const t=this.getSortedCols();for(let i=0,o=t.length;i<o;++i){const s=t[i],r=s.getSortDef(),n=r?.direction;n&&e.push({sort:n,type:ze(r.type),column:s,colComparator:void 0,leafComparator:void 0,descending:!1,absolute:!1})}Qh(e,this.beans.colModel),this.opts=e}return e}getDisplaySort(e){const t=e.getSortDef();if(!e.showRowGroup||!Xe(this.gos))return t;const i=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);if(!i?.length)return t;const s=e.field!=null||!!e.valueGetter?t:i[0].getSortDef();let r=!0;for(let n=0,a=i.length;r&&n<a;++n)r=Xn(i[n].getSortDef(),s);return r?s:{type:ze(t?.type),direction:"mixed"}}getDisplaySortIndex(e){return this.getIndexMap().get(e)}isMultiSort(){return this.getIndexMap(),this.multi}setupHeader(e,t){const i=()=>{const{type:o,direction:s}=Ce(t.getSortDef());if(e.toggleCss("ag-header-cell-sorted-asc",s==="asc"),e.toggleCss("ag-header-cell-sorted-desc",s==="desc"),e.toggleCss("ag-header-cell-sorted-abs-asc",o==="absolute"&&s==="asc"),e.toggleCss("ag-header-cell-sorted-abs-desc",o==="absolute"&&s==="desc"),e.toggleCss("ag-header-cell-sorted-none",!s),t.showRowGroup){const r=this.beans.showRowGroupCols?.isGroupSortMixed(t,s)??!0;e.toggleCss("ag-header-cell-sorted-mixed",r)}};e.addManagedEventListeners({sortChanged:i,columnPinned:i,columnRowGroupChanged:i,displayedColumnsChanged:i}),i()}initCol(e){const{sortIndex:t,initialSortIndex:i}=e.colDef,o=xc(e.colDef);o&&e.setSortDef(o);const s=t!==void 0?t:i;s!=null&&(e.sortIndex=s)}updateColSort(e,t,i){t!==void 0&&this.setColSort(e,Ce(t),i)}setColSort(e,t,i,o){const s=e.getSortDef();e.sortCycleIndex=o,Xn(s,t)||(!!s?.direction!=!!t.direction?this.invalidate():this.opts=null,e.setSortDef(t),e.dispatchColEvent("sortChanged",i)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,this.invalidate(),e.dispatchStateUpdatedEvent("sortIndex")}},By=(e,t)=>(e.sortIndex??2147483647)-(t.sortIndex??2147483647),Xn=(e,t)=>e?t?e.type===t.type&&e.direction===t.direction:e.direction===null:t?t.direction===null:!0;function ea(e){const t=e?.getSortOptions();if(!t)return[];const i=t.length,o=new Array(i);for(let s=0;s<i;++s){const r=t[s];o[s]={sort:r.sort,type:r.type,colId:r.column.colId}}return o}var ta={moduleName:"Sort",version:E,beans:[Hy,Dy],apiFunctions:{onSortChanged:Ty},userComponents:{agSortIndicator:Jn},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",sortAbsoluteAscending:"aasc",sortAbsoluteDescending:"adesc"}};import{_debounce as Oy}from"ag-stack";var so=class{constructor(){this.reordered=!1,this.removals=[],this.updates=new Set,this.adds=new Set}},Gy=class extends y{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},Zh(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){this.dispatchRowDataUpdateStarted(e),this.destroyAllNodes();const t=Zh(this.rootNode),i=new Array(e.length);t._leafs=i;let o=0;const s=this.beans.groupStage?.getNestedDataGetter(),r=s?new Set:null,n=(a,l)=>{const d=a.level+1;for(let c=0,u=l.length;c<u;++c){const h=l[c];if(!h)continue;const g=this.createRowNode(h,d,o);if(i[o++]=g,r&&!r.has(h)){r.add(h),g.treeParent=a;const p=s(h);p&&n(g,p)}}};n(t,e),i.length=o}destroyAllNodes(){const{selectionSvc:e,pinnedRowModel:t,groupStage:i}=this.beans;e?.reset("rowDataChanged"),t?.isManual()&&t.reset(),i?.clearNonLeafs();const o=this.rootNode._leafs;if(o)for(let s=0,r=o.length;s<r;++s)o[s]._destroy(null);this.allNodesMap=Object.create(null),this.nextId=0}setImmutableRowData(e,t){const{rootNode:i,gos:o}=this;this.dispatchRowDataUpdateStarted(t);const s=At(this.beans),r=e.changedRowNodes,{adds:n,updates:a}=r,l=new Set,d=this.beans.groupStage?.getNestedDataGetter();let c=o.get("suppressMaintainUnsortedOrder")?void 0:!1,u=-1,h=!1;const g=(m,C)=>{if(!c&&c!==void 0){const v=m.sourceRowIndex;c=v<=u,u=v}m.data!==C&&(m.updateData(C),n.has(m)||a.add(m))},p=(m,C,v)=>{for(let S=0,w=C.length;S<w;++S){const b=C[S];if(!b)continue;let R=this.getRowNode(s({data:b,level:v}));if(R?(g(R,b),h||(h=!!d&&R.treeParent!==m)):(R=this.createRowNode(b,v),n.add(R)),!d||l.has(R)){l.add(R);continue}l.add(R),R.treeParent=m;const x=d(b);x&&p(R,x,v+1)}};p(i,t,0);const f=this.deleteUnusedNodes(l,r,!!e.animate)||c||n.size>0;if(f){const m=i._leafs??(i._leafs=[]);c===void 0?Uy(m,l,r):Wy(m,l)&&(r.reordered=!0)}(f||h||a.size)&&(e.rowDataUpdated=!0)}deleteUnusedNodes(e,{removals:t},i){const o=this.rootNode._leafs,s=this.beans.selectionSvc;for(let r=0,n=o.length;r<n;r++){const a=o[r];e.has(a)||this.destroyNode(a,i)&&(t.push(a),a.isSelected()&&s?.removeFromSelection?.(a,"rowDataChanged"))}return t.length>0}updateRowData(e,t,i){if(this.dispatchRowDataUpdateStarted(e.add),this.beans.groupStage?.getNestedDataGetter())return this.warn(268),{remove:[],update:[],add:[]};const o=At(this.beans),s=this.executeRemove(o,e,t,i),r=this.executeUpdate(o,e,t),n=this.executeAdd(e,t);return{remove:s,update:r,add:n}}executeRemove(e,{remove:t},{adds:i,updates:o,removals:s},r){const n=this.rootNode._leafs,a=n?.length,l=t?.length;if(!l||!a)return[];const d=this.beans.selectionSvc;let c=0,u=a,h=0;const g=new Array(l);for(let p=0;p<l;++p){const f=this.lookupNode(e,t[p]);if(!f)continue;const m=f.sourceRowIndex;m<u&&(u=m),m>h&&(h=m),g[c++]=f,this.destroyNode(f,r)&&(f.isSelected()&&d?.removeFromSelection?.(f,"rowDataChanged"),i.delete(f)||(o.delete(f),s.push(f)))}return g.length=c,c&&zy(n,u,h),g}executeUpdate(e,{update:t},{adds:i,updates:o}){const s=t?.length;if(!s)return[];const r=new Array(s);let n=0;for(let a=0;a<s;a++){const l=t[a],d=this.lookupNode(e,l);d&&(d.updateData(l),r[n++]=d,i.has(d)||o.add(d))}return r.length=n,r}executeAdd(e,t){var i;const o=(i=this.rootNode)._leafs??(i._leafs=[]),s=o.length,r=e.add,n=r?.length;if(!n)return[];const a=s+n;let l=this.sanitizeAddIndex(o,e.addIndex);if(l<s){for(let u=s-1,h=a-1;u>=l;--u){const g=o[u];g.sourceRowIndex=h,o[h--]=g}t.reordered=!0}o.length=a;const d=new Array(n),c=t.adds;for(let u=0;u<n;u++){const h=this.createRowNode(r[u],0,l);c.add(h),o[l]=h,d[u]=h,l++}return d}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}createRowNode(e,t,i){const o=new Ue(this.beans);o.parent=this.rootNode,o.level=t,o.group=!1,i!=null&&(o.sourceRowIndex=i),o.setDataAndId(e,String(this.nextId++));const s=o.id,r=this.allNodesMap;return r[s]&&this.warn(2,{nodeId:s}),r[s]=o,o}destroyNode(e,t){if(!e._destroy(t))return!1;const i=e.id,o=this.allNodesMap;return o[i]===e&&delete o[i],!0}lookupNode(e,t){if(!e)return _y(this.beans.log,this.rootNode._leafs,t);const i=e({data:t,level:0}),o=this.allNodesMap[i];return o||(this.error(4,{id:i}),null)}sanitizeAddIndex(e,t){const i=e.length;if(typeof t!="number"||t<0||t>=i||Number.isNaN(t))return i;t=Math.ceil(t);const o=this.gos;return t>0&&o.get("treeData")&&o.get("getDataPath")&&(t=Ny(e,t)),t}},Ny=(e,t)=>{for(let i=0,o=e.length;i<o;i++)if(e[i]?.rowIndex==t-1)return i+1;return t},Zh=e=>{e.group=!0,e.level=-1,e._expanded=!0,e.id=Gi,e._leafs?.length!==0&&(e._leafs=[]);const t=[],i=[],o=[],s=[];e.childrenAfterGroup=t,e.childrenAfterSort=i,e.childrenAfterAggFilter=o,e.childrenAfterFilter=s;const r=e.sibling;return r&&(r.childrenAfterGroup=t,r.childrenAfterSort=i,r.childrenAfterAggFilter=o,r.childrenAfterFilter=s,r.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},_y=(e,t,i)=>{if(t)for(let o=0,s=t.length;o<s;o++){const r=t[o];if(r.data===i)return r}return e.error(5,{data:i}),null},zy=(e,t,i)=>{t=Math.max(0,t);for(let o=t,s=e.length;o<s;++o){const r=e[o];o<=i&&r.destroyed||(r.sourceRowIndex=t,e[t++]=r)}e.length=t},Wy=(e,t)=>{const i=t.size;e.length=i;let o=0,s=!1,r=!1;for(const n of t){const a=n.sourceRowIndex;a===o?r||(r=s):(a>=0?r=!0:s=!0,n.sourceRowIndex=o,e[o]=n),++o}return r},Uy=(e,t,{adds:i})=>{const o=e.length,s=t.size;s>o&&(e.length=s);let r=0;for(let n=0;n<o;++n){const a=e[n];a.destroyed||(r!==n&&(a.sourceRowIndex=r,e[r]=a),++r)}for(const n of i)n.sourceRowIndex<0&&(n.sourceRowIndex=r,e[r++]=n);e.length=r},qy=class extends y{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.hierarchical=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.rowsToRender=this.rowsToDisplay,this.loadingRows=null,this.formulaRows=[],this.positionedRows=[],this.positionedRowsNext=[],this.positioningRows=0,this.stages=null,this.asyncTransactions=null,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=Oy(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const e=this.beans,t=new Ue(e);this.rootNode=t,this.nodeManager=this.createBean(new Gy(t));const i=()=>{this.beans.groupStage?.invalidateGroupCols(),this.refreshModel({step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")})};this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:i,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.onPivotChanged.bind(this),columnPivotModeChanged:()=>this.refreshModel({step:"group"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:e,stagesRefreshProps:t}=this,i=[e.groupStage,e.filterStage,e.groupFilterStage,e.pivotStage,e.aggStage,e.sortStage,e.groupSortStage,e.filterAggStage,e.flattenStage].filter(o=>!!o);this.stages=i;for(let o=i.length-1;o>=0;--o){const s=i[o].refreshProps;if(s)for(const r of s)t.set(r,o)}this.addManagedPropertyListeners([...t.keys(),"rowData"],o=>{const s=o.changeSet?.properties;s&&this.onPropChange(s)}),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights()),Mi(this,()=>{this.beans.rowAutoHeight?.active||this.resetRowHeights()}),this.addManagedPropertyListeners(["loading","loadingRows"],()=>this.onLoadingRowsChanged())}start(){this.updateLoadingRows(),this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):(this.setInitialData(),this.loadingRows&&!this.rowNodesCountReady&&this.refreshModel({step:"nothing"}))}onLoadingRowsChanged(){!this.updateLoadingRows()||!this.started||this.refreshModel({step:"nothing",keepRenderedRows:!1,animate:!1})}updateLoadingRows(){if(!Rr(this.gos)){const n=this.loadingRows;if(this.loadingRows=null,this.rowsToRender=this.rowsToDisplay,!n)return!1;for(const a of n)a._destroy(null);return!0}const t=i0(this.gos),i=this.loadingRows==null,o=this.loadingRows??(this.loadingRows=[]);this.rowsToRender=o;let s=i;const r=Ne(this.beans);for(;o.length<t;){const n=new Ue(this.beans);n.parent=this.rootNode,n.level=0,n.uiLevel=0,n.group=!1,n.stub=!0,n.selectable=!1,n.setRowHeight(r),o.push(n),s=!0}for(;o.length>t;)o.pop()._destroy(null),s=!0;return s}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,i,o){let s,r=!1;do{s=!1;const n=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(n,i),d=Math.min(a,o);for(let c=l;c<=d;c++){const u=this.getRow(c);if(u.rowHeightEstimated){const h=Je(this.beans,u);u.setRowHeight(h.height),s=!0,r=!0}}s&&this.setRowTopAndRowIndex()}while(s);return r}onPropChange(e){const{nodeManager:t,gos:i,beans:o}=this,s=o.groupStage;if(!t)return;const r=new Set(e),n=s?.onPropChange(r);let a;r.has("rowData")?a=i.get("rowData"):n&&(a=s?.extractData()),a&&!Array.isArray(a)&&(a=null,this.warn(1));const l={step:"nothing",changedProps:r};if(a){const c=!n&&!!this.rootNode?._leafs?.length&&a.length>0&&i.exists("getRowId")&&!i.get("resetRowDataOnUpdate");this.refreshingData=!0,c?(l.keepRenderedRows=!0,l.animate=!i.get("suppressAnimationFrame"),l.changedRowNodes=new so,t.setImmutableRowData(l,a)):(l.rowDataUpdated=!0,l.newData=!0,t.setNewRowData(a),this.rowNodesCountReady=!0)}const d=l.rowDataUpdated?"group":this.getRefreshedStage(e);d&&(l.step=d,this.refreshModel(l))}getRefreshedStage(e){const{stages:t,stagesRefreshProps:i}=this;if(!t)return null;const o=t.length;let s=o;for(let r=0,n=e.length;r<n&&s;++r)s=Math.min(s,i.get(e[r])??s);return s<o?t[s].step:null}setRowTopAndRowIndex(){if(this.positioningRows){++this.positioningRows;return}this.positioningRows=1;try{this.positionAndClearRows(),this.positioningRows>1&&this.positionAndClearRows()}finally{this.positioningRows=0}}positionAndClearRows(){const e=this.positionedRows,t=this.positionedRowsNext;this.positionedRows=t,this.positionedRowsNext=e,t.length=0;try{this.positionRows(t),this.updateFormulaRowIndexes(),this.clearStaleRowTops(e)}catch(i){throw this.retainStaleRows(e),i}}updateFormulaRowIndexes(){if(this.beans.formula?.isEvaluationActive()){const e=this.formulaRows;for(let t=0,i=e.length;t<i;++t)e[t].formulaRowIndex=t}}positionRows(e){const t=this.beans,i=this.rowsToRender,o=t.environment.getDefaultRowHeight();let s=0;const r=No(t)||!t.environment.sizesMeasured;for(let n=0,a=i.length;n<a;++n){const l=i[n];if(e[n]=l,l.rowHeight==null){const d=Je(t,l,r,o);l.setRowHeight(d.height,d.estimated)}l.setRowTop(s),l.setRowIndex(n),s+=l.rowHeight}}clearStaleRowTops(e){const t=this.rowsToRender;for(const i of e){const o=i.rowIndex;(o==null||t[o]!==i)&&!i.destroyed&&i.clearRowTopAndRowIndex()}e.length=0}retainStaleRows(e){const t=this.positionedRows,i=this.rowsToRender,o=t.length;for(const s of e){const r=s.rowIndex;(r==null||r>=o||i[r]!==s)&&t.push(s)}e.length=0}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToRender.length}getTopLevelRowCount(){if(this.loadingRows)return this.loadingRows.length;const{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;const o=e.sibling?.displayed?1:0;return(e.childrenAfterSort?.length??0)+o}getTopLevelRowDisplayedIndex(e){if(this.loadingRows)return e;const{beans:t,rootNode:i,rowsToDisplay:o}=this;if(!i||!o.length||o[0]===i)return e;const r=i.childrenAfterSort,n=l=>{let d=r[l];if(this.gos.get("groupHideOpenParents"))for(;d.expanded&&d.childrenAfterSort&&d.childrenAfterSort.length>0;)d=d.childrenAfterSort[0];return d.rowIndex},a=t.footerSvc;return a?a?.getTopDisplayIndex(o,e,r,n):n(e)}getTopLevelIndexFromDisplayedIndex(e){if(this.loadingRows)return e;const{rootNode:t,rowsToDisplay:i}=this;if(!t||!i.length||i[0]===t)return e;let s=this.getRow(e).primaryRow,r=s.parent;for(;r&&r!==t;)s=r,r=s.parent;const n=t.childrenAfterSort?.indexOf(s)??-1;return n>=0?n:e}getRowBounds(e){const t=this.rowsToRender[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:Tt(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){const o=t.length===0||t.some(s=>s.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:o,keepRenderedRows:!0,animate:Tt(this.gos)})}}onPivotChanged(){this.beans.filterManager?.isAnyFilterPresent()||this.refreshModel({step:"pivot"})}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:Tt(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:i,rowDataUpdated:o}=e;return!(!t||i||!o||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:i,started:o}=this;if(!t)return;const s=!!e.rowDataUpdated;o&&s&&i.dispatchEvent({type:"rowDataUpdated"});const r=this.isSuppressModelUpdateAfterUpdateTransaction(e);if(this.deferRefresh(r)){this.setPendingRefreshFlags(e),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=s);const a=this.beans.selectionSvc;s&&o&&!this.refreshingModel&&a&&(r?a.updateSelectableAfterGrouping(void 0,e.changedRowNodes):a.flushPendingSelectionChanged?.());return}this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.updateRefreshParams(e);let n=!1;this.refreshingModel=!0;try{this.executeRefresh(e,s),n=!0}finally{this.refreshingData=!1,this.refreshingModel=!1,n||this.setPendingRefreshFlags(e)}this.clearPendingRefreshFlags(),this.beans.formula?.onRowsChanged(e.changedRowNodes,e.newData),i.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}executeRefresh(e,t){const{beans:i,rootNode:o}=this;i.masterDetailSvc?.refreshModel(e),t&&e.step!=="group"&&i.colFilter?.refreshModel();let s=e.changedPath;switch(s?.addRow(o),e.step==="group"&&(this.doGrouping(o,e),s??(s=e.changedPath),i.selectionSvc?.updateSelectableAfterGrouping(s,e.changedRowNodes)),s??(s=i.changedPathFactory?.ensureRowsPath(e,o)),e.step){case"group":case"filter":this.doFilter(s);case"pivot":this.doPivot(s,e.changedProps)&&(s=void 0,e.changedPath=void 0);case"aggregate":this.doAggregate(s);case"filter_aggregates":this.doFilterAggregates(s);case"sort":this.doSort(s,e.changedRowNodes);case"map":this.doRowsToDisplay()}this.setRowTopAndRowIndex(),this.updateRefreshParams(e)}deferRefresh(e){return this.refreshingModel||this.beans.colModel.changeEventsDispatching?!0: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.loadingRows&&(!this.rootNode?._leafs?.length||!this.beans.colModel?.ready)}isRowsToRender(){return this.rowsToRender.length>0}getOverlayType(){const{beans:e,gos:t}=this;if(this.loadingRows)return null;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){const i=ai(this.gos),o=i?e:jr(e),s=i?t:jr(t);if(!o||!s)return null;let r=!1,n=!1;const a=[],l=d=>(n=!0,i&&d.group?(Yh(a,d),!0):!1);return this.forEachNodeAfterFilterAndSort(d=>{if(n||r&&(d===s||d===o)&&l(d)||!r&&(d!==s&&d!==o||(r=!0,s===o&&l(d))))return;(!d.group||!i)&&(i||d.rowIndex!=null)&&a.push(d)}),a}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToRender[e]}getFormulaRow(e){return this.formulaRows[e]}isRowPresent(e){return this.rowsToRender.includes(e)}getRowIndexAtPixel(e){const t=this.rowsToRender,i=t.length;if(this.isEmpty()||i===0)return-1;let o=0,s=i-1;if(e<=0)return 0;if(t[s].rowTop<=e)return s;let n=-1,a=-1;for(;;){const l=Math.floor((o+s)/2),d=t[l];if(this.isRowInPixel(d,e)||(d.rowTop<e?o=l+1:d.rowTop>e&&(s=l-1),n===o&&a===s))return l;n=o,a=s}}isRowInPixel(e,t){const i=e.rowTop,o=i+e.rowHeight;return i<=t&&o>t}forEachLeafNode(e){const t=this.rootNode?._leafs;if(t)for(let i=0,o=t.length;i<o;++i)e(t[i],i)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){const t=this.rowsToRender;for(let i=0,o=t.length;i<o;++i)e(t[i],i)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,i=>i.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,i=>i.childrenAfterSort)}forEachPivotNode(e,t,i){const{colModel:o,rowGroupColsSvc:s}=this.beans;if(!o.pivotMode)return;if(!s?.columns.length){e(this.rootNode,0);return}const r=i?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,n=>n.leafGroup?null:n[r])}depthFirstSearchRowNodes(e,t=!1,i=r=>r.childrenAfterGroup,o=this.rootNode,s=0){let r=s;if(!o)return r;const n=o===this.rootNode;if(n||e(o,r++),o.hasChildren()&&!o.footer){const a=n||this.hierarchical?i(o):null;if(a){const l=this.beans.footerSvc;r=l?.addTotalRows(r,o,e,t,n,"top")??r;for(const d of a)r=this.depthFirstSearchRowNodes(e,t,i,d,r);return l?.addTotalRows(r,o,e,t,n,"bottom")??r}}return r}doAggregate(e){this.rootNode&&this.beans.aggStage?.execute(e)}doFilterAggregates(e){if(this.hierarchical){const o=this.beans.filterAggStage;if(o){o.execute(e);return}}const t=this.rootNode;t.childrenAfterAggFilter=t.childrenAfterFilter;const i=t.sibling;i&&(i.childrenAfterAggFilter=t.childrenAfterFilter)}doSort(e,t){const i=this.beans;(this.hierarchical&&i.groupSortStage||i.sortStage).execute(e,t)}doGrouping(e,t){const o=this.beans.groupStage?.execute(t);if(o===void 0){const s=e._leafs;e.childrenAfterGroup=s,e.updateHasChildren();const r=e.sibling;r&&(r.childrenAfterGroup=s)}(o||t.rowDataUpdated)&&this.beans.colFilter?.refreshModel(),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){const t=this.beans;(this.hierarchical&&t.groupFilterStage||t.filterStage).execute(e);const i=this.rootNode,o=i.sibling;o&&(o.childrenAfterFilter=i.childrenAfterFilter)}doPivot(e,t){return this.beans.pivotStage?.execute(e,t)??!1}getRowNode(e){typeof e!="string"&&(e=String(e));const t=this.nodeManager?.getRowNode(e);if(typeof t=="object")return t;const i=this.beans.groupStage?.getNonLeaf(e);return i||this.getSpecialRowNode(e)}getSpecialRowNode(e){if(e===Gi)return this.rootNode??void 0;if(e===Tc){const t=this.rootNode?.sibling;return t?.footer?t:void 0}if(e.startsWith(Ko)){const t=e.slice(Ko.length),i=this.getRowNode(t);return i?.sibling?.footer?i.sibling:void 0}if(e.startsWith(_r)){const t=e.slice(_r.length),i=this.nodeManager?.getRowNode(t);if(typeof i=="object"&&i.detailNode?.id===e)return i.detailNode}}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const i=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),i)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){const e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){const{nodeManager:e,beans:t,eventSvc:i,asyncTransactions:o}=this;if(!e)return;t.valueCache?.onDataChanged();const s=[],r=[],n=new so,a=!this.gos.get("suppressAnimationFrame");for(const{rowDataTransaction:l,callback:d}of o??[]){this.rowNodesCountReady=!0,this.refreshingData=!0;const c=e.updateRowData(l,n,a);s.push(c),d&&r.push(d.bind(null,c))}this.commitTransactions(n,a),r.length>0&&setTimeout(()=>{for(let l=0,d=r.length;l<d;l++)r[l]()},0),s.length>0&&i.dispatchEvent({type:"asyncTransactionsFlushed",results:s}),this.asyncTransactionsTimer=void 0,this.asyncTransactions=null}updateRowData(e){const t=this.nodeManager;if(!t)return null;this.beans.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const i=new so,o=!this.gos.get("suppressAnimationFrame");this.refreshingData=!0;const s=t.updateRowData(e,i,o);return this.commitTransactions(i,o),s}commitTransactions(e,t){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:t,changedRowNodes:e})}doRowsToDisplay(){const{rootNode:e,beans:t}=this,{formula:i,flattenStage:o}=t;let s;if(i?.active){const r=e?.childrenAfterSort??[];this.formulaRows=r,s=$y(r)}else if(o)s=o.execute();else{s=e?.childrenAfterSort??[];for(let r=0,n=s.length;r<n;++r)s[r].setUiLevel(0)}this.rowsToDisplay=s,i?.active||(this.formulaRows=i?.isEvaluationActive()?s:[]),this.loadingRows||(this.rowsToRender=s)}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes(),i=Ne(this.beans),o=this.loadingRows;if(o)for(const r of o)r.setRowHeight(i);e.setRowHeight(e.rowHeight,!0);const s=e.sibling;s?.setRowHeight(s.rowHeight,!0),(t||o)&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const i=t.detailNode;i?.setRowHeight(i.rowHeight,!0);const o=t.sibling;o?.setRowHeight(o.rowHeight,!0),e=!0}),e}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy();const e=this.loadingRows;if(e)for(const t of e)t._destroy(null);this.loadingRows=null,this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.rowsToRender=[],this.positionedRows.length=0,this.positionedRowsNext.length=0,this.asyncTransactions=null,this.stages=null,this.stagesRefreshProps.clear(),clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},$y=e=>{for(let t=0,i=e.length;t<i;++t){const o=e[t];if(o.softFiltered)return Ky(e,t,i);o.setUiLevel(0)}return e},Ky=(e,t,i)=>{const o=e.slice(0,t);for(let s=t+1;s<i;++s){const r=e[s];r.softFiltered||(r.setUiLevel(0),o.push(r))}return o},Yh=(e,t)=>{const i=t.childrenAfterGroup;if(i)for(let o=0,s=i.length;o<s;++o){const r=i[o];r.data&&e.push(r),r.group&&Yh(e,r)}};function jy(e){e.expansionSvc?.onGroupExpandedOrCollapsed()}function Qy(e,t){const i=xe(e);i&&((!t||t==="everything")&&(t="group"),i.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function Zy(e){return xe(e)?.isEmpty()??!0}function Yy(e,t){xe(e)?.forEachLeafNode(t)}function Jy(e,t){xe(e)?.forEachNodeAfterFilter(t)}function Xy(e,t){xe(e)?.forEachNodeAfterFilterAndSort(t)}function e2(e,t){return e.frameworkOverrides.wrapIncoming(()=>xe(e)?.updateRowData(t))}function t2(e,t,i){e.frameworkOverrides.wrapIncoming(()=>xe(e)?.batchUpdateRowData(t,i))}function i2(e){e.frameworkOverrides.wrapIncoming(()=>xe(e)?.flushAsyncTransactions())}function o2(e){return e.selectionSvc?.getBestCostNodeSelection()}var s2=class extends y{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=null}wireBeans(e){this.filterManager=e.filterManager}execute(){const e=this.beans,t=e.rowModel.rootNode,i=t.childrenAfterGroup,o=i.length,s=this.filterManager,r=!!s?.isChildFilterPresent();if(e.formula?.active)if(t.childrenAfterFilter=i,r)for(let n=0;n<o;++n){const a=i[n];a.softFiltered=!s.doesRowPassFilter(a)}else for(let n=0;n<o;++n)i[n].softFiltered=!1;else r?t.childrenAfterFilter=r2(i,o,t.childrenAfterFilter??i,s):t.childrenAfterFilter=i}},r2=(e,t,i,o)=>{const s=i.length;let r=0;for(let n=0;n<t;++n){const a=e[n];if(o.doesRowPassFilter(a)){if(r>=s||i[r]!==a)return Jh(e,t,n,r,i,o);++r}else if(r<s)return Jh(e,t,n,r,i,o)}return r===s?i:e},Jh=(e,t,i,o,s,r)=>{const n=o>0?s.slice(0,o):[];for(;i<t;){const a=e[i++];r.doesRowPassFilter(a)&&n.push(a)}return n};import{_reuseArrayIfEqual as n2}from"ag-stack";var a2=4,Xh=(e,t,i,o,s)=>{const r=t.childrenAfterSort,n=t.childrenAfterAggFilter;if(!n)return r&&r.length>0?r:[];const a=n.length;if(a<=1)return r?.length===a&&(a===0||r[0]===n[0])?r:n.slice();if(!r||a<=a2)return e.doFullSortInPlace(n.slice(),s);const l=new Map,{updates:d,adds:c}=i,u=[];for(let g=0;g<a;++g){const p=n[g];d.has(p)||c.has(p)||o?.hasRow(p)?(l.set(p,~g),u.push(p)):l.set(p,g)}const h=u.length;return h===0?a===r.length?r:d2(r,l,u):(u.sort((g,p)=>e.compareRowNodes(s,g,p)||~l.get(g)-~l.get(p)),h===a?u:l2(e,s,u,r,l,a))},l2=(e,t,i,o,s,r)=>{const n=new Array(r);let a=0,l=i[a],d,c=-1,u=0,h=0;const g=i.length,p=o.length;for(;;){if(c<0){if(u>=p)break;if(d=o[u++],c=s.get(d)??-1,c<0)continue}if((e.compareRowNodes(t,l,d)||~s.get(l)-c)<0){if(n[h++]=l,++a>=g)break;l=i[a]}else n[h++]=d,c=-1}for(;a<g;)n[h++]=i[a++];if(c<0)return n;for(n[h++]=d;u<p;){const f=o[u++];s.get(f)>=0&&(n[h++]=f)}return n},d2=(e,t,i)=>{let o=0;i.length=t.size;for(let s=0,r=e.length;s<r;++s){const n=e[s];t.has(n)&&(i[o++]=n)}return i.length=o,i},eg=e=>{const t=e.childrenAfterSort,i=e.sibling;if(i&&(i.childrenAfterSort=t),!!t)for(let o=0,s=t.length-1;o<=s;o++){const r=t[o],n=o===0,a=o===s;r.firstChild!==n&&(r.firstChild=n,r.dispatchRowEvent("firstChildChanged")),r.lastChild!==a&&(r.lastChild=a,r.dispatchRowEvent("lastChildChanged")),r.childIndex!==o&&(r.childIndex=o,r.dispatchRowEvent("childIndexChanged"))}},c2=class extends y{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","accentedSort"]}execute(e,t){const{rowModel:i,sortSvc:o,rowNodeSorter:s}=this.beans,r=i.rootNode,n=o.getSortOptions(),a=n.length>0,l=this.gos.getCallback("postSortRows"),d=a&&!l&&this.gos.get("deltaSort")&&t,c=r.childrenAfterSort,u=r.childrenAfterAggFilter;let h;a?d?h=Xh(s,r,d,e,n):h=s.doFullSortInPlace(u?.slice()??[],n):h=n2(c,u),r.childrenAfterSort=h,eg(r),l?.({nodes:h})}},ia={moduleName:"ClientSideRowModel",version:E,rowModels:["clientSide"],beans:[qy,s2,c2],dependsOn:[ta]},tg={moduleName:"ClientSideRowModelApi",version:E,apiFunctions:{onGroupExpandedOrCollapsed:jy,refreshClientSideRowModel:Qy,isRowDataEmpty:Zy,forEachLeafNode:Yy,forEachNodeAfterFilter:Jy,forEachNodeAfterFilterAndSort:Xy,applyTransaction:e2,applyTransactionAsync:t2,flushAsyncTransactions:i2,getBestCostNodeSelection:o2,resetRowHeights:Yn,onRowHeightChanged:Zn},dependsOn:[_h,zh]},u2={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},h2=class extends K{constructor(e,t,i){super(u2),this.rowNode=e,this.column=t,this.eCell=i}postConstruct(){this.getGui().appendChild(X("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const{rowNode:t,column:i,eCell:o,gos:s}=this,r=i.colDef.dndSourceOnRowDrag,n=e.dataTransfer;if(n.setDragImage(o,0,0),r){const a=G(s,{rowNode:t,dragEvent:e});r(a)}else try{const a=JSON.stringify(t.data);n.setData("application/json",a),n.setData("text/plain",a)}catch{}}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}};import{RefPlaceholder as ig,_clearElement as g2}from"ag-stack";var p2=".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}.ag-dnd-ghost-not-allowed{border:var(--ag-drag-and-drop-image-not-allowed-border)}",f2={tag:"div",cls:"ag-dnd-ghost ag-unselectable",children:[{tag:"span",ref:"eIcon",cls:"ag-dnd-ghost-icon ag-shake-left-to-right"},{tag:"div",ref:"eLabel",cls:"ag-dnd-ghost-label"}]},m2=class extends K{constructor(){super(),this.dragSource=null,this.eIcon=ig,this.eLabel=ig,this.registerCSS(p2)}postConstruct(){const e=t=>Kh(t,this.beans,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(f2)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eIcon:i,dragSource:o,dropIconMap:s,gos:r}=this,n=this.getGui();g2(i),e||(e=o?.getDefaultIconName?o.getDefaultIconName():"notAllowed");const a=s[e];n.classList.toggle("ag-dnd-ghost-not-allowed",e==="notAllowed"),i.classList.toggle("ag-shake-left-to-right",t),!(a===s.hide&&r.get("suppressDragLeaveHidesColumns"))&&a&&i.appendChild(a)}setLabel(e){this.eLabel.textContent=e}};function C2(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)}function v2(e,t){const i=e.dragAndDrop?.findExternalZone(t.getContainer());i&&e.dragAndDrop?.removeDropTarget(i)}function w2(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)}function S2(e){const t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}}function b2(e,t){const i=e.rowDropHighlightSvc;if(!i)return;const o=t?.row;let s=t?.dropIndicatorPosition;s!=="above"&&s!=="below"&&s!=="inside"&&(s="none");const r=o?.rowIndex;r==null||s==="none"?i.clear():i.set(o,s)}import{BaseDragService as y2}from"ag-stack";var R2=class extends Ow{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}};import{Direction as E2}from"ag-stack";var x2=class extends y{constructor(){super(...arguments),this.beanName="horizontalResizeSvc"}addResizeBar(e){const t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0},{dragSvc:i}=this.beans;return i.addDragSource(t),()=>i.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons(!!e.isColumn);const i=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(i)}setResizeIcons(e){const t=this.beans.ctrlsSvc.get("gridCtrl");t.setResizeCursor(E2.Horizontal,e),t.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}};import{_isEventSupported as F2,preventEventDefault as og}from"ag-stack";import{AutoScrollService as P2,_areEqual as D2}from"ag-stack";function sg(e,t){return ds(e,t.target)?.getFocusedCellPosition()??null}function oa(e,t){const i=No(e),o=t;let s,r;o.clientX!=null||o.clientY!=null?(s=o.clientX,r=o.clientY):(s=o.x,r=o.y,r-=M2(e,t));const{pageFirstPixel:n}=e.pageBounds.getCurrentPagePixelRange();if(r+=n,i){const a=e.ctrlsSvc.getScrollFeature(),l=a.getVScrollPosition(),d=a.getHScrollPosition();s+=d.left,r+=l.top}return{x:s,y:r}}function M2(e,t){const{eGridViewport:i,eScrollingRows:o}=e.ctrlsSvc.getGridBodyCtrl(),r=t.dropZoneTarget??i;if(!o)return 0;const a=o.getBoundingClientRect().top-r.getBoundingClientRect().top+i.scrollTop;return a>0?a:0}var T2=.25,A2=class extends y{constructor(e){super(),this.eContainer=e,this.lastDraggingEvent=null,this.autoScroll=null,this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,t=>{const i=()=>t.gridBodyCtrl.scrollFeature.getVScrollPosition().top,o=new P2({scrollContainer:t.gridBodyCtrl.eGridViewport,scrollAxis:"y",getVerticalPosition:i,setVerticalPosition:s=>t.gridBodyCtrl.scrollFeature.setVerticalScrollPosition(s),getTopOffset:()=>t.gridBodyCtrl.getTopPinnedRowsOffset(),onScrollCallback:()=>{const s=i();if(this.autoScrollOldV!==s){this.autoScrollOldV=s,this.autoScrollChanging=!0;return}const r=this.autoScrollChanging;this.autoScrollChanged=r,this.autoScrollChanging=!1,r&&(e.dragAndDrop?.nudge(),this.autoScrollChanged=!1)}});this.autoScroll=o,this.clearAutoScroll()})}destroy(){super.destroy(),this.clearAutoScroll(),this.autoScroll=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(e){return e?.dropTarget?.allowed===!1||this.beans.rowDragSvc.visibility!=="visible"?"notAllowed":"move"}getRowNodes(e){const t=e.dragItem.rowNodes||[];return!this.isFromThisGrid(e)||t.length<=1?t:t.slice().sort(I2)}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){const{lastDraggingEvent:i,beans:o}=this;if(t){const a=this.getRowNodes(e);e.dragItem.rowNodes=a,ng(a,!0)}this.lastDraggingEvent=e;const s=e.fromNudge,r=this.makeRowsDrop(i,e,s,!1);o.rowDropHighlightSvc?.fromDrag(e),t&&this.dispatchGridEvent("rowDragEnter",e),this.dispatchGridEvent("rowDragMove",e);const n=this.autoScroll;r?.rowDragManaged&&r.moved&&r.allowed&&r.sameGrid&&!r.suppressMoveWhenRowDragging&&(!s&&!n?.scrolling||this.autoScrollChanged)&&this.dropRows(r),n?.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,i,o){const{beans:s,gos:r}=this,n=this.newRowsDrop(t,o),a=s.rowModel;if(t.dropTarget=n,t.changed=!1,!n)return null;const{sameGrid:l,rootNode:d,source:c}=n;let{target:u}=n;u??(u=a.getRow(a.getRowCount()-1)??null);const h=this.beans.groupEditSvc,g=!!h?.canSetParent(n);let p=null;if(u?.footer){const m=Jo(a,-1,u)??Jo(a,1,u);g&&(p=u.sibling??d),u=m??null}u?.detail&&(u=u.parent),n.moved&&(n.moved=c!==u);let f=.5;if(u&&(l&&n.moved&&(p||!g)?f=c.rowIndex>u.rowIndex?-.5:.5:f=(n.y-u.rowTop-u.rowHeight/2)/u.rowHeight||0),!g&&l&&u&&n.moved&&ae(r)){const m=L2(a,n);m&&(f=c.rowIndex>m.rowIndex?-.5:.5,u=m,n.moved&&(n.moved=c!==u))}return n.target=u,n.newParent=p,n.pointerPos=V2(u,n.y),n.yDelta=f,h?.fixRowsDrop(n,g,i,f),this.validateRowsDrop(n,g,o),t.changed||(t.changed=rg(e?.dropTarget,n)),n}newRowsDrop(e,t){const{beans:i,gos:o}=this,s=i.rowModel.rootNode,r=ae(o)?o.get("rowDragManaged"):!1,n=o.get("suppressMoveWhenRowDragging"),a=this.isFromThisGrid(e);let{rowNode:l,rowNodes:d}=e.dragItem;if(d||(d=l?[l]:[]),l||(l=d[0]),!l||!s)return null;const c=this.beans.dragAndDrop.isDropZoneWithinThisGrid(e);let u=!0;r&&(!d.length||i.rowDragSvc.visibility!=="visible"||(n||!a)&&!c)&&(u=!1);const h=oa(i,e).y,g=this.getOverNode(h);return{api:i.gridApi,context:i.gridOptions.context,draggingEvent:e,rowDragManaged:r,suppressMoveWhenRowDragging:n,sameGrid:a,withinGrid:c,treeData:!1,rootNode:s,moved:l!==g,y:h,overNode:g,overIndex:g?.rowIndex??-1,pointerPos:"none",position:"none",source:l,target:g??null,newParent:null,rows:d,allowed:u,highlight:!t&&r&&n&&(c||!a),yDelta:0,inside:!1,droppedManaged:!1}}validateRowsDrop(e,t,i){const{source:o,target:s,yDelta:r,inside:n,moved:a,rowDragManaged:l,suppressMoveWhenRowDragging:d}=e;e.moved&&(e.moved=o!==s);const{position:c,fallbackPosition:u}=this.computeDropPosition(a,n,r);e.position=c,t||(e.newParent=null),this.enforceSuppressMoveWhenRowDragging(e,d,"initial");const h=(!l||e.allowed)&&this.gos.get("isRowValidDropPosition");h&&this.applyDropValidator(e,t,i,l,h),l&&(e.rows=this.filterRows(e)),this.beans.groupEditSvc?.clearNewSameParent(e,t),this.enforceSuppressMoveWhenRowDragging(e,d,"final"),e.position==="inside"&&(!e.allowed||!e.newParent)&&(e.position=u)}computeDropPosition(e,t,i){const o=i<0?"above":"below";return e?{position:t?"inside":o,fallbackPosition:o}:{position:"none",fallbackPosition:o}}enforceSuppressMoveWhenRowDragging(e,t,i){if(t){if(i==="initial"){e.moved||(e.allowed=!1);return}(!e.rows.length||e.position==="none")&&(e.allowed=!1)}}applyDropValidator(e,t,i,o,s){this.beans.groupEditSvc?.clearNewSameParent(e,t);const r=s(e);if(!r){e.allowed=!1;return}if(typeof r!="object")return;r.rows!==void 0&&(e.rows=r.rows??[]),t&&r.newParent!==void 0&&(e.newParent=r.newParent),r.target!==void 0&&(e.target=r.target),r.position&&(e.position=r.position),r.allowed!==void 0?e.allowed=r.allowed:o||(e.allowed=!0);const n=e.draggingEvent;r.changed&&n&&(n.changed=!0),!i&&r.highlight!==void 0&&(e.highlight=r.highlight)}addRowDropZone(e){if(!e.getContainer()){this.warn(55);return}const t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer())){this.warn(56);return}const i=e.fromGrid?e:{getContainer:e.getContainer,onDragEnter:e.onDragEnter&&(s=>e.onDragEnter(this.rowDragEvent("rowDragEnter",s))),onDragLeave:e.onDragLeave&&(s=>e.onDragLeave(this.rowDragEvent("rowDragLeave",s))),onDragging:e.onDragging&&(s=>e.onDragging(this.rowDragEvent("rowDragMove",s))),onDragStop:e.onDragStop&&(s=>e.onDragStop(this.rowDragEvent("rowDragEnd",s))),onDragCancel:e.onDragCancel&&(s=>e.onDragCancel(this.rowDragEvent("rowDragCancel",s)))},o={isInterestedIn:s=>s===2,getIconName:()=>"move",external:!0,...i};t.addDropTarget(o),this.addDestroyFunc(()=>t.removeDropTarget(o))}getRowDropZone(e){return{getContainer:this.getContainer.bind(this),onDragEnter:i=>{this.onDragEnter(i),e?.onDragEnter?.(this.rowDragEvent("rowDragEnter",i))},onDragLeave:i=>{this.onDragLeave(i),e?.onDragLeave?.(this.rowDragEvent("rowDragLeave",i))},onDragging:i=>{this.onDragging(i),e?.onDragging?.(this.rowDragEvent("rowDragMove",i))},onDragStop:i=>{this.onDragStop(i),e?.onDragStop?.(this.rowDragEvent("rowDragEnd",i))},onDragCancel:i=>{this.onDragCancel(i),e?.onDragCancel?.(this.rowDragEvent("rowDragCancel",i))},fromGrid:!0}}getOverNode(e){const{pageBounds:t,rowModel:i}=this.beans,s=e>t.getCurrentPagePixelRange().pageLastPixel?-1:i.getRowIndexAtPixel(e);return s>=0?i.getRow(s):void 0}rowDragEvent(e,t){const i=this.beans,{dragItem:o,dropTarget:s,event:r,vDirection:n}=t,a=s?.rootNode===i.rowModel.rootNode,l=a?s.y:oa(i,t).y,d=a?s.overNode:this.getOverNode(l),c=a?s.overIndex:d?.rowIndex??-1;return{api:i.gridApi,context:i.gridOptions.context,type:e,event:r,node:o.rowNode,nodes:o.rowNodes,overIndex:c,overNode:d,y:l,vDirection:n,rowsDrop:s}}dispatchGridEvent(e,t){const i=this.rowDragEvent(e,t);this.eventSvc.dispatchEvent(i)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e,!1)}onDragStop(e){const t=this.lastDraggingEvent?.dropTarget??null,i=this.makeRowsDrop(this.lastDraggingEvent,e,!1,!0);this.dispatchGridEvent("rowDragEnd",e),i?.allowed&&i.rowDragManaged&&(!t?.droppedManaged||rg(t,i))&&this.dropRows(i),this.stopDragging(e,!0)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e,!0)}stopDragging(e,t){this.clearAutoScroll(),this.beans.groupEditSvc?.stopDragging(t),this.beans.rowDropHighlightSvc?.fromDrag(null),ng(e.dragItem.rowNodes,!1),this.lastDraggingEvent=null}clearAutoScroll(){this.autoScroll?.ensureCleared(),this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}dropRows(e){return e.droppedManaged=!0,e.sameGrid?this.csrmMoveRows(e):this.csrmAddRows(e)}csrmAddRows({position:e,target:t,rows:i}){const o=At(this.beans),s=this.beans.rowModel,r=i.filter(({data:a,rowPinned:l})=>!s.getRowNode(o?.({data:a,level:0,rowPinned:l})??a.id)).map(({data:a})=>a);if(r.length===0)return!1;let n;if(t){const a=t.sourceRowIndex>=0?t:oo(t);a&&(n=a.sourceRowIndex+(e==="above"?0:1))}return s.updateRowData({add:r,addIndex:n}),!0}filterRows(e){const{groupEditSvc:t}=this.beans,{rows:i,sameGrid:o}=e;let s;for(let r=0,n=i.length;r<n;++r){let a=!0;const l=i[r];(!l||l.footer||o&&l.destroyed&&!l.group||!this.csrmGetLeaf(l))&&(a=!1),a&&t&&!t.canDropRow(l,e)&&(a=!1),a?s?.push(l):s??(s=i.slice(0,r))}return s??i}csrmMoveRows(e){const t=this.beans.groupEditSvc;return t?.isGroupingDrop(e)?t.dropGroupEdit(e):this.csrmMoveRowsReorder(e)}csrmMoveRowsReorder({position:e,target:t,rows:i,newParent:o,rootNode:s}){let r=!1;const n=new Set;for(const h of i){o&&h.parent!==o&&(h.treeParent=o,r=!0);const g=this.csrmGetLeaf(h);g&&n.add(g)}if(!r&&n.size===0)return!1;const a=this.beans.focusSvc,l=a.getFocusedCell(),d=l&&Gt(this.beans,l);if(n.size&&qh(s._leafs,n,t,e==="above")&&(r=!0),!r)return!1;const c=this.beans.rowModel,u=new so;return u.reordered=!0,c.refreshModel({step:"group",keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:u}),d?d.focusCell({forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0}):a.clearFocusedCell(),!0}csrmGetLeaf(e){if(e.sourceRowIndex>=0)return e.destroyed?void 0:e;const t=this.beans.groupEditSvc;return t?t.csrmFirstLeaf(e):oo(e)}},rg=(e,t)=>e!==t&&(e?.sameGrid!==t.sameGrid||e?.allowed!==t.allowed||e?.position!==t.position||e?.target!==t.target||e?.source!==t.source||e?.newParent!==t.newParent||!D2(e?.rows,t.rows)),I2=(e,t)=>(e.rowIndex??2147483647)-(t.rowIndex??2147483647)||e.sourceRowIndex-t.sourceRowIndex,k2=(e,t,i)=>{if(!t.get("rowDragMultiRow")||!i||!e.isSelected())return[e];if(t.get("treeData")&&ae(t)){const s=i.getBestCostNodeSelection();if(s?.length)return s}const o=i.getSelectedNodes();return o.length?o:[e]},ng=(e,t)=>{for(let i=0,o=e?.length||0;i<o;++i){const s=e[i];s.dragging!==t&&(s.dragging=t,s.dispatchRowEvent("draggingChanged"))}},L2=(e,t)=>{let i=null,o=t.target;if(o&&t.rows.indexOf(o)<0)return null;const s=t.source;if(!o||!s)return null;let r=o.rowIndex-s.rowIndex;const n=r<0?-1:1;r=t.suppressMoveWhenRowDragging?Math.abs(r):1;const a=new Set(t.rows);do{const l=Jo(e,n,o);if(!l)break;a.has(l)||(i=l,--r),o=l}while(r>0);return i},V2=(e,t)=>{const i=e?.rowTop,o=e?.rowHeight??0;if(i==null||!o||o<=0)return"none";const s=t-i,r=o*T2;return s<=r?"above":s>=o-r?"below":"inside"},H2={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},vs={skipAriaHidden:!0},B2=class extends K{constructor(e,t,i,o,s,r=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=i,this.customGui=o,this.dragStartPixels=s,this.alwaysVisible=r,this.dragSource=null,this.disabled=!1}isCustomGui(){return this.customGui!=null}postConstruct(){const{beans:e,customGui:t}=this;t?this.setDragElement(t,this.dragStartPixels):(this.setTemplate(H2),this.getGui().appendChild(X("rowDrag",e,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){const{beans:e,rowNode:t}=this,i=this.refreshVisibility.bind(this);this.addManagedListeners(e.eventSvc,{rowDragVisibilityChanged:i}),this.addManagedListeners(t,{dataChanged:i,cellChanged:i}),this.refreshVisibility()}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}refreshVisibility(){if(this.alwaysVisible)return;const{beans:e,column:t,rowNode:i}=this,{gos:o,dragAndDrop:s,rowDragSvc:r}=e,n=r?.visibility;let l=!(n==="suppress"||n==="hidden"&&!s?.hasExternalDropZones()),d=l;if(l&&!this.isCustomGui()&&t){const c=t.getColDef().rowDrag;if(c===!1)l=!1;else{const u=typeof c=="function";d=t.isRowDrag(i),l=u||d}}l&&d&&i.footer&&o.get("rowDragManaged")&&(d=!1,l=!0),d&&(d=l),l||this.setDisplayed(l,vs),d||this.setVisible(d,vs),this.setDisabled(!d||n==="disabled"&&!s?.hasExternalDropZones()),l&&this.setDisplayed(l,vs),d&&this.setVisible(d,vs)}setDisabled(e){e!==this.disabled&&(this.disabled=e,this.getGui()?.classList?.toggle("ag-drag-handle-disabled",e))}getSelectedNodes(){return k2(this.rowNode,this.gos,this.beans.selectionSvc)}getDragItem(){const{column:e,rowNode:t}=this;return{rowNode:t,rowNodes:this.getSelectedNodes(),columns:e?[e]:void 0,defaultTextValue:this.cellValueFn()}}addDragSource(e=4){if(this.dragSource&&this.removeDragSource(),this.gos.get("rowDragManaged")&&this.rowNode.footer)return;const t=this.getGui();if(this.gos.get("enableCellTextSelection")){this.removeMouseDownListener();const o=F2("pointerdown")?{pointerdown:og}:{mousedown:og};this.mouseDownListener=this.addManagedElementListeners(t,o)[0]}const i=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:o=>this.getDragItemName(o,i),getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}getDragItemName(e,t){const i=e?.dragItem||this.getDragItem(),o=(e?.dropTarget?.rows.length??i.rowNodes?.length)||1,s=this.column?.getColDef()?.rowDragText??this.gos.get("rowDragText");if(s)return s(i,o);if(o!==1)return`${o} ${t("rowDragRows","rows")}`;const r=this.cellValueFn();return r||`1 ${t("rowDragRow","rows")}`}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},O2=class extends y{constructor(){super(...arguments),this.beanName="rowDragSvc",this.rowDragFeature=null,this.visibility="suppress"}setupRowDrag(e,t){const i=t.createManagedBean(new A2(e)),o=this.beans.dragAndDrop;o.addDropTarget(i),t.addDestroyFunc(()=>o.removeDropTarget(i)),this.rowDragFeature=i;const s=()=>this.refreshVisibility();this.addManagedPropertyListeners(["rowDragManaged","suppressRowDrag","refreshAfterGroupEdit"],s),this.addManagedEventListeners({newColumnsLoaded:s,columnRowGroupChanged:s,columnPivotModeChanged:s,sortChanged:s,filterChanged:s}),this.visibility=this.computeVisibility()}createRowDragComp(e,t,i,o,s,r){return new B2(e,t,i,o,s,r)}createRowDragCompForRow(e,t){if(_e(this.gos))return;const i=this.getLocaleTextFunc();return this.createRowDragComp(()=>`1 ${i("rowDragRow","row")}`,e,void 0,t,void 0,!0)}createRowDragCompForCell(e,t,i,o,s,r){const n=this.gos;return n.get("rowDragManaged")&&(!ae(n)||n.get("pagination"))?void 0:this.createRowDragComp(i,e,t,o,s,r)}cancelRowDrag(){this.rowDragFeature?.lastDraggingEvent&&this.beans.dragSvc?.cancelDrag()}computeVisibility(){const e=this.beans,t=e.gos;if(t.get("suppressRowDrag"))return"suppress";if(!t.get("rowDragManaged"))return"visible";const o=e.colModel.pivotMode;return(o||e.rowGroupColsSvc?.columns?.length)&&!t.get("refreshAfterGroupEdit")?"hidden":o||e.filterManager?.isAnyFilterPresent()||G2(e.colModel.getAllCols())?"disabled":"visible"}refreshVisibility(){const e=this.visibility,t=this.computeVisibility();e!==t&&(this.visibility=t,this.eventSvc?.dispatchEvent({type:"rowDragVisibilityChanged"}))}},G2=e=>{for(let t=0,i=e.length;t<i;++t)if(e[t].getSortDef())return!0;return!1},N2=class extends y{constructor(){super(...arguments),this.beanName="rowDropHighlightSvc",this.uiLevel=0,this.dragging=!1,this.row=null,this.position="none"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this)})}onModelUpdated(){const e=this.row,t=this.dragging;!e||e?.rowIndex===null||this.position==="none"?this.clear():this.set(e,this.position),this.dragging=t}destroy(){this.clear(),super.destroy()}clear(){const e=this.row;this.dragging=!1,e&&(this.uiLevel=0,this.position="none",this.row=null,e.dispatchRowEvent("rowHighlightChanged"))}set(e,t){const i=e!==this.row,o=e.uiLevel,s=t!==this.position,r=o!==this.uiLevel;this.dragging=!1,(i||s||r)&&(i&&this.clear(),this.uiLevel=o,this.position=t,this.row=e,e.dispatchRowEvent("rowHighlightChanged"))}fromDrag(e){const t=e?.dropTarget;if(t){const{highlight:i,target:o,position:s}=t;if(i&&o&&s!=="none"){this.set(o,s),this.dragging=!0;return}}this.dragging&&this.clear()}},sa={moduleName:"Drag",version:E,beans:[R2]},ag={moduleName:"DragAndDrop",version:E,dynamicBeans:{dndSourceComp:h2},icons:{rowDrag:"grip"}},ra={moduleName:"SharedDragAndDrop",version:E,beans:[S1],dependsOn:[sa],userComponents:{agDragAndDropImage:m2},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},lg={moduleName:"RowDrag",version:E,beans:[N2,O2],apiFunctions:{addRowDropZone:C2,removeRowDropZone:v2,getRowDropZoneParams:w2,getRowDropPositionIndicator:S2,setRowDropPositionIndicator:b2},dependsOn:[ra]},dg={moduleName:"HorizontalResize",version:E,beans:[x2],dependsOn:[sa]},_2=":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s,right .2s}.ag-header-group-cell{transition:left .2s,right .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s,left .2s}.ag-header-group-cell{transition:right .2s,left .2s,width .2s}}",z2=class extends y{constructor(){super(...arguments),this.beanName="colAnimation",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0,this.startDepth=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){if(this.startDepth++,this.active)return;const{gos:e,gridBodyCtrl:t}=this;!t||e.get("suppressColumnMoveAnimation")||(this.ensureAnimationCssClassPresent(t),this.active=!0,this.activeNext=!0)}finish(){const e=Math.max(0,this.startDepth-1);this.startDepth=e,!(e>0||!this.active)&&this.flush()}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(e){this.animationThreadCount++;const t=this.animationThreadCount;e.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===t&&e.setColumnMovingCss(!1)})}flush(){const{executeNextFuncs:e,executeLaterFuncs:t}=this;if(e.length===0&&t.length===0){this.activeNext=!1,this.active=!1;return}this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{this.activeNext=!1,cg(e)},0),window.setTimeout(()=>{this.active=!1,cg(t)},200)})}},cg=e=>{for(;e.length;){const t=e.pop();t&&t()}};function W2(e,t,i){e.colMoves?.moveColumnByIndex(t,i,"api")}function U2(e,t,i){e.colMoves?.moveColumns(t,i,"api")}import{_last as q2,_moveInArray as ug,_removeFromArray as $2}from"ag-stack";var K2=class extends y{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;if(t)for(const i of t)i.primary&&(i.isAnyFunctionActive()||(i.isAllowValue()?this.columnsToAggregate.push(i):i.isAllowRowGroup()?this.columnsToGroup.push(i):i.isAllowPivot()&&this.columnsToPivot.push(i)))}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){const{colModel:t,valueColsSvc:i,rowGroupColsSvc:o,pivotColsSvc:s}=this.beans;t.beginColBatch();try{this.columnsToAggregate.length>0&&i?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&o?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&s?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}finally{t.endColBatch("toolPanelDragAndDrop")}}onDragCancel(){this.clearColumnsList()}};import{FAST_TEST_TIMINGS as j2,_exists as Q2,_last as Z2,_missing as Y2}from"ag-stack";import{_areEqual as J2}from"ag-stack";function X2(e,t){!t||t.length<=1||t.some(i=>!i.inColsList)||(e.ensureColsListIndex(),t.sort((i,o)=>i.colsListIndex-o.colsListIndex))}function eR(e){const t=[...e],i=new Set(t);for(const o of e){let s=null,r=o.parent;for(;r?.getDisplayedLeafColumns().length===1;)s=r,r=r.parent;if(s!=null){const a=!!s.getColGroupDef()?.marryChildren?s.getProvidedColumnGroup().getLeafColumns():s.getLeafColumns();for(let l=0,d=a.length;l<d;++l){const c=a[l];i.has(c)||(i.add(c),t.push(c))}}}return t}function tR(e,t,i){let o=null,s=null;for(let r=0;r<e.length;r++){const n=e[r],a=i.getProposedColumnOrder(t,n);if(!i.doesOrderPassRules(a))continue;const l=a.filter(c=>c.displayed);if(s===null)s=l;else if(!J2(l,s))break;const d=oR(a);(o===null||d<o.fragCount)&&(o={move:n,fragCount:d})}return o}function hg(e){const{isFromHeader:t,fromLeft:i,xPosition:o,fromEnter:s,fakeEvent:r,pinned:n,gos:a,colModel:l,colMoves:d,visibleCols:c}=e;let{allMovingColumns:u}=e;t&&(u=eR(u));const h=u.slice();X2(l,h);const g=nR({movingCols:h,draggingRight:i,xPosition:o,pinned:n,gos:a,colModel:l,visibleCols:c}),p=iR(h,l);if(g.length===0)return;const f=g[0];if(p!==null&&(t||!s)&&!r&&(!i&&f>=p||i&&f<=p))return;const C=tR(g,h,d);if(!C)return;const v=C.move;if(!(v>l.colsList.length-h.length))return{columns:h,toIndex:v}}function gg(e){const{columns:t,toIndex:i}=hg(e)||{},{finished:o,colMoves:s}=e;return!t||i==null?null:(s.moveColumns(t,i,"uiColumnMoved",o),o?null:{columns:t,toIndex:i})}function iR(e,t){const i=e.length;if(i===0)return null;t.ensureColsListIndex();const o=e[0];let s=o.inColsList?o.colsListIndex:-1,r=s;for(let n=1;n<i;++n){const a=e[n],l=a.inColsList?a.colsListIndex:-1;l<s?s=l:l>r&&(r=l)}return r-s===i-1?s:null}function oR(e){function t(o){const s=[];let r=o.getOriginalParent();for(;r!=null;)s.push(r),r=r.getOriginalParent();return s}let i=0;for(let o=0;o<e.length-1;o++){let s=t(e[o]),r=t(e[o+1]);[s,r]=s.length>r.length?[s,r]:[r,s];for(const n of s)r.indexOf(n)===-1&&i++}return i}function sR(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function rR(e,t){if(!e?.displayed)return!0;const i=e.pinned;return t==="left"||t==="right"?i!==t:i!=null}function nR(e){const{movingCols:t,draggingRight:i,xPosition:o,pinned:s,gos:r,colModel:n,visibleCols:a}=e;if(r.get("suppressMovableColumns")||t.some(w=>w.colDef.suppressMovable))return[];const d=sR(a,s),c=n.colsList,u=new Set(t),h=d.filter(w=>u.has(w)),g=d.filter(w=>!u.has(w)),p=c.filter(w=>!u.has(w));let f=0,m=o;if(i){let w=0;for(const b of h)w+=b.getActualWidth();m-=w}if(m>0){for(let w=0;w<g.length;w++){const b=g[w];if(m-=b.getActualWidth(),m<0)break;f++}i&&f++}let C;if(f>0){const w=g[f-1];C=p.indexOf(w)+1}else C=p.indexOf(g[0]),C===-1&&(C=0);const v=[C],S=(w,b)=>w-b;if(i){let w=C+1;const b=c.length-1;for(;w<=b;)v.push(w),w++;v.sort(S)}else{let w=C;const b=c.length-1;let R=c[w];for(;w<=b&&rR(R,s);)w++,v.push(w),R=c[w];w=C-1;const x=0;for(;w>=x;)v.push(w),w--;v.sort(S).reverse()}return v}function pg(e,t){let i;return e==="left"?i="ag-grid-pinned-left-cells":e==="right"?i="ag-grid-pinned-right-cells":i="ag-grid-scrolling-cells",t.getHeaderRowContainerCtrl()?.eViewport?.querySelector(`.ag-header-row .${i}`)}function fg(e,t,i){const o=pg(t,i);return o?e-o.getBoundingClientRect().left:e}var aR=(e,t,i)=>{if(t&&i!=="left")switch(e){case"left":return"right";case"right":return"left"}return e};function mg(e){const{isRtl:t,ctrlsSvc:i,pinned:o}=e;let{x:s}=e;if(t&&o!=="left"){const r=pg(o??null,i);if(!r)return 0;s=r.getBoundingClientRect().width-s}return s}function na(e,t){for(const i of e)i.moving=t,i.dispatchColEvent("movingChanged","uiColumnMoved")}var Cg=7,aa=100,vg=aa/2,lR=5,dR=j2?20:100,cR=class extends y{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!Q2(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,{dragItem:i}=t||{},o=i?.columns??[];for(const s of o){const r=s.getPinned();if(s.getColDef().lockPinned){if(r==e)return"move";continue}const n=i?.containerType;if(n===e||!e)return"move";if(e&&(!r||n!==e))return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,i=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(i,!0,"uiColumnDragged");else{const s=t.visibleState,r=(i||[]).filter(n=>s[n.getId()]&&!n.isVisible());this.setColumnsVisible(r,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(i,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,i=!1,o=!1){const{gos:s,ctrlsSvc:r}=this.beans,n=s.get("suppressMoveWhenColumnDragging");if(o&&!n){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!o&&Y2(e.hDirection))return;const a=fg(e.event.clientX,this.pinned,r),l=mg({x:a,pinned:this.pinned,isRtl:s.get("enableRtl"),ctrlsSvc:r});t||this.checkCenterForScrolling(e),n?this.handleColumnDragWhileSuppressingMovement(e,t,i,l,o):this.handleColumnDragWhileAllowingMovement(e,t,i,l,o)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,i){e?.length&&Bi(this.beans,e,t,i,!0)}finishColumnMoving(){this.clearHighlighted();const e=this.lastMovedInfo;e&&this.beans.colMoves.moveColumns(e.columns,e.toIndex,"uiColumnMoved",!0)}updateDragItemContainerType(){const{lastDraggingEvent:e}=this;if(this.gos.get("suppressMoveWhenColumnDragging")||!e)return;const t=e.dragItem;t&&(t.containerType=this.pinned)}handleColumnDragWhileSuppressingMovement(e,t,i,o,s){const r=this.getAllMovingColumns(e,!0);if(s){const n=this.isAttemptingToPin(r);n&&this.attemptToPinColumns(r,void 0,!0);const{fromLeft:a,xPosition:l}=this.getNormalisedXPositionInfo(r,n)||{};if(a==null||l==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:r,xPosition:l,fromEnter:t,fakeEvent:i,fromLeft:a})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(r,o)}}handleColumnDragWhileAllowingMovement(e,t,i,o,s){const r=this.getAllMovingColumns(e),n=aR(e.hDirection,this.gos.get("enableRtl"),this.pinned)==="right",a=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:r,isFromHeader:a,xPosition:o,fromLeft:n,fromEnter:t,fakeEvent:i}),d=gg({...l,finished:s});d&&(this.lastMovedInfo=d)}getAllMovingColumns(e,t=!1){const i=e.dragSource.getDragItem();let o;t?(o=i.columnsInSplit,o||(o=i.columns)):o=i.columns;const s=r=>r.colDef.lockPinned?r.getPinned()==this.pinned:!0;return o?o.filter(s):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:i,xPosition:o,fromLeft:s,fromEnter:r,fakeEvent:n}=e,{gos:a,colModel:l,colMoves:d,visibleCols:c}=this.beans;return{allMovingColumns:t,isFromHeader:i,fromLeft:s,xPosition:o,pinned:this.pinned,fromEnter:r,fakeEvent:n,gos:a,colModel:l,colMoves:d,visibleCols:c}}highlightHoveredColumn(e,t){const{colModel:i}=this.beans,o=i.getCols().filter(l=>l.isVisible()&&l.getPinned()===this.pinned);let s=null,r=null,n=null;for(const l of o){if(r=l.getActualWidth(),s=this.getNormalisedColumnLeft(l,0),s!=null){const d=s+r;if(s<=t&&d>=t){n=l;break}}s=null,r=null}if(n)e.indexOf(n)!==-1&&(n=null);else{for(let l=o.length-1;l>=0;l--){const d=o[l],c=o[l].parent;if(!c){n=d;break}const u=c?.getDisplayedLeafColumns();if(u.length){n=Z2(u);break}}if(!n)return;s=this.getNormalisedColumnLeft(n,0),r=n.getActualWidth()}if(n==null||s==null||r==null){this.lastHighlightedColumn?.column!==n&&this.clearHighlighted();return}let a;if(t-s<r/2){const l=o.indexOf(n);l===0?a=0:(a=1,n=o[l-1])}else a=1;(this.lastHighlightedColumn?.column!==n||this.lastHighlightedColumn?.position!==a)&&this.clearHighlighted(),wg(n,a),this.lastHighlightedColumn={column:n,position:a}}getNormalisedXPositionInfo(e,t){const{gos:i,visibleCols:o}=this.beans,s=i.get("enableRtl"),{firstMovingCol:r,column:n,position:a}=this.getColumnMoveAndTargetInfo(e,t,s);if(!r||!n||a==null)return;const l=o.allCols,d=r.allColsIndex,c=n.allColsIndex,u=a===0,h=d<c||d===c&&!u;let g=0;if(u?h&&(g-=1):h||(g+=1),c+g===d)return;const p=l[c+g];if(!p)return;const f=this.getNormalisedColumnLeft(p,20);return{fromLeft:h,xPosition:f}}getColumnMoveAndTargetInfo(e,t,i){const o=this.lastHighlightedColumn||{},{firstMovingCol:s,lastMovingCol:r}=uR(e);if(!s||!r||o.column||!t)return{firstMovingCol:s,...o};const a=this.getPinDirection()==="left";return{firstMovingCol:s,position:a?1:0,column:a!==i?s:r}}getNormalisedColumnLeft(e,t){const{gos:i}=this.beans,o=e.getLeft();if(o==null)return null;let s=t;return i.get("enableRtl")&&e.getPinned()==="left"&&(s=e.getActualWidth()-t),o+s}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,i=this.failedMoveAttempts>Cg;return t&&i||e.some(o=>o.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:i,fromEnter:o,fakeEvent:s,fromLeft:r}=e,n=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:i,fromLeft:r,fromEnter:o,fakeEvent:s}),{columns:a,toIndex:l}=hg(n)||{};a&&l!=null&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(wg(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const{visibleCols:t}=this.beans,i=this.gridBodyCon.eGridViewport.getBoundingClientRect(),o=e.event.clientX-i.left,s=t.getLeftStickyColumnContainerWidth(),r=t.getRightStickyColumnContainerWidth(),n=o<s+vg,a=o>i.width-r-vg;this.needToMoveLeft=n,this.needToMoveRight=a,this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),dR),this.beans.dragAndDrop.setDragImageCompIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.setDragImageCompIcon(this.getIconName()))}moveInterval(){let e;this.intervalCount++,e=10+this.intervalCount*lR,e>aa&&(e=aa);let t=null;const i=this.gridBodyCon.scrollFeature,o=this.gos.get("enableRtl")?-1:1;if(this.needToMoveLeft?t=i.scrollHorizontally(-e*o):this.needToMoveRight&&(t=i.scrollHorizontally(e*o)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{dragAndDrop:s,gos:r}=this.beans;if(this.failedMoveAttempts<=Cg+1)return;const n=this.lastDraggingEvent?.dragItem.columns,a=(n??[]).some(l=>!l.colDef.lockPinned);s.setDragImageCompIcon(a?"pinned":this.getIconName()),a&&!r.get("suppressMoveWhenColumnDragging")&&this.attemptToPinColumns(n,void 0,!0)}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,i=!1){const o=(e||[]).filter(n=>!n.colDef.lockPinned);if(!o.length)return 0;i&&(t=this.getPinDirection());const{pinnedCols:s,dragAndDrop:r}=this.beans;return s?.setColsPinned(o,t,"uiColumnDragged"),i&&r.nudge(),o.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function wg(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function uR(e){const t=e.length;let i,o;for(let s=0;s<t;s++){if(!i){const r=e[s];r.getLeft()!=null&&(i=r)}if(!o){const r=e[t-1-s];r.getLeft()!=null&&(o=r)}if(i&&o)break}return{firstMovingCol:i,lastMovingCol:o}}var hR=class extends y{constructor(e){super(),this.eContainer=e,this.currentDropListener=null,this.lastDetectedSection=null}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans;e.whenReady(this,s=>{const r=s.gridBodyCtrl.eGridViewport,n=s.pinnedTop.eViewport,a=s.pinnedBottom.eViewport;this.eGridViewport=r;const l=[];r&&l.push([r]),n&&n!==r&&l.push([n]),a&&a!==r&&a!==n&&l.push([a]),this.eSecondaryContainers=l});const i=s=>this.createManagedBean(new cR(s));this.moveColumnFeatures={left:i("left"),center:i(null),right:i("right")};const o=s=>this.createManagedBean(new K2(s));this.bodyDropPivotTargets={left:o("left"),center:o(null),right:o("right")},t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener?.getIconName()??null}isDropColumnInPivotMode(e){return this.beans.colModel.pivotMode&&e.dragSource.type===0}onDragEnter(e){const t=this.getDropListener(e);this.lastDetectedSection=null,this.currentDropListener=t,t.onDragEnter(e)}onDragLeave(e){const t=this.currentDropListener;t&&(t.onDragLeave(e),this.currentDropListener=null),this.lastDetectedSection=null}onDragging(e){let t=this.currentDropListener;if(!t)return;const i=this.getDropListener(e);t!==i&&(t.onDragLeave(e),t=i,this.currentDropListener=i,t.onDragEnter(e),e.changed=!0),t.onDragging(e)}onDragStop(e){const t=this.currentDropListener;t&&(t.onDragStop(e),this.currentDropListener=null)}onDragCancel(){const e=this.currentDropListener;e&&(e.onDragCancel(),this.currentDropListener=null)}getSection(e){const t=this.getPinnedSection(e);switch(t){case"left":case"right":return t;default:return"center"}}getDropListener(e){const t=this.getSection(e);return this.isDropColumnInPivotMode(e)?this.bodyDropPivotTargets[t]:this.moveColumnFeatures[t]}getPinnedSection(e){const t=this.eGridViewport.getBoundingClientRect(),i=e.event.clientX-t.left,{visibleCols:o}=this.beans,s=o.getLeftStickyColumnContainerWidth(),r=o.getRightStickyColumnContainerWidth();let n=null;i<s?n="left":i>t.width-r&&(n="right");const a=this.lastDetectedSection;return e.fromNudge&&n!==a&&a!==null?a:(this.lastDetectedSection=n,n)}},gR=class extends y{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,i){const o=this.beans.colModel.colsList[e];this.moveColumns([o],t,i)}moveColumns(e,t,i,o=!0){const{colModel:s,visibleCols:r}=this.beans,n=this.beans.colAnimation,a=s.colsList;if(t>a.length-e.length){this.warn(30,{toIndex:t});return}n?.start();try{const l=[];for(let d=0,c=e.length;d<c;++d){const u=s.getCol(e[d]);u&&l.push(u)}this.doesMovePassRules(l,t)&&(ug(s.colsList,l,t),s.markColsListIndexDirty(),r.refresh(i,!1),this.eventSvc.dispatchEvent({type:"columnMoved",columns:l,column:l.length===1?l[0]:null,toIndex:t,finished:o,source:i}))}finally{n?.finish()}}doesMovePassRules(e,t){const i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){const{colModel:t,gos:i}=this.beans;return!(t.hasMarryChildren&&!ac(e,t.colsTree)||!(s=>{const r=d=>d?d==="left"||d===!0?-1:1:0,n=i.get("enableRtl");let a=n?1:-1,l=!0;for(const d of s){const c=r(d.colDef.lockPosition);n?c>a&&(l=!1):c<a&&(l=!1),a=c}return l})(e))}getProposedColumnOrder(e,t){const i=this.beans.colModel.colsList.slice();return ug(i,e,t),i}createBodyDropTarget(e){return new hR(e)}moveHeader(e,t,i,o,s){const{ctrlsSvc:r,gos:n,colModel:a,visibleCols:l,focusSvc:d}=this.beans,c=t.getBoundingClientRect(),u=c.left,h=Ee(i),g=h?c.width:i.getActualWidth(),p=n.get("enableRtl"),f=e==="left"!==p,m=f?u-20:u+g+20,C=fg(m,o,r),v=mg({x:C,pinned:o,isRtl:p,ctrlsSvc:r}),S=d.focusedHeader;gg({allMovingColumns:h?i.getLeafColumns():[i],isFromHeader:!0,fromLeft:e==="right",xPosition:v,pinned:o,fromEnter:!1,fakeEvent:!1,gos:n,colModel:a,colMoves:this,visibleCols:l,finished:!0});let w;if(h){const b=i.getDisplayedLeafColumns();w=f?b[0]:q2(b)}else w=i;if(r.getScrollFeature().ensureColumnVisible(w,"auto"),(!s.isAlive()||n.get("ensureDomOrder"))&&S){let b;if(h){const R=i.getGroupId(),x=i.getLeafColumns();if(!x.length)return;const D=x[0].parent;if(!D)return;b=pR(D,R)}else b=i;b&&d.focusHeaderPosition({headerPosition:{...S,column:b}})}}setDragSourceForHeader(e,t,i){const o=this.beans,{gos:s,dragAndDrop:r,visibleCols:n}=o;let a=!s.get("suppressDragLeaveHidesColumns");const l=Ee(t),d=l?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>mR(t,n.allCols):()=>fR(t),dragItemName:i,onDragStarted:()=>{a=!s.get("suppressDragLeaveHidesColumns"),na(d,!0)},onDragStopped:()=>na(d,!1),onDragCancelled:()=>na(d,!1),onGridEnter:h=>{if(a){const{columns:g=[],visibleState:p}=h??{},f=l?g.filter(m=>!p||p[m.colId]):g;Bi(o,f,!0,"uiColumnMoved",!0)}},onGridExit:h=>{a&&Bi(o,h?.columns??[],!1,"uiColumnMoved",!0)}};return r.addDragSource(u,!0),u}};function pR(e,t){for(;e;){if(e.groupId===t)return e;e=e.parent}}function fR(e){const t=Object.create(null);return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function mR(e,t){const i=e.getProvidedColumnGroup().getLeafColumns(),o=Object.create(null);for(const a of i)o[a.getId()]=a.isVisible();const s=[];for(const a of t)i.indexOf(a)>=0&&(s.push(a),$2(i,a));for(const a of i)s.push(a);const r=[],n=e.getLeafColumns();for(const a of s)n.indexOf(a)!==-1&&r.push(a);return{columns:s,columnsInSplit:r,visibleState:o,containerType:r[0]?.pinned}}var Sg={moduleName:"ColumnMove",version:E,beans:[gR,z2],apiFunctions:{moveColumnByIndex:W2,moveColumns:U2},dependsOn:[ra],css:[_2]},CR=class extends y{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.scrollingRowContainerCtrl=e.scrolling})}getPreferredWidthForColumn(e,t){const i=this.getHeaderCellForColumn(e);if(!i)return-1;const o=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||o.push(i),this.getPreferredWidthForElements(o)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){const i=V({tag:"form"});i.style.position="fixed";const o=this.scrollingRowContainerCtrl.eViewport;for(const r of e)this.cloneItemIntoDummy(r,i);o.appendChild(i);const s=i.offsetWidth;return i.remove(),t=t??this.gos.get("autoSizePadding"),s+t}getHeaderCellForColumn(e){return this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getHtmlElementForColumnHeader(e)??null}cloneItemIntoDummy(e,t){const i=e.cloneNode(!0);i.style.width="",i.style.position="static",i.style.left="",i.style.right="";const o=V({tag:"div"}),s=o.classList;["ag-header-cell","ag-header-group-cell"].some(a=>i.classList.contains(a))?(s.add("ag-header","ag-header-row"),o.style.position="static"):s.add("ag-row");let n=e.parentElement;for(;n;){if(["ag-header-row","ag-row"].some(l=>n.classList.contains(l))){for(let l=0;l<n.classList.length;l++){const d=n.classList[l];d!="ag-row-position-absolute"&&s.add(d)}break}n=n.parentElement}o.appendChild(i),t.appendChild(o)}},bg={moduleName:"AutoWidth",version:E,beans:[CR]};function vR(e,t,i=!0,o="api"){e.colResize?.setColumnWidths(t,!1,i,o)}var wR=class extends y{constructor(e,t,i){super(),this.comp=e,this.eResize=t,this.columnGroup=i}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:i}=this.beans,o=e.addResizeBar({eResizeBar:this.eResize,isColumn:!0,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(o),!t.get("suppressAutoSize")&&i&&this.addDestroyFunc(i.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:i,resizeRatios:o,groupAfterColumns:s,groupAfterStartWidth:r,groupAfterRatios:n}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=i,this.resizeRatios=o,this.resizeTakeFromCols=s,this.resizeTakeFromStartWidth=r,this.resizeTakeFromRatios=n,this.toggleColumnResizing(!0)}onResizing(e,t,i="uiColumnResized"){const o=this.normaliseDragChange(t),s=this.resizeStartWidth+o;this.resizeColumnsFromLocalValues(s,i,e)}getInitialValues(e){const t=l=>l.reduce((d,c)=>d+c.getActualWidth(),0),i=(l,d)=>l.map(c=>c.getActualWidth()/d),o=this.getColumnsToResize(),s=t(o),r=i(o,s),n={columnsToResize:o,resizeStartWidth:s,resizeRatios:r};let a=null;if(e&&(a=SR(this.beans.visibleCols,this.columnGroup)),a){const l=a.getDisplayedLeafColumns(),d=n.groupAfterColumns=l.filter(u=>u.isResizable()),c=n.groupAfterStartWidth=t(d);n.groupAfterRatios=i(d,c)}else n.groupAfterColumns=void 0,n.groupAfterStartWidth=void 0,n.groupAfterRatios=void 0;return n}resizeLeafColumnsToFit(e){const t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),i=this.getInitialValues();t>i.resizeStartWidth&&this.resizeColumns(i,t,e,!0)}resizeColumnsFromLocalValues(e,t,i=!0){if(!this.resizeCols||!this.resizeRatios)return;const o={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(o,e,t,i)}resizeColumns(e,t,i,o=!0){const{columnsToResize:s,resizeStartWidth:r,resizeRatios:n,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:d}=e,c=[];if(c.push({columns:s,ratios:n,width:t}),a){const u=t-r;c.push({columns:a,ratios:d,width:l-u})}this.beans.colResize?.resizeColumnSets({resizeSets:c,finished:o,source:i}),o&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;const{columnGroup:i}=this,s=Ot(i,!0,!1)?.getPinned()??i.getPinned();return this.gos.get("enableRtl")?s!=="left"&&(t*=-1):s==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},SR=(e,t)=>{const i=t.providedColumnGroup.level+t.getPaddingLevel();let o=Ot(t,!0,!0);for(;o;){const s=e.getColAfter(o);if(!s)return null;const r=Mc(s,i);if(r!==t)return r;o=s}return null};import{_setDisplayed as bR}from"ag-stack";var yR=class extends y{constructor(e,t,i,o){super(),this.column=e,this.eResize=t,this.comp=i,this.ctrl=o}postConstruct(){const e=[];let t,i;const o=()=>{if(bR(this.eResize,t),!t)return;const{horizontalResizeSvc:n,colAutosize:a}=this.beans,l=n.addResizeBar({eResizeBar:this.eResize,isColumn:!0,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(l),i&&a&&e.push(a.addColumnAutosizeListeners(this.eResize,this.column))},s=()=>{for(const n of e)n();e.length=0},r=()=>{const n=this.column.isResizable(),a=!this.gos.get("suppressAutoSize")&&!this.column.colDef.suppressAutoSize;(n!==t||a!==i)&&(t=n,i=a,s(),o())};r(),this.addDestroyFunc(s),this.ctrl.setRefreshFunction("resize",r)}onResizing(e,t){const{column:i,lastResizeAmount:o,resizeStartWidth:s,beans:r}=this,n=this.normaliseResizeAmount(t),a=s+n,l=[{key:i,newWidth:a}],{pinnedCols:d,ctrlsSvc:c,colResize:u}=r;if(this.column.getPinned()){const h=d?.leftWidth??0,g=d?.rightWidth??0,p=c.getGridBodyCtrl().getViewportWidthWithoutScrollbar()-50;if(h+g+(n-o)>p)return}this.lastResizeAmount=n,u?.setColumnWidths(l,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.column.resizing=e,this.comp.toggleCss("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const i=this.column.getPinned(),o=i!=="left",s=i==="right";return this.gos.get("enableRtl")?o&&(t*=-1):s&&(t*=-1),t}},RR=class extends y{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,i,o){const s=[],{colModel:r,gos:n,visibleCols:a}=this.beans;for(const l of e){const d=r.getCol(l.key);if(!d)continue;if(s.push({width:l.newWidth,ratios:[1],columns:[d]}),n.get("colResizeDefault")==="shift"&&(t=!t),t){const u=a.getColAfter(d);if(!u)continue;const h=d.getActualWidth()-l.newWidth,g=u.getActualWidth()+h;s.push({width:g,ratios:[1],columns:[u]})}}s.length!==0&&this.resizeColumnSets({resizeSets:s,finished:i,source:o})}resizeColumnSets(e){const{resizeSets:t,finished:i,source:o}=e;if(!(!t||t.every(c=>ER(c)))){if(i){const c=t&&t.length>0?t[0].columns:null;li(this.eventSvc,c,i,o)}return}const r=[],n=[];for(const c of t){const{width:u,columns:h,ratios:g}=c,p=Object.create(null),f=Object.create(null);for(const v of h)n.push(v);let m=!0,C=0;for(;m;){if(C++,C>1e3){this.error(31);break}m=!1;const v=[];let S=0,w=u;h.forEach((R,x)=>{if(f[R.getId()])w-=p[R.getId()];else{v.push(R);const T=g[x];S+=T}});const b=1/S;v.forEach((R,x)=>{const D=x===v.length-1;let T;D?T=w:(T=Math.round(g[x]*u*b),w-=T);const B=R.getMinWidth(),W=R.getMaxWidth();T<B?(T=B,f[R.getId()]=!0,m=!0):W>0&&T>W&&(T=W,f[R.getId()]=!0,m=!0),p[R.getId()]=T})}for(const v of h){const S=p[v.getId()];v.getActualWidth()!==S&&(v.setActualWidth(S,o),r.push(v))}}const a=r.length>0;let l=[];if(a){const{colFlex:c,visibleCols:u,colViewport:h}=this.beans;l=c?.refreshFlexedColumns({resizingCols:n,skipSetLeft:!0})??[],u.updateBodyWidths(u.setLeftValues(o)),h.checkViewportColumns()}const d=n.concat(l);(a||i)&&li(this.eventSvc,d,i,o,l)}resizeHeader(e,t,i){if(!e.isResizable())return;const o=e.getActualWidth(),s=e.getMinWidth(),r=e.getMaxWidth(),n=Dt(o+t,s,r);this.setColumnWidths([{key:e,newWidth:n}],i,!0,"uiColumnResized")}createResizeFeature(e,t,i,o){return new yR(e,t,i,o)}createGroupResizeFeature(e,t,i){return new wR(e,t,i)}};function ER(e){const{columns:t,width:i}=e;let o=0,s=0,r=!0;for(const l of t){const d=l.getMinWidth();o+=d||0;const c=l.getMaxWidth();c>0?s+=c:r=!1}const n=i>=o,a=!r||i<=s;return n&&a}var xR={moduleName:"ColumnResize",version:E,beans:[RR],apiFunctions:{setColumnWidths:vR},dependsOn:[dg,bg]};function FR(e,t,i){ji(e,t,i,"api")}function PR(e,t,i){const o=t!=null?e.colModel.colsGroupsById.get(t)?.displayInstances:void 0;return o&&(typeof i=="number"?o[i]:o[0])||null}function DR(e,t){return e.colModel.getColGroup(t)??null}function MR(e,t,i){return e.colNames.getDisplayNameForColumnGroup(t,i)||""}function TR(e){return pn(e)}function AR(e,t){Qi(e,t,"api")}function IR(e){GS(e,"api")}function kR(e){return e.visibleCols.treeLeft}function LR(e){return e.visibleCols.treeCenter}function VR(e){return e.visibleCols.treeRight}function HR(e){const{treeLeft:t,treeCenter:i,treeRight:o}=e.visibleCols;return t.concat(i,o)}var yg=class{constructor(e){this.entries=new Map,this.context=e.context}wrap(e,t,i){const o=this.entries,s=o.get(e);if(s?.depth===t)return s.buildToken=i,e.originalParent=s.parent,s.wrapper;if(s!==void 0&&la(s.wrapper),t===0)return s!==void 0&&o.delete(e),e.originalParent=null,e;const r=e.colId,n=this.context;let a=e;for(let l=t-1;l>=0;--l){const d=new Hi(null,"FAKE_PATH_"+r+"_"+l,!0,l);n.createBean(d),d.children=[a],a.originalParent=d,a=d}return a.originalParent=null,o.set(e,{wrapper:a,parent:e.originalParent,depth:t,buildToken:i}),a}evict(e){const t=this.entries;t.size!==0&&t.forEach((i,o)=>{i.buildToken!==e&&(la(i.wrapper),t.delete(o))})}destroy(){const e=this.entries;e.forEach(BR),e.clear()}},BR=e=>la(e.wrapper),la=e=>{let t=e;for(;t&&!t.isColumn;){const i=t.children[0];t.isAlive()&&t.destroy(),t=i??null}},OR=class extends y{constructor(){super(...arguments),this.beanName="colGroupSvc"}wireBeans(e){this.colModel=e.colModel,this.colViewport=e.colViewport,this.wrapperCache=new yg(e)}destroy(){this.wrapperCache.destroy(),super.destroy()}createGroups(e,t,i,o=1,s=!1){const r=!s,n=this.colViewport;if(e.length===0||e[0].originalParent===null){if(r)for(let d=0,c=e.length;d<c;++d){const u=e[d];u.parent&&(u.parent=null,n.colsWithinViewportHash="")}return e}const a=[];let l=e;for(;l.length;){const d=l.length,c=[];let u=0,h=Rg(l[0]);for(let g=1;g<=d;++g){const p=g===d?void 0:Rg(l[g]);if(!(g<d&&p===h)){if(h==null)for(let f=u;f<g;++f){const m=l[f];a.push(m),r&&m.parent!==null&&(m.parent=null,n.colsWithinViewportHash="")}else{let f;const m=h.groupId,C=t.getInstanceIdForKey(m),v=r?h.displayInstances?.[C]:void 0;if(v&&v.buildToken!==o)v.buildToken=o,v.pinned=i,v.parent=null,v.children=null,v.displayedChildren=[],f=v;else if(f=new di(h,m,C,i),f.buildToken=o,r){this.createBean(f);let w=h.displayInstances;w===null&&(w=[],h.displayInstances=w),w[C]=f}let S=f.children;S===null&&(S=[],f.children=S);for(let w=u;w<g;++w){const b=l[w];S.push(b),r&&b.parent!==f&&(b.parent=f,n.colsWithinViewportHash="")}c.push(f)}u=g,g<d&&(h=p)}}l=c}return a}prune(e){const t=this.colModel.colsAllGroups;for(let i=0,o=t.length;i<o;++i){const s=t[i].displayInstances;if(!s)continue;let r=0;for(let n=0,a=s.length;n<a;++n){const l=s[n];l.buildToken===e&&(s[r++]=l)}s.length=r}}},Rg=e=>(e.isColumn?e:e.providedColumnGroup).originalParent,Eg={moduleName:"ColumnGroup",version:E,dynamicBeans:{headerGroupCellCtrl:rb},beans:[OR],apiFunctions:{getAllDisplayedColumnGroups:HR,getCenterDisplayedColumnGroups:LR,getColumnGroup:PR,getColumnGroupState:TR,getDisplayNameForColumnGroup:MR,getLeftDisplayedColumnGroups:kR,getProvidedColumnGroup:DR,getRightDisplayedColumnGroups:VR,resetColumnGroupState:IR,setColumnGroupOpened:FR,setColumnGroupState:AR}};import{_areEqual as xg}from"ag-stack";function Fg(e,t,i,o,s,r,n,a,l,d){const{context:c,dataTypeSvc:u,gos:h,userColumnSvc:g}=e,p=h.get("defaultColGroupDef"),f=p??null,m=new Set,C=new Set,v=A=>m.has(A)||A in r;let S=0,w=0;if(t){const A=(I,H)=>{H>S&&(S=H);for(let k=0,Z=I.length;k<Z;++k){const U=I[k],j=U.children;if(j)U.groupId==null&&++w,A(j,H+1);else{const z=U.colId??U.field;z==null?++w:C.add(z)}}};if(A(t,0),S>0){const I=H=>{for(let k=0,Z=H.length;k<Z;++k){const U=H[k],j=U.children;if(j){I(j);continue}const z=U,J=s.get(z.colId??z.field??U);let ie=J?Pg(J,S):null;for(;ie?.padding;)m.add(ie.groupId),ie=ie.originalParent}};I(t)}}let b=0;const R=A=>{let I;if(A==null){do I=`${b++}`;while(v(I)||C.has(I));return m.add(I),I}if(!v(A))return m.add(A),A;let H=1;do I=`${A}_${H++}`;while(v(I));return e.log.warn(273,{providedId:A,usedId:I}),m.add(I),I},x=[],D=[];let T=!1;const B=new Map,W=A=>A.colKind==="user"&&A.primary===i&&A.buildToken!==l,fe=A=>{for(;;){const I=`${b++}`;if(m.has(I)||C.has(I))continue;const H=r[I];if(H!==void 0){const k=H.userProvidedColDef;if(W(H)&&k&&k.colId==null&&k.field==null)return m.add(I),H.buildToken=l,H.reapplyColDef(A,n,a),H;continue}return m.add(I),Tr(e,A,I,i,l)}},ne=(A,I,H)=>{const k=I??H,Z=s.get(k);if(Z?.colId===k&&W(Z))return Z.buildToken=l,Z.reapplyColDef(A,n,a),Z;let U=0;for(;;){const j=U===0?k:`${k}_${U}`;if(U++,m.has(j))continue;const z=r[j];if(z!==void 0){const J=z.userProvidedColDef;if((J?J.colId??J.field:null)!==k||!W(z))continue}return m.add(j),I!=null&&j!==I&&e.log.warn(273,{providedId:I,usedId:j}),z!==void 0?(z.buildToken=l,z.reapplyColDef(A,n,a),z):Tr(e,A,j,i,l)}},te=A=>{const I=g?.overrideFor(A);if(I===null)return;I!==void 0&&(A=I);const H=A.colId;let k;if(H!=null){const U=s.get(H);k=U?.colId===H&&W(U)?U:void 0}else{const U=s.get(A);k=U!==void 0&&W(U)?U:void 0}if(k!==void 0)k.buildToken=l,k.reapplyColDef(A,n,a);else{const U=A.field;k=H==null&&U==null?fe(A):ne(A,H,U)}const Z=k.userProvidedColDef;if(Z){B.set(k.colId,k),B.has(Z)||B.set(Z,k);const U=Z.field;U&&!B.has(U)&&B.set(U,k)}return u?.addColumnListeners(k),k},O=new Map;if(S===0){const A=[],I=t?.length??0;for(let H=0;H<I;++H){const k=te(t[H]);k!==void 0&&(k.originalParent=null,A.push(k))}return{columnTree:A,treeDepth:0,columns:A,allGroups:D,marryChildren:!1,groupsById:O,colsByKey:B,source:n,newColDefs:a,buildToken:l,wrapperCache:d}}const _=(A,I,H)=>{let k=Pg(A,S);if(k===null||k.buildToken===l)return null;for(;k.level>I;)k.buildToken=l,D.push(k),k=k.originalParent;return k.buildToken=l,D.push(k),k.originalParent=H,k};f&&h.validateColDef(f,"");const Y=(A,I,H)=>{let k,Z;for(let j=A;j<S;++j){let z;do z=`${w++}`;while(v(z)||C.has(z));m.add(z);const J=new Hi(f,z,!0,j);J.buildToken=l,c.createBean(J),D.push(J),Z?(Z.children=[J],Z.setExpandable(),J.originalParent=Z):(J.originalParent=I,k=J),Z=J}const U=Z;U.children=H,U.setExpandable();for(let j=0,z=H.length;j<z;++j)H[j].originalParent=U;return k},ee=(A,I)=>{if(A==null)return null;const H=o.get(A);return!H||H.buildToken===l||H.padding?null:m.has(H.groupId)||!si(I,H.colGroupDef,"children")?{reused:null,existing:H}:(H.buildToken=l,H.colGroupDef=I,m.add(H.groupId),{reused:H,existing:H})},$=(A,I,H)=>{const k=A.length;if(k===0)return[];const Z=I<S;if(Z){let j=!0;for(let z=0;z<k;++z)if(A[z].children!==void 0){j=!1;break}if(j){const z=[];for(let be=0;be<k;++be){const me=te(A[be]);me!==void 0&&(x.push(me),z.push(me))}if(z.length===0)return z;const J=z[0].originalParent;let ie=J!==null;if(ie){for(let be=1,me=z.length;be<me;++be)if(z[be].originalParent!==J){ie=!1;break}}if(ie){const be=_(z[0],I,H);if(be!==null){J.children=z;for(let me=0,Vo=z.length;me<Vo;++me)z[me].originalParent=J;return[be]}}return[Y(I,H,z)]}}const U=[];for(let j=0;j<k;++j){const z=A[j],J=z.children;if(J){const ie=z,be=ie.groupId,me={...p,...ie},Vo=ee(be,me),wr=Vo?.reused;let ye;if(wr)wr.level=I,ye=wr;else{const Sr=R(be);h.validateColDef(me,Sr),ye=new Hi(me,Sr,!1,I),ye.buildToken=l,c.createBean(ye);const Td=Vo?.existing??o.get(Sr);Td&&ye.setExpanded(Td.expanded)}ye.children=$(J,I+1,ye),ye.originalParent=H,ye.setExpandable(),T||(T=!!me.marryChildren),O.set(ye.groupId,ye),D.push(ye),U.push(ye)}else{const ie=te(z);if(ie===void 0)continue;x.push(ie),Z?U.push(_(ie,I,H)??Y(I,H,[ie])):(ie.originalParent=H,U.push(ie))}}return U};return{columnTree:$(t,0,null),treeDepth:S,columns:x,allGroups:D,marryChildren:T,groupsById:O,colsByKey:B,source:n,newColDefs:a,buildToken:l,wrapperCache:d}}var Pg=(e,t)=>{const i=e.originalParent;return i!=null&&i.padding&&i.level===t-1?i:null},GR=e=>{e.edit?.commit(e),e.wrapperCache?.evict(e.buildToken)};import{_pushToMapArray as ws}from"ag-stack";var NR=(e,t,i)=>{const o=e.length,s=i.length;if(o===s){let w=!0;for(let b=0;b<s;++b)if(e[b].colId!==i[b]){w=!1;break}if(w)return e}const r=[],n=new Map,a=new Map;let l=!1;for(let w=0;w<s;++w){const b=t[i[w]];if(b!=null){n.set(b,r.length),r.push(b),l||(l=b.colKind==="auto-group");let R=b.originalParent;for(;R!=null;)a.set(R,b),R=R.originalParent}}if(l&&_R(r,e,n),r.length===o)return r;if(r.length===0)return e;const d=[],c=[],u=[],h=[];let g=null,p=null,f=null;for(let w=0;w<o;++w){const b=e[w];if(n.has(b)){f=b;continue}const R=b.colKind;if(R==="auto-group"||R==="selection"||R==="row-number")f===null?d.push(b):(g??(g=new Map),ws(g,f,b));else if(b.isCalculatedCol){const x=b.anchoredToColId,D=x!=null?t[x]:void 0;D!==void 0&&n.has(D)?(p??(p=new Map),ws(p,D,b)):x==null?h.push(b):f===null?u.push(b):(p??(p=new Map),ws(p,f,b))}else c.push(b)}let m=null,C=c;if(c.length>0&&zR(r)){const w=WR(c,n,a);m=w.followers,C=w.orphans}const v=new Array(o);let S=0;for(let w=0,b=d.length;w<b;++w)v[S++]=d[w];for(let w=0,b=u.length;w<b;++w)v[S++]=u[w];for(let w=0,b=r.length;w<b;++w){const R=r[w];v[S++]=R;const x=g?.get(R);if(x!==void 0)for(let B=0,W=x.length;B<W;++B)v[S++]=x[B];const D=p?.get(R);if(D!==void 0)for(let B=0,W=D.length;B<W;++B)v[S++]=D[B];const T=m?.get(R);if(T!==void 0)for(let B=0,W=T.length;B<W;++B)v[S++]=T[B]}for(let w=0,b=C.length;w<b;++w)v[S++]=C[w];for(let w=0,b=h.length;w<b;++w)v[S++]=h[w];return v},_R=(e,t,i)=>{let o=0;const s=t.length;for(let r=0,n=e.length;r<n;++r)if(e[r].colKind==="auto-group")for(;o<s;){const a=t[o++];if(a.colKind==="auto-group"&&i.has(a)){e[r]=a,i.set(a,r);break}}},zR=e=>{for(let t=0,i=e.length;t<i;++t){let o=e[t].originalParent;for(;o!=null;){if(o.children.length>1)return!0;o=o.originalParent}}return!1},WR=(e,t,i)=>{const o=new Map,s=[];for(let r=0,n=e.length;r<n;++r){const a=e[r],l=UR(a,t,i);if(l==null){s.push(a);continue}ws(o,l,a)}return{followers:o,orphans:s}},UR=(e,t,i)=>{let o=e.originalParent,s=null;for(;o!=null;){let r=-1,n=null;const a=o.children;for(let l=0,d=a.length;l<d;++l){const c=a[l];if(c===s||c===e)continue;let u;if(c.isColumn?u=c:u=i.get(c),u!==void 0){const h=t.get(u);h!==void 0&&h>r&&(r=h,n=u)}}if(n!=null)return n;s=o,o=o.originalParent}return null},qR=class extends y{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.colSpanActive=!1,this.ready=!1,this.changeEventsDispatching=!1,this.showingPivotResult=!1,this.colBatchDepth=0,this.pendingRefresh=!1,this.everythingChangedInBatch=!1,this.pendingRaiseEverything=!1,this.colsList=[],this.colsTree=[],this.colsTreeDepth=0,this.colDefList=[],this.colDefsVersion=0,this.colDefTree=[],this.colDefTreeDepth=0,this.colDefHasMarryChildren=!1,this.hasMarryChildren=!1,this.colsById=Object.create(null),this.colDefGroupsById=new Map,this.colDefColsByKey=new Map,this.colDefAllGroups=[],this.colsGroupsById=new Map,this.colsAllGroups=[],this.groupHeaderNameOverrides=new Map,this.cachedColsByDef=null,this.cachedAllCols=null,this.cachedColsInStateOrder=null,this.lastOrder=null,this.lastPivotOrder=null,this.prevPivotStrict=!1,this.colsListIndexDirty=!0,this.colDefs=void 0,this.buildTokenCounter=0}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.hierarchyWrapperCache=new yg(this.beans),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","hidePaddedHeaderRows"],e=>this.refreshAll(Bt(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),Bt(e.source)))}destroy(){Fc(this.colDefList,this.colDefAllGroups),this.hierarchyWrapperCache.destroy(),super.destroy()}nextBuildToken(){return++this.buildTokenCounter}isPivotActive(){return this.pivotMode&&!!this.beans.pivotColsSvc?.columns?.length}getCols(){return this.colsList}getAllCols(){let e=this.cachedAllCols;return e||(e=(this.showingPivotResult?this.beans.pivotResultCols?.buildAllCols():void 0)??this.colsList,this.cachedAllCols=e),e}getColGroup(e){return this.colsGroupsById.get(e)??(this.showingPivotResult?this.colDefGroupsById.get(e):void 0)}getColsInStateOrder(){if(!this.showingPivotResult)return this.colsList;let e=this.cachedColsInStateOrder;return e||(e=this.beans.pivotResultCols?.buildColsInStateOrder()??this.colsList,this.cachedColsInStateOrder=e,e)}buildFromColDefs(e,t){const i=this.beans,{valueCache:o,colAutosize:s,rowGroupColsSvc:r,pivotColsSvc:n,valueColsSvc:a,visibleCols:l,eventSvc:d,groupHierarchyColSvc:c,calculatedColsSvc:u}=i,h=this.colDefs,g=this.ready?kr(i):void 0;o?.expire();const p=this.colDefList,f=this.colDefTree,m=this.colDefAllGroups,C=Fg(i,h,!0,this.colDefGroupsById,this.colDefColsByKey,this.colsById,e,t,this.nextBuildToken(),this.hierarchyWrapperCache);c?.contributeTo(C),u?.contributeTo(C),GR(C);const v=C.columnTree,S=C.columns;this.colDefTree=v,this.colDefTreeDepth=C.treeDepth,this.colDefList=S,++this.colDefsVersion,this.colDefHasMarryChildren=C.marryChildren,this.colDefGroupsById=C.groupsById,this.colDefColsByKey=C.colsByKey,this.colDefAllGroups=C.allGroups;const w=Object.create(null);for(let R=0,x=S.length;R<x;++R)w[S[R].colId]=S[R];this.colsById=w,f!==v&&Pc(p,m,C.buildToken),this.invalidateColsDerivedState();const b=p.length>0?new Set(p):null;for(let R=0,x=S.length;R<x;++R){const D=S[R],T=!b?.has(D);r?.extractCol(D,T),n?.extractCol(D,T),a?.extractCol(D,T)}r?.commitExtract(e),n?.commitExtract(e),a?.commitExtract(e),this.ready=!0,this.changeEventsDispatching=!0;try{this.refreshCols(t,e)}finally{this.changeEventsDispatching=!1}if(l.refresh(e,!1),d.dispatchEvent({type:"columnEverythingChanged",source:e}),this.colBatchDepth>0&&(this.everythingChangedInBatch=!0),g){this.changeEventsDispatching=!0;try{pc(i,e,g)}finally{this.changeEventsDispatching=!1}}d.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&s?.applyAutosizeStrategy()}beginColBatch(){this.colBatchDepth++}endColBatch(e){this.colBatchDepth=Math.max(0,this.colBatchDepth-1),this.flushColChanges(e,"dispatch")}flushColChanges(e,t){const i=t!=="dispatch";if(i&&(this.pendingRefresh=!0),i&&t!=="reorder"&&(this.pendingRaiseEverything=!0),this.colBatchDepth>0)return;const{rowGroupColsSvc:o,pivotColsSvc:s,valueColsSvc:r}=this.beans,n=this.pendingRefresh,a=this.pendingRaiseEverything,l=this.everythingChangedInBatch;if(this.everythingChangedInBatch=!1,this.pendingRaiseEverything=!1,!o?.pendingChanged&&!s?.pendingChanged&&!r?.pendingChanged&&!n)return;const c=n?this.beans.colAnimation:void 0;c?.start();try{o?.flushReindex(),s?.flushReindex(),r?.flushReindex(),n&&(this.performRefresh(e),a&&!l&&this.eventSvc.dispatchEvent({type:"columnEverythingChanged",source:e})),o?.dispatchColChange(e),s?.dispatchColChange(e),r?.dispatchColChange(e)}finally{c?.finish()}}refreshCols(e,t){if(!this.ready)return;const i=this.beans,o=this.gos,s=this.isPivotSortReorder();s&&i.colAnimation?.start();try{const r=this.colDefList,n=this.colsTree,a=this.showingPivotResult,l=this.pivotMode?i.pivotResultCols:null,d=l?.pivotCols??null,c=d!=null?l:null,u=!!c;this.showingPivotResult=u;const h=d??r,g=c?c.pivotTree:this.colDefTree,p=c?c.pivotTreeDepth:this.colDefTreeDepth;this.colsTreeDepth=p,this.hasMarryChildren=c?c.pivotHasMarryChildren:this.colDefHasMarryChildren,this.colsGroupsById=c?c.pivotGroupsById:this.colDefGroupsById,this.colsAllGroups=c?c.pivotAllGroups:this.colDefAllGroups,i.formula?.setFormulasActive(r);const f=i.autoColSvc?.refreshCols(t),m=i.selectionColSvc?.refreshCols(),C=i.rowNumbersSvc?.refreshCols(),v=this.colsList;v.length>0&&(a?this.prevPivotStrict||(this.lastPivotOrder=Dg(v,this.lastPivotOrder)):this.lastOrder=Dg(v,this.lastOrder)),this.prevPivotStrict=u&&(i.pivotColsSvc?.isStrictColumnOrder()??!1);const S=f?.length??0,w=h.length,b=g.length,R=(C?1:0)+(m?1:0)+S,x=new Array(R+w),D=new Array(R+b),T=Object.create(null);let B=0;C&&(x[B++]=C),m&&(x[B++]=m);for(let $=0;$<S;++$)x[B++]=f[$];const W=i.colGroupSvc.wrapperCache;if(p>0){const $=this.nextBuildToken();for(let Q=0;Q<R;++Q){const A=x[Q];T[A.colId]=A,A.inColsList=!0,D[Q]=W.wrap(A,p,$)}W.evict($)}else{W.destroy();for(let $=0;$<R;++$){const Q=x[$];T[Q.colId]=Q,Q.inColsList=!0,Q.originalParent=null,D[$]=Q}}if(c){a||this.ensureColsListIndex();let $=-1;for(let Q=0,A=r.length;Q<A;++Q){const I=r[Q];T[I.colId]=I,I.inColsList=!1,I.colsListIndex<0?I.colsListIndex=$:$=I.colsListIndex}}for(let $=0;$<w;++$){const Q=h[$];x[B++]=Q,T[Q.colId]=Q,Q.inColsList=!0}for(let $=0;$<b;++$)D[R+$]=g[$];const fe=!e||o0(o,u),ne=u?this.lastPivotOrder:this.lastOrder;let te=fe?ne:null;const O=i.pivotColsSvc;te!=null&&u&&O?.hasInteractivePivotSort()&&(te=O.reRankByPivotGroupOrder(x,te,T));const _=te==null?x:NR(x,T,te),Y=nc(_,o),ee=!xg(Y,v);ee&&(this.colsListIndexDirty=!0),this.colsList=ee?Y:v,this.colsTree=xg(D,n)?n:D,this.colsById=T,this.invalidateColsDerivedState(),this.refreshColsDerivedState(),ee&&(i.rowSpanSvc?.refreshCols(),i.editSvc?.releaseColumnsLeaving(Y)),(this.colsTree!==n||ee)&&this.eventSvc.dispatchEvent({type:"gridColumnsChanged"})}finally{s&&i.colAnimation?.finish()}}isPivotSortReorder(){return!!this.beans.pivotColsSvc?.hasInteractivePivotSort()||this.prevPivotStrict}refreshColsDerivedState(){const e=this.beans;e.showRowGroupCols?.refresh(),e.quickFilter?.refreshCols(),this.computeColSpanAndAutoHeight(),e.visibleCols.clear(),e.colViewport.clear()}computeColSpanAndAutoHeight(){const e=this.colsList,t=this.beans.rowAutoHeight;let i=!1,o=!1;for(let s=0,r=e.length;s<r;++s){const n=e[s],a=n.colDef;if(i||(i=a.colSpan!=null),o||(o=!!t&&!!a.autoHeight&&n.visible),i&&(o||!t))break}this.colSpanActive=i,t?.setAutoHeightActive(o)}refreshAll(e){if(this.ready){if(this.colBatchDepth>0){this.pendingRefresh=!0;return}this.performRefresh(e)}}performRefresh(e){this.pendingRefresh=!1,this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e,!1))}replaceColDefList(e){this.ready&&(this.colDefList=e)}setPivotMode(e,t){e!==this.pivotMode&&(this.pivotMode=e,this.ready&&(this.refreshCols(!1,t),this.beans.visibleCols.refresh(t,!1),this.eventSvc.dispatchEvent({type:"columnPivotModeChanged"})))}recreateColumnDefs(e){this.ready&&(this.beans.autoColSvc?.updateColumns(e),this.buildFromColDefs(Bt(e.source),!0))}setColumnDefs(e,t){const i=this.beans;i.userColumnSvc?.clear(),i.calculatedColsSvc?.resetDynamicColumnDefs(),this.colDefs=e,this.buildFromColDefs(t,!0)}rebuildCols(e){this.ready&&this.buildFromColDefs(e,!1)}markColsListIndexDirty(){this.colsListIndexDirty=!0,this.cachedColsInStateOrder=null,this.cachedAllCols=null}invalidateColsDerivedState(){this.cachedColsByDef=null,this.cachedAllCols=null,this.cachedColsInStateOrder=null,this.beans.sortSvc?.invalidate()}ensureColsListIndex(){if(this.colsListIndexDirty){const e=this.colsList;for(let t=0,i=e.length;t<i;++t)e[t].colsListIndex=t;this.colsListIndexDirty=!1}}getCol(e){if(typeof e=="string")return this.colsById[e]??this.getColFallback(e);const t=e?.colId;if(typeof t=="string"){const i=this.colsById[t];if(i!==void 0)return i}return e==null?void 0:this.getColFallback(e)}getColFallback(e){const t=this.cachedColsByDef??this.loadColsByDef(),i=t.get(e);if(i!==void 0)return i;if(typeof e!="object")return;const o=e.field;return typeof o=="string"?t.get(o):void 0}getNonPivotCol(e){const t=this.getCol(e);return t!==void 0&&t.colDef.pivotKeys==null?t:void 0}getNonPivotColById(e){const t=this.colsById[e];return t!==void 0&&t.colDef.pivotKeys==null?t:void 0}loadColsByDef(){const e=new Map;return Mg(e,this.colsList),this.showingPivotResult&&Mg(e,this.colDefList),this.cachedColsByDef=e,e}},Dg=(e,t)=>{const i=e.length;t??(t=[]),t.length=i;for(let o=0;o<i;++o)t[o]=e[o].colId;return t},Mg=(e,t)=>{for(let i=0,o=t.length;i<o;++i){const s=t[i],r=s.colDef;e.set(r,s);const n=s.userProvidedColDef;n!=null&&e.set(n,s);const a=r.field;a&&a!==s.colId&&!e.has(a)&&e.set(a,s)}};import{KeyCode as $R,RefPlaceholder as KR,_getActiveDomElement as jR,_getAriaCheckboxStateName as QR,_setAriaLive as ZR}from"ag-stack";import{RefPlaceholder as da,_addOrRemoveAttribute as Ss,_setAriaLabel as YR,_setDisabled as JR,_setElementWidth as XR}from"ag-stack";import{_getAriaLabel as eE,_setAriaLabel as tE,_setAriaLabelledBy as Tg,_setFixedWidth as iE}from"ag-stack";import{AgComponentStub as oE,_clearElement as sE,_setAriaRole as Ag,_setDisabled as rE,_setDisplayed as Ig,_setElementWidth as nE}from"ag-stack";var aE=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-label-align-right){.ag-label,.ag-wrapper{flex:none}}.ag-label-align-top{align-items:flex-start;flex-direction:column}:where(.ag-label-align-top){.ag-label,.ag-wrapper{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",ca=class extends Gw{constructor(e,t,i){super(t,i),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(aE)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:i,labelAlignment:o,disabled:s,labelEllipsis:r}=this.config;s!=null&&this.setDisabled(s),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),i!=null&&this.setLabelWidth(i),r!=null&&this.setLabelEllipsis(r),this.setLabelAlignment(o||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;sE(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(Ig(t,!1),Ag(t,"presentation")):(Ig(t,!0),Ag(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const i=this.getGui().classList;return i.toggle("ag-label-align-left",e==="left"),i.toggle("ag-label-align-right",e==="right"),i.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(nE(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return rE(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},ua=class extends ca{constructor(e,t,i,o){super(e,t,i),this.className=o}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:i,ariaLabel:o}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),i!=null&&this.onValueChange(i),o!=null&&this.setAriaLabel(o),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),i=this.getLabel();i==null||i==""||eE(e)!==null?Tg(e,""):Tg(e,t??"")}setAriaLabel(e){return tE(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return iE(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}},lE=new Set(["button","checkbox","file","hidden","radio","range","reset","submit"]);function dE(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var st=class extends ua{constructor(e,t,i="text",o="input"){super(e,e?.template??dE(o),[],t),this.inputType=i,this.displayFieldTag=o,this.eLabel=da,this.eWrapper=da,this.eInput=da}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:i,className:o}=this;e.classList.add(`${o}-label`),t.classList.add(`${o}-input-wrapper`),i.classList.add(`${o}-input`),this.addCss("ag-input-field"),i.id=i.id||`ag-${this.getCompId()}-input`;const{inputName:s,inputWidth:r,inputPlaceholder:n,autoComplete:a,tabIndex:l}=this.config;s!=null&&this.setInputName(s),r!=null&&this.setInputWidth(r),n!=null&&this.setInputPlaceholder(n),a!=null?this.setAutoComplete(a):this.refreshAutoComplete(),this.addManagedPropertyListener("enableInputAutoComplete",()=>this.refreshAutoComplete()),this.addInputListeners(),this.activateTabIndex([i],l)}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,Ss(this.eInput,"type",e))}getInputElement(){return this.eInput}getWrapperElement(){return this.eWrapper}setInputWidth(e){return XR(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return Ss(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return YR(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return JR(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){return this.autoCompleteOverride=e,e==null?this.refreshAutoComplete():this.applyAutoComplete(e),this}refreshAutoComplete(){this.autoCompleteOverride==null&&this.isAutoCompleteCapableField()&&this.applyAutoComplete(this.gos.get("enableInputAutoComplete")===!0)}isAutoCompleteCapableField(){const{eInput:e}=this;if(e.tagName==="TEXTAREA")return!0;if(e.tagName!=="INPUT")return!1;const{type:t}=e;return!lE.has(t)}applyAutoComplete(e){if(e===!0)Ss(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Ss(this.eInput,"autocomplete",t)}}},ro=class extends st{constructor(e,t="ag-checkbox",i="checkbox"){super(e,t,i),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t,name:i}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t),i!=null&&this.setName(i)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const i=this.eInput;i.checked=e,i.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,i){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:i});const o=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:o.id,name:o.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),i=this.selected=e.target.checked;this.refreshSelectedClass(i),this.dispatchChange(i,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},bs={selector:"AG-CHECKBOX",component:ro},cE=".ag-checkbox-cell{height:100%}",uE={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},hE=class extends K{constructor(){super(uE,[bs]),this.eCheckbox=KR,this.registerCSS(cE)}init(e){this.refresh(e);const{eCheckbox:t,beans:i}=this,o=t.getInputElement();o.setAttribute("tabindex","-1"),ZR(o,"polite"),this.addManagedListeners(o,{click:s=>{if(mt(s),t.isDisabled())return;const r=t.getValue();this.onCheckboxChanged(r)},dblclick:s=>{mt(s)}}),this.addManagedElementListeners(e.eGridCell,{keydown:s=>{if(s.key===$R.SPACE&&!t.isDisabled()){e.eGridCell===jR(i)&&t.toggle();const r=t.getValue();this.onCheckboxChanged(r),s.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,i=!0;const{value:o,column:s,node:r}=e;if(r.group&&s)if(typeof o=="boolean")t=o;else{const u=s.getColId();u.startsWith(Ht)?t=o==null||o===""?void 0:o==="true":r.aggData?.[u]!==void 0||r.sourceRowIndex>=0?t=o??void 0:i=!1}else t=o??void 0;const{eCheckbox:n}=this;if(!i){n.setDisplayed(!1);return}n.setValue(t);const a=e.disabled??!s?.isCellEditable(r);n.setDisabled(a);const l=this.getLocaleTextFunc(),d=QR(l,t),c=a?d:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${d})`;n.setInputAriaLabel(c)}onCheckboxChanged(e){const{params:t}=this,{column:i,node:o,value:s}=t,{editSvc:r}=this.beans;if(!i)return;const n={rowNode:o,column:i};r?.dispatchCellEvent(n,null,"cellEditingStarted",{value:s});const a=o.setDataValue(i,e,"ui");r?.dispatchCellEvent(n,null,"cellEditingStopped",{oldValue:s,newValue:e,valueChanged:a}),a||this.updateCheckbox(t)}};import{_setAriaLabel as kg,_setAriaLabelledBy as Lg}from"ag-stack";var gE={tag:"div",cls:"ag-skeleton-container"},pE=class extends K{constructor(){super(gE)}init(e){const t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>Lg(e.eParentOfValue)),Lg(e.eParentOfValue,t),e.deferRender?this.setupLoading(e):e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){const e=this.getLocaleTextFunc();this.getGui().textContent=e("loadingError","ERR");const t=e("ariaSkeletonCellLoadingFailed","Row failed to load");kg(this.getGui(),t)}setupLoading(e){const t=V({tag:"div",cls:"ag-skeleton-effect"}),i=e.node.rowIndex;if(i!=null){const r=75+25*(i%2===0?Math.sin(i):Math.cos(i));t.style.width=`${r}%`}this.getGui().appendChild(t);const o=this.getLocaleTextFunc(),s=e.deferRender?o("ariaDeferSkeletonCellLoading","Cell is loading"):o("ariaSkeletonCellLoading","Row data is loading");kg(this.getGui(),s)}refresh(e){return!1}},fE={moduleName:"CheckboxCellRenderer",version:E,userComponents:{agCheckboxCellRenderer:hE}},mE={moduleName:"SkeletonCellRenderer",version:E,userComponents:{agSkeletonCellRenderer:pE}};function CE(e,t){const i=e.colModel.getCol(t);return i?i.colDef:null}function vE(e){return e.colDefFactory?.getColumnDefs()}function wE(e,t,i){return e.colNames.getDisplayNameForColumn(t,i)||""}function SE(e,t){return e.colModel.getCol(t)??null}function bE(e){const t=e.colModel;return t.ready?t.colDefList:null}function yE(e,t){return et(e,t,"api")}var RE=mc;function EE(e){hc(e,"api")}function xE(e){return e.visibleCols.leftCols.length>0||e.visibleCols.rightCols.length>0}function FE(e){return e.visibleCols.leftCols.length>0}function PE(e){return e.visibleCols.rightCols.length>0}function DE(e,t){return e.visibleCols.getColAfter(t)}function ME(e,t){return e.visibleCols.getColBefore(t)}function TE(e,t,i){Bi(e,t,i,"api")}function AE(e,t,i){e.pinnedCols?.setColsPinned(t,i,"api")}function IE(e){return e.colModel.colsList}function kE(e){return e.visibleCols.leftCols}function LE(e){return e.visibleCols.centerCols}function VE(e){return e.visibleCols.rightCols}function HE(e){return e.visibleCols.allCols}function BE(e){return e.colViewport.getViewportColumns()}function ha(e,t){if(!e)return;const i=e,o={};for(const s of Object.keys(i)){if(s===t||Ho(s))continue;const r=i[s];Bo(r)?o[s]=ha(r):o[s]=r}return o}var OE=class extends y{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.colModel=e.colModel}getColumnDefs(){const e=this.colModel;if(!e.ready)return;const t=e.colDefList;e.ensureColsListIndex();const i=t.slice().sort(NE),o=[],s=Object.create(null),r=e.colDefTreeDepth+1;for(let n=0,a=i.length;n<a;++n){const l=i[n];if(l.colKind==="hierarchy")continue;const d=GE(l);let c=!0,u=d,h=l.originalParent,g=0;for(;h&&!(++g>r);){if(h.padding){h=h.originalParent;continue}const p=s[h.groupId];if(p){p.children.push(u),c=!1;break}const f=ha(h.colGroupDef,"children");if(!f){c=!1;break}f.groupId=h.groupId,f.children=[u],s[f.groupId]=f,u=f,h=h.originalParent}c&&o.push(u)}return o}},GE=e=>{const{colId:t,colDef:i,actualWidth:o,aggregationActive:s,rowGroupActive:r,visible:n,pivotActive:a,pinned:l}=e,d=ha(i);return d.colId=t,d.width=o,d.rowGroup=r,d.rowGroupIndex=r?e.rowGroupActiveIndex:null,d.pivot=a,d.pivotIndex=a?e.pivotActiveIndex:null,d.aggFunc=s?e.aggFunc:null,d.hide=n?void 0:!0,d.pinned=l==="left"||l==="right"?l:null,d.sort=e.getSortDef(),d.sortIndex=e.sortIndex??null,d},NE=(e,t)=>e.colsListIndex-t.colsListIndex,_E=class extends y{constructor(){super(...arguments),this.beanName="colFlex",this.columnsHidden=!1}refreshFlexedColumns(e={}){const t=e.source??"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);const i=this.flexViewportWidth,{visibleCols:o,colDelayRenderSvc:s}=this.beans,r=o.centerCols;let n=-1;if(e.resizingCols){const C=new Set(e.resizingCols);for(let v=r.length-1;v>=0;v--)if(C.has(r[v])){n=v;break}}let a=!1;const l=r.map((C,v)=>{const S=C.getFlex(),w=S!=null&&S>0&&v>n;return a||(a=w),{col:C,isFlex:w,flex:Math.max(0,S??0),initialSize:C.getActualWidth(),min:C.getMinWidth(),max:C.getMaxWidth(),targetSize:0}});if(a&&!!i?(s?.hideColumns("colFlex"),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(s),!i||!a)return[];let c=l.length,u=l.reduce((C,v)=>C+v.flex,0),h=i;const g=(C,v)=>{C.frozenSize=v,C.col.setActualWidth(v,t),h-=v,u-=C.flex,c-=1},p=C=>C.frozenSize!=null;for(const C of l)C.isFlex||g(C,C.initialSize);for(;c>0;){const C=Math.round(u<1?h*u:h);let v,S=0,w=0;for(const x of l){if(p(x))continue;v=x,w+=C*(x.flex/u);const D=w-S,T=Math.round(D);x.targetSize=T,S+=T}v&&(v.targetSize+=C-S);let b=0;for(const x of l){if(p(x))continue;const D=x.targetSize,T=Math.min(Math.max(D,x.min),x.max);b+=T-D,x.violationType=T===D?void 0:T<D?"max":"min",x.targetSize=T}const R=b===0?"all":b>0?"min":"max";for(const x of l)p(x)||(R==="all"||x.violationType===R)&&g(x,x.targetSize)}const f=e.skipSetLeft?void 0:o.setLeftValues(t);e.updateBodyWidths&&o.updateBodyWidths(f);const m=l.filter(C=>C.isFlex&&!C.violationType).map(C=>C.col);if(e.fireResizedEvent){const C=l.filter(S=>S.initialSize!==S.frozenSize).map(S=>S.col),v=l.filter(S=>S.flex).map(S=>S.col);li(this.eventSvc,C,!0,t,v)}return this.revealColumns(s),m}revealColumns(e){this.columnsHidden&&(e?.revealColumns("colFlex"),this.columnsHidden=!1)}initCol(e){const{flex:t,initialFlex:i}=e.colDef;t!==void 0?e.flex=t:i!==void 0&&(e.flex=i)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}};import{KeyCode as zE,_getValueUsingDotField as WE,_isValidDate as ga,_isValidDateTime as UE,_parseBigIntOrNull as ys,_parseDateTimeFromString as Vg,_serialiseDate as Hg,_toStringOrNull as Bg}from"ag-stack";var qE=["dateTimeString","dateString","text","number","bigint","boolean","date"],$E=["cellRenderer","cellEditorParams","comparator","getFindText","keyCreator","suppressKeyboardEvent","valueFormatter","valueParser"],KE=class extends y{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference=Object.create(null),this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number(){return{cellEditor:"agNumberCellEditor"}},bigint({filterModuleBean:e}){return e?{cellEditor:"agTextCellEditor"}:{cellEditor:"agTextCellEditor",comparator:{default:YE,absolute:JE}}},boolean(){return{cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:({node:e,event:t,column:i})=>t.key===zE.SPACE&&i.isCellEditable(e)}},date({formatValue:e}){return{cellEditor:"agDateCellEditor",keyCreator:e}},dateString({formatValue:e}){return{cellEditor:"agDateStringCellEditor",keyCreator:e}},dateTime(e){return this.date(e)},dateTimeString(e){return this.dateString(e)},object({formatValue:e,colModel:t,colId:i}){return{cellEditorParams:{useFormatter:!0},comparator:(o,s)=>{const r=t.getNonPivotColById(i),n=r?.colDef;if(!r||!n)return 0;const a=o==null?"":e({column:r,node:null,value:o}),l=s==null?"":e({column:r,node:null,value:s});return a===l?0:a>l?1:-1},keyCreator:e}},text(){return{}}}}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)})}processDataTypeDefinitions(){const e=this.getDefaultDataTypes(),t={},i={},o=c=>u=>{const{column:h,node:g,value:p}=u;let f=h.getColDef().valueFormatter;return f===c.groupSafeValueFormatter&&(f=c.valueFormatter),this.beans.valueSvc.formatValue(h,g,p,f)};for(const c of Object.keys(e)){const u=e[c],h={...u,groupSafeValueFormatter:Ng(u,this.gos)};t[c]=h,i[c]=o(h)}const s=this.gos.get("dataTypeDefinitions")??{},r={};for(const c of Object.keys(s)){const u=s[c],h=this.processDataTypeDefinition(u,s,[c],e);h&&(t[c]=h,u.dataTypeMatcher&&(r[c]=u.dataTypeMatcher),i[c]=o(h))}const{valueParser:n,valueFormatter:a}=e.object,{valueParser:l,valueFormatter:d}=t.object;this.hasObjectValueParser=l!==n,this.hasObjectValueFormatter=d!==a,this.formatValueFuncs=i,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(r,e)}sortKeysInMatchers(e,t){const i={...e};for(const o of qE)delete i[o],i[o]=e[o]??t[o].dataTypeMatcher;return i}processDataTypeDefinition(e,t,i,o){let s;const r=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let n=o[r];const a=t[r];if(n&&a&&(n=a),!Gg(this.beans.log,e,n,r))return;s=Og(n,e)}else{if(i.includes(r)){this.warn(44);return}const n=t[r];if(!Gg(this.beans.log,e,n,r))return;const a=this.processDataTypeDefinition(n,t,[...i,r],o);if(!a)return;s=Og(a,e)}return{...s,groupSafeValueFormatter:Ng(s,this.gos)}}updateColDefAndGetColumnType(e,t,i){let{cellDataType:o}=t;o===void 0&&(o=e.cellDataType);const{field:s}=t;if((o==null||o===!0)&&(o=this.canInferCellDataType(e,t)?this.inferCellDataType(s,i):!1),this.addFormulaCellEditorToColDef(e,t),!o){e.cellDataType=!1;return}const r=this.dataTypeDefinitions[o];if(!r){this.warn(47,{cellDataType:o});return}return e.cellDataType=o,r.groupSafeValueFormatter&&(e.valueFormatter=r.groupSafeValueFormatter),r.valueParser&&(e.valueParser=r.valueParser),r.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,o,r,i),r.columnTypes}addFormulaCellEditorToColDef(e,t){!(t.allowFormula??e.allowFormula)||t.cellEditor||(e.cellEditor="agFormulaCellEditor")}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.colId];if(!t)return;const i=o=>{t.add(o.key)};e.__addEventListener("columnStateUpdated",i),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",i))}canInferCellDataType(e,t){const{gos:i}=this;if(!ae(i))return!1;const o={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(pa(t,o))return!1;const s=t.type===null?e.type:t.type;if(s){const r=i.get("columnTypes")??{};if($o(s).some(a=>{const l=r[a.trim()];return l&&pa(l,o)}))return!1}return!pa(e,o)}inferCellDataType(e,t){if(!e)return;let i;const o=this.getInitialData();return o?i=e.includes(".")&&!this.gos.get("suppressFieldDotNotation")?WE(o,e):o[e]:this.initWaitForRowData(t),i==null?void 0:Object.keys(this.dataTypeMatchers).find(r=>this.dataTypeMatchers[r](i))??"object"}getInitialData(){const e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{const t=this.beans.rowModel.rootNode?._leafs;if(t?.length)return t[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:i,eventSvc:o}=this.beans;t&&i&&(i.shouldQueueResizeOperations=!0);const[s]=this.addManagedEventListeners({rowDataUpdateStarted:r=>{const{firstRowData:n}=r;n&&(s?.(),this.isPendingInference=!1,this.processColumnsPendingInference(n,t),this.columnStateUpdatesPendingInference=Object.create(null),t&&i?.processResizeOperations(),o.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){const i=this.beans;this.initialData=e;const o=[];this.destroyColumnStateUpdateListeners();const s=Object.create(null),r=Object.create(null);for(const n of Object.keys(this.columnStateUpdatesPendingInference)){const a=this.columnStateUpdatesPendingInference[n],l=this.colModel.colsById[n];if(!l)continue;const d=l.colDef;if(!this.resetColDefIntoCol(l,"cellDataTypeInferred"))continue;const c=l.colDef;if(t&&c.type&&c.type!==d.type){const u=XE(this.beans,l,a);u.rowGroup&&u.rowGroupIndex==null&&(s[n]=u),u.pivot&&u.pivotIndex==null&&(r[n]=u),o.push(u)}}if(t){const n=Object.create(null);i.rowGroupColsSvc?.restoreColumnOrder(s,n),i.pivotColsSvc?.restoreColumnOrder(r,n);const a=Object.keys(n);for(let l=0,d=a.length;l<d;++l)o.push(n[a[l]])}o.length&&et(i,{state:o},"cellDataTypeInferred"),this.initialData=null}resetColDefIntoCol(e,t){const i=e.getUserProvidedColDef();if(!i)return!1;const o=zo(this.beans,i,e.colId);return e.setColDef(o,i,t),!0}getDateStringTypeDefinition(e){const{dateString:t}=this.dataTypeDefinitions;return e?this.getDataTypeDefinition(e)??t:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDateIncludesTimeFlag(e){return e==="dateTime"||e==="dateTimeString"}getDataTypeDefinition(e){const t=e.colDef;if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(t==null)return!0;const i=this.getDataTypeDefinition(e)?.dataTypeMatcher;return!i||e.allowFormula&&this.beans.formula?.isFormula(t)?!0:i(t)}validateColDef(e,t,i,o){if(e.cellDataType==="object"){const s=l=>l?.cellDataType==null||l?.cellDataType===!0,r=s(t)&&s(i),n=l=>this.warn(48,{property:l,inferred:r,colId:o}),{object:a}=this.dataTypeDefinitions;e.valueFormatter===a.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&n("Formatter"),e.editable&&e.valueParser===a.valueParser&&!this.hasObjectValueParser&&n("Parser")}}postProcess(e){const t=e.cellDataType;if(!t||typeof t!="string")return;const{dataTypeDefinitions:i,beans:o,formatValueFuncs:s}=this,r=i[t];r&&o.colFilter?.setColDefPropsForDataType(e,r,s[t])}getFormatValue(e){return this.formatValueFuncs[e]}isDataTypeRegistered(e){return this.dataTypeDefinitions[e]!=null}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,i,o){const s=this.formatValueFuncs[t],r=this.columnDefinitionPropsPerDataType[i.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:i,colId:o,formatValue:s,filterModuleBean:this.beans.filterManager});e.cellEditor==="agFormulaCellEditor"&&r.cellEditor!==e.cellEditor&&(r.cellEditor=e.cellEditor),Object.assign(e,r)}getDateObjectTypeDef(e){const t=this.getLocaleTextFunc(),i=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:o=>Vg(o.newValue&&String(o.newValue)),valueFormatter:o=>o.value==null?"":!(o.value instanceof Date)||isNaN(o.value.getTime())?t("invalidDate","Invalid Date"):Hg(o.value,i)??"",dataTypeMatcher:o=>o instanceof Date}}getDateStringTypeDef(e){const t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:i=>Vg(i)??void 0,dateFormatter:i=>Hg(i??null,t)??void 0,valueParser:i=>ga(String(i.newValue))?i.newValue:null,valueFormatter:i=>ga(String(i.value))?String(i.value):"",dataTypeMatcher:i=>typeof i=="string"&&ga(i)}}getDefaultDataTypes(){const e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>t.newValue?.trim?.()===""?null:Number(t.newValue),valueFormatter:t=>t.value==null?"":typeof t.value!="number"||isNaN(t.value)?e("invalidNumber","Invalid Number"):String(t.value),dataTypeMatcher:t=>typeof t=="number"},bigint:{baseDataType:"bigint",valueParser:t=>{const{newValue:i}=t;return i==null||typeof i=="string"&&i.trim()===""?null:ys(i)},valueFormatter:t=>t.value==null?"":typeof t.value!="bigint"?e("invalidBigInt","Invalid BigInt"):String(t.value),dataTypeMatcher:t=>typeof t=="bigint"},text:{baseDataType:"text",valueParser:t=>t.newValue===""?null:Bg(t.newValue),dataTypeMatcher:t=>typeof t=="string"},boolean:{baseDataType:"boolean",valueParser:t=>t.newValue==null?t.newValue:t.newValue?.trim?.()===""?null:String(t.newValue).toLowerCase()==="true",valueFormatter:t=>t.value==null?"":String(t.value),dataTypeMatcher:t=>typeof t=="boolean"},date:this.getDateObjectTypeDef("date"),dateString:this.getDateStringTypeDef("dateString"),dateTime:this.getDateObjectTypeDef("dateTime"),dateTimeString:{...this.getDateStringTypeDef("dateTimeString"),dataTypeMatcher:t=>typeof t=="string"&&UE(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>Bg(t.value)??""}}}destroyColumnStateUpdateListeners(){for(const e of this.columnStateUpdateListenerDestroyFuncs)e();this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference=Object.create(null),this.destroyColumnStateUpdateListeners(),super.destroy()}};function Og(e,t){const i={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(i.columnTypes=[...$o(e.columnTypes),...$o(t.columnTypes)]),i}function Gg(e,t,i,o){return i?i.baseDataType!==t.baseDataType?(e.warn(46),!1):!0:(e.warn(45,{parentCellDataType:o}),!1)}var jE=e=>typeof e=="bigint"||typeof e=="number",QE=e=>e==="number"||e==="bigint";function Ng(e,t){if(e.valueFormatter)return i=>{const{node:o,column:s,value:r}=i;if(o?.group){const n=s,a=(n.pivotValueColumn??n).aggFunc;if(a){if(a==="first"||a==="last")return e.valueFormatter(i);const{baseDataType:l}=e;if(QE(l)&&a!=="count"){if(jE(r))return e.valueFormatter(i);if(r==null)return;if(typeof r=="object"){if(typeof r.toNumber=="function")return e.valueFormatter({...i,value:r.toNumber()});if("value"in r)return e.valueFormatter({...i,value:r.value})}}return}}else if(t.get("groupHideOpenParents")&&i.column.isRowGroupActive()&&typeof i.value=="string"&&!e.dataTypeMatcher?.(i.value))return;return e.valueFormatter(i)}}function ZE(e,t,i,o){if(!t[i])return!1;const s=e[i];return s===null?(t[i]=!1,!1):o===void 0?!!s:s===o}function YE(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;const i=ys(e),o=ys(t);return i!=null&&o!=null?i===o?0:i>o?1:-1:0}function JE(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;const i=_g(e),o=_g(t);return i!=null&&o!=null?i===o?0:i>o?1:-1:0}function _g(e){const t=ys(e);return t==null?null:t<0n?-t:t}function pa(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([i,o])=>ZE(e,t,i,o))}function XE(e,t,i){const o=Cc(e,t);for(const s of i)delete o[s],s==="rowGroup"?delete o.rowGroupIndex:s==="pivot"&&delete o.pivotIndex;return o}var ex={moduleName:"DataType",version:E,beans:[KE],dependsOn:[fE]},tx={moduleName:"ColumnFlex",version:E,beans:[_E]},fa={moduleName:"ColumnApi",version:E,beans:[OE],apiFunctions:{getColumnDef:CE,getDisplayNameForColumn:wE,getColumn:SE,getColumns:bE,applyColumnState:yE,getColumnState:RE,resetColumnState:EE,isPinning:xE,isPinningLeft:FE,isPinningRight:PE,getDisplayedColAfter:DE,getDisplayedColBefore:ME,setColumnsVisible:TE,setColumnsPinned:AE,getAllGridColumns:IE,getDisplayedLeftColumns:kE,getDisplayedCenterColumns:LE,getDisplayedRightColumns:VE,getAllDisplayedColumns:HE,getAllDisplayedVirtualColumns:BE,getColumnDefs:vE}};import{_camelCaseToHumanText as ix}from"ag-stack";var ox=class extends y{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;const o=this.getHeaderName(e.colDef,e,null,null,t),s=this.beans.aggColNameSvc;return i&&s?s.getHeaderName(e,o):o}getDisplayNameForProvidedColumnGroup(e,t,i){const o=t?.colGroupDef;return o?this.getHeaderName(o,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.providedColumnGroup,t)}getHeaderName(e,t,i,o,s){const r=o?this.beans.colModel.groupHeaderNameOverrides.get(o.groupId)??null:null,n=t?.headerNameOverride??r;if(n!=null)return n;const a=e.headerValueGetter;if(a){const l=G(this.gos,{colDef:e,column:t,columnGroup:i,providedColumnGroup:o,location:s});return typeof a=="function"?a(l):typeof a=="string"?this.beans.expressionSvc?.evaluate(a,l)??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return ix(e.field)}return""}};import{_exists as sx}from"ag-stack";var rx=class extends y{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[]}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}getScrollPosition(){return this.scrollPosition}setScrollPosition(e,t,i=!1){const{visibleCols:o}=this,s=o.isBodyWidthDirty;e===this.scrollWidth&&t===this.scrollPosition&&!s||(this.scrollWidth=e,this.scrollPosition=t,o.isBodyWidthDirty=!0,this.viewportLeft=t,this.viewportRight=e+t,this.colModel.ready&&this.checkViewportColumns(i))}getColumnHeadersToRender(e){switch(e){case"left":return this.columnsToRenderLeft;case"right":return this.columnsToRenderRight;default:return this.columnsToRenderCenter}}getHeadersToRender(e,t){let i;switch(e){case"left":i=this.rowsOfHeadersToRenderLeft[t];break;case"right":i=this.rowsOfHeadersToRenderRight[t];break;default:i=this.rowsOfHeadersToRenderCenter[t];break}return i??[]}extractViewportColumns(){const e=this.visibleCols.centerCols;this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[],this.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||nx(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,i=t+e.getActualWidth(),o=this.viewportLeft-200,s=this.viewportRight+200,r=t<o&&i<o,n=t>s&&i>s;return!r&&!n}getViewportColumns(){const{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;const t=r=>{const n=r.getLeft();return sx(n)&&n>this.viewportLeft},i=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:o}=this,s=o.centerCols;return o.getColsForRow(e,s,i,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){const{leftCols:e,rightCols:t}=this.visibleCols;this.columnsToRenderLeft=e,this.columnsToRenderRight=t,this.columnsToRenderCenter=this.colsWithinViewport;const i=o=>{const s=new Set,r={};for(const n of o){let a=n.parent;const l=n.isSpanHeaderHeight();for(;a&&!s.has(a);){if(l&&a.isPadding()){a=a.parent;continue}const c=a.getProvidedColumnGroup().getLevel();r[c]??(r[c]=[]),r[c].push(a),s.add(a),a=a.parent}}return r};this.rowsOfHeadersToRenderLeft=i(e),this.rowsOfHeadersToRenderRight=i(t),this.rowsOfHeadersToRenderCenter=i(this.headerColsWithinViewport)}extractViewport(){const e=o=>`${o.getId()}-${o.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),i=this.colsWithinViewportHash!==t;return i&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),i}};function nx(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.parent}return!1}var zg=class{constructor(){this.existingIds=Object.create(null)}getInstanceIdForKey(e){const t=(this.existingIds[e]??-1)+1;return this.existingIds[e]=t,t}},ax=class extends y{constructor(){super(...arguments),this.beanName="visibleCols",this.flexActive=!1,this.treeLeft=[],this.treeRight=[],this.treeCenter=[],this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.autoHeightCols=[],this.headerGroupRowCount=0,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.totalWidth=0,this.isBodyWidthDirty=!0,this.prevLastLeftPinned=null,this.prevFirstRightPinned=null}wireBeans(e){this.colModel=e.colModel,this.colGroupSvc=e.colGroupSvc,this.colViewport=e.colViewport,this.ctrlsSvc=e.ctrlsSvc,this.colFlex=e.colFlex}refresh(e,t){const{colFlex:i,colModel:o,colViewport:s,ctrlsSvc:r}=this;t||this.buildTrees();const n=this.treeLeft,a=this.treeCenter,l=this.treeRight;let d,c,u;if(o.colsTreeDepth===0)d=n,c=a,u=l;else{d=[],c=[],u=[];for(let p=0,f=n.length;p<f;++p)no(n[p],null,d);for(let p=0,f=a.length;p<f;++p)no(a[p],null,c);for(let p=0,f=l.length;p<f;++p)no(l[p],null,u)}this.leftCols=d,this.centerCols=c,this.rightCols=u;const h=this.joinCols(e);this.setLeftValuesOfGroups(e);const g=this.flexActive||i?.columnsHidden;if(g){const p=r?.getGridBodyCtrl()?.getViewportWidthWithoutScrollbar();let f;if(p!=null){const m=p-h.left-h.right;f={viewportWidth:m>0?m:0}}i?.refreshFlexedColumns(f)}this.updateBodyWidths(g?void 0:h),this.setFirstRightAndLastLeftPinned(d,u,e),s.checkViewportColumns(!1),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}updateBodyWidths(e){const t=e?e.center:ft(this.centerCols),i=e?e.left:ft(this.leftCols),o=e?e.right:ft(this.rightCols),s=this.bodyWidth!==t;if(this.isBodyWidthDirty=s,!s&&this.leftWidth===i&&this.rightWidth===o)return;this.bodyWidth=t,this.leftWidth=i,this.rightWidth=o,this.totalWidth=t+i+o;const r=this.eventSvc;r.dispatchEvent({type:"columnContainerWidthChanged"}),r.dispatchEvent({type:"displayedColumnsWidthChanged"})}setLeftValues(e){const t=Ca(this.leftCols,e),i=Ca(this.rightCols,e),o=Ca(this.centerCols,e);return this.setLeftValuesOfGroups(e),{left:t,center:o,right:i}}setLeftValuesOfGroups(e){const t=this.colModel.colsList;for(let i=0,o=t.length;i<o;++i){const s=t[i];s.displayed||s.setLeft(null,e)}ma(this.treeLeft),ma(this.treeRight),ma(this.treeCenter)}setFirstRightAndLastLeftPinned(e,t,i){const o=e.length,s=o?e[o-1]:null;let r=null;const n=t.length;n&&(r=this.gos.get("enableRtl")?t[n-1]:t[0]);const a=this.prevLastLeftPinned;a!==s&&(a?.setLastLeftPinned(!1,i),s?.setLastLeftPinned(!0,i),this.prevLastLeftPinned=s);const l=this.prevFirstRightPinned;l!==r&&(l?.setFirstRightPinned(!1,i),r?.setFirstRightPinned(!0,i),this.prevFirstRightPinned=r)}buildTrees(){const{colModel:e,colGroupSvc:t}=this,{leftCols:i,rightCols:o,centerCols:s,leftCount:r,centerCount:n}=this.partitionVisibleCols();this.stampAriaColIndexes(r,n);const a=new zg;if(t){const l=e.nextBuildToken();this.treeLeft=t.createGroups(i,a,"left",l),this.treeRight=t.createGroups(o,a,"right",l),this.treeCenter=t.createGroups(s,a,null,l),t.prune(l)}else this.treeLeft=i,this.treeRight=o,this.treeCenter=s}partitionVisibleCols(){const e=this.colModel,t=[],i=[],o=[];let s=0,r=0;if(!e.ready)return{leftCols:t,rightCols:i,centerCols:o,leftCount:s,centerCount:r};const n=this.beans,a=e.pivotMode&&!e.showingPivotResult,l=n.selectionColSvc?.isEnabled()??!1,d=Od(n),c=zd(this.gos),u=e.colsList;let h=null,g=!1;for(let p=0,f=u.length;p<f;++p){const m=u[p],C=m.colKind,v=m.pinned;v!=="right"&&(v?++s:++r);const S=C==="auto-group";let w;if(a?w=m.aggregationActive||S&&(!c||m.visible)||l&&C==="selection"||d&&C==="row-number":w=S&&!c||m.visible,!!w){if(C==="selection"&&m.visible&&!g){h=m;continue}if(C!=="selection"&&C!=="row-number"&&(g=!0),h!==null&&C!=="row-number"){const b=h.pinned;b==="right"?i.push(h):b?t.push(h):o.push(h),h=null}v==="right"?i.push(m):v?t.push(m):o.push(m)}}return{leftCols:t,rightCols:i,centerCols:o,leftCount:s,centerCount:r}}clear(){const e=this.allCols;for(let t=0,i=e.length;t<i;++t)e[t].allColsIndex=-1,e[t].displayed=!1;this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[]}stampAriaColIndexes(e,t){const i=this.colModel.colsList;let o=1,s=e+1,r=e+t+1;for(let n=0,a=i.length;n<a;++n){const l=i[n],d=l.pinned;d==="right"?l.ariaColIndex=r++:d?l.ariaColIndex=o++:l.ariaColIndex=s++}}joinCols(e){const{leftCols:t,centerCols:i,rightCols:o}=this,s=this.allCols;for(let c=0,u=s.length;c<u;++c)s[c].allColsIndex=-1,s[c].displayed=!1;const r=[];this.autoHeightCols.length=0,this.flexActive=!1;const n=!!this.gos.get("hidePaddedHeaderRows");this.headerGroupRowCount=n?0:this.colModel.colsTreeDepth;let a,l,d;return this.gos.get("enableRtl")?(d=this.layoutSection(o,r,n,e),l=this.layoutSection(i,r,n,e),a=this.layoutSection(t,r,n,e)):(a=this.layoutSection(t,r,n,e),l=this.layoutSection(i,r,n,e),d=this.layoutSection(o,r,n,e)),this.allCols=r,{left:a,center:l,right:d}}layoutSection(e,t,i,o){const s=this.autoHeightCols;let r=0,n=null;for(let a=0,l=e.length;a<l;++a){const d=e[a];if(d.allColsIndex=t.length,d.displayed=!0,d.setLeft(r,o),t.push(d),d.colDef.autoHeight&&s.push(d),!this.flexActive&&d.pinned==null){const c=d.flex;c!=null&&c>0&&(this.flexActive=!0)}if(i){const c=d.parent;if(c!==null&&c!==n){n=c;const u=lx(c);u>this.headerGroupRowCount&&(this.headerGroupRowCount=u)}}r+=d.actualWidth}return r}getLeftColsForRow(e){return this.colModel.colSpanActive?this.getColsForRow(e,this.leftCols):this.leftCols}getRightColsForRow(e){return this.colModel.colSpanActive?this.getColsForRow(e,this.rightCols):this.rightCols}getColsForRow(e,t,i,o){const s=[];let r=null;const n=t.length;for(let a=0;a<n;++a){const l=t[a],d=Math.min(l.getColSpan(e),n-a);let c;if(i){c=i(l);for(let u=1;!c&&u<d;++u)i(t[a+u])&&(c=!0)}else c=!0;d>1&&(a+=d-1),c&&(s.length===0&&r&&o?.(l)&&s.push(r),s.push(l)),r=l}return s}getColBefore(e){const t=e.allColsIndex;return t>0?this.allCols[t-1]:null}getColAfter(e){const t=this.allCols,i=e.allColsIndex;return i<t.length-1?t[i+1]:null}getLeftStickyColumnContainerWidth(){return this.leftCols.length?ft(this.leftCols):this.leftWidth}getRightStickyColumnContainerWidth(){return this.rightCols.length?ft(this.rightCols):this.rightWidth}isColAtEdge(e,t){const i=this.allCols,o=i.length;if(!o)return!1;const s=t==="first",r=Ee(e)?Ot(e,!0,!s):e;return r?(s?i[0]:i[o-1])===r:!1}},no=(e,t,i)=>{if(e.isColumn)return i.push(e),!1;const o=e.isPadding()?t:e,s=o?.providedColumnGroup??null,r=s?.expandable,n=e.displayedChildren,a=n?.length??0;let l=null,d=0,c=!1;const u=e.children;if(u!==null){const g=r&&s.expanded;for(let p=0,f=u.length;p<f;++p){const m=u[p];if(r){const C=m.getColumnGroupShow();if(C==="open"&&!g||C==="closed"&&g)continue;const v=i.length;if(no(m,o,i)&&(c=!0),i.length===v)continue}else no(m,o,i)&&(c=!0);l!==null?l.push(m):(d>=a||n[d]!==m)&&(n===null?l=[m]:(l=n.slice(0,d),l.push(m))),++d}}const h=l!==null||d!==a;return h&&(e.displayedChildren=l??n.slice(0,d)),(h||c)&&e.dispatchLocalEvent({type:"displayedChildrenChanged"}),h||c},lx=e=>{let t=e;for(;t;){const i=t.providedColumnGroup;if(!i.padding)return i.level+1;t=t.parent}return 0},ma=e=>{for(let t=0,i=e.length;t<i;++t){const o=e[t];Ee(o)&&o.checkLeft()}},Ca=(e,t)=>{let i=0;for(let o=0,s=e.length;o<s;++o){const r=e[o];r.setLeft(i,t),i+=r.actualWidth}return i};import{_loadTemplate as dx}from"ag-stack";var cx=class extends y{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.supportsJsFunction)return null;class i{refresh(){return!1}getGui(){return this.eGui}init(s){const r=t(s),n=typeof r;if(n==="string"||n==="number"||n==="boolean"){this.eGui=dx("<span>"+r+"</span>");return}if(r==null){this.eGui=V({tag:"span"});return}this.eGui=r}}return i}},ux={moduleName:"CellRendererFunction",version:E,beans:[cx]};import{BaseRegistry as hx}from"ag-stack";function gx(e){return typeof e=="object"&&!!e.getComp}var px=class extends Nw{constructor(){super(...arguments),this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},this.selectors={},this.icons={}}postConstruct(){const e=this.gos.get("components");if(e!=null)for(const t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){const{icons:t,userComponents:i,dynamicBeans:o,selectors:s}=e;if(i){const r=(n,a,l,d)=>{this.agGridDefaults[n]=a,(l||d)&&(this.agGridDefaultOverrides[n]={params:l,processParams:d})};for(const n of Object.keys(i)){let a=i[n];if(gx(a)&&(a=a.getComp(this.beans)),typeof a=="object"){const{classImp:l,params:d,processParams:c}=a;r(n,l,d,c)}else r(n,a)}}this.registerDynamicBeans(o);for(const r of s??[])this.selectors[r.selector]=r;if(t)for(const r of Object.keys(t))this.icons[r]=t[r]}getUserComponent(e,t){const i=(a,l,d,c)=>({componentFromFramework:l,component:a,params:d,processParams:c}),{frameworkOverrides:o}=this.beans,s=o.frameworkComponent(t,this.gos.get("components"));if(s!=null)return i(s,!0);const r=this.jsComps[t];if(r){const a=o.isFrameworkComponent(r);return i(r,a)}const n=this.agGridDefaults[t];if(n){const a=this.agGridDefaultOverrides[t];return i(n,!1,a?.params,a?.processParams)}return this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}getDynamicError(e,t){return t?Me(279,{name:e}):this.beans.validation?.missingDynamicBean(e)??Me(256)}},fx=["gridCtrl","gridBodyCtrl","scrolling","pinnedTop","pinnedBottom","stickyTop","stickyBottom","fakeHScrollComp","fakeVScrollComp","gridHeaderCtrl","headerRowContainerCtrl"],mx=class extends y{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",()=>{if(this.updateReady(),this.ready){for(const e of this.readyCallbacks)e(this.params);this.readyCallbacks.length=0}},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){this.ready=fx.every(e=>this.params[e]?.isAlive()??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{const i=this.readyCallbacks.indexOf(t);i>=0&&this.readyCallbacks.splice(i,1)})}register(e,t){this.params[e]=t,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:"ready"}),t.addDestroyFunc(()=>{this.updateReady()})}get(e){return this.params[e]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrl(){return this.params.headerRowContainerCtrl}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}};import{BaseEnvironment as Cx}from"ag-stack";var vx='.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport{background-color:var(--ag-data-background-color);flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-grid-viewport{flex:1 1 auto;min-height:0;min-width:0;overflow:auto;position:relative;-webkit-overflow-scrolling:touch;-ms-overflow-style:none!important;scrollbar-width:none!important}.ag-grid-viewport:where(.ag-pinned-columns-overflow){overflow-x:hidden}.ag-grid-viewport::-webkit-scrollbar{display:none!important}.ag-grid-scrollable-area{display:flex;flex-direction:column;min-height:100%;min-width:100%;position:relative}.ag-spanning-container{height:100%;pointer-events:none;position:absolute;top:0}.ag-grid-scrolling-container{display:block;isolation:isolate;min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll;pointer-events:all}.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-grid-scrolling-container{position:relative}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-full-width-anchor{height:100%;position:sticky;width:var(--ag-internal-grid-viewport-width,100%)}:where(.ag-ltr) .ag-full-width-anchor{left:0}:where(.ag-rtl) .ag-full-width-anchor{right:0}.ag-grid-scrolling-rows{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;z-index:2;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-active),&:where(.ag-scrollbar-scrolling){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{flex:none;width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-horizontal-scroll-end-spacer{flex:0 0 auto;min-width:0;overflow:scroll}.ag-body-vertical-scroll{flex-direction:column;pointer-events:none;position:absolute;top:0;z-index:2}:where(.ag-ltr) .ag-body-vertical-scroll{right:0}:where(.ag-rtl) .ag-body-vertical-scroll{left:0}.ag-body-vertical-scroll-start-spacer{border-bottom:var(--ag-header-row-border);flex:none;opacity:0}:where(.ag-ltr .ag-has-right-pinned-cols),:where(.ag-rtl .ag-has-left-pinned-cols){.ag-body-vertical-scroll-start-spacer{background-color:var(--ag-background-color);background-image:linear-gradient(0deg,var(--ag-header-background-color),var(--ag-header-background-color));opacity:1;pointer-events:all}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-header-row,.ag-row:where(:not(.ag-full-width-row)),.ag-spanned-row,:where(.ag-row.ag-embedded-full-width-row){display:flex;width:100%}:where(.ag-header-row):after,:where(.ag-row.ag-embedded-full-width-row:after),:where(.ag-row:not(.ag-full-width-row)):after,:where(.ag-spanned-row):after{align-self:stretch;content:"";flex:1 0 0px}:where(.ag-row.ag-embedded-full-width-row:after),:where(.ag-row:not(.ag-header-row,.ag-full-width-row)):after{background-color:var(--ag-data-background-color)}:where(.ag-header-row):after{background-color:var(--ag-header-background-color)}.ag-header{border-bottom:var(--ag-header-row-border);left:0;position:absolute;right:0;top:0;z-index:1}.ag-grid-pinned-left-cells,.ag-grid-pinned-right-cells,.ag-grid-scrolling-cells{height:100%;position:relative;white-space:nowrap}.ag-grid-scrolling-cells{flex:0 0 auto;z-index:0}:where(.ag-row.ag-embedded-full-width-row)>.ag-grid-scrolling-cells{flex:1 0 auto;margin-right:var(--ag-internal-pinned-right-sticky-offset,0)}.ag-grid-pinned-left-cells,.ag-grid-pinned-right-cells{flex:0 0 auto;overflow:hidden;position:sticky;z-index:2}.ag-grid-pinned-left-cells{left:var(--ag-internal-pinned-left-sticky-offset,0)}.ag-grid-pinned-right-cells{right:var(--ag-internal-pinned-right-sticky-offset,0)}:where(.ag-header-row),:where(.ag-row.ag-embedded-full-width-row),:where(.ag-row:not(.ag-full-width-row)),:where(.ag-spanned-row){>.ag-grid-pinned-right-cells{order:1}}.ag-rtl{:where(.ag-header-row),:where(.ag-row.ag-embedded-full-width-row),:where(.ag-row:not(.ag-full-width-row)),:where(.ag-spanned-row){>:where(.ag-grid-scrolling-cells){order:1}}:where(.ag-row .ag-grid-scrolling-cells),:where(.ag-spanned-row .ag-grid-scrolling-cells){margin-left:var(--ag-internal-pinned-left-sticky-offset,0)}}.ag-spanning-container .ag-grid-scrolling-cells{z-index:1}.ag-spanning-container .ag-grid-pinned-left-cells,.ag-spanning-container .ag-grid-pinned-right-cells{overflow:visible;z-index:3}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:4}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-spanning-container .ag-cell{pointer-events:auto}.ag-cell-value{flex:1 1 auto}.ag-cell-value:not(.ag-allow-overflow),.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{overflow-wrap:break-word;white-space:normal}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-grid-pinned-bottom-rows,.ag-grid-pinned-top-rows{background-color:var(--ag-data-background-color);position:sticky;width:100%;z-index:2}.ag-grid-pinned-top-rows{top:0;white-space:nowrap}.ag-grid-pinned-bottom-rows{border-bottom:none;bottom:0;box-sizing:content-box!important;white-space:nowrap}.ag-grid-pinned-bottom-rows-container,.ag-grid-pinned-top-rows-container,.ag-grid-sticky-bottom-rows-container,.ag-grid-sticky-top-rows-container{background-color:var(--ag-data-background-color);overflow:visible;position:absolute;white-space:nowrap;width:100%}.ag-grid-pinned-top-rows-container{border-bottom:var(--ag-pinned-row-border);display:flex;z-index:1}.ag-grid-pinned-bottom-rows-container{border-top:var(--ag-pinned-row-border);display:flex}.ag-extra-rows-container{position:absolute;width:100%}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;:where(.ag-column-group-closed-icon),:where(.ag-column-group-opened-icon){cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-grid-pinned-bottom-rows,.ag-grid-pinned-bottom-rows-container,.ag-grid-pinned-top-rows,.ag-grid-pinned-top-rows-container,.ag-grid-scrolling-rows,.ag-grid-sticky-bottom-rows-container,.ag-grid-sticky-top-rows-container{flex-direction:row}.ag-header-row,.ag-row:where(.ag-embedded-full-width-row),.ag-row:where(:not(.ag-full-width-row)),.ag-spanned-row{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-grid-pinned-bottom-rows,.ag-grid-pinned-bottom-rows-container,.ag-grid-pinned-top-rows,.ag-grid-pinned-top-rows-container,.ag-grid-scrolling-rows,.ag-grid-sticky-bottom-rows-container,.ag-grid-sticky-top-rows-container{flex-direction:row-reverse}.ag-header-row,.ag-row:where(.ag-embedded-full-width-row),.ag-row:where(:not(.ag-full-width-row)),.ag-spanned-row{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-show-values-as-inapplicable{opacity:.5}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-cell-font-size);font-weight:var(--ag-cell-font-weight);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{height:var(--ag-row-height);width:100%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}.ag-row.ag-full-width-row:not(.ag-embedded-full-width-row){border-bottom:var(--ag-row-border)}.ag-row:where(.ag-embedded-full-width-row),.ag-row:where(:not(.ag-header-row,.ag-full-width-row)){>.ag-grid-pinned-left-cells,>.ag-grid-pinned-right-cells,>.ag-grid-scrolling-cells{border-bottom:var(--ag-row-border)}}:where(.ag-grid-pinned-bottom-rows-container){.ag-row-last:where(.ag-embedded-full-width-row),.ag-row-last:where(:not(.ag-header-row,.ag-full-width-row)){>.ag-grid-pinned-left-cells,>.ag-grid-pinned-right-cells,>.ag-grid-scrolling-cells{border-bottom:none}}}:where(.ag-grid-sticky-bottom-rows-container){.ag-row:where(.ag-embedded-full-width-row),.ag-row:where(:not(.ag-header-row,.ag-full-width-row)){>.ag-grid-pinned-left-cells,>.ag-grid-pinned-right-cells,>.ag-grid-scrolling-cells{border-bottom:none;border-top:var(--ag-row-border)}}}:where(.ag-row:not(.ag-header-row)){background-color:var(--ag-data-background-color);--ag-internal-row-overlay-color:transparent;--ag-internal-row-overlay-image:none}.ag-grid-container-wrapper{height:100%;width:100%}.ag-row:not(.ag-header-row){>.ag-grid-pinned-left-cells,>.ag-grid-pinned-right-cells{background-color:inherit;background-image:linear-gradient(var(--ag-data-background-color),var(--ag-data-background-color))}>.ag-grid-pinned-left-cells>.ag-grid-container-wrapper,>.ag-grid-pinned-right-cells>.ag-grid-container-wrapper{background-color:inherit}}.ag-body-vertical-content-no-gap .ag-has-bottom-pinned-rows{.ag-grid-pinned-bottom-rows .ag-grid-sticky-bottom-rows-container .ag-row-last,.ag-grid-scrolling-container .ag-row-last{>.ag-grid-pinned-left-cells,>.ag-grid-pinned-right-cells,>.ag-grid-scrolling-cells{border-bottom:none}}}.ag-grid-scrollable-area.ag-has-top-pinned-rows .ag-grid-pinned-top-rows>.ag-grid-pinned-top-rows-container>.ag-row.ag-row-last{>.ag-grid-pinned-left-cells,>.ag-grid-pinned-right-cells,>.ag-grid-scrolling-cells{border-bottom:none}}.ag-body-vertical-content-no-gap>.ag-grid-viewport>.ag-grid-scrollable-area>.ag-grid-scrolling-rows>.ag-grid-scrolling-container>.ag-row-last.ag-full-width-row{border-bottom-color:transparent}.ag-body-vertical-content-no-gap>.ag-grid-viewport>.ag-grid-scrollable-area>.ag-grid-scrolling-rows>.ag-grid-scrolling-container>.ag-row-last:not(.ag-full-width-row){>.ag-grid-pinned-left-cells,>.ag-grid-pinned-right-cells,>.ag-grid-scrolling-cells{border-bottom-color:transparent}}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-data-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}.ag-drag-handle-disabled{opacity:.35;pointer-events:none}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-full-width-row:not(.ag-embedded-full-width-row):after,.ag-grid-pinned-left-cells:after,.ag-grid-pinned-right-cells:after,.ag-grid-scrolling-cells:after{background-color:var(--ag-row-drag-indicator-color);border-radius:calc(var(--ag-row-drag-indicator-width)/2);content:var(--ag-internal-row-highlight-content,none);height:var(--ag-row-drag-indicator-width);inset:var(--ag-internal-row-highlight-inset,auto);pointer-events:none;position:absolute}.ag-root-wrapper{--ag-internal-row-highlight-content:initial}.ag-row-highlight-above{--ag-internal-row-highlight-content:"";--ag-internal-row-highlight-inset:0 0 auto}.ag-row-highlight-below{--ag-internal-row-highlight-content:"";--ag-internal-row-highlight-inset:auto 0 0}:where(.ag-ltr) .ag-row-highlight-indent.ag-full-width-row:not(.ag-embedded-full-width-row):after,:where(.ag-ltr) .ag-row-highlight-indent>.ag-grid-scrolling-cells:after{margin-left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-row-highlight-indent.ag-full-width-row:not(.ag-embedded-full-width-row):after,:where(.ag-rtl) .ag-row-highlight-indent>.ag-grid-scrolling-cells:after{margin-right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside{&.ag-full-width-row:not(.ag-embedded-full-width-row):after,>.ag-grid-pinned-left-cells:after,>.ag-grid-pinned-right-cells:after,>.ag-grid-scrolling-cells:after{--ag-internal-row-highlight-content:"";background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);border-radius:0;height:auto;inset:0}}.ag-grid-pinned-bottom-rows-container,.ag-grid-scrolling-rows{background-color:var(--ag-data-background-color)}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-hover:not(.ag-full-width-row),.ag-row-selected{.ag-grid-pinned-left-cells:before,.ag-grid-pinned-right-cells:before,.ag-grid-scrolling-cells:before{background-color:var(--ag-internal-row-overlay-color);background-image:var(--ag-internal-row-overlay-image);content:"";display:block;inset:0;pointer-events:none;position:absolute}}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-selected.ag-full-width-row:before{background-color:var(--ag-internal-row-overlay-color);background-image:var(--ag-internal-row-overlay-image);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row.ag-row-selected{--ag-internal-row-overlay-color:var(--ag-selected-row-background-color)}.ag-row-hover.ag-full-width-row.ag-row-group,.ag-row-hover:not(.ag-full-width-row){--ag-internal-row-overlay-color:var(--ag-row-hover-color)}.ag-row-hover.ag-row-selected{--ag-internal-row-overlay-color:var(--ag-row-hover-color);--ag-internal-row-overlay-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-data-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-grid-scrolling-rows{min-height:var(--ag-auto-height-min-body-height)}}.ag-grid-viewport{--ag-internal-header-rows-height:0px;--ag-internal-top-rows-height:0px;--ag-internal-bottom-rows-height:0px}.ag-grid-viewport.ag-layout-auto-height{max-height:calc(var(--ag-auto-height-max-body-height) + var(--ag-internal-header-rows-height) + var(--ag-internal-top-rows-height) + var(--ag-internal-bottom-rows-height))}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-header{color:var(--ag-header-text-color);font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight)}.ag-header-row{border-bottom:none;height:var(--ag-header-height);position:absolute;.ag-grid-scrolling-cells{background-color:var(--ag-header-background-color)}>.ag-grid-pinned-left-cells,>.ag-grid-pinned-right-cells{background-image:linear-gradient(var(--ag-background-color),var(--ag-background-color))}.ag-grid-container-wrapper{background-color:var(--ag-header-background-color);height:100%;width:100%}.ag-grid-pinned-left-cells,.ag-grid-pinned-right-cells{overflow:visible}}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label,:where(.ag-header-group-cell-selectable) .ag-header-cell-comp-wrapper{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}:where(.ag-header-row.ag-header-row-not-first){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden)),:where(.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:visible}:where(.ag-grid-pinned-top-rows-container.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)):before,.ag-header-group-cell:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}.ag-header-cell:where(:not(.ag-floating-filter)):where(:hover):before,.ag-header-group-cell:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}.ag-header-cell:where(:not(.ag-floating-filter)):where(.ag-header-cell-moving):before,.ag-header-group-cell:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}:where(.ag-header-cell:not(.ag-floating-filter)>*,.ag-header-group-cell>*){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{overflow-wrap:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-calculated-column-icon,.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-calculated-column-icon,.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-show-values-as-dormant{opacity:.35}.ag-header-cell:after,.ag-header-group-cell:after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:after{border-left:var(--ag-header-column-border);left:0}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap){.ag-header-cell:where(.ag-column-last):after,.ag-header-group-cell:where(.ag-column-last):after{border-right-color:transparent}}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap){.ag-header-cell:where(.ag-column-last):after,.ag-header-group-cell:where(.ag-column-last):after{border-left-color:transparent}}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-column-drag-indicator-color);border-radius:calc(var(--ag-column-drag-indicator-width)/2);content:"";height:100%;position:absolute;top:0;width:var(--ag-column-drag-indicator-width)}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-grid-pinned-left-cells) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-grid-pinned-left-cells) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:col-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2}:where(.ag-ltr) .ag-header-cell-resize{right:-3px}:where(.ag-rtl) .ag-header-cell-resize{left:-3px}.ag-header-cell-resize:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}:where(.ag-ltr) .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-rtl) .ag-header-cell-resize:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-grid-scrolling-rows{display:block;height:unset}&.ag-root-wrapper{container-type:normal;display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}.ag-full-width-anchor,.ag-grid-scrollable-area,.ag-grid-scrolling-container,.ag-header-row{width:auto!important}}@media print{.ag-root-wrapper.ag-layout-print{container-type:normal;display:table;.ag-body-horizontal-scroll-viewport,.ag-grid-scrolling-container,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-root-wrapper{background-color:var(--ag-wrapper-background-color);border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);container-type:inline-size;display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color)}.ag-chart-menu-icon:hover,.ag-chart-settings-next:hover,.ag-chart-settings-prev:hover,.ag-column-group-icons:hover,.ag-column-select-header-icon:hover,.ag-filter-toolpanel-expand:hover,.ag-floating-filter-button-button:hover,.ag-group-title-bar-icon:hover,.ag-has-menu-open,.ag-header-cell-filter-button:hover,.ag-header-cell-menu-button:hover,.ag-header-expand-icon:hover,.ag-panel-title-bar-button-icon:hover,.ag-panel-title-bar-button:hover,.ag-set-filter-group-icons:hover,:where(.ag-group-contracted) .ag-icon:hover,:where(.ag-group-expanded) .ag-icon:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}:where(.ag-filter-active),:where(.ag-filter-toolpanel-group-instance-header-icon),:where(.ag-filter-toolpanel-instance-header-icon){position:relative}:where(.ag-filter-active):after,:where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-filter-toolpanel-instance-header-icon):after{background-color:var(--ag-icon-button-active-indicator-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-ltr) :where(.ag-filter-active):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-instance-header-icon):after{right:-1px}:where(.ag-rtl) :where(.ag-filter-active):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-instance-header-icon):after{left:-1px}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}';import{accentColor as Kt,accentMix as va,backgroundColor as ao,createPart as Wg,defaultFontFamily as Ug,foregroundBackgroundMix as He,foregroundColor as hi,foregroundMix as rt}from"ag-stack";import{createSharedTheme as wx}from"ag-stack";import{accentColor as gi,accentMix as Rt,backgroundColor as lo,foregroundColor as Rs,foregroundHeaderBackgroundMix as Sx,foregroundMix as nt}from"ag-stack";var qg={wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarPanelAnimationDuration:0,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:lo,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},cellFontFamily:{ref:"fontFamily"},cellFontSize:{ref:"dataFontSize"},cellFontWeight:{ref:"fontWeight"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:gi,rangeSelectionBackgroundColor:Rt(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:Rt(.5),rangeHeaderHighlightColor:Sx(.08),calculatedColumnHighlightColor:Rt(.12),columnHeaderEditHighlightColor:Rt(.12),calculatedColumnParentSuggestionColor:nt(.75),calculatedColumnSuggestionListWidth:200,rowNumbersSelectedColor:Rt(.5),columnHoverColor:Rt(.05),selectedRowBackgroundColor:Rt(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},dataBackgroundColor:lo,oddRowBackgroundColor:{ref:"dataBackgroundColor"},wrapperBackgroundColor:lo,wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,autoHeightMinBodyHeight:150,autoHeightMaxBodyHeight:"none",rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",rowHeight:{calc:"max(iconSize, cellFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,paginationPanelHeight:{calc:"pickerFieldHeight + spacing * 1.25"},dragHandleColor:nt(.7),headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:nt(.1),iconButtonActiveColor:gi,iconButtonActiveBackgroundColor:Rt(.28),iconButtonActiveIndicatorColor:gi,setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:nt(.8),cellEditingBorder:{color:gi},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"},columnSelectIndentSize:{ref:"iconSize"},toolbarBackgroundColor:{ref:"headerBackgroundColor"},toolbarTextColor:{ref:"headerTextColor"},toolbarSeparatorBorder:!0,toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:nt(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:nt(.13)},selectCellBackgroundColor:nt(.07),selectCellBorder:{color:nt(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:lo,filterPanelApplyButtonBackgroundColor:gi,columnPanelApplyButtonColor:lo,columnPanelApplyButtonBackgroundColor:gi,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:Rs,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:Rs,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:nt(.15),statusBarLabelColor:Rs,statusBarLabelFontWeight:500,statusBarValueColor:Rs,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedRowTextColor:{ref:"textColor"},rowDragIndicatorColor:{ref:"rangeSelectionBorderColor"},rowDragIndicatorWidth:2,columnDragIndicatorColor:{ref:"accentColor"},columnDragIndicatorWidth:2,formulaToken1Color:"#3269c6",formulaToken1BackgroundColor:{ref:"formulaToken1Color",mix:.08},formulaToken1Border:{color:{ref:"formulaToken1Color"}},formulaToken2Color:"#c0343f",formulaToken2BackgroundColor:{ref:"formulaToken2Color",mix:.06},formulaToken2Border:{color:{ref:"formulaToken2Color"}},formulaToken3Color:"#8156b8",formulaToken3BackgroundColor:{ref:"formulaToken3Color",mix:.08},formulaToken3Border:{color:{ref:"formulaToken3Color"}},formulaToken4Color:"#007c1f",formulaToken4BackgroundColor:{ref:"formulaToken4Color",mix:.06},formulaToken4Border:{color:{ref:"formulaToken4Color"}},formulaToken5Color:"#b03e85",formulaToken5BackgroundColor:{ref:"formulaToken5Color",mix:.08},formulaToken5Border:{color:{ref:"formulaToken5Color"}},formulaToken6Color:"#b74900",formulaToken6BackgroundColor:{ref:"formulaToken6Color",mix:.06},formulaToken6Border:{color:{ref:"formulaToken6Color"}},formulaToken7Color:"#247492",formulaToken7BackgroundColor:{ref:"formulaToken7Color",mix:.08},formulaToken7Border:{color:{ref:"formulaToken7Color"}},noteIndicatorColor:{ref:"accentColor"},noteIndicatorSize:"8px",notePopupBackgroundColor:{ref:"menuBackgroundColor"},notePopupTextColor:{ref:"menuTextColor",mix:.75},notePopupInputTextColor:{ref:"inputTextColor"},notePopupInputBackgroundColor:{ref:"inputBackgroundColor"},notePopupBorder:{ref:"dialogBorder"},notePopupPadding:{calc:"spacing * 0.5"}},bx={warn:(...e)=>{qn(e[0],e[1])},error:(...e)=>{$n(e[0],e[1])},preInitErr:(...e)=>{jn(e[0],e[2],e[1])}},co=()=>wx(bx).withParams(qg);import{accentColor as Es,backgroundColor as xs,createPart as Fs,foregroundBackgroundMix as yx,foregroundColor as $g}from"ag-stack";var Ps=":where(.ag-button){background:none;border:none;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}:where(.ag-button:not(:disabled)){cursor:pointer}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding)}.ag-standard-button:hover:where(:not(:disabled)){background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}.ag-standard-button:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}.ag-standard-button:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}",Ds={buttonTextColor:"inherit",buttonFontWeight:"normal",buttonBackgroundColor:"transparent",buttonBorder:!1,buttonBorderRadius:{ref:"borderRadius"},buttonHorizontalPadding:{calc:"spacing * 2"},buttonVerticalPadding:{ref:"spacing"},buttonHoverTextColor:{ref:"buttonTextColor"},buttonHoverBackgroundColor:{ref:"buttonBackgroundColor"},buttonHoverBorder:{ref:"buttonBorder"},buttonActiveTextColor:{ref:"buttonHoverTextColor"},buttonActiveBackgroundColor:{ref:"buttonHoverBackgroundColor"},buttonActiveBorder:{ref:"buttonHoverBorder"},buttonDisabledTextColor:{ref:"inputDisabledTextColor"},buttonDisabledBackgroundColor:{ref:"inputDisabledBackgroundColor"},buttonDisabledBorder:{ref:"inputDisabledBorder"}},Rx=()=>Fs({feature:"buttonStyle",params:Ds,css:Ps}),Kg=Rx(),Ex=()=>Fs({feature:"buttonStyle",params:{...Ds,buttonBackgroundColor:xs,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:Es}},css:Ps}),jg=Ex(),xx=()=>Fs({feature:"buttonStyle",params:{...Ds,buttonBackgroundColor:xs,buttonBorder:{color:Es},buttonFontWeight:600,buttonTextColor:Es,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBackgroundColor:Es,buttonActiveTextColor:xs},css:Ps}),Qg=xx(),Fx=()=>Fs({feature:"buttonStyle",params:{...Ds,buttonBorder:{color:$g,width:2,style:"outset"},buttonActiveBorder:{color:$g,width:2,style:"inset"},buttonBackgroundColor:yx(.07),buttonHoverBackgroundColor:xs,buttonVerticalPadding:{calc:"spacing * 0.5"}},css:Ps}),Zg=Fx();import{accentColor as Px,backgroundColor as wa,createPart as Dx,foregroundBackgroundMix as Yg}from"ag-stack";var Mx='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;-webkit-print-color-adjust:exact;print-color-adjust:exact;width:var(--ag-icon-size);&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color)}&:where(.ag-checked):after{background-color:var(--ag-checkbox-checked-shape-color)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input,.ag-radio-button-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}.ag-checkbox-input:where(:not(:disabled)),.ag-radio-button-input:where(:not(:disabled)){cursor:pointer}.ag-checkbox-input-wrapper:after,.ag-radio-button-input-wrapper:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}.ag-checkbox-input-wrapper:where(:focus-within,:active),.ag-radio-button-input-wrapper:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color)}&:where(.ag-indeterminate):after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}.ag-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',Tx=()=>Dx({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:wa,checkboxUncheckedBorderColor:Yg(.3),checkboxCheckedBackgroundColor:Px,checkboxCheckedBorderColor:{ref:"checkboxCheckedBackgroundColor"},checkboxCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'},checkboxCheckedShapeColor:wa,checkboxIndeterminateBackgroundColor:Yg(.3),checkboxIndeterminateBorderColor:{ref:"checkboxIndeterminateBackgroundColor"},checkboxIndeterminateShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'},checkboxIndeterminateShapeColor:wa,radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}},css:Mx}),uo=Tx();import{accentMix as Jg,backgroundColor as Xg,createPart as jt,defaultLightColorSchemeParams as pi,foregroundBackgroundMix as ho,foregroundColor as ep}from"ag-stack";var Ax=()=>jt({feature:"colorScheme",params:pi}),Ix=Ax(),kx=()=>jt({feature:"colorScheme",params:{...pi,foregroundColor:"#000000de",borderColor:"#60300026",chromeBackgroundColor:"#60300005"}}),Lx=kx(),Vx=()=>jt({feature:"colorScheme",params:{...pi,foregroundColor:"#000",chromeBackgroundColor:"#f3f8f8"}}),Hx=Vx(),Sa=()=>({...pi,cellBatchEditTextColor:"#f3d0b3",backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:ho(.05),rowHoverColor:Jg(.15),selectedRowBackgroundColor:Jg(.2),menuBackgroundColor:ho(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:ep,columnPanelApplyButtonColor:ep,findMatchColor:Xg,findActiveMatchColor:Xg,checkboxUncheckedBorderColor:ho(.4),toggleButtonOffBackgroundColor:ho(.4),rowBatchEditBackgroundColor:ho(.1),formulaToken1Color:"#4da3e5",formulaToken2Color:"#f55864",formulaToken3Color:"#b688f2",formulaToken4Color:"#24bb4a",formulaToken5Color:"#e772ba",formulaToken6Color:"#f69b5f",formulaToken7Color:"#a3e6ff"}),Bx=()=>jt({feature:"colorScheme",params:Sa()}),Ox=Bx(),Gx=()=>jt({feature:"colorScheme",params:{backgroundColor:"hsl(29, 10%, 17%)",foregroundColor:"#FFF",browserColorScheme:"dark"}}),tp=()=>({...Sa(),backgroundColor:"#1f2836"}),Nx=Gx(),_x=()=>jt({feature:"colorScheme",params:tp()}),zx=_x(),Wx=()=>jt({feature:"colorScheme",params:pi,modeParams:{light:pi,dark:Sa(),"dark-blue":tp()}}),go=Wx();import{createPart as ip}from"ag-stack";var Ux=".ag-column-drop-vertical-empty-message{align-items:center;border:dashed var(--ag-border-width);border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}",qx=".ag-column-drop-vertical-empty-message{color:var(--ag-subtle-text-color);font-size:calc(var(--ag-font-size) - 1px);font-weight:600;padding-top:var(--ag-spacing)}:where(.ag-ltr) .ag-column-drop-vertical-empty-message{padding-left:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing));padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-column-drop-vertical-empty-message{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing))}",$x=()=>ip({feature:"columnDropStyle",css:Ux}),ba=$x(),Kx=()=>ip({feature:"columnDropStyle",css:qx}),ya=Kx();import{createPart as jx}from"ag-stack";var Qx=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M22 12h-2v-2h-8v.092c.056 1.352 3.426 2.598 4.472 4.404.682 1.174.438 2.754-.572 3.72C14.29 19.618 12 20.924 12 22h8v-2h2v4H10c0-1.586-.098-3.304 1.016-4.314 1.904-1.632 4.89-3.108 3.54-4.42-1.918-1.68-4.464-2.936-4.554-5.12L10 8h12z'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='m6.414 17 2.294 2.292-1.416 1.416L2.586 16l4.706-4.708 1.416 1.416L6.414 15H15V6.414l-2.292 2.294-1.416-1.416L16 2.586l4.708 4.706-1.416 1.416L17 6.414V15h8.586l-2.294-2.292 1.416-1.416L29.414 16l-4.706 4.708-1.416-1.416L25.586 17H17v8.586l2.292-2.294 1.416 1.416L16 29.414l-4.708-4.706 1.416-1.416L15 25.586V17z'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-aasc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M13.201 8.08q.65 0 1.135.222.487.222.759.618.27.396.279.919H14.19a.72.72 0 0 0-.293-.536q-.26-.191-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125q.382.086.701.229.32.143.554.35.234.21.362.49.131.284.134.648a1.6 1.6 0 0 1-.273.93q-.27.391-.777.608-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.642q-.29-.428-.305-1.058h1.194q.02.294.17.49.15.195.402.294.253.097.573.097.313 0 .544-.09a.84.84 0 0 0 .362-.255.6.6 0 0 0 .129-.374q0-.195-.117-.33a.9.9 0 0 0-.337-.228 3.4 3.4 0 0 0-.54-.171l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.927q.287-.396.79-.618a2.8 2.8 0 0 1 1.14-.223'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 14H4.489l-.432-1.332H1.948L1.515 14H.19l2.017-5.84h1.592zm-3.551-2.296h1.481l-.718-2.21H2.98zM8.452 8.16q.645 0 1.075.19.43.191.648.531a1.4 1.4 0 0 1 .217.775q0 .343-.137.602-.137.256-.376.422a1.6 1.6 0 0 1-.542.231v.057q.333.015.624.188.294.175.476.489.183.31.183.74 0 .466-.231.831a1.56 1.56 0 0 1-.676.573Q9.265 14 8.609 14H6.114V8.16zM7.35 12.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.29 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.396.64.64 0 0 0-.226-.511q-.223-.195-.633-.194H7.35z' clip-rule='evenodd'/%3E%3Cpath fill='%23000' d='M7.166.377a.75.75 0 0 1 .919.066l3.333 3a.75.75 0 0 1-1.003 1.115L7.609 2.033 5.113 4.53a.75.75 0 0 1-1.06-1.06l3-3z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 4C9.378 4 4 9.378 4 16s5.378 12 12 12 12-5.378 12-12S22.622 4 16 4m0 2c5.52 0 10 4.48 10 10s-4.48 10-10 10S6 21.52 6 16 10.48 6 16 6m0 8.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M14 25h-2V7h2zm6 0h-2V7h2zm6 0h-2V7h2zM8 25H6V7h2z'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M21.929 27.999h-7.828a5.09 5.09 0 0 1-5.086-5.086v-9.812a5.087 5.087 0 0 1 5.086-5.086h7.828a5.09 5.09 0 0 1 5.086 5.086v9.812a5.087 5.087 0 0 1-5.086 5.086m.16-17.984h-8.088a2.94 2.94 0 0 0-2.938 2.938v10.132a2.94 2.94 0 0 0 2.938 2.938h8.088a2.94 2.94 0 0 0 2.936-2.938V12.953a2.94 2.94 0 0 0-2.936-2.938M7.041 26.013h-2.05a4 4 0 0 1-.006-.228V9.065a5.07 5.07 0 0 1 5.064-5.064h12.812q.069 0 .134.002v2.012H9.915a2.876 2.876 0 0 0-2.874 2.874z'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 4 24 24'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m16 14.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14.703 15.096 6.215 4.719a1 1 0 1 1 1.548-1.267l13.058 15.965A5.001 5.001 0 0 1 28 23.916a5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 4.98 4.98 0 0 1 1.23-3.283l-3.238-3.958-3.272 4.001a4.98 4.98 0 0 1 1.265 3.323 5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 5 5 0 0 1 7.13-4.522zM8.991 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M23 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1m-5.723-8.852 1.292 1.579 7.205-8.808a1 1 0 0 0-1.548-1.267z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-desc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m17 21.379 4.292-4.294 1.416 1.416L16 25.207l-6.708-6.706 1.416-1.416L15 21.379V6.793h2z'/%3E%3C/svg%3E")}.ag-icon-adesc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M10.387 11.47a.75.75 0 0 1 1.06 1.06l-3 3-.113.093a.75.75 0 0 1-.919-.065l-3.333-3a.75.75 0 0 1 1.003-1.116l2.806 2.525zM13.201 3.08q.65 0 1.135.222.487.223.759.619.27.396.279.918H14.19a.72.72 0 0 0-.293-.536q-.26-.192-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125a3.7 3.7 0 0 1 .701.229q.32.143.554.35.234.21.362.492.131.282.134.647a1.6 1.6 0 0 1-.273.93 1.74 1.74 0 0 1-.777.607q-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.641q-.29-.429-.305-1.059h1.194q.02.294.17.49.15.195.402.294.253.098.573.098.313 0 .544-.092a.84.84 0 0 0 .362-.254.6.6 0 0 0 .129-.373.5.5 0 0 0-.117-.33.9.9 0 0 0-.337-.23 3.4 3.4 0 0 0-.54-.17l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.926q.287-.396.79-.62a2.8 2.8 0 0 1 1.14-.222'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 9H4.489l-.432-1.332H1.948L1.515 9H.19l2.017-5.84h1.592zM2.262 6.704h1.481l-.718-2.21H2.98zM8.452 3.16q.645 0 1.075.19.43.192.648.53a1.4 1.4 0 0 1 .217.776q0 .342-.137.602a1.2 1.2 0 0 1-.376.423 1.6 1.6 0 0 1-.542.23v.058q.333.014.624.187.294.175.476.489.183.31.183.74 0 .465-.231.83a1.56 1.56 0 0 1-.676.574Q9.265 9 8.609 9H6.114V3.16zM7.35 7.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.291 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.397.64.64 0 0 0-.226-.51q-.223-.194-.633-.194H7.35z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-document:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath stroke='currentColor' stroke-width='2' d='M5 28.667V3.333C5 2.597 5.597 2 6.333 2H19l8 8v18.667c0 .736-.597 1.333-1.333 1.333H6.333A1.333 1.333 0 0 1 5 28.667Z'/%3E%3Cpath stroke='currentColor' stroke-width='2' d='M27 12H17V2'/%3E%3C/svg%3E")}.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m17 21.379 4.292-4.294 1.416 1.416L16 25.207l-6.708-6.706 1.416-1.416L15 21.379V6.793h2z'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-pdf:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.05-.728h.08v.74H.05Zm.08 0h.29v.08H.13Zm0 .308h.29v.08H.13Zm.21-.228h.08v.308H.34Z' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.05-.728h.08v.74H.05Zm.08 0h.29v.08H.13Zm0 .66h.29v.08H.13Zm.21-.58h.08v.58H.34Z' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='M.05-.728h.08v.74H.05Zm.08 0h.29v.08H.13Zm0 .308h.21v.08H.13Z' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M9.304 7.89a15.2 15.2 0 0 1 6.404-1.638c.294-.002.292-.002.584 0 5.956.174 11.328 4.088 13.62 9.748 0 0-1.318 3.178-3.224 5.174a13.6 13.6 0 0 1-2.226 1.874L26.414 25 25 26.414l-2.336-2.336C17.866 26.396 11.776 26.15 7.36 22.96a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.218 2.002-3.718a14.6 14.6 0 0 1 3.442-3.334L5.586 7 7 5.586zm-.3 2.528c-2.038 1.344-3.708 3.246-4.724 5.508L4.248 16c2.46 5.762 9.622 9.064 15.63 7.15q.688-.219 1.342-.516l-.912-.912a6.96 6.96 0 0 1-4.19 1.394c-3.862 0-7-3.136-7-7 0-1.57.52-3.022 1.394-4.19zm14.032 11.204a13.25 13.25 0 0 0 4.684-5.548l.032-.074c-1.984-4.646-6.834-7.798-12.006-7.748-1.712.05-3.386.458-4.922 1.158l1.102 1.102a6.97 6.97 0 0 1 4.192-1.396 7.003 7.003 0 0 1 5.606 11.192zm-11.09-8.262a5.003 5.003 0 0 0 6.928 6.928zm8.342 5.514a5.002 5.002 0 0 0-6.928-6.928z'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16.292 6.32c5.956.174 11.328 4.086 13.62 9.746 0 0-1.318 3.18-3.224 5.176-4.862 5.088-13.534 5.97-19.328 1.784a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.216 2.002-3.716 2.678-3.64 7.03-5.896 11.618-6.03.294-.004.292-.004.584 0m-.546 2c-4.896.142-9.458 3.202-11.466 7.672l-.032.074c2.46 5.762 9.622 9.066 15.63 7.152 3.458-1.102 6.342-3.738 7.842-7.076l.032-.076C25.768 11.42 20.918 8.27 15.746 8.32m.254.946c3.754 0 6.8 3.048 6.8 6.8 0 3.754-3.046 6.8-6.8 6.8s-6.8-3.046-6.8-6.8c0-3.752 3.046-6.8 6.8-6.8m5 6.768V16c0-2.76-2.24-5-5-5s-5 2.24-5 5v.066c0 2.76 2.24 5 5 5s5-2.24 5-5z'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M26 8.184c-.066 2.658-4.058 5.154-6.742 7.974a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h20zM8 8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.066-2.658 4.058-5.154 6.742-7.974.198-.23.258-.538.258-.842z'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.354 8.708 17.06 16l7.294 7.292-1.416 1.416L14.232 16l8.706-8.708zM9.646 8v16h-2V8z'/%3E%3C/svg%3E")}.ag-icon-fx:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M17.251 5.705h-2.182a3 3 0 0 0-2.901 2.238l-1.1 4.19h4.077v2h-4.601L7.489 25.772A4.64 4.64 0 0 1 3 29.235v-2c1.2 0 2.25-.81 2.555-1.97l2.92-11.132H4.61v-2h4.391l1.232-4.697a5 5 0 0 1 4.836-3.73h2.182zM21.69 16.33l4.553-4.25h2.932l-6.416 5.987 4.093 6.653h-2.348l-3.237-5.261-5.636 5.26H12.7l7.496-6.997-3.471-5.643h2.348z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M14 21h-4v-2h4zm12 0H16v-2h10zm-12-4h-4v-2h4zm12 0H16v-2h10zm-16-4H6v-2h4zm16 0H12v-2h14z'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m17.768 16-8.706 8.708-1.416-1.416L14.94 16 7.646 8.708l1.416-1.416zm6.586 8h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='m17.621 11-2 2h12.586v6H15.621l2 2-4.414 4.414L3.793 16l9.414-9.414zm-11 5 6.586 6.586L14.793 21l-4-4h15.414v-2H10.793l4-4-1.586-1.586z'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M17.138 13.418a1.03 1.03 0 0 0-.298.658s.125.096.226.178c1.372 1.114 2.033 3.039 1.582 4.796a4.7 4.7 0 0 1-1.205 2.123c-1.145 1.151-2.296 2.294-3.445 3.441-1.241 1.232-3.185 1.691-4.864 1.105-1.546-.54-2.756-1.938-3.048-3.572-.267-1.496.246-3.108 1.319-4.186l.578-.578-.03-.092a10.5 10.5 0 0 1-.452-2.3v-.005c-.776.775-1.621 1.489-2.275 2.396-1.817 2.522-1.643 6.323.706 8.669 1.813 1.811 4.708 2.462 7.171 1.517a6.75 6.75 0 0 0 2.336-1.518l3.427-3.424c1.939-1.954 2.533-5.126 1.294-7.674a6.8 6.8 0 0 0-2.071-2.481l-.003-.002zM21.265 4a6.8 6.8 0 0 0-4.734 1.964l-3.427 3.424c-1.961 1.977-2.52 5.092-1.32 7.619a6.8 6.8 0 0 0 2.098 2.537l.003.002c.32-.32.643-.637.96-.96.167-.172.27-.401.286-.64l-.204-.167c-1.603-1.287-2.215-3.68-1.316-5.616a4.7 4.7 0 0 1 .918-1.32c1.145-1.151 2.296-2.294 3.445-3.441 1.239-1.23 3.178-1.694 4.864-1.105 1.83.639 3.16 2.498 3.12 4.493a4.8 4.8 0 0 1-1.391 3.265l-.578.578.03.092c.235.743.387 1.519.452 2.3v.005c.732-.731 1.521-1.406 2.162-2.244 1.192-1.559 1.643-3.651 1.204-5.575a6.8 6.8 0 0 0-3.98-4.703 6.8 6.8 0 0 0-2.529-.506h-.061z'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='m7.54 17.4.1 6.98 6.96.1-2.24-2.24L16 18.6 13.4 16l-3.64 3.64zm16.92-2.8-.1-6.98-6.96-.1 2.24 2.24L16 13.4l2.6 2.6 3.64-3.64z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M26 23H6v-2h20zm0-6H6v-2h20zm0-6H6V9h20z'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none'%3E%3Cpath fill='%23000' d='M16 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0-7a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='m14.8 24.26-.1-6.96-6.96-.1 2.24 2.24-3.64 3.64 2.6 2.6 3.64-3.64zm2.4-16.52.1 6.96 6.96.1-2.24-2.24 3.64-3.64-2.6-2.6-3.64 3.64z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142m-1.414 6.07h16.97v2.002H7.515z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='m10.044 21.258 4.478-4.198L16 18.444 9 25l-7-6.556 1.478-1.384 4.478 4.198V7h2.088zm14 3.742h-2.088V10.742l-4.478 4.198L16 13.556 23 7q3.5 3.28 7 6.556l-1.478 1.384-4.478-4.198z'/%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16.186 3.646c8.188.154 14.898 9.796 11.17 17.78-3.298 7.066-13.932 9.374-19.848 3.87-3.9-3.632-5.076-9.896-2.684-14.708 2.082-4.19 6.588-6.974 11.362-6.942m-.298 1.998c-6.922.132-12.578 8.308-9.33 15.052 3.342 6.934 15.246 7.646 18.932 0 3.076-6.386-1.988-15.1-9.602-15.052m7.596 6.422c2.864 5.33-1.744 13.186-8.306 12.536a8.6 8.6 0 0 1-3.232-.998l-1.266-.706L22.778 10.8q.351.633.706 1.266m-9.422 10.276c3.296 1.028 7.246-1.006 8.216-4.418a6.6 6.6 0 0 0-.056-3.742zm2.104-14.696a8.8 8.8 0 0 1 3.936 1.038l1.266.706L9.27 21.488c-3.018-5.41-.99-13.37 6.318-13.834q.289-.01.578-.008m-.31 2c-4.06.154-7.23 4.614-6.03 8.46l8.16-8.16a6.8 6.8 0 0 0-2.13-.3'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M20 6.5c0-1-1-3-4-3s-4 2-4 3H8c-2.21 0-4 1.79-4 4v14c0 2.21 1.79 4 4 4h16c2.21 0 4-1.79 4-4v-14c0-2.21-1.79-4-4-4zm-4 .546c.734 0 1.334.572 1.334 1.272S16.734 9.59 16 9.59s-1.334-.572-1.334-1.272.6-1.272 1.334-1.272M24 26.5H8a2 2 0 0 1-2-2v-14a2 2 0 0 1 2-2h2v4h12v-4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2'/%3E%3C/svg%3E")}.ag-icon-values-as:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M11.763 2.75c2.63 1.519 3.196 5.464 1.263 8.812s-5.632 4.831-8.263 3.312C2.133 13.356 1.567 9.41 3.5 6.062s5.633-4.83 8.263-3.312m-.5.866c-1.196-.69-3.508 1.076-5.165 3.946s-2.03 5.756-.835 6.446c1.196.69 3.508-1.076 5.165-3.946s2.03-5.756.835-6.446M27.163 17.05c2.63 1.519 3.196 5.464 1.263 8.812s-5.632 4.831-8.263 3.312c-2.63-1.518-3.196-5.464-1.263-8.812s5.633-4.83 8.263-3.312m-.5.866c-1.196-.69-3.508 1.076-5.165 3.946s-2.03 5.756-.835 6.446c1.196.69 3.508-1.076 5.165-3.946s2.03-5.756.835-6.446M22.704 2.388l1.732 1L9.294 29.615l-1.732-1z'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008c-1.358-.022-2.714-.026-4.07-.022v4.034h4.07z'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142M15 15l-.001-7.485h2.002L17 15l7.485-.001v2.002L17 17l.001 7.485h-2.002L15 17l-7.485.001v-2.002z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m28.207 16-9.414 9.414L14.379 21l2-2H3.793v-6h12.586l-2-2 4.414-4.414zm-11-5 4 4H5.793v2h15.414l-4 4 1.586 1.586L25.379 16l-6.586-6.586z'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='m24.708 19.645-1.416 1.416L16 13.767l-7.292 7.294-1.416-1.416L16 10.939z'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='M24.708 10.855 13 22.561l-5.708-5.706 1.416-1.416L13 19.733 23.292 9.439z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6 15h20v2H6z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M5.35 3.999a.2.2 0 0 0-.14.058c-.388.38-.768.768-1.152 1.152a.21.21 0 0 0-.002.288c7.459 7.506 14.965 14.965 22.447 22.447a.21.21 0 0 0 .288.002q.576-.574 1.151-1.151a.21.21 0 0 0 .002-.288C20.484 19.002 12.979 11.542 5.497 4.06a.2.2 0 0 0-.146-.061zm.611 12.548c-1.933 1.939-2.538 5.119-1.289 7.688a6.79 6.79 0 0 0 4.891 3.672 6.82 6.82 0 0 0 5.893-1.866l1.984-1.984-1.438-1.438-1.986 1.986c-1.486 1.476-3.993 1.81-5.834.629a4.73 4.73 0 0 1-2.024-2.853 4.76 4.76 0 0 1 1.241-4.393l1.986-1.986-1.438-1.438-1.984 1.984zM21.273 3.999a6.78 6.78 0 0 0-4.727 1.963l-1.984 1.984L16 9.384l1.985-1.985a4.74 4.74 0 0 1 2.776-1.338c1.974-.224 4.045.926 4.845 2.834.712 1.699.329 3.778-1.004 5.12L22.616 16l1.439 1.438q1-1 2-2c2.012-2.031 2.557-5.368 1.112-7.982-1.144-2.07-3.432-3.441-5.834-3.459h-.061z'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}.ag-icon-column-arrow:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11 4a1 1 0 0 1 1 1v22a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 13a1 1 0 0 1 1-1h23.5a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 4h18v24H2zm2 2v20h14V6zM26.793 13 23 9.207l1.414-1.414L29.621 13l-5.207 5.207L23 16.793z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-un-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m6.112 15.111 3.272 3.271 1.436-1.402-2.476-2.479c.81-1.25 3.168-1.12 5.156-.614l4.986-4.988-.49-.722c-.392-.622.336-1.504 1.024-2.072l.008-.007.01-.006.032-.025 1.447 1.447 1.432-1.397-2.601-2.602s-4.052 2.704-3.352 5.046l-3.158 3.108c-2.004-.388-4.69-.288-6.056 1.572-.638.87-.67 1.87-.67 1.87m.581 11.582.014.014 5.502-5.501 4.783 4.783.746-.364c1.992-1.016 2.776-3.21 2.632-5.34-.055-.805-.068-.87-.088-.97-.008-.04-.017-.085-.03-.182l3.32-3.218c1.734.292 3.198-.912 4.272-2.338q.337-.447.67-.894l-.001-.001-.007-.007-.007-.007-.007-.007-3.87-3.87 1.585-1.584-1.414-1.414-14.381 14.38-1.237 1.209-5.69 5.687 1.417 1.416zM23.21 10.206l2.65 2.651c-1.465 1.714-2.935.776-2.935.776l-4.79 4.79q.041.291.087.583c.257 1.676.513 3.35-.585 4.317a4 4 0 0 1-.272.21l-3.739-3.744z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-pinned-top:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='m16.708 10.878 8.708 8.706L24 21l-6.292-6.294V27h-2V14.706L9.416 21 8 19.584q4.348-4.344 8.691-8.69zM25 6H8v2h17z'/%3E%3C/svg%3E")}.ag-icon-pinned-bottom:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M16.708 22.122 8 13.416 9.416 12l6.292 6.294V6h2v12.294L24 12l1.416 1.416-8.691 8.69zM7.416 28h17v-2h-17z'/%3E%3C/svg%3E")}.ag-icon-chevron-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3.479 10.521a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06l-3.47-3.47-3.47 3.47a.75.75 0 0 1-1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.521 5.461a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 1.06-1.06l3.47 3.47 3.47-3.47a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.53 12.512a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 1.06l-3.47 3.47 3.47 3.47a.75.75 0 0 1 0 1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.47 3.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06L8.94 8 5.47 4.53a.75.75 0 0 1 0-1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-filter-add:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M19.834 8H8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.056-2.267 2.968-4.417 5.49-6.75v3.087c-1.081.974-2.245 1.968-3.232 3.005a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h13.834z'/%3E%3Cpath fill='currentColor' d='M26 6h2.946v2.002H26v3.313h-2.002V8.002h-2.946V6h2.946V3.04H26z'/%3E%3C/svg%3E")}.ag-icon-edit:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M23.182 5a3.82 3.82 0 0 1 2.83 6.383l-.131.137-2.09 2.088a1 1 0 0 1-.084.099 1 1 0 0 1-.098.084L12.533 24.869a3 3 0 0 1-1.245.746l-4.353 1.32-.003.002a1.5 1.5 0 0 1-1.87-1.867l.003-.004 1.32-4.352v-.003l.06-.174c.13-.344.321-.661.565-.936l.126-.135L18.209 8.39a1 1 0 0 1 .18-.181l2.092-2.09.137-.132A3.82 3.82 0 0 1 23.182 5M8.548 20.883a1 1 0 0 0-.25.415l-1.049 3.451 3.457-1.048.114-.042q.17-.076.301-.206l10.458-10.46-2.572-2.572zM23.182 7c-.482 0-.946.19-1.287.531v.001l-1.474 1.475 2.572 2.572 1.474-1.474.121-.133A1.82 1.82 0 0 0 23.182 7'/%3E%3C/svg%3E")}.ag-icon-search:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M11 2a9 9 0 1 0 0 18 9 9 0 1 0 0-18m0 2a7 7 0 1 1 0 14 7 7 0 1 1 0-14m10.71 16.29-4.35-4.35-1.42 1.42 4.35 4.35Z'/%3E%3C/svg%3E")}`,op=jx({feature:"iconSet",css:Qx});import{createPart as Zx}from"ag-stack";var Yx=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24 6H8v2l8 8-8 8v2h16v-2H11l8-8-8-8h13z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 11.171 2.687 16l4.828 4.829-1.414 1.414L-.142 16l6.243-6.243zm16.97 0 1.414-1.414L32.142 16l-6.243 6.243-1.414-1.414L29.313 16zM16.028 13.2l2.829 2.828-2.829 2.829-2.828-2.829zm-4.857 11.285L16 29.313l4.829-4.828 1.414 1.414L16 32.142l-6.243-6.243zm0-16.97L9.757 6.101 16-.142l6.243 6.243-1.414 1.414L16 2.687z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333 5.332 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-aasc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M13.201 8.08q.65 0 1.135.222.487.222.759.618.27.396.279.919H14.19a.72.72 0 0 0-.293-.536q-.26-.191-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125q.382.086.701.229.32.143.554.35.234.21.362.49.131.284.134.648a1.6 1.6 0 0 1-.273.93q-.27.391-.777.608-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.642q-.29-.428-.305-1.058h1.194q.02.294.17.49.15.195.402.294.253.097.573.097.313 0 .544-.09a.84.84 0 0 0 .362-.255.6.6 0 0 0 .129-.374q0-.195-.117-.33a.9.9 0 0 0-.337-.228 3.4 3.4 0 0 0-.54-.171l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.927q.287-.396.79-.618a2.8 2.8 0 0 1 1.14-.223'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 14H4.489l-.432-1.332H1.948L1.515 14H.19l2.017-5.84h1.592zm-3.551-2.296h1.481l-.718-2.21H2.98zM8.452 8.16q.645 0 1.075.19.43.191.648.531a1.4 1.4 0 0 1 .217.775q0 .343-.137.602-.137.256-.376.422a1.6 1.6 0 0 1-.542.231v.057q.333.015.624.188.294.175.476.489.183.31.183.74 0 .466-.231.831a1.56 1.56 0 0 1-.676.573Q9.265 14 8.609 14H6.114V8.16zM7.35 12.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.29 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.396.64.64 0 0 0-.226-.511q-.223-.195-.633-.194H7.35z' clip-rule='evenodd'/%3E%3Cpath fill='%23000' d='M7.166.377a.75.75 0 0 1 .919.066l3.333 3a.75.75 0 0 1-1.003 1.115L7.609 2.033 5.113 4.53a.75.75 0 0 1-1.06-1.06l3-3z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16 2.667A13.32 13.32 0 0 0 2.667 16c0 7.373 5.96 13.333 13.333 13.333S29.333 23.373 29.333 16 23.373 2.667 16 2.667m6.667 18.12-1.88 1.88L16 17.88l-4.787 4.787-1.88-1.88L14.12 16l-4.787-4.787 1.88-1.88L16 14.12l4.787-4.787 1.88 1.88L17.88 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cg fill='%23000' fill-rule='nonzero'%3E%3Cpath d='M14 7h4v18h-4zM8 17h4v8H8zM20 13h4v12h-4z'/%3E%3C/g%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M26 25H6V7h20zM12 11H8v12h4zm6 0h-4v12h4zm6 12V11h-4v12z' style='fill-rule:nonzero' transform='translate(0 -1)'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m12 6 10 10-10 10-2-2 8-8-8-8z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M22 1.333H6A2.675 2.675 0 0 0 3.333 4v18.667H6V4h16zm4 5.334H11.333a2.675 2.675 0 0 0-2.667 2.667v18.667c0 1.467 1.2 2.667 2.667 2.667H26c1.467 0 2.667-1.2 2.667-2.667V9.334c0-1.467-1.2-2.667-2.667-2.667M26 28H11.333V9.333H26z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M15.984 13.894 27.05 2.828l2.122 2.122-11.066 11.066 11.066 11.066-2.122 2.12-11.066-11.066L4.918 29.202l-2.12-2.12 11.066-11.066L2.798 4.95l2.12-2.122z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M13.775 15.198 3.835 2.945a1.501 1.501 0 0 1 2.33-1.89l14.997 18.488A6.003 6.003 0 0 1 29.657 25c0 3.311-2.688 6-6 6s-6-2.689-6-6c0-1.335.437-2.569 1.176-3.566l-3.127-3.855-3.001 3.7A5.97 5.97 0 0 1 14 25c0 3.311-2.689 6-6 6s-6-2.689-6-6a6.003 6.003 0 0 1 8.315-5.536zm9.882 6.702a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M8 21.95a3.05 3.05 0 1 0 .001 6.101A3.05 3.05 0 0 0 8 21.95m9.63-11.505 1.932 2.381 8.015-9.881a1.5 1.5 0 0 0-2.329-1.89z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-desc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-adesc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M10.387 11.47a.75.75 0 0 1 1.06 1.06l-3 3-.113.093a.75.75 0 0 1-.919-.065l-3.333-3a.75.75 0 0 1 1.003-1.116l2.806 2.525zM13.201 3.08q.65 0 1.135.222.487.223.759.619.27.396.279.918H14.19a.72.72 0 0 0-.293-.536q-.26-.192-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125a3.7 3.7 0 0 1 .701.229q.32.143.554.35.234.21.362.492.131.282.134.647a1.6 1.6 0 0 1-.273.93 1.74 1.74 0 0 1-.777.607q-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.641q-.29-.429-.305-1.059h1.194q.02.294.17.49.15.195.402.294.253.098.573.098.313 0 .544-.092a.84.84 0 0 0 .362-.254.6.6 0 0 0 .129-.373.5.5 0 0 0-.117-.33.9.9 0 0 0-.337-.23 3.4 3.4 0 0 0-.54-.17l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.926q.287-.396.79-.62a2.8 2.8 0 0 1 1.14-.222'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 9H4.489l-.432-1.332H1.948L1.515 9H.19l2.017-5.84h1.592zM2.262 6.704h1.481l-.718-2.21H2.98zM8.452 3.16q.645 0 1.075.19.43.192.648.53a1.4 1.4 0 0 1 .217.776q0 .342-.137.602a1.2 1.2 0 0 1-.376.423 1.6 1.6 0 0 1-.542.23v.058q.333.014.624.187.294.175.476.489.183.31.183.74 0 .465-.231.83a1.56 1.56 0 0 1-.676.574Q9.265 9 8.609 9H6.114V3.16zM7.35 7.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.291 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.397.64.64 0 0 0-.226-.51q-.223-.194-.633-.194H7.35z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-document:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath stroke='currentColor' stroke-width='2.5' d='M5.333 28.667V3.333C5.333 2.597 5.93 2 6.667 2h12l8 8v18.667c0 .736-.597 1.333-1.334 1.333H6.667a1.333 1.333 0 0 1-1.334-1.333Z'/%3E%3Cpath stroke='currentColor' stroke-width='2.5' d='M26 12H16V2'/%3E%3C/svg%3E")}.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-pdf:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.05-.728h.08v.74H.05Zm.08 0h.29v.08H.13Zm0 .308h.29v.08H.13Zm.21-.228h.08v.308H.34Z' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.05-.728h.08v.74H.05Zm.08 0h.29v.08H.13Zm0 .66h.29v.08H.13Zm.21-.58h.08v.58H.34Z' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='M.05-.728h.08v.74H.05Zm.08 0h.29v.08H.13Zm0 .308h.21v.08H.13Z' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M20 26 10 16 20 6l2 2-8 8 8 8z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath fill='%23000' fill-rule='nonzero' d='M8.95 10.364 7 8.414 8.414 7l2.32 2.32A13.2 13.2 0 0 1 16.5 8c5.608 0 10.542 3.515 12.381 8.667L29 17l-.119.333a13 13 0 0 1-4.255 5.879l1.466 1.466-1.414 1.414-1.754-1.753A13.2 13.2 0 0 1 16.5 26c-5.608 0-10.542-3.515-12.381-8.667L4 17l.119-.333a13 13 0 0 1 4.83-6.303m1.445 1.445A11.02 11.02 0 0 0 6.148 17c1.646 4.177 5.728 7 10.352 7 1.76 0 3.441-.409 4.94-1.146l-1.878-1.878A5.06 5.06 0 0 1 16.5 22c-2.789 0-5.05-2.239-5.05-5 0-1.158.398-2.223 1.065-3.07zm1.855-.974 1.794 1.795A5.07 5.07 0 0 1 16.5 12c2.789 0 5.05 2.239 5.05 5 0 .9-.24 1.745-.661 2.474l2.305 2.306A11 11 0 0 0 26.852 17c-1.646-4.177-5.728-7-10.352-7-1.495 0-2.933.295-4.25.835'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16.5 23c4.624 0 8.706-2.823 10.352-7-1.646-4.177-5.728-7-10.352-7s-8.706 2.823-10.352 7c1.646 4.177 5.728 7 10.352 7M4.119 15.667C5.958 10.515 10.892 7 16.5 7s10.542 3.515 12.381 8.667L29 16l-.119.333C27.042 21.485 22.108 25 16.5 25S5.958 21.485 4.119 16.333L4 16zM16.5 21c2.789 0 5.049-2.239 5.049-5s-2.26-5-5.049-5-5.049 2.239-5.049 5 2.26 5 5.049 5' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m28 8-8 8v5l-6 6V16L6 8V6h22zM9 8l7 7v7l2-2v-5l7-7z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24.273 22.12 18.153 16l6.12-6.12L22.393 8l-8 8 8 8zM7.727 8h2.667v16H7.727z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-fx:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16.506 5.955h-2.182a2.75 2.75 0 0 0-2.659 2.052l-1.017 3.876h3.751v2.5H9.992L6.986 25.835a4.89 4.89 0 0 1-4.731 3.65v-2.5a2.39 2.39 0 0 0 2.313-1.784l2.838-10.818h-3.54v-2.5h4.196l1.184-4.51a5.25 5.25 0 0 1 5.078-3.918h2.182z'/%3E%3Cpath fill='currentColor' d='m20.997 15.938 4.135-3.859h3.665l-6.463 6.031 4.067 6.61h-2.936l-2.996-4.87-5.216 4.87h-3.664l7.543-7.041-3.446-5.6h2.936z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14 7v1H9V7zm0-3v1H5.001V4zm-7 7H5v-1h2zm0-3H5V7h2zM3 5H1V4h2zm11 5v1H9v-1zm-7 4H5v-1h2zm7-1v1H9v-1z' style='fill-rule:nonzero' transform='matrix(2 0 0 2 0 -2)'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m7.727 9.88 6.12 6.12-6.12 6.12L9.607 24l8-8-8-8zM21.607 8h2.667v16h-2.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M26.667 14.667H10.44l7.453-7.453L16 5.334 5.333 16.001 16 26.668l1.88-1.88-7.44-7.453h16.227z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M5.2 16a4.136 4.136 0 0 1 4.133-4.133h5.333V9.334H9.333a6.67 6.67 0 0 0-6.667 6.667 6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.333A4.136 4.136 0 0 1 5.2 16.002zm5.467 1.333h10.667v-2.667H10.667zm12-8h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133 4.136 4.136 0 0 1-4.133 4.133h-5.333v2.533h5.333a6.67 6.67 0 0 0 6.667-6.667 6.67 6.67 0 0 0-6.667-6.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z' style='fill-rule:nonzero' transform='translate(-3.692 -3.692)scale(1.23077)'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14 30H2V18h2.828v7.05l8.254-8.252 2.12 2.12-8.252 8.254H14zm4-28h12v12h-2.828V6.95l-8.254 8.252-2.12-2.12 8.252-8.254H18z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M20 13H0v-2h20zm0-6H0V5h20zm0-6H0v-2h20z' style='fill-rule:nonzero' transform='translate(6 9)'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 19a3 3 0 1 0 0-6 3 3 0 0 0 0 6M16 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6M16 27a3 3 0 1 0 0-6 3 3 0 0 0 0 6'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M2 18h12v12h-2.828v-7.05l-8.254 8.252-2.12-2.12 8.252-8.254H2zm28-4H18V2h2.828v7.05L29.082.798l2.12 2.12-8.252 8.254H30z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658H7.901v-2.658z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M10.94 6 9.06 7.88 17.167 16 9.06 24.12 10.94 26l10-10z' style='fill-rule:nonzero' transform='translate(1)'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cg fill='%23000' fill-rule='nonzero'%3E%3Cpath d='M23.708 14.645 16 6.939l-7.708 7.706 1.416 1.416L16 9.767l6.292 6.294zM23.708 20.355 16 28.061l-7.708-7.706 1.416-1.416L16 25.233l6.292-6.294z'/%3E%3C/g%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667M5.333 16c0-5.893 4.773-10.667 10.667-10.667 2.467 0 4.733.84 6.533 2.253L7.586 22.533A10.54 10.54 0 0 1 5.333 16M16 26.667c-2.467 0-4.733-.84-6.533-2.253L24.414 9.467A10.54 10.54 0 0 1 26.667 16c0 5.893-4.773 10.667-10.667 10.667' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M25.334 4H19.76C19.2 2.453 17.733 1.333 16 1.333S12.8 2.453 12.24 4H6.667A2.675 2.675 0 0 0 4 6.667V28c0 1.467 1.2 2.667 2.667 2.667h18.667c1.467 0 2.667-1.2 2.667-2.667V6.667C28.001 5.2 26.801 4 25.334 4M16 4c.733 0 1.333.6 1.333 1.333s-.6 1.333-1.333 1.333-1.333-.6-1.333-1.333S15.267 4 16 4m9.333 24H6.666V6.667h2.667v4h13.333v-4h2.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-values-as:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M11.763 2.75c2.63 1.519 3.196 5.464 1.263 8.812s-5.632 4.831-8.263 3.312C2.133 13.356 1.567 9.41 3.5 6.062s5.633-4.83 8.263-3.312m-.5.866c-1.196-.69-3.508 1.076-5.165 3.946s-2.03 5.756-.835 6.446c1.196.69 3.508-1.076 5.165-3.946s2.03-5.756.835-6.446M27.163 17.05c2.63 1.519 3.196 5.464 1.263 8.812s-5.632 4.831-8.263 3.312c-2.63-1.518-3.196-5.464-1.263-8.812s5.633-4.83 8.263-3.312m-.5.866c-1.196-.69-3.508 1.076-5.165 3.946s-2.03 5.756-.835 6.446c1.196.69 3.508-1.076 5.165-3.946s2.03-5.756.835-6.446M22.704 2.388l1.732 1L9.294 29.615l-1.732-1z'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008a213 213 0 0 0-4.07-.022v4.034h4.07z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658h-6.77v6.77h-2.658v-6.77h-6.77v-2.658h6.77v-6.77h2.658v6.77z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M21.94 7.88 20.06 6l-10 10 10 10 1.88-1.88L13.833 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m16 5.333-1.88 1.88 7.44 7.453H5.333v2.667H21.56l-7.44 7.453 1.88 1.88 10.667-10.667L16 5.332z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M15.708 2.355 8 10.061.292 2.355 1.708.939 8 7.233 14.292.939z' style='fill-rule:nonzero' transform='translate(8 14)'/%3E%3Cpath d='M5 26h22v2H5zM15 4h2v18h-2z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.334 10.667 16 21.334l8.667-10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M21.333 7.334 10.666 16l10.667 8.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M10.667 24.666 21.334 16 10.667 7.333z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.334 21.333 16 10.666l8.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M11.586 22.96 27.718 6.828 29.84 8.95 11.586 27.202 2.4 18.016l2.12-2.122z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m11.94 6-1.88 1.88L18.167 16l-8.107 8.12L11.94 26l10-10z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6 13.5h20v3H6z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24.12 9.06 16 17.167 7.88 9.06 6 10.94l10 10 10-10z' style='fill-rule:nonzero' transform='translate(0 1)'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M22.667 9.333h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133c0 1.907-1.307 3.507-3.08 3.973l1.947 1.947c2.173-1.107 3.667-3.32 3.667-5.92a6.67 6.67 0 0 0-6.667-6.667zm-1.334 5.334h-2.92l2.667 2.667h.253zM2.667 5.693 6.814 9.84A6.65 6.65 0 0 0 2.667 16a6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.334a4.136 4.136 0 0 1-4.133-4.133c0-2.12 1.613-3.867 3.68-4.093l2.76 2.76h-.973v2.667h3.64l3.027 3.027v2.307h2.307l5.347 5.333 1.68-1.68L4.362 4.002 2.669 5.695z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333 5.332 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}.ag-icon-column-arrow:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11 4a1 1 0 0 1 1 1v22a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 13a1 1 0 0 1 1-1h23.5a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 4h18v24H2zm2 2v20h14V6zM26.793 13 23 9.207l1.414-1.414L29.621 13l-5.207 5.207L23 16.793z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-un-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m6.112 15.111 3.272 3.271 1.436-1.402-2.476-2.479c.81-1.25 3.168-1.12 5.156-.614l4.986-4.988-.49-.722c-.392-.622.336-1.504 1.024-2.072l.008-.007.01-.006.032-.025 1.447 1.447 1.432-1.397-2.601-2.602s-4.052 2.704-3.352 5.046l-3.158 3.108c-2.004-.388-4.69-.288-6.056 1.572-.638.87-.67 1.87-.67 1.87m.581 11.582.014.014 5.502-5.501 4.783 4.783.746-.364c1.992-1.016 2.776-3.21 2.632-5.34-.055-.805-.068-.87-.088-.97-.008-.04-.017-.085-.03-.182l3.32-3.218c1.734.292 3.198-.912 4.272-2.338q.337-.447.67-.894l-.001-.001-.007-.007-.007-.007-.007-.007-3.87-3.87 1.585-1.584-1.414-1.414-14.381 14.38-1.237 1.209-5.69 5.687 1.417 1.416zM23.21 10.206l2.65 2.651c-1.465 1.714-2.935.776-2.935.776l-4.79 4.79q.041.291.087.583c.257 1.676.513 3.35-.585 4.317a4 4 0 0 1-.272.21l-3.739-3.744z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-pinned-top:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='m16.708 10.878 8.708 8.706L24 21l-6.292-6.294V27h-2V14.706L9.416 21 8 19.584q4.348-4.344 8.691-8.69zM25 6H8v2h17z'/%3E%3C/svg%3E")}.ag-icon-pinned-bottom:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M16.708 22.122 8 13.416 9.416 12l6.292 6.294V6h2v12.294L24 12l1.416 1.416-8.691 8.69zM7.416 28h17v-2h-17z'/%3E%3C/svg%3E")}.ag-icon-chevron-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3.479 10.521a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06l-3.47-3.47-3.47 3.47a.75.75 0 0 1-1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.521 5.461a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 1.06-1.06l3.47 3.47 3.47-3.47a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.53 12.512a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 1.06l-3.47 3.47 3.47 3.47a.75.75 0 0 1 0 1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.47 3.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06L8.94 8 5.47 4.53a.75.75 0 0 1 0-1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-filter-add:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M19.834 8H8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.056-2.267 2.968-4.417 5.49-6.75v3.087c-1.081.974-2.245 1.968-3.232 3.005a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h13.834z'/%3E%3Cpath fill='currentColor' d='M26 6h2.946v2.002H26v3.313h-2.002V8.002h-2.946V6h2.946V3.04H26z'/%3E%3C/svg%3E")}.ag-icon-edit:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M6.222 25.778h1.611l14.834-14.811-1.611-1.611-14.834 14.81zM4 28v-4.733L22.644 4.656a2.26 2.26 0 0 1 1.567-.634q.423 0 .833.167.412.166.734.478l1.589 1.6q.333.322.483.733t.15.822q0 .423-.161.839-.162.416-.472.728L8.733 28zm17.856-17.833-.8-.811 1.61 1.61z'/%3E%3C/svg%3E")}.ag-icon-search:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M11 2a9 9 0 1 0 0 18 9 9 0 1 0 0-18m0 2a7 7 0 1 1 0 14 7 7 0 1 1 0-14m10.71 16.29-4.35-4.35-1.42 1.42 4.35 4.35Z'/%3E%3C/svg%3E")}`,sp=Zx({feature:"iconSet",css:Yx});import{createPart as Jx}from"ag-stack";var Xx=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M24 5.333H8V8l8.667 8L8 24v2.667h16v-4h-9.333L21.334 16l-6.667-6.667H24z'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='M13.333 11.556h5.333V8h3.556L16 1.778 9.778 8h3.556zm-1.777 1.777H8V9.777l-6.222 6.222L8 22.221v-3.556h3.556zM30.222 16 24 9.778v3.556h-3.556v5.333H24v3.556l6.222-6.222zm-11.555 4.444h-5.333V24H9.778L16 30.222 22.222 24h-3.556z'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333z'/%3E%3C/svg%3E")}.ag-icon-aasc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M13.201 8.08q.65 0 1.135.222.487.222.759.618.27.396.279.919H14.19a.72.72 0 0 0-.293-.536q-.26-.191-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125q.382.086.701.229.32.143.554.35.234.21.362.49.131.284.134.648a1.6 1.6 0 0 1-.273.93q-.27.391-.777.608-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.642q-.29-.428-.305-1.058h1.194q.02.294.17.49.15.195.402.294.253.097.573.097.313 0 .544-.09a.84.84 0 0 0 .362-.255.6.6 0 0 0 .129-.374q0-.195-.117-.33a.9.9 0 0 0-.337-.228 3.4 3.4 0 0 0-.54-.171l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.927q.287-.396.79-.618a2.8 2.8 0 0 1 1.14-.223'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 14H4.489l-.432-1.332H1.948L1.515 14H.19l2.017-5.84h1.592zm-3.551-2.296h1.481l-.718-2.21H2.98zM8.452 8.16q.645 0 1.075.19.43.191.648.531a1.4 1.4 0 0 1 .217.775q0 .343-.137.602-.137.256-.376.422a1.6 1.6 0 0 1-.542.231v.057q.333.015.624.188.294.175.476.489.183.31.183.74 0 .466-.231.831a1.56 1.56 0 0 1-.676.573Q9.265 14 8.609 14H6.114V8.16zM7.35 12.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.29 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.396.64.64 0 0 0-.226-.511q-.223-.195-.633-.194H7.35z' clip-rule='evenodd'/%3E%3Cpath fill='%23000' d='M7.166.377a.75.75 0 0 1 .919.066l3.333 3a.75.75 0 0 1-1.003 1.115L7.609 2.033 5.113 4.53a.75.75 0 0 1-1.06-1.06l3-3z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 2.667C8.627 2.667 2.667 8.627 2.667 16S8.627 29.333 16 29.333 29.333 23.373 29.333 16 23.373 2.667 16 2.667m6.667 18.12-1.88 1.88L16 17.88l-4.787 4.787-1.88-1.88L14.12 16l-4.787-4.787 1.88-1.88L16 14.12l4.787-4.787 1.88 1.88L17.88 16z'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M5.333 10.667h5.333V5.334H5.333zm8 16h5.333v-5.333h-5.333zm-8 0h5.333v-5.333H5.333zm0-8h5.333v-5.333H5.333zm8 0h5.333v-5.333h-5.333zm8-13.334v5.333h5.333V5.333zm-8 5.334h5.333V5.334h-5.333zm8 8h5.333v-5.333h-5.333zm0 8h5.333v-5.333h-5.333z'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M22 1.333H6A2.675 2.675 0 0 0 3.333 4v18.667H6V4h16zm4 5.334H11.333a2.675 2.675 0 0 0-2.667 2.667v18.667c0 1.467 1.2 2.667 2.667 2.667H26c1.467 0 2.667-1.2 2.667-2.667V9.334c0-1.467-1.2-2.667-2.667-2.667M26 28H11.333V9.333H26z'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m25.333 8.547-1.88-1.88L16 14.12 8.547 6.667l-1.88 1.88L14.12 16l-7.453 7.453 1.88 1.88L16 17.88l7.453 7.453 1.88-1.88L17.88 16z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m19 3-6 6 2 2 7-7V3m-10 9.5a.503.503 0 0 1-.5-.5c0-.274.226-.5.5-.5s.5.226.5.5-.226.5-.5.5M6 20c-1.097 0-2-.903-2-2a2 2 0 0 1 2-2c1.097 0 2 .903 2 2a2 2 0 0 1-2 2M6 8c-1.097 0-2-.903-2-2a2 2 0 0 1 2-2c1.097 0 2 .903 2 2a2 2 0 0 1-2 2m3.64-.36c.23-.5.36-1.05.36-1.64 0-2.194-1.806-4-4-4S2 3.806 2 6s1.806 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.194 0-4 1.806-4 4s1.806 4 4 4 4-1.806 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1z' style='fill-rule:nonzero' transform='translate(4 4)'/%3E%3C/svg%3E")}.ag-icon-desc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667L26.668 16z'/%3E%3C/svg%3E")}.ag-icon-adesc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M10.387 11.47a.75.75 0 0 1 1.06 1.06l-3 3-.113.093a.75.75 0 0 1-.919-.065l-3.333-3a.75.75 0 0 1 1.003-1.116l2.806 2.525zM13.201 3.08q.65 0 1.135.222.487.223.759.619.27.396.279.918H14.19a.72.72 0 0 0-.293-.536q-.26-.192-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125a3.7 3.7 0 0 1 .701.229q.32.143.554.35.234.21.362.492.131.282.134.647a1.6 1.6 0 0 1-.273.93 1.74 1.74 0 0 1-.777.607q-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.641q-.29-.429-.305-1.059h1.194q.02.294.17.49.15.195.402.294.253.098.573.098.313 0 .544-.092a.84.84 0 0 0 .362-.254.6.6 0 0 0 .129-.373.5.5 0 0 0-.117-.33.9.9 0 0 0-.337-.23 3.4 3.4 0 0 0-.54-.17l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.926q.287-.396.79-.62a2.8 2.8 0 0 1 1.14-.222'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 9H4.489l-.432-1.332H1.948L1.515 9H.19l2.017-5.84h1.592zM2.262 6.704h1.481l-.718-2.21H2.98zM8.452 3.16q.645 0 1.075.19.43.192.648.53a1.4 1.4 0 0 1 .217.776q0 .342-.137.602a1.2 1.2 0 0 1-.376.423 1.6 1.6 0 0 1-.542.23v.058q.333.014.624.187.294.175.476.489.183.31.183.74 0 .465-.231.83a1.56 1.56 0 0 1-.676.574Q9.265 9 8.609 9H6.114V3.16zM7.35 7.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.291 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.397.64.64 0 0 0-.226-.51q-.223-.194-.633-.194H7.35z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-document:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath stroke='currentColor' stroke-miterlimit='3.994' stroke-width='2.5' d='M5.333 30V2h13.334l8 8v20z'/%3E%3Cpath stroke='currentColor' stroke-width='2.5' d='M26.5 12H16V2'/%3E%3C/svg%3E")}.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667L26.668 16z'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-pdf:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.05-.728h.08v.74H.05Zm.08 0h.29v.08H.13Zm0 .308h.29v.08H.13Zm.21-.228h.08v.308H.34Z' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.05-.728h.08v.74H.05Zm.08 0h.29v.08H.13Zm0 .66h.29v.08H.13Zm.21-.58h.08v.58H.34Z' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='M.05-.728h.08v.74H.05Zm.08 0h.29v.08H.13Zm0 .308h.21v.08H.13Z' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M20.94 9.88 19.06 8l-8 8 8 8 1.88-1.88L14.833 16z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M21.106 15.088A5.19 5.19 0 0 0 16 10.814a5.17 5.17 0 0 0-3.668 1.522L9.866 9.868a12.2 12.2 0 0 1 6.133-1.646c5.186 0 9.614 3.225 11.408 7.778a12.34 12.34 0 0 1-5.276 6.133l-2.468-2.466a5.17 5.17 0 0 0 1.449-2.802h-2.123c-.148.508-.42.964-.782 1.33l-1.33-1.33h-2.514l2.196 2.196q-.272.049-.56.05a3.11 3.11 0 0 1-2.99-2.245h-2.123a5.19 5.19 0 0 0 7.3 3.836l2.247 2.247a12.2 12.2 0 0 1-4.434.828c-5.186 0-9.614-3.225-11.408-7.778a12.3 12.3 0 0 1 3.781-5.111l2.924 2.924a5.1 5.1 0 0 0-.404 1.275h4.206l-1.296-1.296a3.1 3.1 0 0 1 2.196-.903c1.404 0 2.587.924 2.976 2.199h2.13z'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16 8.222c-5.186 0-9.614 3.225-11.408 7.778 1.794 4.553 6.222 7.778 11.408 7.778S25.614 20.553 27.408 16C25.614 11.447 21.186 8.222 16 8.222m0 12.964c-2.862 0-5.186-2.324-5.186-5.186s2.324-5.186 5.186-5.186 5.186 2.324 5.186 5.186-2.324 5.186-5.186 5.186m0-8.297c-1.721 0-3.111 1.39-3.111 3.111s1.39 3.111 3.111 3.111 3.111-1.39 3.111-3.111-1.39-3.111-3.111-3.111'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M13.333 24h5.333v-2.667h-5.333zM4 8v2.667h24V8zm4 9.333h16v-2.667H8z'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.273 22.12 18.153 16l6.12-6.12L22.393 8l-8 8 8 8zM7.727 8h2.667v16H7.727z'/%3E%3C/svg%3E")}.ag-icon-fx:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16.506 5.955h-2.182a2.75 2.75 0 0 0-2.659 2.052l-1.017 3.876h3.751v2.5H9.992L6.986 25.835a4.89 4.89 0 0 1-4.731 3.65v-2.5a2.39 2.39 0 0 0 2.313-1.784l2.838-10.818h-3.54v-2.5h4.196l1.184-4.51a5.25 5.25 0 0 1 5.078-3.918h2.182z'/%3E%3Cpath fill='currentColor' d='m20.997 15.938 4.135-3.859h3.665l-6.463 6.031 4.067 6.61h-2.936l-2.996-4.87-5.216 4.87h-3.664l7.543-7.041-3.446-5.6h2.936z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M18.667 21.333h8.889A3.555 3.555 0 0 1 24 24.889h-5.333zm8.888-7.111v3.556h-8.889v-3.556zM24 7.111a3.555 3.555 0 0 1 3.556 3.556h-16V7.111zm-8.889 17.778h-3.556v-3.556h3.556zm0-7.111h-3.556v-3.556h3.556zM8 10.667H4.444A3.555 3.555 0 0 1 8 7.111z'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m7.727 9.88 6.12 6.12-6.12 6.12L9.607 24l8-8-8-8zM21.607 8h2.667v16h-2.667z'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='M26.667 14.667H10.44l7.453-7.453L16 5.334 5.333 16.001 16 26.668l1.88-1.88-7.44-7.453h16.227v-2.667z'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M5.2 16a4.136 4.136 0 0 1 4.133-4.133h5.333V9.334H9.333c-3.68 0-6.667 2.987-6.667 6.667s2.987 6.667 6.667 6.667h5.333v-2.533H9.333A4.136 4.136 0 0 1 5.2 16.002zm5.467 1.333h10.667v-2.667H10.667zm12-8h-5.333v2.533h5.333c2.28 0 4.133 1.853 4.133 4.133s-1.853 4.133-4.133 4.133h-5.333v2.533h5.333c3.68 0 6.667-2.987 6.667-6.667s-2.987-6.667-6.667-6.667z'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='m17.778 11.708 3.25-3.251 2.516 2.516-3.251 3.25h4.597v3.556h-4.597l3.251 3.25-2.516 2.516-3.25-3.251v4.597h-3.556v-4.597l-3.25 3.251-2.516-2.516 3.251-3.25H7.11v-3.556h4.597l-3.251-3.25 2.516-2.516 3.25 3.251V7.111h3.556zm-3.251 7.847h2.944l2.084-2.084v-2.944l-2.084-2.084h-2.944l-2.084 2.084v2.944z'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='M4 4h24v2.667H4z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M4 24h24v-2.667H4zm0-6.667h24v-2.667H4zM4 8v2.667h24V8z'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 26.667a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 24q0-1.1.784-1.883A2.57 2.57 0 0 1 16 21.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784m0-8a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 16q0-1.1.784-1.883A2.57 2.57 0 0 1 16 13.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784m0-8a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 8q0-1.1.784-1.883A2.57 2.57 0 0 1 16 5.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='M8 25.333h16V28H8z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658H7.901v-2.658z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='M4 24h16v-2.667H4zM4 8v2.667h24V8zm0 9.333h24v-2.667H4z'/%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667M5.333 16c0-5.893 4.773-10.667 10.667-10.667 2.467 0 4.733.84 6.533 2.253L7.586 22.533A10.54 10.54 0 0 1 5.333 16M16 26.667c-2.467 0-4.733-.84-6.533-2.253L24.414 9.467A10.54 10.54 0 0 1 26.667 16c0 5.893-4.773 10.667-10.667 10.667'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M25.333 4H19.76C19.2 2.453 17.733 1.333 16 1.333S12.8 2.453 12.24 4H6.667A2.675 2.675 0 0 0 4 6.667V28c0 1.467 1.2 2.667 2.667 2.667h18.667c1.467 0 2.667-1.2 2.667-2.667V6.667C28.001 5.2 26.801 4 25.334 4zM16 4c.733 0 1.333.6 1.333 1.333s-.6 1.333-1.333 1.333-1.333-.6-1.333-1.333S15.267 4 16 4m9.333 24H6.666V6.667h2.667v4h13.333v-4h2.667z'/%3E%3C/svg%3E")}.ag-icon-values-as:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M25.414 8 8 25.414 6.586 24 24 6.586zM10 6a4 4 0 1 1 0 8 4 4 0 0 1 0-8m0 2a2 2 0 1 0 0 4 2 2 0 0 0 0-4M22 18a4 4 0 1 1 0 8 4 4 0 0 1 0-8m0 2a2 2 0 1 0 0 4 2 2 0 0 0 0-4'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m11.106 22.093-4.444 4.444-1.259-1.259 4.444-4.444zm5.872-16.63 9.618 9.62-.962.962-.962-.962-7.694 3.847 1.924 1.924-2.74 2.74-7.696-7.696 2.741-2.74 1.924 1.925 3.847-7.696-.962-.962z'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M26.667 30.223H5.334a3.556 3.556 0 0 1-3.556-3.556V5.334a3.556 3.556 0 0 1 3.556-3.556h21.333a3.556 3.556 0 0 1 3.556 3.556v21.333a3.556 3.556 0 0 1-3.556 3.556m-16-8.89H5.334v5.333h5.333zm16-7.11H12.444v12.444h14.223zm-9.15 6.85-2.039 2.037 2.039 2.039-1.257 1.257-3.295-3.296 3.295-3.295q.63.628 1.257 1.257zm-6.85-6.85H5.334v5.333h5.333zm15.74 3.816-1.257 1.256-2.039-2.037-2.037 2.037-1.257-1.256 3.295-3.296zM10.667 5.333H5.334v5.333h5.333zm8.889 0h-7.112v5.333h7.112zm7.111 0h-5.333v5.333h5.333z'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658h-6.77v6.77h-2.658v-6.77h-6.77v-2.658h6.77v-6.77h2.658v6.77z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M20.94 9.88 19.06 8l-8 8 8 8 1.88-1.88L14.833 16z'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m16 5.333-1.88 1.88 7.44 7.453H5.333v2.667H21.56l-7.44 7.453 1.88 1.88 10.667-10.667L16 5.332z'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M9.333 12.667 16 19.334l6.667-6.667H9.334z'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M19.333 9.333 12.666 16l6.667 6.667V9.334z'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='M12.667 22.667 19.334 16l-6.667-6.667v13.333z'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='M9.333 19.333 16 12.666l6.667 6.667H9.334z'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='m11.727 21.167-5.56-5.56-1.893 1.88 7.453 7.453 16-16-1.88-1.88z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6.667 14.667h18.667v2.667H6.667z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M22.12 11.06 16 17.167 9.88 11.06 8 12.94l8 8 8-8z'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M22.667 9.333h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133c0 1.907-1.307 3.507-3.08 3.973l1.947 1.947c2.173-1.107 3.667-3.32 3.667-5.92a6.67 6.67 0 0 0-6.667-6.667zm-1.334 5.334h-2.92l2.667 2.667h.253zM2.667 5.693 6.814 9.84A6.65 6.65 0 0 0 2.667 16a6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.334a4.136 4.136 0 0 1-4.133-4.133c0-2.12 1.613-3.867 3.68-4.093l2.76 2.76h-.973v2.667h3.64l3.027 3.027v2.307h2.307l5.347 5.333 1.68-1.68L4.362 4.002 2.669 5.695z'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333z'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M26.667 12H5.334v2.667h21.333zM5.333 20h21.333v-2.667H5.333z'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}.ag-icon-column-arrow:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11 4a1 1 0 0 1 1 1v22a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 13a1 1 0 0 1 1-1h23.5a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 4h18v24H2zm2 2v20h14V6zM26.793 13 23 9.207l1.414-1.414L29.621 13l-5.207 5.207L23 16.793z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-un-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' d='M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11'/%3E%3Cpath fill='currentColor' d='M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28zM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972z'/%3E%3C/svg%3E")}.ag-icon-pinned-top:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' d='M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22M3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536'/%3E%3C/svg%3E")}.ag-icon-pinned-bottom:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' d='M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22M12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536'/%3E%3C/svg%3E")}.ag-icon-chevron-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3.479 10.521a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06l-3.47-3.47-3.47 3.47a.75.75 0 0 1-1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.521 5.461a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 1.06-1.06l3.47 3.47 3.47-3.47a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.53 12.512a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 1.06l-3.47 3.47 3.47 3.47a.75.75 0 0 1 0 1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.47 3.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06L8.94 8 5.47 4.53a.75.75 0 0 1 0-1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-filter-add:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M18.666 24h-5.333v-2.667h5.333zM24 17.333H8v-2.667h16zm3.59-9.344h3.221v2.657h-3.22v3.22h-2.656v-3.22h-3.221V7.989h3.22V4.77h2.657zm-8.582 2.678H4V8h15.008z'/%3E%3C/svg%3E")}.ag-icon-edit:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M6.222 25.778h1.611l14.834-14.811-1.611-1.611-14.834 14.81zM4 28v-4.733L22.644 4.656a2.26 2.26 0 0 1 1.567-.634q.423 0 .833.167.412.166.734.478l1.589 1.6q.333.322.483.733t.15.822q0 .423-.161.839-.162.416-.472.728L8.733 28zm17.856-17.833-.8-.811 1.61 1.61z'/%3E%3C/svg%3E")}.ag-icon-search:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M11 2a9 9 0 1 0 0 18 9 9 0 1 0 0-18m0 2a7 7 0 1 1 0 14 7 7 0 1 1 0-14m10.71 16.29-4.35-4.35-1.42 1.42 4.35 4.35Z'/%3E%3C/svg%3E")}`,rp=Jx({feature:"iconSet",css:Xx});import{colorValueToCss as eF,createPart as tF,fontFamilyValueToCss as iF,fontWeightValueToCss as oF,imageValueToCss as sF}from"ag-stack";var rF=e=>{const t=[];if(e.type==="image"){const{icons:i,mask:o}=e;for(const s of Object.keys(i)){const r=sF(i[s]);o?t.push(`.ag-icon-${s}::before { mask-image: ${r}; }`):t.push(`.ag-icon-${s}::before { background-image: ${r}; ${np} }`)}}if(e.type==="font"){const{family:i,weight:o,color:s,icons:r}=e;let n=np;i&&(n+=` font-family: ${iF(i)};`),o&&(n+=` font-weight: ${oF(o)};`),s&&(n+=` color: ${eF(s)};`);for(const a of Object.keys(r))t.push(`.ag-icon-${a}::before { content: ${JSON.stringify(r[a])}; ${n} }`)}return tF({css:t.join(`;
`),cssImports:e.cssImports})},np="background-color: unset; mask-image: unset; -webkit-mask-image: unset;";import{createPart as nF}from"ag-stack";var ap={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<path d="m18 6-12 12"/><path d="m6 6 12 12"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',pdf:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M7 17V12h2.2a1.4 1.4 0 0 1 0 2.8H7"/><path d="M12 17v-5h1.4a2.5 2.5 0 0 1 0 5H12z"/><path d="M17 17v-5h3"/><path d="M17 14h2.5"/>',expanded:'<path d="m15 18-6-6 6-6"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',search:'<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>'},lp={aasc:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2012 8.07928C13.6346 8.0793 14.0128 8.15365 14.3359 8.30193C14.6609 8.45018 14.9141 8.65595 15.0947 8.9201C15.2754 9.18439 15.3683 9.49109 15.374 9.83904H14.1904C14.1676 9.60898 14.0695 9.4303 13.8965 9.30291C13.7235 9.1756 13.4889 9.1115 13.1924 9.1115C12.9909 9.1115 12.8204 9.1404 12.6816 9.19744C12.543 9.25255 12.4364 9.32917 12.3623 9.42791C12.2901 9.52678 12.2539 9.63933 12.2539 9.76482C12.2501 9.8692 12.272 9.9604 12.3193 10.0383C12.3688 10.1162 12.4369 10.1843 12.5225 10.2414C12.6079 10.2964 12.7064 10.3451 12.8184 10.3869C12.9304 10.4268 13.0505 10.4609 13.1777 10.4894L13.7031 10.6144C13.9578 10.6715 14.1914 10.7479 14.4043 10.8429C14.6173 10.938 14.8021 11.0547 14.958 11.1935C15.1138 11.3323 15.2348 11.4957 15.3203 11.6838C15.4077 11.8719 15.4522 12.088 15.4541 12.3312C15.4522 12.6885 15.3611 12.9986 15.1807 13.2609C15.0019 13.5214 14.7427 13.7248 14.4043 13.8693C14.0678 14.0118 13.6617 14.0832 13.1865 14.0832C12.7153 14.0832 12.3048 14.0107 11.9551 13.8664C11.6071 13.7219 11.3345 13.5071 11.1387 13.2238C10.9449 12.9387 10.8435 12.5862 10.834 12.1662H12.0283C12.0416 12.362 12.0984 12.5252 12.1973 12.6564C12.298 12.7857 12.4323 12.8838 12.5996 12.9504C12.7688 13.0149 12.96 13.047 13.1729 13.047C13.3817 13.047 13.563 13.0169 13.7168 12.9562C13.8727 12.8954 13.9935 12.8106 14.0791 12.7023C14.1647 12.5939 14.208 12.469 14.208 12.3283C14.2079 12.1974 14.1686 12.0875 14.0908 11.9982C14.0148 11.9089 13.9022 11.8324 13.7539 11.7697C13.6076 11.707 13.4276 11.6501 13.2148 11.5988L12.5791 11.4387C12.0869 11.3189 11.6982 11.1318 11.4131 10.8771C11.128 10.6224 10.9855 10.2793 10.9873 9.84783C10.9854 9.49418 11.0804 9.18439 11.2705 8.9201C11.4625 8.65603 11.7261 8.45015 12.0605 8.30193C12.3951 8.15369 12.7754 8.07928 13.2012 8.07928Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5.8125 14.0002H4.48926L4.05664 12.6681H1.94824L1.51465 14.0002H0.19043L2.20703 8.15935H3.79883L5.8125 14.0002ZM2.26172 11.7043H3.74316L3.02539 9.49334H2.98047L2.26172 11.7043Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.45215 8.15935C8.88165 8.15935 9.24031 8.22251 9.52734 8.34978C9.81445 8.47717 10.0303 8.65477 10.1748 8.88103C10.3192 9.10536 10.3916 9.36368 10.3916 9.65642C10.3916 9.88452 10.3461 10.085 10.2549 10.258C10.1637 10.4289 10.0384 10.5696 9.87891 10.6799C9.72117 10.7882 9.54024 10.8657 9.33691 10.9113V10.9679C9.55917 10.9775 9.76716 11.0406 9.96094 11.1564C10.1568 11.2724 10.3158 11.4356 10.4375 11.6447C10.5591 11.8519 10.6201 12.099 10.6201 12.3859C10.6201 12.6958 10.5427 12.9727 10.3887 13.216C10.2366 13.4573 10.0113 13.6486 9.71289 13.7892C9.41443 13.9299 9.04655 14.0002 8.60938 14.0002H6.11426V8.15935H8.45215ZM7.34863 12.9904H8.35547C8.69943 12.9904 8.95057 12.9252 9.1084 12.7941C9.26621 12.661 9.34473 12.4834 9.34473 12.2629C9.34468 12.1014 9.30643 11.9587 9.22852 11.8351C9.15056 11.7116 9.03903 11.6145 8.89453 11.5441C8.75195 11.4738 8.58148 11.4387 8.38379 11.4387H7.34863V12.9904ZM7.34863 10.6037H8.26465C8.43369 10.6036 8.58376 10.5737 8.71484 10.5148C8.84793 10.454 8.95227 10.3683 9.02832 10.258C9.10628 10.1477 9.14551 10.0155 9.14551 9.8615C9.14546 9.65055 9.07008 9.48001 8.91992 9.35076C8.77165 9.22169 8.56064 9.15741 8.28711 9.1574H7.34863V10.6037Z" fill="black"/><path d="M7.16602 0.377127C7.44584 0.189493 7.82551 0.20905 8.08496 0.442557L11.418 3.44256C11.7257 3.71966 11.7507 4.19428 11.4736 4.50213C11.1966 4.80961 10.7228 4.83441 10.415 4.55779L7.60938 2.03338L5.11328 4.53045C4.82042 4.82326 4.34562 4.82322 4.05273 4.53045C3.75986 4.23757 3.75989 3.7628 4.05273 3.4699L7.05273 0.4699L7.16602 0.377127Z" fill="black"/></svg>',adesc:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.3867 11.4697C10.6796 11.1771 11.1544 11.1769 11.4473 11.4697C11.7399 11.7626 11.7399 12.2374 11.4473 12.5303L8.44727 15.5303L8.33398 15.623C8.05425 15.8106 7.67449 15.7909 7.41504 15.5576L4.08203 12.5576C3.77415 12.2805 3.74927 11.8059 4.02637 11.498C4.30342 11.1907 4.77722 11.1657 5.08496 11.4424L7.89062 13.9668L10.3867 11.4697Z" fill="black"/><path d="M13.2012 3.0791C13.6346 3.07912 14.0128 3.1535 14.3359 3.30176C14.6611 3.45006 14.9141 3.65661 15.0947 3.9209C15.2752 4.18513 15.3683 4.49104 15.374 4.83887H14.1904C14.1676 4.60882 14.0695 4.43012 13.8965 4.30273C13.7235 4.17546 13.4889 4.11133 13.1924 4.11133C12.9909 4.11133 12.8204 4.14023 12.6816 4.19727C12.5431 4.25236 12.4364 4.32902 12.3623 4.42773C12.2901 4.52659 12.2539 4.63919 12.2539 4.76465C12.2501 4.86901 12.272 4.96023 12.3193 5.03809C12.3688 5.11604 12.4369 5.18417 12.5225 5.24121C12.6079 5.29623 12.7064 5.34496 12.8184 5.38672C12.9304 5.42661 13.0505 5.46075 13.1777 5.48926L13.7031 5.61426C13.9578 5.67128 14.1914 5.74776 14.4043 5.84277C14.6172 5.93784 14.8021 6.05457 14.958 6.19336C15.1139 6.33216 15.2348 6.49633 15.3203 6.68457C15.4076 6.8727 15.4522 7.08885 15.4541 7.33203C15.4521 7.68929 15.3612 7.99944 15.1807 8.26172C15.0019 8.52216 14.7427 8.72465 14.4043 8.86914C14.0678 9.01165 13.6617 9.08301 13.1865 9.08301C12.7153 9.08299 12.3048 9.01057 11.9551 8.86621C11.6072 8.72173 11.3345 8.50786 11.1387 8.22461C10.9447 7.9394 10.8435 7.58622 10.834 7.16602H12.0283C12.0416 7.36176 12.0985 7.52509 12.1973 7.65625C12.298 7.78554 12.4323 7.88365 12.5996 7.9502C12.7688 8.01477 12.96 8.04785 13.1729 8.04785C13.3817 8.04781 13.5629 8.01678 13.7168 7.95605C13.8727 7.89522 13.9935 7.81051 14.0791 7.70215C14.1646 7.59387 14.2079 7.46965 14.208 7.3291C14.208 7.19796 14.1687 7.08739 14.0908 6.99805C14.0148 6.90868 13.9022 6.83228 13.7539 6.76953C13.6076 6.70685 13.4276 6.64993 13.2148 6.59863L12.5791 6.43848C12.0868 6.31871 11.6982 6.13163 11.4131 5.87695C11.1279 5.62221 10.9855 5.27916 10.9873 4.84766C10.9854 4.49404 11.0804 4.18517 11.2705 3.9209C11.4625 3.65661 11.7259 3.45006 12.0605 3.30176C12.3951 3.15353 12.7754 3.0791 13.2012 3.0791Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5.8125 9H4.48926L4.05664 7.66797H1.94824L1.51465 9H0.19043L2.20703 3.15918H3.79883L5.8125 9ZM2.26172 6.7041H3.74316L3.02539 4.49414H2.98047L2.26172 6.7041Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.45215 3.15918C8.88181 3.15918 9.24025 3.22322 9.52734 3.35059C9.81445 3.47798 10.0303 3.6546 10.1748 3.88086C10.3193 4.10518 10.3916 4.36351 10.3916 4.65625C10.3916 4.88432 10.3461 5.08484 10.2549 5.25781C10.1636 5.4289 10.0386 5.57039 9.87891 5.68066C9.72118 5.78898 9.54022 5.86549 9.33691 5.91113V5.96875C9.55913 5.9783 9.76719 6.04044 9.96094 6.15625C10.1568 6.27223 10.3158 6.43538 10.4375 6.64453C10.5591 6.85173 10.6201 7.09875 10.6201 7.38574C10.6201 7.69567 10.5427 7.97245 10.3887 8.21582C10.2366 8.45719 10.0113 8.64841 9.71289 8.78906C9.41442 8.9297 9.04658 8.99999 8.60938 9H6.11426V3.15918H8.45215ZM7.34863 7.99023H8.35547C8.69948 7.99023 8.95057 7.92504 9.1084 7.79395C9.26621 7.66085 9.34473 7.48325 9.34473 7.2627C9.34466 7.10125 9.3064 6.95844 9.22852 6.83496C9.15056 6.71143 9.03899 6.61427 8.89453 6.54395C8.75196 6.47365 8.58145 6.43848 8.38379 6.43848H7.34863V7.99023ZM7.34863 5.60352H8.26465C8.43369 5.60347 8.58376 5.57354 8.71484 5.51465C8.84791 5.45381 8.95228 5.36807 9.02832 5.25781C9.10623 5.14755 9.14551 5.01529 9.14551 4.86133C9.14542 4.65046 9.07002 4.48078 8.91992 4.35156C8.77163 4.22228 8.56087 4.15724 8.28711 4.15723H7.34863V5.60352Z" fill="black"/></svg>',"chevron-down":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 6L8 10L4 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-left":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-right":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L10 8L6 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-up":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 10L8 6L12 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"column-arrow":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 32 32"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 26C0 28.2092 1.79086 30 4 30H14C16.2091 30 18 28.2092 18 26V15H25.8786L24.4394 16.4393C23.8536 17.0251 23.8536 17.9749 24.4394 18.5607C25.0252 19.1464 25.9748 19.1464 26.5606 18.5607L30.5606 14.5607C31.1464 13.9749 31.1464 13.0251 30.5606 12.4393L26.5606 8.43934C25.9748 7.85356 25.0252 7.85356 24.4394 8.43934C23.8536 9.02512 23.8536 9.97488 24.4394 10.5607L25.8786 12H18V6C18 3.79086 16.2091 2 14 2H4C1.79086 2 0 3.79086 0 6V26ZM14 5H10.5V12H15V6C15 5.44772 14.5523 5 14 5ZM4 5H7.5V12H3V6C3 5.44772 3.44772 5 4 5ZM10.5 15H15V26C15 26.5522 14.5523 27 14 27H10.5V15ZM4 27H7.5V15H3V26C3 26.5522 3.44772 27 4 27Z" fill="currentColor"/></svg>',document:'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.66663 14.3333V1.66667C2.66663 1.29848 2.9651 1 3.33329 1H9.33329L13.3333 5V14.3333C13.3333 14.7015 13.0348 15 12.6666 15H3.33329C2.9651 15 2.66663 14.7015 2.66663 14.3333Z" stroke="currentColor" stroke-width="1.33333"/><path d="M12.6667 6H8V1" stroke="currentColor" stroke-width="1.33333"/></svg>',edit:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 10.6262V12.5012H5.375L10.905 6.97122L9.03 5.09622L3.5 10.6262ZM12.355 5.52122C12.4014 5.47497 12.4381 5.42002 12.4632 5.35953C12.4883 5.29905 12.5012 5.23421 12.5012 5.16872C12.5012 5.10324 12.4883 5.0384 12.4632 4.97791C12.4381 4.91742 12.4014 4.86248 12.355 4.81622L11.185 3.64622C11.1387 3.59987 11.0838 3.5631 11.0233 3.53801C10.9628 3.51291 10.898 3.5 10.8325 3.5C10.767 3.5 10.7022 3.51291 10.6417 3.53801C10.5812 3.5631 10.5263 3.59987 10.48 3.64622L9.565 4.56122L11.44 6.43622L12.355 5.52122Z" fill="currentColor"/></svg>',"filter-add":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.12126 7.75L10.8517 7.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M6.65934 11.748L9.32778 11.748" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12.2943 1.04872V6.19184M14.9886 3.74341H9.68478" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M8.25488 3C8.04799 3.18323 7.91706 3.45099 7.91699 3.74902C7.91713 4.04868 8.04988 4.31681 8.25879 4.5H2C1.58579 4.5 1.25 4.16421 1.25 3.75C1.25 3.33579 1.58579 3 2 3H8.25488Z" fill="currentColor"/></svg>',"pinned-bottom":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22ZM12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536Z"/></svg>',"pinned-top":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22ZM3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536Z"/></svg>',"small-down":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>',"small-up":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>',"un-pin":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11Z"/><path fill="currentColor" d="M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904l.589-.825Zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28l2.887-4.044ZM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972L9.277 1Z"/></svg>',fx:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.49158 3.12305H7.50623C6.93834 3.12323 6.44152 3.5064 6.29724 4.05566L5.87439 5.66797H7.48083V7.16797H5.48083L4.06775 12.5527C3.77958 13.6508 2.787 14.417 1.65173 14.417V12.917C2.10521 12.917 2.50147 12.6105 2.61658 12.1719L3.93005 7.16797H2.42419V5.66797H4.32361L4.84607 3.6748C5.16341 2.46608 6.25655 1.62323 7.50623 1.62305H8.49158V3.12305ZM10.6781 7.5293L12.4115 5.91211H14.6097L14.5648 5.9541L11.4808 8.83203L13.4301 12H11.6683L10.3617 9.87598L8.08728 12H5.88904L9.55994 8.57324L7.92224 5.91211H9.68396L10.6781 7.5293Z" fill="currentColor"/></svg>',"values-as":'<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.7631 2.75003C14.3937 4.26881 14.9593 8.21416 13.0263 11.5622C11.0933 14.9103 7.39373 16.3932 4.76312 14.8744C2.13251 13.3556 1.56698 9.41025 3.49998 6.0622C5.43297 2.71416 9.13251 1.23124 11.7631 2.75003ZM11.2631 3.61605C10.0674 2.9257 7.75491 4.69245 6.09805 7.5622C4.4412 10.432 4.06739 13.318 5.26312 14.0084C6.45885 14.6987 8.77133 12.932 10.4282 10.0622C12.085 7.19245 12.4588 4.30641 11.2631 3.61605Z" fill="currentColor"/><path d="M27.1631 17.05C29.7938 18.5688 30.3593 22.5142 28.4263 25.8622C26.4933 29.2103 22.7938 30.6932 20.1631 29.1744C17.5325 27.6556 16.967 23.7103 18.9 20.3622C20.833 17.0142 24.5325 15.5312 27.1631 17.05ZM26.6631 17.9161C25.4674 17.2257 23.1549 18.9924 21.4981 21.8622C19.8412 24.732 19.4674 27.618 20.6631 28.3084C21.8589 28.9987 24.1714 27.232 25.8282 24.3622C27.4851 21.4924 27.8589 18.6064 26.6631 17.9161Z" fill="currentColor"/><path d="M22.7042 2.38759L24.4363 3.38759L9.29419 29.6145L7.56214 28.6145L22.7042 2.38759Z" fill="currentColor"/></svg>'},aF=(e={})=>{let t="";for(const i of[...Object.keys(ap),...Object.keys(lp)]){const o=lF(i,e.strokeWidth);t+=`.ag-icon-${i}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(o)}'); }
`}return t},lF=(e,t=1.5)=>{const i=lp[e];if(i)return i;const o=ap[e];if(!o)throw new Error(`Missing icon data for ${e}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+o+"</svg>"},Ms=(e={})=>nF({feature:"iconSet",css:()=>aF(e)}),dF=Ms({strokeWidth:1}),dp=Ms(),cF=Ms({strokeWidth:2});import{accentColor as uF,backgroundColor as hF,createPart as Ra,foregroundBackgroundMix as gF,foregroundMix as pF}from"ag-stack";var Ea=":where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}.ag-input-field-clear-button{align-items:center;background:transparent;border:0;border-radius:var(--ag-border-radius);color:inherit;cursor:pointer;display:flex;height:var(--ag-icon-size);inset-inline-end:var(--ag-spacing);justify-content:center;padding:0;position:absolute;width:var(--ag-icon-size)}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);min-height:var(--ag-input-height);padding-inline:var(--ag-input-padding-start);&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}.ag-input-field-search-icon{align-items:center;display:inline-flex;inset-inline-start:var(--ag-spacing);opacity:.5;pointer-events:none;position:absolute;--ag-icon-color:var(--ag-input-icon-color)}:where(.ag-input-field-search){.ag-number-field-input,.ag-text-field-input{padding-inline-start:calc(var(--ag-icon-size) + var(--ag-spacing)*2)}}.ag-input-field-input-with-clear-button{padding-inline-end:calc(var(--ag-icon-size) + var(--ag-spacing)*2)}",fF=".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:focus{box-shadow:var(--ag-input-focus-shadow);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}",mF=".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){border-left:none;border-right:none;border-top:none}",xa={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonBorderRadius:{ref:"borderRadius"},pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"},colorPickerThumbSize:18,colorPickerTrackSize:12,colorPickerThumbBorderWidth:3,colorPickerTrackBorderRadius:12,colorPickerColorBorderRadius:4},CF=()=>Ra({feature:"inputStyle",params:xa,css:Ea}),vF=CF(),wF=()=>Ra({feature:"inputStyle",params:{...xa,inputBackgroundColor:hF,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:uF},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:gF(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>Ea+fF}),Ts=wF(),SF=()=>Ra({feature:"inputStyle",params:{...xa,inputBackgroundColor:"transparent",inputBorder:{width:2,color:pF(.3)},inputPaddingStart:{ref:"spacing"},inputFocusBorder:"solid 2px var(--ag-accent-color)",inputDisabledTextColor:{ref:"textColor",mix:.5},inputDisabledBorder:"solid 1px var(--ag-border-color)",inputInvalidBorder:{width:2,color:{ref:"invalidColor",mix:.3}}},css:()=>Ea+mF}),cp=SF();import{accentColor as Fa,backgroundColor as up,createPart as po,foregroundMix as bF}from"ag-stack";var fo='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:solid var(--ag-border-width) var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative}.ag-tab:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}.ag-tab.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}.ag-tab:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}.ag-tab.ag-tab-selected:after{opacity:1}',yF=".ag-tab{border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;border-top:var(--ag-tab-selected-border-width) solid transparent;flex:none;&.ag-tab-selected{border-left-color:var(--ag-tab-selected-border-color);border-right-color:var(--ag-tab-selected-border-color);border-top-color:var(--ag-tab-selected-border-color);margin-bottom:-1px;padding-bottom:calc(var(--ag-tab-bottom-padding) + 1px)}}",mo={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:{ref:"borderWidth"},tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},RF=()=>po({feature:"tabStyle",params:mo,css:fo}),EF=RF(),xF=()=>po({feature:"tabStyle",params:{...mo,tabBarBorder:!0,tabBarBackgroundColor:bF(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:up},css:fo}),hp=xF(),FF=()=>po({feature:"tabStyle",params:{...mo,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabSelectedUnderlineColor:{ref:"primaryColor"},tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:0},css:fo}),gp=FF(),PF=()=>po({feature:"tabStyle",params:{...mo,tabBarBorder:!0,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabHoverTextColor:Fa,tabSelectedTextColor:Fa,tabSelectedUnderlineColor:Fa,tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:"0.3s"},css:fo}),pp=PF(),DF=()=>po({feature:"tabStyle",params:{...mo,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabBarHorizontalPadding:{ref:"spacing"},tabBarTopPadding:{ref:"spacing"},tabBarBorder:!0,tabHorizontalPadding:{calc:"spacing * 2"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:{ref:"spacing"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:up},css:()=>fo+yF}),fp=DF(),MF=".ag-dnd-ghost,.ag-filter-toolpanel-header,.ag-filter-toolpanel-search,.ag-multi-filter-group-title-bar,.ag-panel-title-bar-title,.ag-status-bar{color:var(--ag-header-text-color);font-size:calc(var(--ag-font-size) - 1px);font-weight:600}.ag-column-drop-horizontal{background-color:color-mix(in srgb,var(--ag-background-color),var(--ag-foreground-color) 8%)}:where(.ag-toolbar) .ag-column-drop-horizontal{background-color:transparent}:where(.ag-toolbar) .ag-toolbar-panel{padding-inline:var(--ag-cell-horizontal-padding) 0}.ag-cell.ag-cell-inline-editing{background-color:var(--ag-background-color);background-image:linear-gradient(0deg,var(--ag-input-background-color),var(--ag-input-background-color));border:var(--ag-input-border)!important;border-width:1px!important;height:calc(var(--ag-row-height) + var(--ag-spacing)*3);padding:var(--ag-spacing);:where(.ag-row-last:not(.ag-row-first)) &{bottom:0}:where(.ag-has-focus) &{border:var(--ag-input-focus-border)!important;border-width:1px!important}}.ag-advanced-filter-builder-button,.ag-standard-button{text-transform:uppercase}.ag-status-bar{border:solid var(--ag-border-width) var(--ag-border-color)}.ag-list-item-hovered:after{background-color:var(--ag-primary-color)}.ag-pill-button:hover{color:var(--ag-primary-color)}.ag-filter-add-button,.ag-filter-add-button:hover{border-bottom:2px solid var(--ag-primary-color)}.ag-toolbar-button-wrapper{transition:background-color .2s,color .2s}.ag-toolbar-find,.ag-toolbar-input{border-left:none;border-right:none;border-top:none;box-shadow:none}.ag-toolbar-find:focus-within{border-left:none;border-right:none;border-top:none;box-shadow:none}.ag-toolbar-input-field{border-left:none;border-right:none;border-top:none}.ag-toolbar-input-field:focus{border-left:none;border-right:none;border-top:none;box-shadow:none}",TF=":where(.ag-number-field.ag-paging-number) .ag-input-field-input{padding-bottom:1px}",mp=()=>({fontFamily:[{googleFont:"IBM Plex Sans"},...Ug()]}),AF=()=>Wg({feature:"styleQuartz",css:TF}),IF=AF(),kF=()=>co().withPart(jg).withPart(uo).withPart(go).withPart(dp).withPart(hp).withPart(Ts).withPart(ba).withPart(IF).withParams(mp()),Cp=kF(),vp=()=>({accentColor:"#2196f3",selectedRowBackgroundColor:va(.3),inputFocusBorder:{color:va(.4)},focusShadow:{radius:2,spread:1.6,color:va(.4)},iconButtonHoverBackgroundColor:"transparent",iconButtonActiveBackgroundColor:"transparent",checkboxUncheckedBorderColor:He(.45),checkboxIndeterminateBackgroundColor:He(.45),checkboxIndeterminateBorderColor:He(.45),checkboxBorderWidth:2,checkboxBorderRadius:2,fontSize:13,dataFontSize:14,headerFontWeight:700,borderRadius:3,wrapperBorderRadius:3,tabSelectedUnderlineColor:Kt,tabSelectedBorderWidth:0,tabSelectedUnderlineTransitionDuration:.3,sideButtonSelectedUnderlineColor:Kt,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineTransitionDuration:.3,sideButtonBorder:!1,sideButtonSelectedBorder:!1,sideButtonBarTopPadding:{calc:"spacing * 3"},sideButtonSelectedBackgroundColor:"transparent",sideButtonHoverTextColor:Kt,iconButtonHoverColor:Kt,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonSwitchInset:1,toggleButtonOffBackgroundColor:He(.45),colorPickerThumbSize:13,colorPickerTrackSize:11,colorPickerThumbBorderWidth:2,colorPickerTrackBorderRadius:2,colorPickerColorBorderRadius:2}),LF=()=>co().withPart(Qg).withPart(uo).withPart(go).withPart(sp).withPart(pp).withPart(Ts).withPart(ba).withParams(vp()),VF=LF(),wp=()=>({accentColor:"#0091ea",borderColor:rt(.2),spacing:4,widgetVerticalSpacing:{calc:"max(8px, spacing)"},borderRadius:2,wrapperBorderRadius:2,headerColumnResizeHandleColor:"transparent",headerColumnBorder:!0,headerColumnBorderHeight:"50%",oddRowBackgroundColor:{ref:"chromeBackgroundColor",mix:.5},checkboxBorderRadius:2,checkboxBorderWidth:1,checkboxUncheckedBackgroundColor:ao,checkboxUncheckedBorderColor:He(.5),checkboxCheckedBackgroundColor:ao,checkboxCheckedBorderColor:Kt,checkboxCheckedShapeColor:Kt,checkboxIndeterminateBackgroundColor:ao,checkboxIndeterminateBorderColor:He(.5),checkboxIndeterminateShapeColor:He(.5),focusShadow:{radius:2,spread:1,color:Kt},headerTextColor:rt(.6),iconButtonHoverBackgroundColor:"transparent",iconButtonActiveBackgroundColor:"transparent",fontSize:12,tabSelectedBackgroundColor:ao,headerFontWeight:"bold",toggleButtonWidth:32,toggleButtonHeight:16,toggleButtonSwitchInset:1,toggleButtonOffBackgroundColor:He(.5),sideButtonBorder:!0,sideButtonBarTopPadding:{calc:"spacing * 4"},popupShadow:"5px 5px 10px rgba(0, 0, 0, 0.3)",statusBarLabelColor:rt(.54),statusBarLabelFontWeight:600,statusBarValueFontWeight:600,panelTitleBarIconColor:hi,toolbarTextColor:{ref:"headerTextColor"},colorPickerThumbSize:13,colorPickerTrackSize:11,colorPickerThumbBorderWidth:2,colorPickerTrackBorderRadius:2,colorPickerColorBorderRadius:2}),HF=()=>co().withPart(Zg).withPart(uo).withPart(go).withPart(op).withPart(fp).withPart(Ts).withPart(ya).withParams(wp()),BF=HF(),OF=()=>{const e={tabSelectedUnderlineColor:{ref:"primaryColor"},sideButtonSelectedUnderlineColor:{ref:"primaryColor"},buttonTextColor:{ref:"primaryColor"},rangeSelectionBackgroundColor:{ref:"primaryColor",mix:.2},rangeSelectionBorderColor:{ref:"primaryColor"},rangeSelectionHighlightColor:{ref:"primaryColor",mix:.5},rangeHeaderHighlightColor:{ref:"foregroundColor",mix:.08},rowNumbersSelectedColor:{ref:"primaryColor",mix:.5},inputFocusBorder:{width:2,color:{ref:"primaryColor"}},pickerButtonFocusBorder:{width:1,color:{ref:"primaryColor"}},cellEditingBorder:{color:{ref:"primaryColor"}},menuBackgroundColor:{ref:"backgroundColor"},sideButtonBarBackgroundColor:ao,sideButtonSelectedBackgroundColor:"transparent",sideButtonBarTopPadding:{calc:"spacing * 4"},headerColumnResizeHandleColor:"none",headerBackgroundColor:{ref:"backgroundColor"},rowHoverColor:rt(.08),columnHoverColor:rt(.08),headerCellHoverBackgroundColor:rt(.05),headerTextColor:rt(.615),statusBarLabelColor:rt(.63),statusBarLabelFontWeight:600,statusBarValueFontWeight:600,valueChangeValueHighlightBackgroundColor:"#00acc1",panelTitleBarIconColor:hi,toolbarTextColor:hi,advancedFilterBuilderButtonBarBorder:!1,filterPanelApplyButtonColor:{ref:"buttonTextColor"},filterPanelApplyButtonBackgroundColor:{ref:"buttonBackgroundColor"},columnPanelApplyButtonColor:{ref:"buttonTextColor"},columnPanelApplyButtonBackgroundColor:{ref:"buttonBackgroundColor"},colorPickerThumbSize:13,colorPickerTrackSize:11,colorPickerThumbBorderWidth:2,colorPickerTrackBorderRadius:2,colorPickerColorBorderRadius:2,rowDragIndicatorColor:{ref:"primaryColor"},columnDragIndicatorColor:{ref:"primaryColor"}},t={...e,primaryColor:"#3f51b5",foregroundColor:"#000D",accentColor:"#ff4081",checkboxUncheckedBorderColor:hi,checkboxIndeterminateBackgroundColor:hi,toggleButtonOffBackgroundColor:hi,selectedRowBackgroundColor:"rgba(33, 150, 243, 0.3)"},i={...e,primaryColor:"#3f51b5",foregroundColor:"#fffD",accentColor:"#bb86fc",checkboxUncheckedBorderColor:He(.5),checkboxIndeterminateBackgroundColor:He(.5),toggleButtonOffBackgroundColor:He(.5),selectedRowBackgroundColor:"#bb86fc33"};return Wg({feature:"styleMaterial",css:MF,params:t,modeParams:{light:t,dark:i,"dark-blue":i}})},Sp=OF(),bp=()=>({rowHeight:{calc:"max(iconSize, cellFontSize) + spacing * 3.75 * rowVerticalPaddingScale"},headerHeight:{calc:"max(iconSize, headerFontSize) + spacing * 4.75 * headerVerticalPaddingScale"},widgetVerticalSpacing:{calc:"spacing * 1.75"},cellHorizontalPadding:{calc:"spacing * 3"},buttonHorizontalPadding:{ref:"spacing"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 2"},fontSize:13,iconSize:18,borderRadius:0,wrapperBorderRadius:0,wrapperBorder:!1,menuBorder:!1,dialogBorder:!1,panelTitleBarBorder:!1,tabSelectedBorderWidth:0,tabSelectedUnderlineTransitionDuration:.3,sidePanelBorder:!1,sideButtonSelectedBorder:!1,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineTransitionDuration:.3,sideButtonBorder:!1,buttonBorder:!1,buttonDisabledBorder:!1,focusShadow:{spread:4,color:rt(.16)},fontFamily:[{googleFont:"Roboto"},...Ug()],inputHeight:{calc:"max(iconSize, fontSize) + spacing * 3"},pickerButtonBorder:{width:1,color:"transparent"},headerFontWeight:600,headerFontSize:{calc:"fontSize - 1px"},checkboxBorderWidth:2,checkboxBorderRadius:2,toggleButtonWidth:34,toggleButtonSwitchInset:1,cardShadow:"0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)",popupShadow:"5px 5px 10px rgba(0, 0, 0, 0.3)"}),GF=()=>co().withPart(Kg).withPart(uo).withPart(go).withPart(rp).withPart(gp).withPart(cp).withPart(ya).withPart(Sp).withParams(bp()),NF=GF(),at=(e,t,i)=>({changeKey:e,type:t,defaultValue:i}),_F=at("autoHeightMaxBodyHeight","length",1/0),zF=at("cellHorizontalPadding","length",16),WF=at("cellWidgetSpacing","length",12),UF=at("iconSize","length",16),yp=at("rowHeight","length",42),Rp=at("headerHeight","length",48),Pa=at("rowBorderWidth","border",1),Ep=at("pinnedRowBorderWidth","border",1),qF=at("headerRowBorderWidth","border",1);function xp(e,t){for(const i of t.sort((o,s)=>o.moduleName.localeCompare(s.moduleName))){const o=i.css;o&&e.set(`module-${i.moduleName}`,o)}}var $F=class extends _w{initVariables(){this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(yp),this.getSizeEl(Rp),this.getSizeEl(Pa),this.getSizeEl(Ep),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(Ep)}getRowBorderWidth(){return this.getCSSVariablePixelValue(Pa)}getHeaderRowBorderWidth(){return this.getCSSVariablePixelValue(qF)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(yp)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(Rp)}getAutoHeightMaxBodyHeight(){const e=this.getCSSVariablePixelValue(_F);return e<1/0?e:null}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(zF)}getDefaultCellWidgetSpacing(){return this.getCSSVariablePixelValue(WF)}getDefaultIconSize(){return this.getCSSVariablePixelValue(UF)}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}refreshRowHeightVariable(){const{eRootDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),i=this.gos.get("rowHeight");if(i==null||isNaN(i)||!isFinite(i))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;const o=`${i}px`;return t!=o?(e.style.setProperty("--ag-line-height",o),i):t!=""?Number.parseFloat(t):-1}fireStylesChangedEvent(e){e==="rowBorderWidth"&&this.refreshRowBorderWidthVariable(),e!=="theme"&&this.checkLegacyThemeVariables(),super.fireStylesChangedEvent(e)}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue(Pa);this.eRootDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}postProcessThemeChange(e,t){e&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")?t?this.beans.log.error(106):this.beans.log.error(239):e&&this.checkLegacyThemeVariables()}checkLegacyThemeVariables(){this.beans.validation?.checkLegacyThemeVariables(this.eRootDiv)}getAdditionalCss(){const e=new Map;return e.set("core",[vx]),xp(e,Array.from(K3())),e}getDefaultTheme(){return Cp}varError(e,t){this.beans.log.warn(9,{variable:{cssName:e,defaultValue:t}})}themeError(e){this.beans.log.error(240,{theme:e})}shadowRootError(){this.beans.log.error(293)}};import{BaseEventService as KF}from"ag-stack";var jF=class extends zw{postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}};import{KeyCode as Da,_focusInto as QF,_getActiveDomElement as Ma,_last as Ta,_makeNull as Aa,_registerKeyboardFocusEvents as ZF}from"ag-stack";import{_getDocument as YF,_last as Ia}from"ag-stack";function ka(e,t,i){const o=e.visibleCols.headerGroupRowCount;if(i>=o)return{column:t,headerRowIndex:i};let s=t.parent;for(;s&&s.getProvidedColumnGroup().getLevel()>i;)s=s.parent;const r=t.isSpanHeaderHeight();return!s||r&&s.isPadding()?{column:t,headerRowIndex:o}:{column:s,headerRowIndex:s.getProvidedColumnGroup().getLevel()}}var JF=class extends y{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,i=>{this.gridBodyCon=i.gridBodyCtrl});const t=YF(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let i;const{colModel:o,ctrlsSvc:s}=this.beans;if(typeof e=="string"?i=o.getCol(e)??o.colsGroupsById.get(e)?.displayInstances?.[0]??null:i=e,!i)return null;const n=s.getHeaderRowContainerCtrl()?.getAllCtrls(),a=Ia(n||[]).type==="filter",l=Pe(this.beans)-1;let d=-1,c=i;for(;c;)d++,c=c.parent;let u=d;return t&&a&&u===l-1&&u++,u===-1?null:{headerRowIndex:u,column:i}}navigateVertically(e,t){const{focusSvc:i,visibleCols:o}=this.beans,{focusedHeader:s}=i;if(!s)return!1;const{headerRowIndex:r}=s,n=s.column,a=Pe(this.beans),l=this.getHeaderRowType(r),d=o.headerGroupRowCount;let{headerRowIndex:c,column:u,headerRowIndexWithoutSpan:h}=e==="UP"?XF(l,n,r):e6(n,r,d),g=!1;return c<0&&(c=0,u=n,g=!0),c>=a?(c=-1,this.currentHeaderRowWithoutSpan=-1):h!==void 0&&(this.currentHeaderRowWithoutSpan=h),!g&&!u?!1:i.focusHeaderPosition({headerPosition:{headerRowIndex:c,column:u},allowUserOverride:!0,event:t})}navigateHorizontally(e,t=!1,i){const{focusSvc:o,gos:s}=this.beans;if(!o.focusedHeader)return!1;const r={...o.focusedHeader};let n,a;this.currentHeaderRowWithoutSpan!==-1?r.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=r.headerRowIndex,e==="LEFT"!==s.get("enableRtl")?(a="Before",n=this.findHeader(r,a)):(a="After",n=this.findHeader(r,a));const l=s.getCallback("tabToNextHeader");if(t&&l){const d=o.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:n,direction:a});if(d){const{headerRowIndex:c}=o.focusedHeader||{};c!=null&&c!=r.headerRowIndex&&(this.currentHeaderRowWithoutSpan=c)}return d}return n||!t?o.focusHeaderPosition({headerPosition:n,direction:a,fromTab:t,allowUserOverride:!0,event:i}):this.focusNextHeaderRow(r,a,i)}focusNextHeaderRow(e,t,i){const o=this.beans,s=e.headerRowIndex;let r,n;const a=Pe(o),l=this.beans.visibleCols.allCols;if(t==="Before"){if(s<=0)return!1;r=Ia(l),n=s-1,this.currentHeaderRowWithoutSpan-=1}else r=l[0],n=s+1,this.currentHeaderRowWithoutSpan<a?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1;let{column:d,headerRowIndex:c}=ka(this.beans,r,n);return c>=a&&(c=-1),o.focusSvc.focusHeaderPosition({headerPosition:{column:d,headerRowIndex:c},direction:t,fromTab:!0,allowUserOverride:!0,event:i})}scrollToColumn(e,t="After"){if(e.getPinned())return;let i;if(Ee(e)){const o=e.getDisplayedLeafColumns();i=t==="Before"?Ia(o):o[0]}else i=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(i)}findHeader(e,t){const{visibleCols:i}=this.beans;let o=e.column;if(o instanceof di){const a=o.getDisplayedLeafColumns();o=t==="Before"?a[0]:a[a.length-1]}const s=t==="Before"?i.getColBefore(o):i.getColAfter(o);if(!s)return;const r=i.headerGroupRowCount;if(e.headerRowIndex>=r)return{headerRowIndex:e.headerRowIndex,column:s};const n=Mc(s,e.headerRowIndex);return n?n.isPadding()&&s.isSpanHeaderHeight()?{headerRowIndex:i.headerGroupRowCount,column:s}:{headerRowIndex:e.headerRowIndex,column:n??s}:{headerRowIndex:s instanceof kt&&s.isSpanHeaderHeight()?i.headerGroupRowCount:e.headerRowIndex,column:s}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}};function XF(e,t,i){const o=i-1;if(e!=="filter"){const s=t instanceof kt&&t.isSpanHeaderHeight();let r=t.parent;for(;r&&(r.getProvidedColumnGroup().getLevel()>o||s&&r.isPadding());)r=r.parent;if(r)return s?{column:r,headerRowIndex:r.getProvidedColumnGroup().getLevel(),headerRowIndexWithoutSpan:o}:{column:r,headerRowIndex:o,headerRowIndexWithoutSpan:o}}return{column:t,headerRowIndex:o,headerRowIndexWithoutSpan:o}}function e6(e,t,i){const o=t+1,s={column:e,headerRowIndex:o,headerRowIndexWithoutSpan:o};if(e instanceof di){if(o>=i)return{column:Ot(e,!0,!1),headerRowIndex:i,headerRowIndexWithoutSpan:o};let n=e.displayedChildren[0];if(n instanceof di&&n.isPadding()){const l=Ot(n,!0,!1);l?.isSpanHeaderHeight()&&(n=l)}s.column=n,n instanceof kt&&n.isSpanHeaderHeight()&&(s.headerRowIndex=i,s.headerRowIndexWithoutSpan=o)}return s}var t6=class extends y{constructor(){super(...arguments),this.beanName="focusSvc",this.focusFallbackTimeout=null,this.needsFocusRestored=!1}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols,this.rowRenderer=e.rowRenderer,this.navigation=e.navigation,this.filterManager=e.filterManager,this.overlays=e.overlays}postConstruct(){const e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(ZF(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,this.focusFallbackTimeout!=null&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,this.focusFallbackTimeout!=null&&(clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null)}shouldTakeFocus(){return this.gos.get("suppressFocusAfterRefresh")?(this.setFocusRecovered(),!1):this.needsFocusRestored?(this.setFocusRecovered(),!0):this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;const e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){const{gos:e,focusedCell:t}=this;return e.get("suppressFocusAfterRefresh")||e.get("suppressCellFocus")||!t||!this.doesRowOrCellHaveBrowserFocus()?null:t}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader||!this.isDomDataPresentInHierarchy(Ma(this.beans),wn)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){const e=Ma(this.beans);return this.isDomDataPresentInHierarchy(e,ls,!0)?!0:this.isDomDataPresentInHierarchy(e,cs,!0)}isDomDataPresentInHierarchy(e,t,i){let o=e;for(;o;){const s=Gd(this.gos,o,t);if(s)return s.destroyed&&i?(this.attemptToRecoverFocus(),!1):!0;o=o.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){const{rowIndex:t,rowPinned:i,column:o}=e,s={rowIndex:t,rowPinned:i,column:o,isFullWidthCell:!1},r=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i});return r&&(s.isFullWidthCell=r.isFullWidth()),s}clearFocusedCell(){if(this.focusedCell==null)return;const e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){this.setFocusRecovered();const{column:t,rowIndex:i,rowPinned:o,forceBrowserFocus:s=!1,preventScrollOnBrowserFocus:r=!1,sourceEvent:n}=e,a=this.colModel.getCol(t);if(!a){this.focusedCell=null;return}this.focusedCell={rowIndex:i,rowPinned:Aa(o),column:a};const l=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:"cellFocused",...l,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:s,preventScrollOnBrowserFocus:r,sourceEvent:n}),this.previousCellFocusParams=l}isCellFocused(e){return this.focusedCell==null?!1:es(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;const{column:t,rowCtrl:{rowIndex:i}}=e,{column:o,headerRowIndex:s}=this.focusedHeader;return t===o&&i===s}focusHeaderPosition(e){if(this.setFocusRecovered(),ve(this.beans))return!1;const{direction:t,fromTab:i,allowUserOverride:o,event:s,fromCell:r,rowWithoutSpanValue:n,scroll:a=!0}=e;let{headerPosition:l}=e;if(r&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(l);if(o){const d=this.focusedHeader,c=Pe(this.beans);if(i){const u=this.gos.getCallback("tabToNextHeader");u&&(l=this.getHeaderPositionFromUserFunc({userFunc:u,direction:t,currentPosition:d,headerPosition:l,headerRowCount:c}))}else{const u=this.gos.getCallback("navigateToNextHeader");if(u&&s){const h={key:s.key,previousHeaderPosition:d,nextHeaderPosition:l,headerRowCount:c,event:s},g=u(h);l=g===null?d:g}}}return l?this.focusProvidedHeaderPosition({headerPosition:l,direction:t,event:s,fromCell:r,rowWithoutSpanValue:n,scroll:a}):!1}focusHeaderPositionFromUserFunc(e){if(ve(this.beans))return!1;const{userFunc:t,headerPosition:i,direction:o,event:s}=e,r=this.focusedHeader,n=Pe(this.beans),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:o,currentPosition:r,headerPosition:i,headerRowCount:n});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:o,event:s})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:i,currentPosition:o,headerPosition:s,headerRowCount:r}=e,a=t({backwards:i==="Before",previousHeaderPosition:o,nextHeaderPosition:s,headerRowCount:r});return a===!0?o:a===!1?null:a}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:i,fromCell:o,rowWithoutSpanValue:s,event:r,scroll:n=!0}=e,{column:a,headerRowIndex:l}=t,{filterManager:d,ctrlsSvc:c,headerNavigation:u}=this.beans;if(this.isDomDataPresentInHierarchy(Ma(this.beans),wn)&&this.focusedHeader&&yS(e.headerPosition,this.focusedHeader))return!1;if(l===-1)return d?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:a,event:r});n&&u?.scrollToColumn(a,i);const p=c.getHeaderRowContainerCtrl()?.focusHeader(t.headerRowIndex,a,r)||!1;return u&&p&&(s!=null||o)&&(u.currentHeaderRowWithoutSpan=s??-1),p}focusFirstHeader(){if(this.overlays?.exclusive&&this.focusOverlay())return!0;const e=this.visibleCols.allCols[0];if(!e)return!1;const t=ka(this.beans,e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.exclusive&&this.focusOverlay(!0))return!0;const t=Pe(this.beans)-1,i=Ta(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:i},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return this.focusedCell==null?!1:this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===Aa(t)}focusOverlay(e){const t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&QF(t,e)}getDefaultTabToNextGridContainerTarget(e){const{backwards:t,focusableContainers:i}=e,o=t?-1:1;let s;const r=()=>(s===void 0&&(s=this.getGridBodyTabTarget(t)),s);for(let n=e.nextIndex;n>=0&&n<i.length;n+=o){const a=mS(i[n],r);if(a)return a}return null}getGridBodyTabTarget(e){if(e)return this.getGridViewTabTarget({column:Ta(this.visibleCols.allCols),backwards:!0});const t=this.visibleCols.allCols[0];return this.gos.get("headerHeight")===0||ve(this.beans)?this.getGridViewTabTarget({column:t}):t?ka(this.beans,t,0):null}getGridViewTabTarget(e){const{backwards:t=!1}=e,i=e.column??this.focusedHeader?.column;if(!i||this.overlays?.exclusive)return null;if($i(this.beans))return t&&!ve(this.beans)?{headerRowIndex:Pe(this.beans)-1,column:i}:null;const o=t?sn(this.beans):on(this.beans);if(o?.rowIndex==null){if(this.overlays?.isVisible())return null;if(t&&!ve(this.beans)){const r=Ta(this.visibleCols.allCols);if(r)return{headerRowIndex:Pe(this.beans)-1,column:r}}return null}const s=Fe(this.beans,o);return!s||i.isSuppressNavigable(s)||t&&this.rowRenderer.getRowByPosition(o)?.isFullWidth()?null:{rowIndex:o.rowIndex,rowPinned:o.rowPinned,column:i}}focusGridView(e){const{backwards:t=!1,canFocusOverlay:i=!0,event:o}=e;if(this.overlays?.exclusive)return i&&this.focusOverlay(t);if($i(this.beans))return t&&!ve(this.beans)?this.focusLastHeader():i&&this.focusOverlay(t)?!0:t?!1:Nt(this.beans,t);const s=t?sn(this.beans):on(this.beans);if(s){const r=e.column??this.focusedHeader?.column,{rowIndex:n,rowPinned:a}=s,l=Fe(this.beans,s);if(!r||!l||n==null)return!1;if(r.isSuppressNavigable(l)){if(ut(this.gos,l))return t&&!ve(this.beans)?this.focusLastHeader():i&&this.focusOverlay(t);const d=this.gos.get("enableRtl");let c;return!o||o.key===Da.TAB?c=d?Da.LEFT:Da.RIGHT:c=o.key,this.beans.navigation?.navigateToNextCell(null,c,{rowIndex:n,column:r,rowPinned:a||null},!0),!0}return this.navigation?.ensureCellVisible({rowIndex:n,column:r,rowPinned:a}),t&&this.rowRenderer.getRowByPosition(s)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(s,t)||(this.setFocusedCell({rowIndex:n,column:r,rowPinned:Aa(a),forceBrowserFocus:!0}),Re(r)||this.beans.rangeSvc?.setRangeToCell({rowIndex:n,rowPinned:a,column:r})),!0}return!!(i&&this.focusOverlay(t)||t&&this.focusLastHeader())}focusAdvancedFilter(e){return this.advFilterFocusColumn=e?.column,this.beans.advancedFilter?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(e,t){const i=(t?void 0:this.advFilterFocusColumn)??this.visibleCols.allCols?.[0];return e?this.focusHeaderPosition({headerPosition:{column:i,headerRowIndex:Pe(this.beans)-1}}):this.focusGridView({column:i})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}};import{_getScrollbarWidth as i6,_isInvisibleScrollbar as Fp}from"ag-stack";var o6=class extends y{constructor(){super(...arguments),this.beanName="scrollVisibleSvc",this.refreshTimer=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}destroy(){window.clearTimeout(this.refreshTimer),super.destroy()}postConstruct(){const{gos:e}=this;this.horizontalScrollShowing=e.get("alwaysShowHorizontalScroll")===!0,this.verticalScrollShowing=e.get("alwaysShowVerticalScroll")===!0,this.getScrollbarWidth();const t=this.refresh.bind(this);this.addManagedEventListeners({displayedColumnsChanged:t,displayedColumnsWidthChanged:t,newColumnsLoaded:t})}refresh(){this.refreshImpl(),window.clearTimeout(this.refreshTimer),this.refreshTimer=window.setTimeout(()=>this.refreshImpl(),500)}isHorizontalScrollShowing(){return this.horizontalScrollShowing}isVerticalScrollShowing(){return this.verticalScrollShowing}refreshImpl(){const{colAnimation:e}=this;e?.isActive()?e.executeLaterVMTurn(()=>{e.executeLaterVMTurn(()=>this.refreshScrollState())}):this.refreshScrollState()}refreshScrollState(){const e=this.ctrlsSvc.getGridBodyCtrl();if(!this.isAlive()||!e||this.colAnimation?.isActive())return;const t=this.calculateScrollVisibilityState(e);this.applyScrollVisibility(t),this.applyScrollGap(this.calculateScrollGapState(e,t.verticalScrollShowing))}calculateScrollVisibilityState(e){const t=this.calculateVerticalScrollShowing(e,!1),i=this.calculateHorizontalScrollShowing(e,t),o=t||i&&this.calculateVerticalScrollShowing(e,!0);return{horizontalScrollShowing:i,verticalScrollShowing:o}}calculateVerticalScrollShowing(e,t){if(this.gos.get("alwaysShowVerticalScroll"))return!0;if(!No(this.beans))return!1;const o=e.eGridViewport.clientHeight+this.getAppliedHorizontalScrollbarLayoutHeight()-this.getHorizontalScrollbarLayoutHeight(t),s=e.getBodyViewportHeight(o);return(this.beans.rowContainerHeight.uiContainerHeight??0)-s>.5}getHorizontalScrollbarLayoutHeight(e){return!e||this.gos.get("suppressHorizontalScroll")||Fp()?0:this.getScrollbarWidth()||0}getAppliedHorizontalScrollbarLayoutHeight(){if(this.gos.get("suppressHorizontalScroll")||Fp())return 0;const e=Number.parseFloat(this.ctrlsSvc.get("fakeHScrollComp")?.getGui().style.height??"");return Number.isFinite(e)?e:0}calculateHorizontalScrollShowing(e,t){return this.gos.get("alwaysShowHorizontalScroll")?!0:e.getHorizontalContentWidth(t)-e.getHorizontalViewportWidth()>.5}calculateScrollGapState(e,t){const{rowContainerHeight:i}=this.beans,o=e.getColumnsWidth(),s=e.getViewportWidthWithoutScrollbar(t),r=i.getAdjustedUiContainerHeight()??0,n=e.getBodyViewportHeight(e.eGridViewport.clientHeight);return{horizontalScrollGap:o<s-.5,verticalScrollGap:r<n-.5}}applyScrollGap({horizontalScrollGap:e,verticalScrollGap:t}){(this.horizontalScrollGap!==e||this.verticalScrollGap!==t)&&(this.horizontalScrollGap=e,this.verticalScrollGap=t,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}applyScrollVisibility(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(this.scrollbarWidth==null){const e=this.gos.get("scrollbarWidth"),i=typeof e=="number"&&e>=0?e:i6();i!=null&&(this.scrollbarWidth=i,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},s6=class extends y{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;const{stateSvc:e,ctrlsSvc:t,context:i}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:e?.getState()??{}}),this.destroyCalled=!0,t.get("gridCtrl")?.destroyGridUi(),i.destroy(),super.destroy()}};import{LocalEventService as r6,_exists as Pp}from"ag-stack";var La=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnHeaderNameChanged","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","pinnedRowsChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","calculatedColumnCreated","calculatedColumnExpressionChanged","calculatedColumnRemoved","calculatedColumnValidationStateChanged","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterUiChanged","filterOpened","floatingFilterUiChanged","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged","rowResizeStarted","rowResizeEnded","columnsReset","bulkEditingStarted","bulkEditingStopped","batchEditingStarted","batchEditingStopped","issueRaised"],n6=["scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","gridViewportWidthChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","scrollGapChanged","columnHoverChanged","flashCells","rowDragVisibilityChanged","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","stylesChanged","storeUpdated","filterDestroyed","filterHandlerDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","stickyBottomOffsetChanged","overlayExclusiveChanged","rowNodeDataChanged","cellEditValuesChanged","filterSwitched","filterClosed","headerRowsChanged","rowExpansionStateChanged","showRowGroupColsSetChanged","columnHeaderEditHighlightChanged","columnShowValuesAsChanged"],a6=()=>[...La,...n6],Co=new Set(["gridPreDestroyed","fillStart","pasteStart","issueRaised"]),As=La.reduce((e,t)=>(e[t]=Jd(t),e),{});function l6(e){return e?.calculatedExpression!==void 0}function Dp(e){return e!=null&&e!==!1}function d6(e){return e===void 0?void 0:e??""}function Va(e,t,i,o){o?e.deprecated(t,i):e.warn(t,i)}function N(e,t){return{errorId:e,emit:i=>Va(i,e,t,!1)}}function Mp(e,t){return{errorId:e,emit:i=>Va(i,e,t,!0)}}function Tp(e,t){typeof e=="string"?Va(t,322,{message:e},!1):e.emit(t)}var c6=["__ob__","__v_skip","__metadata__"];function Ap(e,t,i){return new Set([...c6,...i??[],...Object.keys(t),...e])}var fi={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agExportingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agNoMatchingRowsOverlay:"Overlay",agFileInputOverlay:"FileInputOverlay",agErrorOverlay:"Validation",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agBigIntColumnFilter:"BigIntFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agBigIntColumnFloatingFilter:"BigIntFilter",agDateColumnFloatingFilter:"DateFilter",agFormulaCellEditor:"Formula",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agNewFiltersToolPanel:"NewFiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find",agButtonToolbarItem:"Toolbar",agFindToolbarItem:"Toolbar",agMenuToolbarItem:"Toolbar",agPivotPanelToolbarItem:"Toolbar",agQuickFilterToolbarItem:"Toolbar",agRowGroupPanelToolbarItem:"Toolbar"};function Ip(e){return`"${e}"`}var u6=()=>({checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."},rowGroupingHierarchy:{version:"34.3",message:"Use `colDef.groupHierarchy` instead."},headerTooltipValueGetter:{version:"36.2",message:"Use `headerTooltip` with a callback instead."},tooltipField:{version:"36.2",message:"Use `tooltip` with a callback instead."},tooltipValueGetter:{version:"36.2",message:"Use `tooltip` with a callback instead."}}),h6={allowFormula:"Formula",calculatedExpression:"CalculatedColumns",aggFunc:"SharedAggregation",showValuesAs:"ShowValuesAs",initialShowValuesAs:"ShowValuesAs",showValuesAsDef:"ShowValuesAs",enableShowValuesAs:"ShowValuesAs",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:e,editable:t,groupRowEditable:i})=>!!t||!!i?typeof e=="string"?fi[e]??"CustomEditor":"CustomEditor":null,cellRenderer:({cellRenderer:e})=>typeof e!="string"?null:fi[e],cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:e,cellEditor:t})=>e&&!t?"TextEditor":null,groupRowEditable:({groupRowEditable:e,cellEditor:t})=>e?t?"RowGroupingEdit":["RowGroupingEdit","TextEditor"]:null,groupRowValueSetter:({groupRowValueSetter:e})=>e?"RowGroupingEdit":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:e})=>e&&typeof e!="string"&&typeof e!="boolean"?"CustomFilter":typeof e=="string"?fi[e]??"ColumnFilter":"ColumnFilter",floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",headerTooltipValueGetter:"Tooltip",mainMenuItems:"ColumnMenu",columnMenuItems:["ColumnMenu","ColumnsToolPanel"],menuTabs:e=>{const t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some(i=>t.includes(i))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",pivotSort:"SharedPivot",initialPivotSort:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltip:"Tooltip",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",tooltipComponentSelector:"Tooltip",spanRows:"CellSpan",groupHierarchy:"SharedRowGrouping"},g6=()=>({autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(t,{paginationAutoPageSize:i})=>i?N(318,{feature:"`colDef.autoHeight`",conflictsWith:"`paginationAutoPageSize`"}):null},allowFormula:{supportedRowModels:["clientSide"]},showValuesAs:{supportedRowModels:["clientSide"]},initialShowValuesAs:{supportedRowModels:["clientSide"]},showValuesAsDef:{supportedRowModels:["clientSide"]},enableShowValuesAs:{supportedRowModels:["clientSide"]},calculatedExpression:{validate:(t,i)=>l6(t)?Dp(i.calculatedColumns)?t.pivotValueColumn?null:t.colId?t.field||t.valueGetter||t.valueSetter?"colDef.calculatedExpression is used as the value source and should not be combined with field, valueGetter or valueSetter.":t.editable?"colDef.calculatedExpression columns are read-only and should not be combined with editable.":null:N(319,{feature:"`colDef.calculatedExpression`",requirement:"`colId` to be set on the calculated column"}):N(319,{feature:"`colDef.calculatedExpression`",requirement:"`gridOptions.calculatedColumns` to be set to true or an options object"}):null},cellRendererParams:{validate:t=>(t.rowGroup!=null||t.rowGroupIndex!=null||t.cellRenderer==="agGroupCellRenderer")&&"checkbox"in t.cellRendererParams?Mp(306,{version:"33.0",name:"cellRendererParams.checkbox",message:'Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.'}):null},flex:{validate:(t,i)=>i.autoSizeStrategy?N(318,{feature:"`colDef.flex`",conflictsWith:"`gridOptions.autoSizeStrategy`"}):null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(t,{rowSelection:i})=>i==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:i})=>i==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:i})=>i==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:t=>{const i=t.headerValueGetter;return typeof i=="function"||typeof i=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:t})=>{if(t){if(t.smallDown)return Me(262);if(t.smallLeft)return Me(263);if(t.smallRight)return Me(264)}return null}},sort:{validate:t=>Lt(t.sort)||pt(t.sort)?null:`sort must be of type (SortDirection | SortDef), currently it is ${typeof t.sort=="object"?JSON.stringify(t.sort):Wn(t.sort)}`},initialSort:{validate:t=>Lt(t.initialSort)||pt(t.initialSort)?null:`initialSort must be of non-null type (SortDirection | SortDef), currently it is ${typeof t.initialSort=="object"?JSON.stringify(t.initialSort):Wn(t.initialSort)}`},sortingOrder:{validate:t=>{const i=t.sortingOrder;if(Array.isArray(i)&&i.length>0){const o=i.filter(s=>!(Lt(s)||pt(s)));if(o.length>0)return N(324,{property:"sortingOrder",invalidItems:o})}else if(!Array.isArray(i)||!i.length)return N(325,{property:"sortingOrder",value:i});return null}},type:{validate:t=>{const i=t.type;return i instanceof Array?i.some(s=>typeof s!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof i=="string"?null:N(321,{property:"colDef.type",expected:"of type `string` | `string[]`"})}},rowSpan:{validate:(t,{suppressRowTransform:i})=>i?null:N(319,{feature:"`colDef.rowSpan`",requirement:"`suppressRowTransform` to be enabled"})},spanRows:{dependencies:{editable:{required:[!1,void 0]},groupRowEditable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(t,{rowSelection:i,cellSelection:o,enableCellSpan:s,rowDragEntireRow:r,enableCellTextSelection:n})=>typeof i=="object"&&i?.mode==="singleRow"&&i?.enableClickSelection?N(318,{feature:"`colDef.spanRows`",conflictsWith:"`rowSelection.clickSelection`"}):o?N(318,{feature:"`colDef.spanRows`",conflictsWith:"`cellSelection`"}):s?r?N(318,{feature:"`colDef.spanRows`",conflictsWith:"`rowDragEntireRow`"}):n?N(318,{feature:"`colDef.spanRows`",conflictsWith:"`enableCellTextSelection`"}):null:N(319,{feature:"`colDef.spanRows`",requirement:"`enableCellSpan` to be enabled"})},groupHierarchy:{validate(t,{groupHierarchyConfig:i={}},o){const s=new Set(["year","quarter","month","formattedMonth","day","hour","minute","second"]),r=[];for(const n of t.groupHierarchy??[]){if(typeof n=="object"){o.validation?.validateColDef(n);continue}!s.has(n)&&!(n in i)&&r.push(Ip(n))}if(r.length>0){const n=`The following parts of colDef.groupHierarchy are not recognised: ${r.join(", ")}.`,a=`Choose one of ${[...s].map(Ip).join(", ")}, or define your own parts in gridOptions.groupHierarchyConfig.`;return`${n}
${a}`}return null}}}),p6={headerName:void 0,headerNameEditable:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltip:void 0,tooltipField:void 0,headerTooltip:void 0,headerTooltipValueGetter:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,valueIndex:void 0,initialValueIndex:void 0,groupRowEditable:void 0,groupRowValueSetter:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,calculatedExpression:void 0,showValuesAs:void 0,initialShowValuesAs:void 0,showValuesAsDef:void 0,enableShowValuesAs:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,pivotSort:void 0,initialPivotSort:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,tooltipComponentSelector:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,columnMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0,rowGroupingHierarchy:void 0,groupHierarchy:void 0,allowFormula:void 0,suppressNoteActions:void 0},f6=()=>Object.keys(p6),kp,m6=()=>kp??(kp=(()=>{const e=f6(),t=u6();return{objectName:"colDef",allProperties:e,allValidNames:Ap(e,t),docsUrl:"column-properties/",deprecations:t,validations:g6()}})()),Lp=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","noteTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","invalidEditValueMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce","renderingMode"],C6=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","defaultPdfExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","activeOverlayParams","popupParent","themeStyleContainer","toolbar","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","advancedFilterParams","formulaDataSource","formulaFuncs","notesDataSource","calculatedColumns","columnHeaderEdit","initialState","autoSizeStrategy","selectionColumnDef","findOptions","filterHandlers","groupHierarchyConfig"],v6=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector","paginationPanels","suppressOverlays"],Ha=["rowHeight","detailRowHeight","rowBuffer","stickyRowsMaxViewportRatio","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","masterDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipSwitchShowDelay","tooltipHideDelay","noteShowDelay","noteHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","contentVisibilityAutoDelay","tabIndex","pivotMaxGeneratedColumns","rowDragInsertDelay"],w6=["theme","rowSelection"],Ba=["autoGenerateColumnDefs","cellSelection","sideBar","rowNumbers","loadingRows","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],Oa=["loading","loadThemeGoogleFonts","suppressInputClearButton","enableInputAutoComplete","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","refreshAfterGroupEdit","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupHideColumnsUntilExpanded","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","suppressPdfExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressContentVisibilityAuto","enableContentVisibilityAuto","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","includeHiddenColumnsInCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","pivotPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault","enableFilterHandlers","suppressStartEditOnTab","hidePaddedHeaderRows","ssrmExpandAllAffectsAllRows","animateColumnResizing"],Vp=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","processFileInput","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","overlayComponent","loadingOverlayComponent","noRowsOverlayComponent","overlayComponentSelector","activeOverlay","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getFullRowEditValidationErrors","getContextMenuItems","getMainMenuItems","getColumnMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","tabToNextGridContainer","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","isMasterOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter","isRowPinnable","isRowPinned","isRowValidDropPosition","processAutoGeneratedColumnDefs"],Hp=()=>[...v6,...C6,...Lp,...Ha,...Vp,...Oa,...Ba,...w6],S6=()=>[...Lp,...Ha,...Vp,...Oa,...Ba],b6=()=>({suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."},suppressAdvancedFilterEval:{version:"34",message:"Advanced filter no longer uses function evaluation, so this option has no effect."},suppressContentVisibilityAuto:{version:"36.1",message:"Use `enableContentVisibilityAuto` instead."}});function $e(e,t,i){return typeof t=="number"||t==null?t==null||t>=i?null:N(317,{property:String(e),min:i}):`${e}: value should be a number`}var y6={autoGenerateColumnDefs:"AutoGenerateColumns",processFileInput:"FileInputOverlay",alignedGrids:"AlignedGrids",allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",calculatedColumns:"CalculatedColumns",columnHeaderEdit:"ColumnHeaderEdit",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",invalidEditValueMode:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getFullRowEditValidationErrors:"EditCore",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getColumnMenuItems:["ColumnMenu","ColumnsToolPanel"],getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:(e,t)=>t.rowModelType==="serverSide"?"ServerSideRowModel":"RowGrouping",grandTotalRow:["CsrmHierarchy","ServerSideRowModel"],initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isMasterOpenByDefault:"MasterDetail",isRowPinnable:"PinnedRow",isRowPinned:"PinnedRow",localeText:"Locale",masterDefaultExpanded:"MasterDetail",masterDetail:(e,t)=>t.rowModelType==="serverSide"?"ServerSideRowModel":"MasterDetail",notesDataSource:"Notes",pagination:"Pagination",pinnedBottomRowData:"PinnedRow",pinnedTopRowData:"PinnedRow",pivotMode:(e,t)=>t.rowModelType==="serverSide"?"ServerSideRowModel":"Pivot",pivotPanelShow:"RowGroupingPanel",quickFilterText:"QuickFilter",rowClass:"RowStyle",rowClassRules:"RowStyle",rowData:"ClientSideRowModel",rowDragManaged:"RowDrag",refreshAfterGroupEdit:["RowGrouping","TreeData"],rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:(e,t)=>t.rowModelType==="serverSide"?"ServerSideRowModel":"RowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:(e,t)=>t.rowModelType==="serverSide"?"ServerSideRowModel":"TreeData",toolbar:"Toolbar",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},R6=()=>{const e={autoSizePadding:{validate({autoSizePadding:i}){return $e("autoSizePadding",i,0)}},calculatedColumns:{validate({calculatedColumns:i}){if(i==null||typeof i=="boolean")return null;if(typeof i!="object"||Array.isArray(i))return N(321,{property:"calculatedColumns",expected:"a boolean or an object"});const{dataTypes:o,expressionPickers:s,applyMode:r}=i;if(o!=null&&(!Array.isArray(o)||o.some(n=>typeof n!="string")))return N(321,{property:"calculatedColumns.dataTypes",expected:"an array of strings"});if(s!=null){const n=new Set(["columns","functions","operators"]);if(!Array.isArray(s)||s.some(a=>!n.has(a)))return"calculatedColumns.expressionPickers should contain only 'columns', 'functions' or 'operators'."}return r!=null&&r!=="live"&&r!=="deferred"?N(320,{property:"calculatedColumns.applyMode",allowed:["live","deferred"]}):null}},columnHeaderEdit:{validate({columnHeaderEdit:i}){if(i==null)return null;if(typeof i!="object"||Array.isArray(i))return N(321,{property:"columnHeaderEdit",expected:"an object"});const{applyMode:o}=i;return o!=null&&o!=="live"&&o!=="deferred"?N(320,{property:"columnHeaderEdit.applyMode",allowed:["live","deferred"]}):null}},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:i}){return $e("cacheBlockSize",i,1)}},cacheOverflowSize:{validate({cacheOverflowSize:i}){return $e("cacheOverflowSize",i,1)}},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:i=>{const o=i.domLayout,s=["autoHeight","normal","print"];return o&&!s.includes(o)?N(320,{property:"domLayout",allowed:s,value:o}):null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableCellSpan:{supportedRowModels:["clientSide","serverSide"]},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate({enableRowPinning:i,pinnedTopRowData:o,pinnedBottomRowData:s}){return i&&(o||s)?N(318,{feature:"Manual row pinning",conflictsWith:"pinned row data",advice:"Either set `enableRowPinning` to `false`, or remove `pinnedTopRowData` and `pinnedBottomRowData`."}):null}},isRowPinnable:{supportedRowModels:["clientSide"],validate({enableRowPinning:i,isRowPinnable:o,pinnedTopRowData:s,pinnedBottomRowData:r}){return o&&(s||r)?N(318,{feature:"Manual row pinning",conflictsWith:"pinned row data",advice:"Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`."}):!i&&o?N(319,{feature:"`isRowPinnable`",requirement:"`enableRowPinning` to be set"}):null}},isRowPinned:{supportedRowModels:["clientSide"],validate({enableRowPinning:i,isRowPinned:o,pinnedTopRowData:s,pinnedBottomRowData:r}){return o&&(s||r)?N(318,{feature:"Manual row pinning",conflictsWith:"pinned row data",advice:"Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`."}):!i&&o?N(319,{feature:"`isRowPinned`",requirement:"`enableRowPinning` to be set"}):null}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},masterDefaultExpanded:{supportedRowModels:["clientSide"]},isMasterOpenByDefault:{supportedRowModels:["clientSide"]},groupHideColumnsUntilExpanded:{supportedRowModels:["clientSide"],validate({groupHideColumnsUntilExpanded:i,groupHideOpenParents:o,groupDisplayType:s}){return i&&!o&&s!=="multipleColumns"?N(319,{feature:"`groupHideColumnsUntilExpanded = true`",requirement:"either `groupDisplayType = 'multipleColumns'` or `groupHideOpenParents = true`"}):null}},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},groupDisplayType:{required:[void 0,"multipleColumns"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},groupHierarchyConfig:{validate({groupHierarchyConfig:i={}},o,s){for(const r of Object.keys(i))s.validation?.validateColDef(i[r]);return null}},icons:{validate:({icons:i})=>{if(i){if(i.smallDown)return Me(262);if(i.smallLeft)return Me(263);if(i.smallRight)return Me(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:i}){return $e("infiniteInitialRowCount",i,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},ssrmExpandAllAffectsAllRows:{validate:i=>{if(typeof i.ssrmExpandAllAffectsAllRows=="boolean"){if(i.rowModelType!=="serverSide")return"'ssrmExpandAllAffectsAllRows' is only supported with the Server Side Row Model.";if(i.ssrmExpandAllAffectsAllRows&&typeof i.getRowId!="function")return N(319,{feature:"Server Side Row Model grouping",requirement:"the `getRowId` callback"})}return null}},keepDetailRowsCount:{validate({keepDetailRowsCount:i}){return $e("keepDetailRowsCount",i,1)}},paginationPageSize:{validate({paginationPageSize:i}){return $e("paginationPageSize",i,1)}},paginationPageSizeSelector:{validate:i=>{const o=i.paginationPageSizeSelector;return typeof o=="boolean"||o==null||o.length?null:`'paginationPageSizeSelector' cannot be an empty array.
If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},paginationPanels:{validate:({paginationPanels:i})=>{const o=new Set(["pageSize","rowSummary","pageSummary","pageNumbers"]);return i!=null&&!Array.isArray(i)?N(323,{validNames:Array.from(o)}):i?.some(s=>typeof s=="string"?!o.has(s):typeof s=="object"&&s!==null?!o.has(s.type):!0)?N(323,{validNames:Array.from(o)}):null}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate({rowBuffer:i}){return $e("rowBuffer",i,0)}},rowClass:{validate:i=>typeof i.rowClass=="function"?"rowClass should not be a function, please use getRowClass instead":null},rowData:{supportedRowModels:["clientSide"]},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{pagination:{required:[!1,void 0]}}},rowSelection:{validate({rowSelection:i}){return i&&typeof i=="string"?Mp(306,{version:"32.2.1",name:'using `rowSelection` with the values "single" or "multiple"',message:"Use the object value instead."}):i&&typeof i!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":i&&i.mode!=="multiRow"&&i.mode!=="singleRow"?N(320,{property:"Selection mode",allowed:["singleRow","multiRow"],value:i.mode}):null}},rowStyle:{validate:i=>{const o=i.rowStyle;return o&&typeof o=="function"?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null}},loadingRows:{validate({loadingRows:i,rowModelType:o}){if(i==null||i===!1)return null;if(i!==!0&&(typeof i!="object"||Array.isArray(i)))return N(321,{property:"loadingRows",expected:"a boolean or an object"});if(o!=null&&o!=="clientSide")return"`loadingRows` is only supported with the Client-Side Row Model.";const s=typeof i=="object"?i.rowCount:void 0;return s!=null&&(!Number.isInteger(s)||s<1)?"loadingRows.rowCount: value should be an integer greater than or equal to 1":null}},notesDataSource:{validate:({getRowId:i})=>i?null:N(319,{feature:"Notes",requirement:"the `getRowId` callback"})},noteHideDelay:{validate:i=>i.noteHideDelay!=null&&i.noteHideDelay<0?N(317,{property:"noteHideDelay",min:0}):null},noteShowDelay:{validate:i=>i.noteShowDelay!=null&&i.noteShowDelay<0?N(317,{property:"noteShowDelay",min:0}):null},serverSideDatasource:{supportedRowModels:["serverSide"]},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:i}){return $e("serverSideInitialRowCount",i,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:i=>{const o=i.sortingOrder;if(Array.isArray(o)&&o.length>0){const s=o.filter(r=>!Ce(r));if(s.length>0)return N(324,{property:"sortingOrder",invalidItems:s})}else if(!Array.isArray(o)||!o.length)return N(325,{property:"sortingOrder",value:o});return null}},stickyRowsMaxViewportRatio:{validate({stickyRowsMaxViewportRatio:i}){return i==null||typeof i=="number"&&i>=0&&i<=1?null:"stickyRowsMaxViewportRatio: value should be a number between 0 and 1"}},tooltipHideDelay:{validate:i=>i.tooltipHideDelay&&i.tooltipHideDelay<0?N(317,{property:"tooltipHideDelay",min:0}):null},tooltipShowDelay:{validate:i=>i.tooltipShowDelay&&i.tooltipShowDelay<0?N(317,{property:"tooltipShowDelay",min:0}):null},tooltipSwitchShowDelay:{validate:i=>i.tooltipSwitchShowDelay&&i.tooltipSwitchShowDelay<0?N(317,{property:"tooltipSwitchShowDelay",min:0}):null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:i=>{const o=i.rowModelType??"clientSide";switch(o){case"clientSide":{const{treeDataChildrenField:s,treeDataParentIdField:r,getDataPath:n,getRowId:a}=i;if(!s&&!r&&!n)return N(319,{feature:"`treeData`",requirement:"either `treeDataChildrenField` or `treeDataParentIdField` or `getDataPath` in the `clientSide` row model"});if(s){if(n)return N(318,{feature:"`treeDataChildrenField`",conflictsWith:"`getDataPath`"});if(r)return N(318,{feature:"`treeDataChildrenField`",conflictsWith:"`treeDataParentIdField`"})}if(r){if(!a)return"getRowId callback not provided, tree data with parent id cannot be built.";if(n)return N(318,{feature:"`treeDataParentIdField`",conflictsWith:"`getDataPath`"})}return null}case"serverSide":{const s=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${o} row model.`;return i.isServerSideGroup&&i.getServerSideGroupKey?null:s}}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:i}){return $e("viewportRowModelBufferSize",i,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:i}){return $e("viewportRowModelPageSize",i,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate({autoGroupColumnDef:i,showOpenedGroup:o}){return i?.field&&o?N(318,{feature:"`autoGroupColumnDef.field`",conflictsWith:"`showOpenedGroup`"}):i?.valueGetter&&o?N(318,{feature:"`autoGroupColumnDef.valueGetter`",conflictsWith:"`showOpenedGroup`"}):null}},renderingMode:{validate:i=>{const o=i.renderingMode,s=["default","legacy"];return o&&!s.includes(o)?N(320,{property:"renderingMode",allowed:s,value:o}):null}},autoSizeStrategy:{validate:({autoSizeStrategy:i})=>{if(!i)return null;const o=["fitCellContents","fitGridWidth","fitProvidedWidth"],s=i.type;return s!=="fitCellContents"&&s!=="fitGridWidth"&&s!=="fitProvidedWidth"?N(320,{property:"autoSizeStrategy",allowed:o,value:s}):s==="fitProvidedWidth"&&typeof i.width!="number"?`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${i.width}`:i.shouldAutoSizeColumns!==void 0&&!i.continuous?"The `shouldAutoSizeColumns` auto-size option only applies when `continuous` is true.":null}}},t={};for(const i of Oa)t[i]={expectedType:"boolean"};for(const i of Ha)t[i]={expectedType:"number"};return he(t,e),t},Bp,E6=()=>Bp??(Bp=(()=>{const e=[...Hp(),...Object.values(As)],t=b6(),i=["api"];return{objectName:"gridOptions",allProperties:e,allValidNames:Ap(e,t,i),propertyExceptions:i,docsUrl:"grid-options/",deprecations:t,validations:R6()}})()),x6=0,F6=0,Op="__ag_grid_instance",P6=class extends y{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=F6++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new r6,this.globalEventHandlerFactory=e=>(t,i)=>{if(!this.isAlive())return;const o=Co.has(t);if(o&&!e||!o&&e||!D6(t))return;const s=(r,n)=>{const a=As[r],l=this.gridOptions[a];typeof l=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>l(n))};if(this.gridReadyFired||t==="issueRaised")s(t,i);else if(t==="gridReady"){s(t,i),this.gridReadyFired=!0;for(const r of this.queueEvents)s(r.eventName,r.event);this.queueEvents=[]}else this.queueEvents.push({eventName:t,event:i})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.validateGridOptions(this.gridOptions),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"optionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){return this.gridOptions[e]??Ld[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return Pp(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(i=>e(this.addCommon(i)))}updateGridOptions({options:e,force:t,source:i="api"}){const o={id:x6++,properties:[]},s=[],{gridOptions:r,validation:n}=this;for(const a of Object.keys(e)){const l=Di.applyGlobalGridOption(a,e[a]);n?.warnOnInitialPropertyUpdate(i,a);const d=t||typeof l=="object"&&i==="api",c=r[a];if(d||c!==l){r[a]=l;const u={type:a,currentValue:l,previousValue:c,changeSet:o,source:i};s.push(u)}}this.validateGridOptions(this.gridOptions),o.properties=s.map(a=>a.type);for(const a of s)St(this,`Updated property ${a.type} from`,a.previousValue," to ",a.currentValue),this.propEventSvc.dispatchEvent(a)}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addCommon(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t,i=""){for(const o of Object.keys(e)){const s=e[o];if(s==null||s===!1)continue;let r=t[o];typeof r=="function"&&(r=r(e,this.gridOptions,this.beans)),r&&this.assertModuleRegistered(r,`\`${i}${o}\``)}}validateGridOptions(e){this.validateOptions(e,y6),this.validation?.processGridOptions(e)}validateColDef(e,t,i){(i||!this.beans.dataTypeSvc?.isColPendingInference(t))&&(this.validateOptions(e,h6,"colDef."),this.validation?.validateColDef(e))}assertModuleRegistered(e,t){const i=Array.isArray(e)?e.some(o=>this.isModuleRegistered(o)):this.isModuleRegistered(e);return i||Ih({...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),i}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:mh(),rowModelType:this.get("rowModelType"),isUmd:Bn(),usesAgGridProvider:this.beans.frameworkOverrides.usesAgGridProvider??!1}}isModuleRegistered(e){return fh(e,this.gridId,this.get("rowModelType"))}setInstanceDomData(e){e[Op]=this.instanceId}isElementInThisInstance(e){let t=e;for(;t;){const i=t[Op];if(Pp(i))return i===this.instanceId;t=t.parentElement}return!1}};function D6(e){return!!As[e]}import{RefPlaceholder as ce,_removeFromParent as Gp,_setDisplayed as vo,_toString as M6}from"ag-stack";function Ga(e,t,i){e.addManagedElementListeners(t,{mousedown:s=>{s.button===0&&i()==="opened"&&s.preventDefault()},click:s=>{s.detail===0&&i()}});const o=new Ct(t,!0);o.addEventListener("tap",i),e.addDestroyFunc(()=>o.destroy())}var T6=class extends y{constructor(e,t){super(),this.column=e,this.eGui=t,this.lastMovingChanged=0}postConstruct(){this.addManagedElementListeners(this.eGui,{click:e=>e&&this.onClick(e)}),this.addManagedListeners(this.column,{movingChanged:()=>{this.lastMovingChanged=Date.now()}})}onClick(e){const{sortSvc:t,rangeSvc:i,gos:o}=this.beans;if(!(ht(o)?e.altKey:!0))i?.handleColumnSelection(this.column,e);else if(this.column.isSortable()){const r=this.column.isMoving(),a=Date.now()-this.lastMovingChanged<50;r||a||t?.progressSortFromEvent(this.column,e)}}};function A6(e,t,i,o){const s={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:s},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:s},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[e?{tag:"span",ref:"eColRef",cls:"ag-header-col-ref"}:null,t?{tag:"span",ref:"eCalculatedColumn",cls:"ag-header-icon ag-calculated-column-icon",attrs:s}:null,{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:s},o?{tag:"span",ref:"eShowValuesAs",cls:"ag-header-icon ag-header-label-icon ag-show-values-as-icon",attrs:s}:null,i?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var Np=class extends K{constructor(){super(...arguments),this.eFilter=ce,this.eShowValuesAs=ce,this.eFilterButton=ce,this.eSortIndicator=ce,this.eMenu=ce,this.eLabel=ce,this.eText=ce,this.eColRef=ce,this.eCalculatedColumn=ce,this.eSortOrder=ce,this.eSortAsc=ce,this.eSortDesc=ce,this.eSortMixed=ce,this.eSortNone=ce,this.eSortAbsoluteAsc=ce,this.eSortAbsoluteDesc=ce,this.isLoadingInnerComponent=!1}refresh(e){const t=this.params;if(this.params=e,this.workOutTemplate(e,!!this.beans?.sortSvc)!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||e.column.formulaRef!=this.currentRef||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){const i={...e};he(i,e.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(i)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){const{formula:i,showValuesAsSvc:o}=this.beans,s=e.template;return s?s?.trim?s.trim():s:A6(!!i?.active,e.column.isCalculatedCol,t,!!o)}init(e){this.params=e;const{sortSvc:t,touchSvc:i,rowNumbersSvc:o,userCompFactory:s}=this.beans,r=t?.SortIndicatorSelector;this.currentTemplate=this.workOutTemplate(e,!!r),this.setTemplate(this.currentTemplate,r?[r]:void 0),this.eLabel&&(this.mouseListener??(this.mouseListener=this.createManagedBean(new T6(e.column,this.eLabel)))),i?.setupForHeader(this),this.setMenu(),this.setupSort(),this.setupColumnRefIndicator(),this.setupCalculatedColumnIcon(),o?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.setupShowValuesAsIcon(),this.workOutInnerHeaderComponent(s,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const i=c1(e,t,t);i&&(this.isLoadingInnerComponent=!0,i.newAgStackInstance().then(o=>{this.isLoadingInnerComponent=!1,o&&(this.isAlive()?(this.innerHeaderComponent=o,this.eText&&this.eText.appendChild(o.getGui())):this.destroyBean(o))}))}setDisplayName(e){const{displayName:t}=e,i=this.currentDisplayName;this.currentDisplayName=t,!(!this.eText||i===t||this.innerHeaderComponent||this.isLoadingInnerComponent)&&(this.eText.textContent=M6(t))}addInIcon(e,t,i){const o=X(e,this.beans,i);o&&t.appendChild(o)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){Gp(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:i}=this,o=ge(e);this.addInIcon(o?"menu":"menuAlt",t,i.column),t.classList.toggle("ag-header-menu-icon",!o);const s=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=s,Ga(this,t,()=>this.toggleColumnMenu(t)),this.toggleMenuAlwaysShow(s)}toggleMenuAlwaysShow(e){this.eMenu?.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){const{currentSuppressMenuHide:t,params:i}=this;t||this.toggleMenuAlwaysShow(!0),i.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}toggleColumnMenu(e){const{currentSuppressMenuHide:t,params:i}=this,o=this.beans.menuSvc?.toggleColumnMenu({column:i.column,buttonElement:e,positionBy:"button",onClosedCallback:()=>{t||this.toggleMenuAlwaysShow(!1)}})??"declined";return o==="opened"&&!t&&this.toggleMenuAlwaysShow(!0),o}onMenuKeyboardShortcut(e){const{params:t,gos:i,beans:o,eMenu:s,eFilterButton:r}=this,n=t.column,a=ge(i);if(e&&!a){if(o.menuSvc?.isFilterMenuInHeaderEnabled(n))return t.showFilter(r??s??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(s??r??this.getGui()),!0;return!1}setupSort(){const{sortSvc:e}=this.beans;if(!e)return;const{enableSorting:t,column:i}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(new e.SortIndicatorComp(!0));const{eSortIndicator:o,eSortOrder:s,eSortAsc:r,eSortDesc:n,eSortMixed:a,eSortNone:l,eSortAbsoluteAsc:d,eSortAbsoluteDesc:c}=this;o.attachCustomElements(s,r,n,a,l,d,c)}this.eSortIndicator.setupSort(i),this.currentSort&&e.setupHeader(this,i)}setupColumnRefIndicator(){const{eColRef:e,beans:{editModelSvc:t},params:i}=this;e&&(this.currentRef=i.column.formulaRef,e.textContent=this.currentRef,vo(e,!1),this.addManagedEventListeners({cellEditingStarted:()=>{const o=t?.getEditPositions(),s=!!this.currentRef&&!!o?.some(r=>r.column.allowFormula);vo(e,s)},cellEditingStopped:()=>{vo(e,!1)}}))}setupCalculatedColumnIcon(){const{eCalculatedColumn:e,params:t}=this;e&&this.addInIcon("calculatedColumnsHeader",e,t.column)}setupFilterIcon(){const{eFilter:e,params:t}=this;if(!e)return;const i=()=>{const o=t.column.isFilterActive();vo(e,o,{skipAriaHidden:!0})};this.configureFilter(t.enableFilterIcon,e,i,"filterActive")}setupShowValuesAsIcon(){const{eShowValuesAs:e,params:t}=this,{showValuesAsSvc:i}=this.beans;if(!e||!i)return;const o=t.column;this.addInIcon("showValuesAs",e,o);const s=()=>{const n=o.showValuesAs!=null&&!o.showValuesAsDef?.suppressHeaderIndicator;vo(e,n,{skipAriaHidden:!0}),n&&(e.classList.toggle("ag-show-values-as-dormant",!i.isApplying(o)),e.title=i.getActiveModeTooltip(o)??"")};this.addManagedListeners(o,{columnStateUpdated:s}),this.addManagedEventListeners({columnRowGroupChanged:s,columnPivotChanged:s,columnPivotModeChanged:s}),s()}setupFilterButton(){const{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?Ga(this,e,()=>this.beans.menuSvc?.toggleFilterMenu({column:t.column,buttonElement:e,containerType:"columnFilter",positionBy:"button"})??"declined"):this.eFilterButton=void 0}configureFilter(e,t,i,o){if(!e)return Gp(t),!1;const s=this.params.column;return this.addInIcon(o,t,s),this.addManagedListeners(s,{filterChanged:i}),i(),!0}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:i}=this;return e?t??i??this.getGui():i??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent=this.destroyBean(this.innerHeaderComponent),this.mouseListener=this.destroyBean(this.mouseListener)}};import{RefPlaceholder as Na,_exists as _p,_setDisplayed as mi,_toString as zp}from"ag-stack";var I6=class extends y{constructor(e,t){super(),this.eLabel=e,this.columnGroup=t,this.isSticky=!1,this.left=null,this.right=null}postConstruct(){const{columnGroup:e,beans:t}=this,{ctrlsSvc:i}=t;i.whenReady(this,()=>{const o=this.refreshPosition.bind(this),s=this.refreshStickyOffset.bind(this);e.getPinned()==null&&this.addManagedEventListeners({bodyScroll:r=>{r.direction==="horizontal"&&this.updateSticky(r.left)},leftPinnedWidthChanged:s}),this.addManagedListeners(e,{leftChanged:o,displayedChildrenChanged:o}),this.addManagedEventListeners({columnResized:o}),this.addManagedPropertyListener("enableRtl",s),this.refreshStickyOffset(),this.refreshPosition()})}refreshPosition(){const{columnGroup:e,beans:t}=this,i=e.getLeft(),o=e.getActualWidth();if(i==null||o===0){this.left=null,this.right=null,this.setSticky(!1);return}this.left=i,this.right=i+o;const s=t.colViewport.getScrollPosition();s!=null&&this.updateSticky(s)}updateSticky(e){const{left:t,right:i}=this;if(t==null||i==null){this.setSticky(!1);return}this.setSticky(t<e&&i>e)}setSticky(e){const{isSticky:t,eLabel:i}=this;t!==e&&(this.isSticky=e,i.classList.toggle("ag-sticky-label",e))}refreshStickyOffset(){if(this.columnGroup.getPinned()!=null){this.eLabel.style.removeProperty("left"),this.eLabel.style.removeProperty("right");return}const{beans:{gos:e,visibleCols:t},eLabel:i}=this,o=e.get("enableRtl"),r=`calc(var(--ag-cell-horizontal-padding) + ${o?t.getRightStickyColumnContainerWidth():t.getLeftStickyColumnContainerWidth()}px)`;o?(i.style.removeProperty("left"),i.style.setProperty("right",r)):(i.style.removeProperty("right"),i.style.setProperty("left",r))}},k6={tag:"div",cls:"ag-header-group-cell-label",role:"presentation",children:[{tag:"span",ref:"agLabel",cls:"ag-header-group-text",role:"presentation"},{tag:"span",ref:"agOpened",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"},{tag:"span",ref:"agClosed",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"}]},L6=class extends K{constructor(){super(k6),this.agOpened=Na,this.agClosed=Na,this.agLabel=Na,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t,touchSvc:i}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),i?.setupForHeaderGroup(this)}refresh(e){const{innerHeaderGroupComponent:t,isLoadingInnerComponent:i}=this;if(i)return!1;if(t){if(!t.refresh)return!1;const s=t.refresh(e);return s&&(this.params=e),s}this.params=e;const{displayName:o}=e;return this.agLabel.textContent=_p(o)?zp(o):"",!0}checkWarnings(){this.params.template&&this.beans.log.warn(89)}workOutInnerHeaderGroupComponent(e,t){const i=h1(e,t,t);i&&(this.isLoadingInnerComponent=!0,i.newAgStackInstance().then(o=>{this.isLoadingInnerComponent=!1,o&&(this.isAlive()?(this.innerHeaderGroupComponent=o,this.agLabel.appendChild(o.getGui())):this.destroyBean(o))}))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:i}}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const o=a=>{if(We(a))return;const l=!i.isExpanded();ji(this.beans,i.getProvidedColumnGroup(),l,"uiColumnExpanded")};this.addTouchAndClickListeners(t,o),this.addTouchAndClickListeners(e,o);const s=a=>{mt(a)};this.addManagedElementListeners(t,{dblclick:s}),this.addManagedElementListeners(e,{dblclick:s}),this.addManagedElementListeners(this.getGui(),{dblclick:o}),this.updateIconVisibility();const r=i.getProvidedColumnGroup(),n=this.updateIconVisibility.bind(this);this.addManagedListeners(r,{expandedChanged:n,expandableChanged:n})}addTouchAndClickListeners(e,t){this.beans.touchSvc?.setupForHeaderGroupElement(this,e,t),this.addManagedElementListeners(e,{click:t})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:i}}=this;if(i.isExpandable()){const o=i.isExpanded();mi(e,o),mi(t,!o)}else mi(e,!1),mi(t,!1)}addInIcon(e,t){const i=X(e,this.beans,null);i&&t.appendChild(i)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:i}=this;mi(t,!1),mi(i,!1)}}setupLabel(e){const{displayName:t,columnGroup:i}=e,{innerHeaderGroupComponent:o,isLoadingInnerComponent:s}=this,r=o||s;_p(t)&&!r&&(this.agLabel.textContent=zp(t)),i.getColGroupDef()?.suppressStickyLabel||this.createManagedBean(new I6(this.getGui(),i))}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},V6={moduleName:"ColumnHeaderComp",version:E,userComponents:{agColumnHeader:Np},icons:{menu:"menu",menuAlt:"menu-alt"}},H6={moduleName:"ColumnGroupHeaderComp",version:E,userComponents:{agColumnGroupHeader:L6},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}};import{_requestAnimationFrame as B6}from"ag-stack";var O6=class extends y{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,e===0&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){this.active===!1&&this.warn(92)}createTask(e,t,i,o,s=!1){this.verify();let r=i;o&&this.batchFrameworkComps&&(r="f1");const n={task:e,index:t,createOrder:++this.taskCount,deferred:s};this.addTaskToList(this[r],n),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((i,o)=>i.deferred!==o.deferred?i.deferred?-1:1:i.index!==o.index?t*(o.index-i.index):o.createOrder-i.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){const{p1:t,p2:i,f1:o,destroyTasks:s,beans:r}=this,{ctrlsSvc:n,frameworkOverrides:a}=r,l=t.list,d=i.list,c=o.list,u=Date.now();let h=0;const g=e<=0,p=n.getScrollFeature();for(;g||h<e;){if(!p.scrollGridIfNeeded()){let m;if(l.length)this.sortTaskList(t),m=l.pop().task;else if(d.length)this.sortTaskList(i),m=d.pop().task;else if(c.length)a.wrapOutgoing(()=>{for(;(g||h<e)&&!p.scrollGridIfNeeded();){if(c.length)this.sortTaskList(o),m=c.pop().task,m();else break;h=Date.now()-u}}),m=()=>{};else if(s.length)m=s.pop();else break;m()}h=Date.now()-u}l.length||d.length||c.length||s.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);B6(this.beans,e)}isQueueEmpty(){return!this.ticking}},G6={moduleName:"AnimationFrame",version:E,beans:[O6]},N6=class extends y{constructor(){super(...arguments),this.beanName="iconSvc"}createIconNoSpan(e,t){return X(e,this.beans,t?.column)}};import{_isEventFromThisInstance as Wp,_isEventSupported as _6,_isIOSUserAgent as _a}from"ag-stack";import{_isBrowserSafari as z6,_isElementChildOfClass as Up,_isFocusableFormField as W6}from"ag-stack";function U6(e,t,i,o){if(!We(o))switch(i){case"click":q6(e,t,o);break;case"pointerdown":case"mousedown":case"touchstart":$6(e,t,o);break;case"dblclick":qp(e,t,o);break;case"mouseout":Q6(e,t,o);break;case"mouseover":Z6(e,t,o);break}}function q6(e,t,i){if(e.touchSvc?.handleCellDoubleClick(t,i))return;const{eventSvc:o,rangeSvc:s,editSvc:r,editModelSvc:n,frameworkOverrides:a,gos:l}=e,d=i.ctrlKey||i.metaKey,{column:c,cellPosition:u,rowNode:h}=t,g=Ji(l,c,h,i);s&&d&&!g&&s.getCellRangeCount(u)>1&&s.intersectLastRange(!0);const p=t.createEvent(i,"cellClicked");p.isEventHandlingSuppressed=g,o.dispatchEvent(p);const f=c.colDef;if(f.onCellClicked&&window.setTimeout(()=>{a.wrapOutgoing(()=>{f.onCellClicked(p)})},0),!g&&n?.getState(t)!=="editing"){const m=r?.isEditing(),C=r?.isRangeSelectionEnabledWhileEditing(),v=n?.getCellValidationModel().getCellValidationMap().size??0,S=n?.getRowValidationModel().getRowValidationMap().size??0;if(m&&(C||v>0||S>0))return;r?.shouldStartEditing(t,i)?r?.startEditing(t,{event:i}):r?.shouldStopEditing(t,i)&&(l.get("editType")==="fullRow"?r?.stopEditing(t,{event:i,source:"edit"}):r?.stopEditing(void 0,{event:i,source:"edit"}))}}function qp(e,t,i){const{eventSvc:o,frameworkOverrides:s,editSvc:r,editModelSvc:n,gos:a}=e,{column:l}=t,d=Ji(a,t.column,t.rowNode,i),c=l.colDef,u=t.createEvent(i,"cellDoubleClicked");if(u.isEventHandlingSuppressed=d,o.dispatchEvent(u),typeof c.onCellDoubleClicked=="function"&&window.setTimeout(()=>{s.wrapOutgoing(()=>{c.onCellDoubleClicked(u)})},0),!d&&r?.shouldStartEditing(t,i)&&n?.getState(t)!=="editing"){const h=r?.isEditing(),g=r?.isRangeSelectionEnabledWhileEditing(),p=n?.getCellValidationModel().getCellValidationMap().size??0,f=n?.getRowValidationModel().getRowValidationMap().size??0;if(h&&(g||p>0||f>0))return;r?.startEditing(t,{event:i})}}function $6(e,t,i){const{shiftKey:o}=i,s=i.target,{eventSvc:r,rangeSvc:n,rowNumbersSvc:a,focusSvc:l,gos:d,editSvc:c}=e,{column:u,rowNode:h,cellPosition:g}=t,p=Ji(d,u,h,i),f=()=>{const S=t.createEvent(i,"cellMouseDown");S.isEventHandlingSuppressed=p,r.dispatchEvent(S)};if(p){f();return}if(K6(e,t,i))return;const m=n&&!n.isEmpty(),C=j6(s),v=Re(u);if(!(a&&v&&!a.handleMouseDownOnCell(g,i))){if(!o||!m){const S=c?.isEditing(t),b=d.get("enableCellTextSelection")&&i.defaultPrevented,R=(z6()||b)&&!S&&!W6(s)&&!C;t.focusCell({forceBrowserFocus:R,sourceEvent:i})}if(o&&m&&!l.isCellFocused(g)){i.preventDefault();const S=l.getFocusedCell();if(S){const{column:w,rowIndex:b,rowPinned:R}=S,x=!!c?.isRangeSelectionEnabledWhileEditing?.();c?.isEditing(S)&&!x&&c?.stopEditing(S),x||l.setFocusedCell({column:w,rowIndex:b,rowPinned:R,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:i})}}C||(n?.handleCellMouseDown(i,g),f())}}function K6(e,t,i){const{rangeSvc:o}=e;if(o){const s=o.isCellInAnyRange(t.cellPosition),r=Xd(e,i);if(s&&r)return!0}return!1}function j6(e){return Up(e,"ag-selection-checkbox",3)||Up(e,"ag-drag-handle",3)}function Q6(e,t,i){if($p(t,i))return;const{eventSvc:o,colHover:s}=e;o.dispatchEvent(t.createEvent(i,"cellMouseOut")),s?.clearMouseOver()}function Z6(e,t,i){if($p(t,i))return;const{eventSvc:o,colHover:s}=e;o.dispatchEvent(t.createEvent(i,"cellMouseOver")),s?.setMouseOver([t.column])}function $p(e,t){if(!t.target||!t.relatedTarget)return!1;const i=e.eGui,o=i.contains(t.target),s=i.contains(t.relatedTarget);return o&&s}var Y6=(e,t,i)=>t||e&&i,J6=class extends y{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eGridViewport,t,{shouldHandleLongTap:()=>this.isBodyContextMenuEnabled()})}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t,{shouldHandleLongTap:()=>!!this.beans.menuSvc?.isHeaderContextMenuEnabled()})}mockRowContextMenu(e){if(!_a())return;const t=(i,o,s)=>{const{rowCtrl:r,cellCtrl:n}=e.getControlsForEventTarget(s?.target??null);this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,s,r,n)};this.mockContextMenu(e,e.element,t,{shouldHandleLongTap:()=>this.isBodyContextMenuEnabled(),onLongTapDetected:({touchEvent:i})=>{if(!Wp(this.beans,i))return;const{cellCtrl:o}=e.getControlsForEventTarget(i.target);o?.column&&o.dispatchCellContextMenuEvent(i)}})}handleCellDoubleClick(e,t){return(()=>{if(!_a()||_6("dblclick"))return!1;const o=Date.now(),s=o-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=o,s})()?(qp(this.beans,e,t),t.preventDefault(),!0):!1}setupForHeader(e){const{gos:t,sortSvc:i,menuSvc:o}=this.beans;if(t.get("suppressTouch"))return;const{params:s,eMenu:r,eFilterButton:n}=e,a=new Ct(e.getGui(),!0);e.addDestroyFunc(()=>a.destroy());const l=e.shouldSuppressMenuHide(),d=!!o?.isHeaderContextMenuEnabled(s.column),c=Y6(s.enableMenu,d,ge(t)),u=h=>s.showColumnMenuAfterMouseClick(h.touchStart);if(c&&e.addManagedListeners(a,{longTap:u}),s.enableSorting){const h=g=>{const p=g.touchStart.target;l&&(r?.contains(p)||n?.contains(p))||i?.progressSort(s.column,!1,"uiColumnSorted")};e.addManagedListeners(a,{tap:h})}}setupForHeaderGroup(e){const t=e.params;if(this.beans.menuSvc?.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){const i=new Ct(t.eGridHeader,!0),o=s=>t.showColumnMenuAfterMouseClick(s.touchStart);e.addManagedListeners(i,{longTap:o}),e.addDestroyFunc(()=>i.destroy())}}setupForHeaderGroupElement(e,t,i){const o=new Ct(t,!0);e.addManagedListeners(o,{tap:i}),e.addDestroyFunc(()=>o.destroy())}isBodyContextMenuEnabled(){return!!this.beans.contextMenuSvc&&!this.gos.get("suppressContextMenu")}mockContextMenu(e,t,i,o){if(!_a())return;const s=new Ct(t,o),r=n=>{Wp(this.beans,n.touchEvent)&&i(void 0,n.touchStart,n.touchEvent)};e.addManagedListeners(s,{longTap:r}),e.addDestroyFunc(()=>s.destroy())}},X6={moduleName:"Touch",version:E,beans:[J6]};import{KeyCode as Qt,_last as eP,_missing as Kp}from"ag-stack";var tP=class extends y{constructor(){super(...arguments),this.beanName="cellNavigation"}getNextCellToFocus(e,t,i=!1){return i?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const i=e===Qt.UP,o=e===Qt.DOWN,s=e===Qt.LEFT;let r,n;const{pageBounds:a,gos:l,visibleCols:d,pinnedRowModel:c}=this.beans,{rowPinned:u}=t;if(i||o)u&&c?i?n=0:n=u==="top"?c.getPinnedTopRowCount()-1:c.getPinnedBottomRowCount()-1:n=i?a.getFirstRow():a.getLastRow(),r=t.column;else{const h=l.get("enableRtl");n=t.rowIndex,r=(s!==h?d.allCols:[...d.allCols].reverse()).find(p=>!Re(p)&&this.isCellGoodToFocusOn({rowIndex:n,rowPinned:null,column:p}))}return r?{rowIndex:n,rowPinned:u,column:r}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let i=t,o=!1;for(;!o;){switch(e){case Qt.UP:i=this.getCellAbove(i);break;case Qt.DOWN:i=this.getCellBelow(i);break;case Qt.RIGHT:i=this.gos.get("enableRtl")?this.getCellToLeft(i):this.getCellToRight(i);break;case Qt.LEFT:i=this.gos.get("enableRtl")?this.getCellToRight(i):this.getCellToLeft(i);break;default:i=null,this.warn(8,{key:e});break}i?o=this.isCellGoodToFocusOn(i):o=!0}return i}isCellGoodToFocusOn(e){const t=e.column;let i;const{pinnedRowModel:o,rowModel:s}=this.beans;switch(e.rowPinned){case"top":i=o?.getPinnedTopRow(e.rowIndex);break;case"bottom":i=o?.getPinnedBottomRow(e.rowIndex);break;default:i=s.getRow(e.rowIndex);break}return i?!this.isSuppressNavigable(t,i):!1}getCellToLeft(e){if(!e)return null;const t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){if(!e)return null;const{beans:t}=this,i=t.rowSpanSvc?.getCellEnd(e)??e,o=nn(t,i,!0);return o?{rowIndex:o.rowIndex,column:e.column,rowPinned:o.rowPinned}:null}getCellAbove(e){if(!e)return null;const{beans:t}=this,i=t.rowSpanSvc?.getCellStart(e)??e,o=qi(t,{rowIndex:i.rowIndex,rowPinned:i.rowPinned},!0);return o?{rowIndex:o.rowIndex,column:e.column,rowPinned:o.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const{visibleCols:t,pagination:i}=this.beans,o=t.allCols;let s=e.rowIndex,r=e.rowPinned,n=t.getColAfter(e.column);if(!n){n=o[0];const a=nn(this.beans,e,!0);if(Kp(a)||!a.rowPinned&&!(i?.isRowInPage(a.rowIndex)??!0))return null;s=a?a.rowIndex:null,r=a?a.rowPinned:null}return{rowIndex:s,column:n,rowPinned:r}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:i,pagination:o}=t,s=i.allCols;let r=e.rowIndex,n=e.rowPinned,a=i.getColBefore(e.column);if(!a){a=eP(s);const l=qi(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);if(Kp(l)||!l.rowPinned&&!(o?.isRowInPage(l.rowIndex)??!0))return null;r=l?l.rowIndex:null,n=l?l.rowPinned:null}return{rowIndex:r,column:a,rowPinned:n}}isSuppressNavigable(e,t){if(ut(this.gos,t))return!0;const{suppressNavigable:i}=e.colDef;if(typeof i=="boolean")return i;if(typeof i=="function"){const o=e.createColumnFunctionCallbackParams(t);return i(o)}return!1}};function iP(e){return e.focusSvc.getFocusedCell()}function oP(e){return e.focusSvc.clearFocusedCell()}function sP(e,t,i,o){e.focusSvc.setFocusedCell({rowIndex:t,column:i,rowPinned:o,forceBrowserFocus:!0})}function rP(e,t){return e.navigation?.tabToNextCell(!1,t)??!1}function nP(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}function aP(e,t,i=!1){const o=e.headerNavigation?.getHeaderPositionForColumn(t,i);o&&e.focusSvc.focusHeaderPosition({headerPosition:o})}import{KeyCode as pe,_exists as Ci,_last as za,_missing as jp,_throttle as Qp}from"ag-stack";import{AgPromise as Zp,_addOrRemoveAttribute as lP,_findFocusableElements as dP,_getActiveDomElement as cP,_makeNull as uP,_placeCaretAtEnd as hP,_setAriaColIndex as gP,_setAriaRowIndex as pP}from"ag-stack";function Is(e){return!!(e.rowPinned&&e.pinnedSibling)}function Te(e,t,i,o){const s=t==="top";if(!i)return Te(e,t,s?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),o);if(!o){const l=s?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return Te(e,t,i,s?e.getPinnedTopRow(l-1):e.getPinnedBottomRow(l-1))}let r=!1,n=!1;const a=[];return e.forEachPinnedRow(t,l=>{if(l===i&&!r){r=!0,a.push(l);return}if(r&&l===o){n=!0,a.push(l);return}r&&!n&&a.push(l)}),a}function Yp(e,t,i,{rowNode:o,column:s},r){return G(e.gos,{type:i,node:o,data:o.data,value:r,column:s,colDef:s.getColDef(),rowPinned:o.rowPinned,event:t,rowIndex:o.rowIndex})}import{KeyCode as se,_isMacOsUserAgent as fP}from"ag-stack";function mP(e,t=!1){return e===se.DELETE?!0:!t&&e===se.BACKSPACE?fP():!1}function CP(e,t,i){const o=i.key;if(!(o===se.ENTER&&Re(t.column)&&e.rowNumbersSvc?.handleKeyDownOnCell(t.cellPosition,i)))switch(o){case se.ENTER:yP(e,t,i);break;case se.F2:EP(e,t,i);break;case se.ESCAPE:xP(e,t,i);break;case se.TAB:SP(e,t,i);break;case se.BACKSPACE:case se.DELETE:bP(e,t,o,i);break;case se.DOWN:case se.UP:case se.RIGHT:case se.LEFT:vP(e,t,i,o);break}}function vP(e,t,i,o){if(!e.editSvc?.isEditing(t,{withOpenEditor:!0})){if(i.shiftKey&&t.isRangeSelectionEnabled())wP(e,i);else{const s=t.getFocusedCellPosition();e.navigation?.navigateToNextCell(i,o,s,!0)}i.preventDefault()}}function wP(e,t){const{rangeSvc:i,navigation:o}=e;if(!i)return;const s=i.extendLatestRangeInDirection(t);s&&(t.key===se.LEFT||t.key===se.RIGHT?o?.ensureColumnVisible(s.column):o?.ensureRowVisible(s.rowIndex))}function SP(e,t,i){e.navigation?.onTabKeyDown(t,i)}function bP(e,t,i,o){const{rowNode:s}=t,{gos:r,rangeSvc:n,eventSvc:a,editSvc:l}=e;if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),mP(i,r.get("enableCellEditingOnBackspace"))&&!l?.isEditing(t,{withOpenEditor:!0})){if(n&&_e(r))n.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(t.isCellEditable()){const d=e.valueSvc.getDeleteValue(t.column,s);s.setDataValue(t.column,d,"cellClear")}}else l?.isEditing(t,{withOpenEditor:!0})||e.editSvc?.startEditing(t,{startedEdit:!0,event:o});a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}function yP(e,t,i){const{editSvc:o,navigation:s}=e,r=o?.isEditing(t,{withOpenEditor:!0}),n=t.rowNode,a=o?.isRowEditing(n,{withOpenEditor:!0}),l=d=>{o?.startEditing(d,{startedEdit:!0,event:i,source:"edit"})&&i.preventDefault()};if(r||a){if(RP(i)){o?.applyBulkEdit(t,e?.rangeSvc?.getCellRanges()||[]);return}const d=o?.checkNavWithValidationAndCache(void 0,i);if(d?.result==="block-stop"){e.gos.get("editType")==="fullRow"&&o?.announceFullRowEditValidationErrors(n);return}o?.isEditing(t,{withOpenEditor:!0})?o?.stopEditing(t,{event:i,source:"edit"},d?.validationCache):a&&!t.isCellEditable()?o?.stopEditing({rowNode:n},{event:i,source:"edit"},d?.validationCache):l(t)}else if(e.gos.get("enterNavigatesVertically")){const d=i.shiftKey?se.UP:se.DOWN;s?.navigateToNextCell(null,d,t.cellPosition,!1)}else{if(o?.revalidateAndCheck())return;o?.checkValidated(t)&&o.revertSingleCellEdit(t,!0),l(t)}}function RP(e){return(e.ctrlKey||e.metaKey)&&e.key===se.ENTER}function EP(e,t,i){const{editSvc:o,notesSvc:s}=e,r=o?.isEditing();if(i.shiftKey&&s?.hasDataSource()&&!r){const n=s.getNoteAccess({rowNode:t.rowNode,column:t.column});if(n&&(!n.isSuppressed||n.canView)){s.showNote(n.params,!0),i.preventDefault();return}}r&&o?.checkNavWithValidation(void 0,i)==="block-stop"||o?.startEditing(t,{startedEdit:!0,event:i})}function xP(e,t,i){const{editSvc:o}=e;o?.isEditing()&&(i.preventDefault(),setTimeout(()=>{o?.stopEditing(t,{event:i,cancel:!0})}))}function FP(e,t,i){const s=i.target!==t.eGui,{editSvc:r}=e;if(s||r?.isEditing(t,{withOpenEditor:!0}))return;if(i.key===se.SPACE)PP(e,t,i);else if(r?.isCellEditable(t,"ui")){if(r?.revalidateAndCheck()&&!r.checkValidated(t))return;r?.startEditing(t,{startedEdit:!0,event:i,source:"api",editable:!0}),!t.editCompDetails?.params?.suppressPreventDefault&&i.preventDefault()}}function PP(e,t,i){const{gos:o,editSvc:s}=e,{rowNode:r}=t;!s?.isEditing(t,{withOpenEditor:!0})&&Ye(o)&&e.selectionSvc?.handleSelectionEvent(i,r,"spaceKey"),i.preventDefault()}import{_areEqual as DP,_missing as MP}from"ag-stack";function TP(e,t){t.isCellSpanning()||(VP(e,t),AP(e,t))}function AP(e,t){t.rowSpan=t.column.getRowSpan(t.rowNode),t.addManagedListeners(e.eventSvc,{newColumnsLoaded:()=>kP(e,t)})}function IP(e,t){qa(e,t),ks(t),t.getCellSpan()?Jp(t):Xp(e,t)}function Jp(e){const t=e.getCellSpan()?.getCellHeight(),i=e.eGui;t!=null&&i&&(i.style.height=`${t}px`)}function kP(e,t){const i=t.column.getRowSpan(t.rowNode);t.rowSpan!==i&&(t.rowSpan=i,Xp(e,t,!0))}function LP(e,t){const i=Ua(e,t);DP(t.colsSpanning,i)||(t.colsSpanning=i,ks(t),qa(e,t))}function VP(e,t){t.column.colDef.colSpan!=null&&(t.colsSpanning=Ua(e,t),t.addManagedListeners(e.eventSvc,{displayedColumnsChanged:()=>LP(e,t),displayedColumnsWidthChanged:()=>ks(t)}))}function ks(e){const t=e.eGui;t&&(t.style.width=`${Wa(e)}px`)}function Wa(e){const{colsSpanning:t,column:i}=e;if(!t)return i.getActualWidth();let o=0;for(let s=0,r=t.length;s<r;++s)o+=t[s].actualWidth;return o}function Ua(e,t){const{column:i,rowNode:o}=t,s=i.getColSpan(o),r=[];if(s===1)r.push(i);else{let n=i;const a=i.getPinned();for(let l=0;n&&l<s&&(r.push(n),n=e.visibleCols.getColAfter(n),!(!n||MP(n)||a!==n.getPinned()));l++);}return r}function qa(e,t){const i=t.getRootElement();if(!i)return;const{gos:o,visibleCols:s}=e,r=ss({left:HP(t),pinned:t.column.getPinned(),width:Wa(t),isPrintLayout:t.printLayout,isRtl:o.get("enableRtl"),visibleCols:s});r!=null&&BP(e,t,i,r)}function HP(e){return e.column.getLeft()}function BP(e,t,i,o){const{gos:s,visibleCols:r}=e;Fu(i,{offset:o,pinned:t.column.getPinned(),width:Wa(t),isPrintLayout:t.printLayout,isRtl:s.get("enableRtl"),visibleCols:r})}function Xp(e,t,i){if(t.rowSpan===1&&!i)return;const o=t.eGui;if(!o)return;const r=Ne(e)*t.rowSpan;o.style.height=`${r}px`,o.style.zIndex="1"}var OP="ag-cell",GP="ag-cell-auto-height",NP="ag-cell-normal-height",_P="ag-cell-focus",zP="ag-cell-first-right-pinned",WP="ag-cell-last-left-pinned",UP="ag-cell-not-inline-editing",qP="ag-cell-wrap-text",$P=0,vi=class extends y{constructor(e,t,i,o){super(),this.column=e,this.rowNode=t,this.rowCtrl=o,this.lastIPadMouseClickEvent=0,this.rowSpan=1,this.rangeFeature=void 0,this.rowResizeFeature=void 0,this.notesFeature=void 0,this.calculatedColumnCssApplied=!1,this.calculatedColumnHighlightedCssApplied=!1,this.hasActiveRenderer=!1,this.suppressRefreshCell=!1,this.pendingEditStart=null,this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.tooltipFeature=void 0,this.editorTooltipFeature=void 0,this.rendererTooltipValue=void 0,this.rendererTooltipShouldDisplay=void 0,this.beans=i,this.gos=i.gos,this.editSvc=i.editSvc;const{colId:s}=e;this.instanceId=s+"-"+$P++,this.createCellPosition(),this.isClientSideLoadingCell()||this.updateAndFormatValue(!1),TP(i,this)}isClientSideLoadingCell(){return ut(this.gos,this.rowNode)}addFeatures(){const{beans:e}=this;this.enableTooltipFeature();const{rangeSvc:t}=e;t&&_e(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(this)),Re(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(this)),this.notesFeature=this.beans.notesSvc?.createNotesFeature(this)}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.editorTooltipFeature=e.destroyBean(this.editorTooltipFeature),this.rangeFeature=e.destroyBean(this.rangeFeature),this.rowResizeFeature=e.destroyBean(this.rowResizeFeature),this.notesFeature=e.destroyBean(this.notesFeature),this.disableTooltipFeature()}enableTooltipFeature(){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature),this.rendererTooltipValue=void 0,this.rendererTooltipShouldDisplay=void 0}resetCellRendererTooltip(){this.rendererTooltipValue==null||!this.isAlive()||(this.rendererTooltipValue=void 0,this.rendererTooltipShouldDisplay=void 0,this.tooltipFeature?.refreshTooltip())}enableEditorTooltipFeature(e){this.editorTooltipFeature&&this.disableEditorTooltipFeature(),this.editorTooltipFeature=this.beans.tooltipSvc?.setupCellEditorTooltip(this,e),this.editSvc?.populateModelValidationErrors(this)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(e,t,i,o,s,r,n){this.comp=e,this.eGui=t,this.printLayout=s,n??(n=this),this.addDomData(n);const a=this.isClientSideLoadingCell();a||(this.addFeatures(),n.addDestroyFunc(()=>this.removeFeatures())),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),a||this.setupControlComps(),this.setupAutoHeight(o,n),this.refreshFirstAndLastStyles(),a||this.checkFormulaError(),this.refreshAriaRowIndex(),this.refreshAriaColIndex(),IP(this.beans,this),a||(this.beans.cellStyles?.setupCellCustomStyle(this),this.editSvc?.applyCellEditStyles(this)),this.tooltipFeature?.refreshTooltip(),this.rangeFeature?.setComp(e),this.rowResizeFeature?.refreshRowResizer(),this.editSvc?.onCompAttached(this,r)||this.showValue(!1,!0),this.pendingEditStart&&this.editSvc.replayPendingStart(this)}checkFormulaError(){const e=this.beans.formula;!e||!e.active&&!this.isCalculatedColumn()||this.eGui.classList.toggle("formula-error",this.hasFormulaError())}hasFormulaError(){const e=this.beans.formula;return!e||!e.active&&!this.isCalculatedColumn()?!1:!!e.getFormulaError(this.column,this.rowNode)}hasCellValidationError(){const{editModelSvc:e}=this.beans;return e?e.getCellValidationModel().hasCellValidation(this):!1}setupAutoHeight(e,t){if(this.isClientSideLoadingCell()){this.isAutoHeight=!1;return}this.isAutoHeight=this.beans.rowAutoHeight?.setupCellAutoHeight(this,e,t)??!1}getCellAriaRole(){return this.column.colDef.cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.colDef;return e.cellRenderer!=null||e.cellRendererSelector!=null}hasActiveCellRenderer(){return this.hasActiveRenderer}getValueToDisplay(){return this.valueFormatted??this.value}getDeferLoadingCellRenderer(){const{beans:e,column:t}=this,{userCompFactory:i,ctrlsSvc:o,eventSvc:s}=e,r=t.colDef,n=this.createCellRendererParams();n.deferRender=!0;const a=kc(i,r,n);if(o.getGridBodyCtrl()?.scrollFeature?.isScrolling()){let l;const d=new Zp(u=>{l=u}),[c]=this.addManagedListeners(s,{bodyScrollEnd:()=>{l(),c()}});return{loadingComp:a,onReady:d}}return{loadingComp:a,onReady:Zp.resolve()}}showValue(e,t){const{beans:i,column:o,rowNode:s,rangeFeature:r}=this,{userCompFactory:n}=i;let a=this.getValueToDisplay(),l;const d=s.stub&&s.groupData?.[o.getId()]==null,c=o.colDef;if(d||this.isCellRenderer()){const h=this.createCellRendererParams();!d||Re(o)?l=Wr(n,c,h):l=kc(n,c,h)}if(!l&&!d&&i.findSvc?.isMatch(s,o)){const h=this.createCellRendererParams();l=Wr(n,{...o.colDef,cellRenderer:"agFindCellRenderer"},h)}const u=this.editSvc;if(u?.isBatchEditing()&&u.isRowEditing(s,{checkSiblings:!0})){const h=u.prepDetailsDuringBatch(this,{compDetails:l,valueToDisplay:a});h&&(h.compDetails?l=h.compDetails:h.valueToDisplay&&(a=h.valueToDisplay))}this.hasActiveRenderer=l!=null,this.comp.setRenderDetails(l,a,e),this.customRowDragComp?.refreshVisibility(),!t&&r&&r.scheduleRefreshRangeStyleAndHandle(),this.rowResizeFeature?.refreshRowResizer()}setupControlComps(){const e=this.column.colDef;this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e),!0),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}getCellValueClass(){const e="ag-cell-value",t=this.column.colDef.cellRenderer==="agCheckboxCellRenderer";let i="";return t&&(i=" ag-allow-overflow"),`${e}${i}`}isIncludeControl(e,t=!1){return(this.rowNode.rowPinned==null||t&&Is(this.rowNode))&&!!e}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:i}=this.beans.gridOptions,o=Ii(t),s=Oi(this.column);return i==="custom"&&o!=="selectionColumn"&&s?!1:e.checkboxSelection||s&&typeof t=="object"&&It(t)}refreshShouldDestroy(){const e=this.column.colDef,t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),i=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),o=this.includeDndSource!=this.isIncludeControl(e.dndSource),s=this.isAutoHeight!=this.column.isAutoHeight();return t||i||o||s}stopEditing(e=!1){const{editSvc:t}=this.beans;return t?.stopEditing(this,{cancel:e,source:t?.isBatchEditing()?"ui":"api"})??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:i,rowNode:o,comp:s,eGui:r,beans:{valueSvc:n,gos:a,editSvc:l}}=this;return G(a,{value:e,valueFormatted:t,getValue:()=>n.getDisplayValue(i,o,"edit",this.shouldUseShowValuesAsValue()),setValue:c=>l?.setDataValue({rowNode:o,column:i},c)||o.setDataValue(i,c),formatValue:this.formatValue.bind(this),data:o.data,node:o,pinned:i.getPinned(),colDef:i.colDef,column:i,refreshCell:this.refreshCell.bind(this),eGridCell:r,eParentOfValue:s.getParentOfValue(),registerRowDragger:(c,u,h,g)=>this.registerRowDragger(c,u,g),setTooltip:(c,u)=>{a.assertModuleRegistered("Tooltip",3),this.rendererTooltipValue=c,this.rendererTooltipShouldDisplay=u,this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell()}refreshOrDestroyCell(e){if(this.isClientSideLoadingCell())return;this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e);const t=this.editSvc;t&&this.editCompDetails&&!this.comp?.getCellEditor()&&t.isEditing(this,{withOpenEditor:!0})&&t.startEditing(this,{startedEdit:!1,source:"api",silent:!0})}refreshCell(e){if(this.isClientSideLoadingCell())return;const{beans:{cellFlashSvc:t,filterManager:i,cellStyles:o},column:s,comp:r,suppressRefreshCell:n}=this;if(n)return;const a=s.enableCellChangeFlash,l=s.field==null&&s.valueGetter==null&&s.showRowGroup==null&&!s.isCalculatedCol,d=e?.newData??!1,c=l||e&&(e.force||d),u=!!r,h=this.updateAndFormatValue(u),g=c||h;if(u){if(g){this.showValue(!!d,!1);const p=i?.isSuppressFlashingCellsBecauseFiltering();!e?.suppressFlash&&!p&&a&&t?.flashCell(this),this.editSvc?.applyCellEditStyles(this),o?.applyCellUserStyles(this),o?.applyCellClassesFromColDef(this),this.editSvc?.applyRowEditStyles(this.rowCtrl),this.checkFormulaError()}this.tooltipFeature?.refreshTooltip(),this.refreshNoteState(),o?.applyCellClassRules(this)}}showNote(e=!1){this.notesFeature?.show({focusEditor:e})}refreshNoteState(){this.notesFeature?.refresh()}isNoteHoverSuppressed(){return!!this.editSvc?.isEditing(this)||this.hasFormulaError()||this.hasCellValidationError()}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){const t=this.beans.valueSvc,i=this.column,o=this.rowNode;if(this.shouldUseShowValuesAsValue()){const s=t.formatTransformedValue(i,o,e);if(s!==void 0)return s??e}return t.formatValue(i,o,e)??e}updateAndFormatValue(e){const t=this.value,i=this.valueFormatted,{value:o,valueFormatted:s}=this.beans.valueSvc.getValueForDisplay({column:this.column,node:this.rowNode,includeValueFormatted:!0,from:"edit",transformValues:this.shouldUseShowValuesAsValue()});return this.value=o,this.valueFormatted=s,e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=i:!0}shouldUseShowValuesAsValue(){return this.column.showValuesAs!=null&&!this.editSvc?.isEditing(this,{withOpenEditor:!0})}valuesAreEqual(e,t){const i=this.column.colDef;return i.equals?i.equals(e,t):e===t}addDomData(e){const t=this.eGui;Mt(this.beans.gos,t,ls,this),e.addDestroyFunc(()=>Mt(this.beans.gos,t,ls,null))}createEvent(e,t){const{rowNode:i,column:o,value:s,beans:r}=this;return Yp(r,e,t,{rowNode:i,column:o},s)}processCharacter(e){FP(this.beans,this,e)}onKeyDown(e){CP(this.beans,this,e)}onMouseEvent(e,t){U6(this.beans,this,e,t)}getColSpanningList(){return Ua(this.beans,this)}onLeftChanged(){this.comp&&qa(this.beans,this)}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:i}=this;Au(e,t,i.visibleCols)}refreshAriaColIndex(){gP(this.eGui,this.column.ariaColIndex)}onWidthChanged(){ks(this)}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){this.comp&&this.rangeFeature?.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.comp&&this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e){if(this.isClientSideLoadingCell())return;const{forceBrowserFocus:t=!1,preventScrollOnBrowserFocus:i=!1,sourceEvent:o}=e||{},s=this.editSvc?.allowedFocusTargetOnValidation(this);s&&s!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:t,preventScrollOnBrowserFocus:i,sourceEvent:o})}restoreFocus(e=!1){const{beans:{editSvc:t,focusSvc:i},comp:o}=this;if(!o||t?.isEditing(this)||!this.isCellFocused()||!i.shouldTakeFocus())return;const s=()=>{if(!this.isAlive())return;const r=o.getFocusableElement();this.isCellFocused()&&r.focus({preventScroll:!0})};if(e){setTimeout(s,0);return}s()}onRowIndexChanged(){this.createCellPosition(),this.refreshAriaRowIndex(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged(),this.rowResizeFeature?.refreshRowResizer()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&lP(t,"tabindex",e?void 0:-1)}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.toggleCss(zP,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.toggleCss(WP,e)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){const e=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=e),e}setupFocus(){this.restoreFocus(!0),this.onCellFocused(this.focusEventWhileNotReady??void 0)}onCellFocused(e){const{beans:t}=this;if($i(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}const i=this.isCellFocused(),o=t.editSvc?.isEditing(this)??!1;if(this.comp.toggleCss(_P,i),i&&(e?.forceBrowserFocus||!this.hasBrowserFocus()&&this.beans.focusSvc.shouldTakeFocus())){let s=this.comp.getFocusableElement();if(o){const n=dP(s,null,!0);n.length&&(s=n[0])}const r=e?e.preventScrollOnBrowserFocus:!0;s.focus({preventScroll:r}),hP(t,s)}i&&this.focusEventWhileNotReady&&(this.focusEventWhileNotReady=null),i&&e&&this.rowCtrl.announceDescription(this)}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:uP(t),column:this.column}}applyStaticCssClasses(){const{comp:e}=this;e.toggleCss(OP,!0),e.toggleCss(UP,!0);const t=this.column.isAutoHeight()==!0;e.toggleCss(GP,t),e.toggleCss(NP,!t),this.setCalculatedColumnCss()}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){this.comp&&(this.tooltipFeature?.refreshTooltip(),this.setWrapText(),this.setCalculatedColumnCss(),this.editSvc?.isEditing(this)?this.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.colDef.wrapText==!0;this.comp.toggleCss(qP,e)}setCalculatedColumnCss(){const e=this.beans.calculatedColsSvc,t=e!=null&&this.column.isCalculatedCol;(t||this.calculatedColumnCssApplied)&&(this.comp.toggleCss(Cn,t),this.calculatedColumnCssApplied=t);const i=e!=null&&t&&e.isHighlightedColumn(this.column);(i||this.calculatedColumnHighlightedCssApplied)&&(this.comp.toggleCss(Mu,i),this.calculatedColumnHighlightedCssApplied=i)}isCalculatedColumn(){return this.column.isCalculatedCol}refreshCalculatedColumnCss(){this.setCalculatedColumnCss()}dispatchCellContextMenuEvent(e){const t=this.column.colDef,i=this.createEvent(e,"cellContextMenu"),{beans:o}=this;o.eventSvc.dispatchEvent(i),t.onCellContextMenu&&window.setTimeout(()=>{o.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(i)})},0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.editSvc?.onCellDestroyed(this),this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(e){const t=cP(this.beans),i=this.eGui;return e?i===t:i?.contains(t)??!1}createSelectionCheckbox(){const e=this.beans.selectionSvc?.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,i){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const o=this.createRowDragComp(e,t,i);o&&(this.customRowDragComp=o,this.addDestroyFunc(()=>{this.beans.context.destroyBean(o),this.customRowDragComp=null}),o.refreshVisibility())}createRowDragComp(e,t,i){const o=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,i);if(o)return this.beans.context.createBean(o),o}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){if(!Re(this.column)||!this.eGui)return;const{ariaRowIndex:e}=this.rowCtrl;e!=null&&pP(this.eGui,e)}getRootElement(){return this.eGui}};import{_addOrRemoveAttribute as KP,_batchCall as ef,_escapeString as $a,_exists as Ls,_getActiveDomElement as jP,_isElementChildOfClass as QP,_isVisible as ZP,_makeNull as YP,_setAriaExpanded as JP,_setAriaRowIndex as XP}from"ag-stack";function Ka(e,t,i,o,s,r){if(i==null&&t==null)return;const n={},a={},l=(d,c)=>{for(const u of d.split(" "))u.trim()!=""&&c(u)};if(i){const d=Object.keys(i);for(let c=0;c<d.length;c++){const u=d[c],h=i[u];let g;typeof h=="string"?g=e?e.evaluate(h,o):!0:typeof h=="function"&&(g=h(o)),l(u,p=>{g?n[p]=!0:a[p]=!0})}}if(t&&r)for(const d of Object.keys(t))l(d,c=>{n[c]||(a[c]=!0)});r&&Object.keys(a).forEach(r),Object.keys(n).forEach(s)}function tf(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var e4=class extends y{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const i=this.gos,o=n=>{if(typeof n=="string")e.push(n);else if(Array.isArray(n))for(const a of n)e.push(a)},s=i.get("rowClass");s&&o(s);const r=i.getCallback("getRowClass");if(r){const n={data:t.data,node:t,rowIndex:t.rowIndex},a=r(n);o(a)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,i=>{e.push(i)},()=>{})}processRowClassRules(e,t,i){const{gos:o,expressionSvc:s}=this.beans,r=G(o,{data:e.data,node:e,rowIndex:e.rowIndex});Ka(s,void 0,o.get("rowClassRules"),r,t,i)}processStylesFromGridOptions(e){const t=this.gos,i=t.get("rowStyle"),o=t.getCallback("getRowStyle");let s;if(o){const r={data:e.data,node:e,rowIndex:e.rowIndex};s=o(r)}if(s||i)return Object.assign({},i,s)}};import{_findNextFocusableElement as t4,_getActiveDomElement as i4,_isBrowserSafari as o4,_isFocusableFormField as s4}from"ag-stack";var r4=class extends y{constructor(e){super(),this.rowCtrl=e,this.focusEventWhileNotReady=null}initialiseComp(){const e=this.rowCtrl.getCurrentRowComp(),t=this.rowCtrl.getCurrentRowElement();if(!(!e||!t)){if(this.tooltips?.pruneStaleElements(),this.shouldCreateCellSections()&&e.showEmbeddedFullWidth)this.rowCtrl.isEmbeddedFullWidth=!0,this.rowCtrl.embeddedSectionHasContent={left:!0,center:!0,right:!0},e.showEmbeddedFullWidth({left:this.createFullWidthCompDetails(e.getPinnedLeftRowElement()??t,"left",!0),center:this.createFullWidthCompDetails(e.getScrollingRowElement()??t,null,!0),right:this.createFullWidthCompDetails(e.getPinnedRightRowElement()??t,"right",!0)}),this.rowCtrl.refreshPinnedCellGroupWidths();else{this.rowCtrl.isEmbeddedFullWidth=!1;const i=this.createFullWidthCompDetails(t,null,!0);e.showFullWidth(i),this.rowCtrl.refreshPinnedCellGroupWidths()}this.notesFeature?.destroy(),this.notesFeature=this.beans.notesSvc?.createFullWidthNotesFeature(this.rowCtrl)}}refreshRow(e){if(!this.refreshFullWidthComp()){this.rowCtrl.redrawThisRow();return}this.notesFeature?.refresh()}refreshFullWidthComp(){const e=this.rowCtrl.getCurrentRowComp(),t=this.rowCtrl.getCurrentRowElement();return!e||!t?!0:(this.tooltips?.pruneStaleElements(),this.shouldCreateCellSections()&&e.refreshEmbeddedFullWidth?e.refreshEmbeddedFullWidth(i=>{const o=i==="left"?e.getPinnedLeftRowElement():i==="right"?e.getPinnedRightRowElement():e.getScrollingRowElement();return this.createFullWidthCompDetails(o??t,i).params}):e.refreshFullWidth(()=>this.createFullWidthCompDetails(t,null).params))}shouldCreateCellSections(){return this.rowCtrl.printLayout||this.gos.get("embedFullWidthRows")}getModeCellRenderers(){return this.rowCtrl.getCurrentRowComp()?.getFullWidthCellRenderers()??[]}getAllCellCtrls(){return[]}recreateCell(e){}destroyCells(){}onDisplayedColumnsChanged(){this.notesFeature?.refresh()}onVirtualColumnsChanged(){}onColumnMoved(){this.notesFeature?.refresh()}onSpannedCellsUpdated(e){}createFullWidthCompDetails(e,t,i=!1){const{rowCtrl:o}=this,{gos:s}=this,{rowNode:r}=o,n=this.getTooltips(),a=n?.claimRenderer(e,i),l=G(s,{fullWidth:!0,data:r.data,node:r,value:r.key,valueFormatted:r.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:o.addEventListener.bind(o),registerRowDragger:(c,u,h,g)=>this.addFullWidthRowDragging(c,u,h,g),setTooltip:(c,u)=>{s.assertModuleRegistered("Tooltip",3),a&&n.setRendererTooltip(e,r,c,u,a)}}),d=this.beans.userCompFactory;switch(o.getRowType()){case"FullWidthDetail":return m1(d,l);case"FullWidthGroup":{const{value:c,valueFormatted:u}=this.beans.valueSvc.getValueForDisplay({node:r,includeValueFormatted:!0,from:"edit"});return l.value=c,l.valueFormatted=u,n?.setupGroupRowsTooltip(r,e),f1(d,l)}case"FullWidthLoading":return p1(d,l);default:return g1(d,l)}}setupDetailRowAutoHeight(e){this.rowCtrl.getRowType()==="FullWidthDetail"&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this.rowCtrl,e)}getTooltips(){return this.tooltips??(this.tooltips=this.beans.tooltipSvc?.createFullWidthRowTooltips(this.rowCtrl))}addFullWidthRowDragging(e,t,i="",o){const{rowDragSvc:s,context:r}=this.beans;if(!s)return;const n=s.createRowDragComp(()=>i,this.rowCtrl.rowNode,void 0,e,t,o);this.createBean(n,r),this.addDestroyFunc(()=>{this.destroyBean(n,r)})}setupFocus(){this.restoreFullWidthFocus(!0),this.onRowFocused(this.focusEventWhileNotReady??void 0)}restoreFullWidthFocus(e=!1){const{focusSvc:t,editSvc:i}=this.beans,{rowCtrl:o}=this;if(i?.isEditing(o)||!t.isRowFocused(o.rowNode.rowIndex,o.rowNode.rowPinned)||!t.shouldTakeFocus())return;const s=o.getCurrentRowElement();if(!s)return;const r=()=>{o.isAlive()&&t.isRowFocused(o.rowNode.rowIndex,o.rowNode.rowPinned)&&s.focus({preventScroll:!0})};if(e){setTimeout(r,0);return}r()}onRowFocused(e){const{focusSvc:t}=this.beans,{rowCtrl:i}=this,o=t.isRowFocused(i.rowNode.rowIndex,i.rowNode.rowPinned),s=i.getCurrentRowElement();if(!o){s?.classList.remove("ag-full-width-focus");return}if(!s){e&&(this.focusEventWhileNotReady=e);return}s.classList.add("ag-full-width-focus"),this.focusEventWhileNotReady=null,e?.forceBrowserFocus&&s.focus({preventScroll:!0})}onKeyboardNavigate(e){const{rowCtrl:t}=this,i=t.getCurrentRowElement();if(!i?.contains(e.target)||!(i===e.target))return;const s=t.rowNode,{focusSvc:r,navigation:n}=this.beans,a=r.getFocusedCell(),l={rowIndex:s.rowIndex,rowPinned:s.rowPinned,column:a?.column??this.getNavigationColumn()};n?.navigateToNextCell(e,e.key,l,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||We(e))return;const{rowCtrl:t,beans:i}=this,o=t.getCurrentRowElement(),s=o?.contains(e.target)?o:null,r=s===e.target,n=i4(this.beans);let a=!1;s&&n&&(a=s.contains(n)&&n.classList.contains("ag-cell"));let l=null;!r&&!a&&(l=t4({beans:i,rootNode:s,backwards:e.shiftKey})),(r||!l)&&this.beans.navigation?.onTabKeyDown(t,e)}getRowContentElement(){return this.rowCtrl.getCurrentRowElement()??null}getNavigationColumn(){return this.getDefaultTarget()?.column??this.getFirstDisplayedColumnForFullWidth()}onRowMouseDown(e){if(this.isSuppressMouseEvent(e))return;const{rangeSvc:t,focusSvc:i}=this.beans;t?.removeAllCellRanges();const{rowCtrl:o}=this,s=o.getCurrentRowElement();if(!s)return;const r=e.target;if(!s.contains(r))return;const n=this.getTarget(r)?.column;if(!n)return;const a=o.rowNode;let l=e.defaultPrevented||o4();s.contains(r)&&s4(r)&&(l=!1),i.setFocusedCell({rowIndex:a.rowIndex,column:n,rowPinned:a.rowPinned,forceBrowserFocus:l})}isSuppressMouseEvent(e){const{rowCtrl:t}=this,{gos:i}=this,o=t.getCurrentRowComp(),r=t.getCurrentRowElement()?.contains(e.target)&&o?o:void 0,n=r&&e.target instanceof HTMLElement?r.getPinnedLeftRowElement()?.contains(e.target)?"left":r.getPinnedRightRowElement()?.contains(e.target)?"right":null:null,a=r?.getFullWidthCellRendererParamsForPinned?.(n)??r?.getFullWidthCellRendererParams();return p3(i,a,t.rowNode,e)}getTargets(){const{rowCtrl:e}=this,t=e.getGui(),i=t?.rowComp,o=t?.element,s=t?.compBean;if(!i||!o||!s)return[];const r=i.getPinnedLeftRowElement(),n=i.getScrollingRowElement(),a=i.getPinnedRightRowElement();if(!r&&!n&&!a){const d=this.getFirstDisplayedColumnForFullWidth();return d?[{compBean:s,element:o,column:d,pinned:null}]:[]}const l=new Map;return this.addFullWidthTarget(l,r,s,this.getFirstColumnForFullWidthSection("left"),"left"),this.addFullWidthTarget(l,n??o,s,this.getFirstColumnForFullWidthSection(null),null),this.addFullWidthTarget(l,a,s,this.getFirstColumnForFullWidthSection("right"),"right"),[...l.values()]}getTarget(e){const t=e instanceof Node?e:void 0,i=this.getTargets();if(i.length)return t?i.find(o=>o.element.contains(t))??i[0]:i[0]}getDefaultTarget(){return this.getTargets()[0]}findInfoForEvent(e){const t=this.getTarget(e?.target);if(t)return{column:t.column,pinned:t.pinned}}addFullWidthTarget(e,t,i,o,s){!t||!o||e.has(t)||e.set(t,{compBean:i,element:t,column:o,pinned:s})}getFirstColumnForFullWidthSection(e){const{visibleCols:t}=this.beans;switch(e){case"left":return t.leftCols[0]??t.centerCols[0]??t.rightCols[0];case"right":return t.rightCols[0]??t.centerCols[0]??t.leftCols[0];default:return t.centerCols[0]??t.leftCols[0]??t.rightCols[0]}}getFirstDisplayedColumnForFullWidth(){return this.beans.visibleCols.allCols[0]}getNotesFeature(){return this.notesFeature}addInitialRowClasses(e){e.push("ag-full-width-row"),this.shouldCreateCellSections()&&e.push("ag-embedded-full-width-row")}destroy(){this.tooltips=this.destroyBean(this.tooltips,this.beans.context),this.notesFeature?.destroy(),this.notesFeature=void 0,super.destroy()}},n4=class extends y{constructor(e){super(),this.rowCtrl=e,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.allCellCtrls=null,this.updateColumnListsPending=!1}postConstruct(){this.addListenersForCellCtrls()}initialiseComp(){this.updateColumnLists(!this.rowCtrl.useAnimationFrameForCreate)}refreshRow(e){for(const t of this.getAllCellCtrls())t.refreshCell(e);this.rowCtrl.onNormalRowRefreshed()}shouldCreateCellSections(){return!0}prepareInitialCellCtrls(){this.rowCtrl.useAnimationFrameForCreate||this.createAllCellCtrls()}getInitialCellCtrls(e){return this.rowCtrl.useAnimationFrameForCreate?null:this.getAllCellCtrls()}getAllCellCtrls(){let e=this.allCellCtrls;if(e===null){const t=this.centerCellCtrls.list,i=this.leftCellCtrls.list,o=this.rightCellCtrls.list;e=i.length===0&&o.length===0?t:t.concat(i,o),this.allCellCtrls=e}return e}recreateCell(e){this.allCellCtrls=null,this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}destroyCells(){this.allCellCtrls=null,this.centerCellCtrls=wo(this.centerCellCtrls),this.leftCellCtrls=wo(this.leftCellCtrls),this.rightCellCtrls=wo(this.rightCellCtrls)}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}onColumnMoved(){this.updateColumnLists()}onSpannedCellsUpdated(e){e&&!this.rowCtrl.rowNode.rowPinned||this.updateColumnLists()}updateColumnLists(e=!1,t=!1){const{rowCtrl:i}=this,{animationFrameSvc:o}=this.beans;if(!o?.active||e||i.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(o.createTask(()=>{i.isAlive()&&this.updateColumnListsImpl(!0)},i.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){const t=this.rowCtrl.getGui();t&&(t.rowComp.setCellCtrls(this.getAllCellCtrls(),e),this.rowCtrl.refreshPinnedCellGroupWidths())}createAllCellCtrls(){this.allCellCtrls=null;const{rowCtrl:e}=this,t=this.beans.colViewport,i=this.beans.visibleCols;if(e.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,i.allCols),this.leftCellCtrls=wo(this.leftCellCtrls),this.rightCellCtrls=wo(this.rightCellCtrls);else{const o=t.getColsWithinViewport(e.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,o);const s=i.getLeftColsForRow(e.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,s,"left");const r=i.getRightColsForRow(e.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,r,"right")}}createCellCtrls(e,t,i=null){const{rowCtrl:o}=this,s={list:[],map:{}},r=(c,u,h)=>{h==null?s.list.push(u):s.list.splice(h,0,u),s.map[c]=u},n=[];for(const c of t){const u=c.instanceId;let h=e.map[u];h&&!o.isCorrectCtrlForSpan(h)&&(h.destroy(),h=void 0),h??(h=o.getNewCellCtrl(c)),h&&r(u,h)}for(const c of e.list){const u=c.column.instanceId;if(s.map[u]!=null)continue;!this.isCellEligibleToBeRemoved(c,i)?n.push([u,c]):c.destroy()}if(n.length)for(const[c,u]of n){const h=s.list.findIndex(p=>p.column.left>u.column.left),g=h===-1?void 0:Math.max(h-1,0);r(c,u,g)}const{focusSvc:a}=this.beans,d=a.getFocusedCell()?.column;if(d&&d.pinned==i){const c=d.instanceId;if(!s.map[c]&&d.displayed){const h=this.createFocusedCellCtrl();if(h){const g=s.list.findIndex(f=>f.column.left>h.column.left),p=g===-1?void 0:Math.max(g-1,0);r(c,h,p)}}}return s}createFocusedCellCtrl(){const{rowCtrl:e}=this,{focusSvc:t,rowSpanSvc:i}=this.beans,o=t.getFocusedCell();if(!o)return;const s=i?.getCellSpan(o.column,e.rowNode);if(s){if(s.firstNode!==e.rowNode||!s.doesSpanContain(o))return}else if(!t.isRowFocused(e.rowNode.rowIndex,e.rowNode.rowPinned))return;return e.getNewCellCtrl(o.column)}isCellEligibleToBeRemoved(e,t){const{column:s}=e;if(s.pinned!=t||!this.rowCtrl.isCorrectCtrlForSpan(e))return!0;const{editSvc:r}=this.beans,n=r?.isEditing(e),a=e.isCellFocused();return n||a?!s.displayed:!0}removeCellCtrl(e,t){const i={list:[],map:{}};for(const o of e.list)o!==t&&(i.list.push(o),i.map[o.column.instanceId]=o);return i}isSuppressMouseEvent(e){const t=ds(this.gos,e.target);return t!=null&&Ji(this.gos,t.column,this.rowCtrl.rowNode,e)}addListenersForCellCtrls(){const{rowCtrl:e}=this;this.addManagedListeners(e.rowNode,{rowIndexChanged:()=>{for(const t of this.getAllCellCtrls())t.onRowIndexChanged()},cellChanged:t=>{for(const i of this.getAllCellCtrls())i.onCellChanged(t)}})}},wo=e=>{for(const t of e.list)t.destroy();return{list:[],map:{}}},a4=0,Vs=class extends y{constructor(e,t,i,o,s){super(),this.rowNode=e,this.useAnimationFrameForCreate=o,this.printLayout=s,this.active=!0,this.slideInAnimation=!1,this.fadeInAnimation=!1,this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.rowId=null,this.ariaRowIndex=null,this.businessKey=null,this.isEmbeddedFullWidth=!1,this.embeddedSectionHasContent={left:!0,center:!0,right:!0},this.beans=t,this.gos=t.gos,this.paginationPage=t.pagination?.getCurrentPage()??0,this.useTopPositioning=!!(this.gos.get("suppressRowTransform")||this.gos.get("enableCellSpan")),this.instanceId=e.id+"-"+a4++,this.rowId=$a(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=tf(this.rowNode),this.setRowType(),this.setAnimateFlags(i),this.rowStyles=this.processStylesFromGridOptions(),this.rowModeFeature=this.createRowModeFeature(),this.addListeners(),this.rowModeFeature.prepareInitialCellCtrls?.()}isClientSideLoadingRow(){return ut(this.gos,this.rowNode)}createRowModeFeature(){const{context:e}=this.beans,t=this.isFullWidth()?new r4(this):new n4(this);return this.createBean(t,e),this.addDestroyFunc(()=>this.destroyBean(t,e)),t}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(this.isClientSideLoadingRow()||typeof this.businessKeyForNodeFunc!="function")return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=$a(e)}setComp(e,t,i,o){const{context:s,rowRenderer:r}=this.beans,n=Zi(this,s,o),a={rowComp:e,element:t,containerType:i,compBean:n};this.rowGui=a,this.initialiseRowComp();const l=this.rowNode,d=this.rowType==="FullWidthLoading"||l.stub,c=!l.data&&this.beans.rowModel.getType()==="infinite";!d&&!c&&!l.rowPinned&&r.dispatchFirstDataRenderedEvent(),this.rowModeFeature.setupFocus?.()}unsetComp(e){this.rowGui?.containerType===e&&(this.rowGui=void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";this.rowGui?.element.style.setProperty("display",t)}initialiseRowComp(){const e=this.rowGui;if(!e)return;const t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),this.onRowHeightChanged(),this.updateRowIndexes(),this.setFocusedClasses(),this.setStylesFromGridOptions(!1),Ye(t)&&this.rowNode.selectable&&this.onRowSelected(),this.rowModeFeature.initialiseComp();const{rowComp:i,element:o,compBean:s}=e,r=this.getInitialRowClasses();for(const n of r)i.toggleCss(n,!0);this.beans.editSvc?.applyRowEditStyles(this),this.executeSlideAndFadeAnimations(),this.rowNode.isExpandable()&&JP(o,!!this.rowNode.expanded),this.setRowCompRowId(),this.setRowCompRowBusinessKey(),Mt(t,o,cs,this),s.addDestroyFunc(()=>Mt(t,o,cs,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&i.toggleCss("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(){this.businessKey!=null&&this.rowGui?.rowComp.setRowBusinessKey(this.businessKey)}setRowCompRowId(){const e=$a(this.rowNode.id);this.rowId=e,e!=null&&this.rowGui?.rowComp.setRowId(e)}executeSlideAndFadeAnimations(){const e=this.rowGui;e&&(this.slideInAnimation&&(ef(()=>{this.onTopChanged()}),this.slideInAnimation=!1),this.fadeInAnimation&&(ef(()=>{e.rowComp.toggleCss("ag-opacity-zero",!1)}),this.fadeInAnimation=!1))}addRowDraggerToRow(){const e=this.rowGui;if(!e)return;const t=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const i=this.createBean(t,this.beans.context);this.rowDragComps.push(i),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(o=>o!==i),this.destroyBean(i,this.beans.context)})}getModeCellRenderers(){return this.rowModeFeature.getModeCellRenderers?.()??[]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate"),t=this.rowGui;if(this.isClientSideLoadingRow()||!e||t?.containerType!=="center")return;const{visibleCols:i}=this.beans,o=t.element,s={eRow:o,ePinnedLeftRow:i.leftCols.length?o:void 0,ePinnedRightRow:i.rightCols.length?o:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(s)}isNodeFullWidthCell(){if(this.isClientSideLoadingRow())return!1;if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){const{rowNode:e,gos:t,beans:{colModel:i}}=this,o=t.get("suppressServerSideFullWidthLoadingRow"),s=t.get("groupHideOpenParents"),n=this.beans.rowModel.getType()==="serverSide"&&e.stub&&!o&&!s,a=this.isNodeFullWidthCell(),l=t.get("masterDetail")&&e.detail,d=i.pivotMode,c=Dr(t,e,d),u=o&&e.stub&&c&&!s;n?this.rowType="FullWidthLoading":l?this.rowType="FullWidthDetail":a?this.rowType="FullWidth":c&&!u?this.rowType="FullWidthGroup":this.rowType="Normal"}getNewCellCtrl(e){if(!this.beans.rowSpanSvc?.isCellSpanning(e,this.rowNode))return new vi(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}getCellLane(e){return this.printLayout?null:e.column.getPinned()}setEmbeddedSectionHasContent(e,t){this.embeddedSectionHasContent[e]=t}refreshPinnedCellGroupWidths(){const e=this.rowGui;e&&e.rowComp.refreshPinnedSections()}getMappedPinnedCellGroupWidths(){let{leftWidth:e,centerWidth:t,rightWidth:i}=this.getPinnedCellGroupWidths();if(this.isEmbeddedFullWidth){const s=this.embeddedSectionHasContent.left,r=this.embeddedSectionHasContent.right;t=t+(s?0:e)+(r?0:i),e=s?e:0,i=r?i:0}const o=this.isFullWidth();return{leftWidth:e,centerWidth:t,rightWidth:i,renderLeft:e>0||o,renderRight:i>0||o}}getPinnedCellGroupWidths(){return un(this.beans.visibleCols,this.printLayout)}getInitialCellCtrls(e){return this.rowModeFeature.getInitialCellCtrls?.(e)??null}getDomOrder(){return this.gos.get("ensureDomOrder")||oe(this.gos,"print")}listenOnDomOrder(e){const t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){this.rowNode.sticky||!e||(Ls(this.rowNode.oldRowTop)?this.slideInAnimation=!0:this.fadeInAnimation=!0)}isFullWidth(){return this.rowType!=="Normal"}onNormalRowRefreshed(){this.setRowCompRowId(),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(),this.onRowSelected(),this.postProcessCss()}getCurrentRowComp(){return this.rowGui?.rowComp}getCurrentRowElement(){return this.rowGui?.element}redrawThisRow(){this.beans.rowRenderer.redrawRow(this.rowNode)}getRowType(){return this.rowType}getFullWidthAnchorRole(){return this.rowType==="FullWidthLoading"?"gridcell":"presentation"}getContainerType(){return this.rowGui?.containerType}shouldCreateCellSections(){return this.rowModeFeature.shouldCreateCellSections()}getNotesFeature(){return this.rowModeFeature.getNotesFeature?.()}addListeners(){const{beans:e,gos:t,rowNode:i}=this,{expansionSvc:o,eventSvc:s,context:r,rowSpanSvc:n}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...o?.getRowExpandedListeners(this)??{}}),i.detail&&this.addManagedListeners(i.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(i,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this),rowPinned:this.onRowPinned.bind(this)}),this.addManagedListeners(s,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),headerHeightChanged:this.onTopChanged.bind(this),headerRowsChanged:this.updateRowIndexes.bind(this),advancedFilterEnabledChanged:this.updateRowIndexes.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),pinnedRowDataChanged:this.onPinnedRowsChanged.bind(this),stickyBottomOffsetChanged:this.onStickyBottomOffsetChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),displayedColumnsWidthChanged:this.refreshPinnedCellGroupWidths.bind(this),leftPinnedWidthChanged:this.refreshPinnedCellGroupWidths.bind(this),rightPinnedWidthChanged:this.refreshPinnedCellGroupWidths.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:()=>{this.rowNode.rowPinned==="bottom"&&this.updateRowIndexes(),this.refreshFirstAndLastRowStyles()},columnMoved:()=>{this.rowModeFeature.onColumnMoved()}}),n?.active&&this.addManagedListeners(n,{spannedCellsUpdated:({pinned:a})=>{this.rowModeFeature.onSpannedCellsUpdated(a)}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,r)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow")){this.addRowDraggerToRow();return}this.rowDragComps=this.destroyBeans(this.rowDragComps,r)})}onRowPinned(){this.rowGui?.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){this.refreshRow({suppressFlash:!e.update,newData:!e.update})}refreshRow(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}this.rowModeFeature.refreshRow(e??{})}postProcessCss(){this.isClientSideLoadingRow()||(this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.beans.editSvc?.applyRowEditStyles(this),this.postProcessRowDragging())}onRowNodeHighlightChanged(){const{rowGui:e,beans:{rowDropHighlightSvc:t}}=this,i=t?.row===this.rowNode?t.position:"none",o=i==="above",s=i==="inside",r=i==="below",n=i!=="none",a=o||r,l=this.rowNode.uiLevel,d=a&&l>0,c=d?l.toString():"0";e?.rowComp.toggleCss("ag-row-highlight-above",o),e?.rowComp.toggleCss("ag-row-highlight-inside",s),e?.rowComp.toggleCss("ag-row-highlight-below",r),e?.rowComp.toggleCss("ag-row-highlight-indent",d),n?e?.element.style.setProperty("--ag-row-highlight-level",c):e?.element.style.removeProperty("--ag-row-highlight-level")}postProcessRowDragging(){const{rowNode:e,rowGui:t}=this,i=e.dragging;t?.rowComp.toggleCss("ag-row-dragging",i)}onDisplayedColumnsChanged(){this.rowModeFeature.onDisplayedColumnsChanged()}onVirtualColumnsChanged(){this.rowModeFeature.onVirtualColumnsChanged()}getRowPosition(){return{rowPinned:YP(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){this.rowModeFeature.onKeyboardNavigate?.(e)}onTabKeyDown(e){this.rowModeFeature.onTabKeyDown?.(e)}getRowContentElement(){return this.rowModeFeature.getRowContentElement?.()??null}getNavigationColumn(){return this.rowModeFeature.getNavigationColumn()}getRowYPosition(){const e=this.rowGui?.element;return e&&ZP(e)?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:this.gos.get("tabIndex");this.rowGui&&KP(this.rowGui.element,"tabindex",t)}onRowFocused(e){this.rowModeFeature.onRowFocused?.(e)}recreateCell(e){this.rowModeFeature.recreateCell(e)}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"pointerdown":case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){const{rowNode:i}=this;return G(this.gos,{type:e,node:i,data:i.data,rowIndex:i.rowIndex,rowPinned:i.rowPinned,event:t})}createRowEventWithSource(e,t){const i=this.createRowEvent(e,t);return i.source=this,i}onRowDblClick(e){if(We(e))return;const t=this.createRowEventWithSource("rowDoubleClicked",e);t.isEventHandlingSuppressed=this.isSuppressMouseEvent(e),this.beans.eventSvc.dispatchEvent(t)}findInfoForEvent(e){return this.rowModeFeature.findInfoForEvent?.(e)}getTargets(){return this.rowModeFeature.getTargets?.()??[]}getTarget(e){return this.rowModeFeature.getTarget?.(e)}onRowMouseDown(e){this.lastMouseDownOnDragger=QP(e.target,"ag-row-drag",3),this.rowModeFeature.onRowMouseDown?.(e)}isSuppressMouseEvent(e){return this.rowModeFeature.isSuppressMouseEvent(e)}onRowClick(e){if(We(e)||this.lastMouseDownOnDragger)return;const i=this.isSuppressMouseEvent(e),{eventSvc:o,selectionSvc:s}=this.beans,r=this.createRowEventWithSource("rowClicked",e);r.isEventHandlingSuppressed=i,o.dispatchEvent(r),!i&&s?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){this.rowModeFeature.setupDetailRowAutoHeight?.(e)}onUiLevelChanged(){const e=tf(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,i="ag-row-level-"+this.rowLevel;this.rowGui?.rowComp.toggleCss(t,!0),this.rowGui?.rowComp.toggleCss(i,!1)}this.rowLevel=e}isFirstRowOnPage(){const{rowNode:{rowIndex:e,rowPinned:t},beans:{pageBounds:i}}=this;return t?e===0:e===i.getFirstRow()}isLastRowOnPage(){const{rowNode:{rowIndex:e,rowPinned:t},beans:{pageBounds:i,pinnedRowModel:o}}=this;if(t){const s=t==="top"?o?.getPinnedTopRowCount():o?.getPinnedBottomRowCount();return s==null?!1:e===s-1}return e===i.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.rowGui?.rowComp.toggleCss("ag-row-first",e)),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.rowGui?.rowComp.toggleCss("ag-row-last",t))}getAllCellCtrls(){return this.rowModeFeature.getAllCellCtrls()}postProcessClassesFromGridOptions(){if(this.isClientSideLoadingRow())return;const e=[];if(this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),!!e.length)for(const t of e)this.rowGui?.rowComp.toggleCss(t,!0)}postProcessRowClassRules(){this.isClientSideLoadingRow()||this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>this.rowGui?.rowComp.toggleCss(e,!0),e=>this.rowGui?.rowComp.toggleCss(e,!1))}setStylesFromGridOptions(e){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.rowGui?.rowComp.setUserStyles(this.rowStyles)}getInitialRowClasses(){const{rowNode:e,beans:t}=this,i=[];i.push("ag-row"),i.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation&&i.push("ag-opacity-zero"),i.push(e.rowIndex%2===0?"ag-row-even":"ag-row-odd"),e.isRowPinned()&&(i.push("ag-row-pinned"),t.pinnedRowModel?.isManual()&&i.push("ag-row-pinned-manual")),!e.isRowPinned()&&e.pinnedSibling&&i.push("ag-row-pinned-source"),e.isSelected()&&i.push("ag-row-selected"),e.footer&&i.push("ag-row-footer"),i.push("ag-row-level-"+this.rowLevel),e.stub&&i.push("ag-row-loading"),this.rowModeFeature.addInitialRowClasses?.(i),t.expansionSvc?.addExpandedCss(i,e),e.dragging&&i.push("ag-row-dragging");const{rowStyleSvc:o}=t;return o&&!this.isClientSideLoadingRow()&&(o.processClassesFromGridOptions(i,e),o.preProcessRowClassRules(i,e)),i.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&i.push("ag-row-first"),this.isLastRowOnPage()&&i.push("ag-row-last"),i}processStylesFromGridOptions(){return this.isClientSideLoadingRow()?this.emptyStyle:this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(){this.beans.selectionSvc?.onRowCtrlSelected(this,()=>this.announceDescription())}announceDescription(e){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode),this.announceNoteDescription(e)}announceNoteDescription(e){const{notesSvc:t,ariaAnnounce:i}=this.beans;if(!t||!i||!e&&!this.isFullWidth())return;const o={rowNode:this.rowNode},s=e?{column:e.column}:{location:"fullWidthRow"},r={...o,...s};if(t.getNoteAccess(r)?.canView){const a=this.getLocaleTextFunc();i.announceValue(a("ariaHasNote","This cell has a note."),"note")}}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:i}=e,{rowNode:o,beans:s,gos:r}=this;i.addManagedListeners(t,{pointerenter:n=>{n.pointerType==="mouse"&&o.dispatchRowEvent("mouseEnter")},pointerleave:n=>{n.pointerType==="mouse"&&o.dispatchRowEvent("mouseLeave")}}),i.addManagedListeners(o,{mouseEnter:()=>{!s.dragSvc?.dragging&&!r.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),o.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){(e??this.rowGui?.element)?.classList.remove("ag-row-hover"),this.rowNode.setHovered(!1)}getGui(){return this.rowGui}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),i=this.applyPaginationOffset(t.top,!0)-100,o=this.applyPaginationOffset(t.bottom,!0)+100;return Dt(e,i,o)}isRowRendered(){return!!this.rowGui}onRowHeightChanged(){if(this.rowNode.rowHeight==null)return;const e=this.rowNode.rowHeight,t=this.beans.environment.getDefaultRowHeight(),o=Er(this.gos)&&!this.isClientSideLoadingRow()?Je(this.beans,this.rowNode).height:void 0,s=o?`${Math.min(t,o)-2}px`:void 0;this.rowGui?.element.style.setProperty("height",`${e}px`),s&&this.rowGui?.element.style.setProperty("--ag-line-height",s)}destroyFirstPass(e=!1){this.active=!1;const{rowNode:t}=this;if(!e&&Tt(this.gos)&&!t.sticky)if(t.rowTop!=null){const s=this.roundRowTopToBounds(t.rowTop);this.setRowTop(s)}else this.rowGui?.rowComp.toggleCss("ag-opacity-zero",!0);this.isFullWidth()&&this.rowGui?.element.contains(jP(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);const i=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(i),this.beans.eventSvc.dispatchEvent(i),super.destroy()}destroySecondPass(){this.rowGui=void 0,this.rowModeFeature.destroyCells()}setFocusedClasses(){const{rowGui:e}=this;e?.rowComp.toggleCss("ag-row-focus",this.rowFocused),e?.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)}onCellFocusChanged(){const{focusSvc:e}=this.beans,t=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses())}onPinnedRowsChanged(){this.updateRowIndexes(),this.refreshFirstAndLastRowStyles()}onPaginationChanged(){const e=this.beans.pagination?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){const e=this.getCalculatedRowTop();Ls(e)&&this.setRowTop(e)}onPaginationPixelOffsetChanged(){this.onTopChanged()}onStickyBottomOffsetChanged(){this.rowNode.rowPinned==="bottom"&&this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const i=this.beans.pageBounds.getPixelOffset();return e+i*(t?1:-1)}setRowTop(e){this.printLayout||Ls(e)&&this.setRowTopStyle(`${this.calculateRowTopPx(e)}px`)}calculateRowTopPx(e){const{rowNode:t,beans:{rowContainerHeight:i}}=this,o=this.applyPaginationOffset(e);return t.isRowPinned()||t.sticky?o:i.getRealPixelPosition(o)}getInitialRowTop(){return this.useTopPositioning?this.getInitialRowTopShared():void 0}getInitialTransform(){return this.useTopPositioning?void 0:`translateY(${this.getInitialRowTopShared()})`}getInitialRowTopShared(){if(this.printLayout)return"";const{rowNode:e}=this;let t;if(e.sticky){const i=this.getCalculatedRowTop();t=Ls(i)?i:e.stickyRowTop}else t=this.slideInAnimation?this.roundRowTopToBounds(e.oldRowTop):e.rowTop;return`${this.calculateRowTopPx(t)}px`}getCalculatedRowTop(){const{sticky:e,rowTop:t,stickyRowTop:i}=this.rowNode;return e?i:t}setRowTopStyle(e){const{rowGui:t,useTopPositioning:i}=this;t&&(i?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`))}getCellCtrl(e,t=!1){let i=null;for(const o of this.getAllCellCtrls())o.column==e&&(i=o);if(i!=null||t)return i;for(const o of this.getAllCellCtrls())o?.getColSpanningList().indexOf(e)>=0&&(i=o);return i}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}getAriaRowIndex(){const{rowNode:e,beans:t}=this,{rowIndex:i}=e;return i==null||e.getRowIndexString()===null?null:of(t,e,i)}updateRowIndexes(){const{rowNode:e,rowGui:t,beans:i}=this,{rowIndex:o}=e;if(o==null)return;const s=e.getRowIndexString();if(s===null)return;const r=o%2===0,n=this.ariaRowIndex=of(i,e,o);t&&(t.rowComp.setRowIndex(s),t.rowComp.toggleCss("ag-row-even",r),t.rowComp.toggleCss("ag-row-odd",!r),XP(t.element,n))}};function of(e,t,i){const o={rowIndex:i,rowPinned:t.rowPinned??null};return an(e)+rn(e,o)+1}var l4=class extends y{constructor(){super(),this.beanName="navigation",this.currentColumnWithoutSpan=null,this.hasColumnWithoutSpanListener=!1,this.onPageDown=Qp(this.onPageDown,100),this.onPageUp=Qp(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const i=e.key,o=e.altKey,s=e.ctrlKey||e.metaKey,r=!!this.beans.rangeSvc&&e.shiftKey,n=sg(this.gos,e);let a=!1;switch(i){case pe.PAGE_HOME:case pe.PAGE_END:!s&&!o&&(this.onHomeOrEndKey(i),a=!0);break;case pe.LEFT:case pe.RIGHT:case pe.UP:case pe.DOWN:if(!n)return!1;s&&!o&&!r&&(this.onCtrlUpDownLeftRight(i,n),a=!0);break;case pe.PAGE_DOWN:case pe.PAGE_UP:!s&&!o&&(a=this.handlePageUpDown(i,n,t));break}return a&&e.preventDefault(),a}handlePageUpDown(e,t,i){return i&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===pe.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:i,focusIndex:o,focusColumn:s,isAsync:r,rowPinned:n}){const{scrollFeature:a}=this.gridBodyCon;Ci(i)&&!i.isPinned()&&a.ensureColumnVisible(i),Ci(e)&&a.ensureIndexVisible(e,t),r||a.ensureIndexVisible(o);const{focusSvc:l}=this.beans;l.setFocusedCell({rowIndex:o,column:s,rowPinned:n,forceBrowserFocus:!0}),this.setRangeToCellIfSupported({rowIndex:o,rowPinned:n,column:s})}onPageDown(e){const t=this.beans,i=ja(t),o=this.getViewportHeight(),{pageBounds:s,rowModel:r,rowAutoHeight:n}=t,a=s.getPixelOffset(),l=i.top+o,d=r.getRowIndexAtPixel(l+a);n?.active?this.navigateToNextPageWithAutoHeight(e,d):this.navigateToNextPage(e,d)}onPageUp(e){const t=this.beans,i=ja(t),{pageBounds:o,rowModel:s,rowAutoHeight:r}=t,n=o.getPixelOffset(),a=i.top,l=s.getRowIndexAtPixel(a+n);r?.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,i=!1){const{pageBounds:o,rowModel:s}=this.beans,r=this.getViewportHeight(),n=o.getFirstRow(),a=o.getLastRow(),l=o.getPixelOffset(),d=s.getRow(e.rowIndex),c=i?d?.rowHeight-r-l:r-l,u=d?.rowTop+c;let h=s.getRowIndexAtPixel(u+l);if(h===e.rowIndex){const v=i?-1:1;t=h=e.rowIndex+v}let g;i?(g="bottom",h<n&&(h=n),t<n&&(t=n)):(g="top",h>a&&(h=a),t>a&&(t=a)),this.isRowTallerThanView(s.getRow(h))&&(t=h,g="top");const p={rowIndex:h,column:e.column,rowPinned:null},f=this.getNormalisedPosition(p),{rowIndex:m,column:C}=f??p;this.navigateTo({scrollIndex:t,scrollType:g,scrollColumn:null,focusIndex:m,focusColumn:C})}navigateToNextPageWithAutoHeight(e,t,i=!1){this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const o=this.getNextFocusIndexForAutoHeight(e,i);this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:o,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const i=t?-1:1,o=this.getViewportHeight(),{pageBounds:s,rowModel:r}=this.beans,n=s.getLastRow();let a=0,l=e.rowIndex;for(;l>=0&&l<=n;){const d=r.getRow(l);if(d){const c=d.rowHeight??0;if(a+c>o)break;a+=c}l+=i}return Dt(l,0,n)}getViewportHeight(){const e=this.beans,t=ja(e),i=this.beans.scrollVisibleSvc.getScrollbarWidth();let o=t.bottom-t.top;return e.scrollVisibleSvc.isHorizontalScrollShowing()&&(o-=i),o}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const i=this.beans.cellNavigation.getNextCellToFocus(e,t,!0);if(!i)return;const o=this.getNormalisedPosition(i),{rowIndex:s,rowPinned:r,column:n}=o??i,a=n;this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:a,focusIndex:s,focusColumn:a,rowPinned:r})}onHomeOrEndKey(e){const t=e===pe.PAGE_HOME,{visibleCols:i,pageBounds:o,rowModel:s}=this.beans,r=i.allCols,n=t?o.getFirstRow():o.getLastRow(),a=s.getRow(n);if(!a)return;const l=(t?r:[...r].reverse()).find(d=>!d.isSuppressNavigable(a)&&!Re(d));l&&this.navigateTo({scrollIndex:n,scrollType:null,scrollColumn:l,focusIndex:n,focusColumn:l})}onTabKeyDown(e,t){const i=t.shiftKey,o=this.tabToNextCellCommon(e,i,t),s=this.beans,{ctrlsSvc:r,pageBounds:n,focusSvc:a,gos:l}=s;if(o!==!1){o?t.preventDefault():o===null&&r.get("gridCtrl").allowFocusForNextCoreContainer(i);return}if(i){const{rowIndex:d,rowPinned:c}=e.getRowPosition();(c?d===0:d===n.getFirstRow())&&(l.get("headerHeight")===0||ve(s)?Nt(s,!0,"force"):(t.preventDefault(),a.focusPreviousFromFirstCell(t)))}else e instanceof vi&&!e.hasBrowserFocus(!0)&&e.focusCell({forceBrowserFocus:!0}),(a.focusOverlay(!1)||Nt(s,i))&&t.preventDefault()}tabToNextCell(e,t){const i=this.beans,{focusSvc:o,rowRenderer:s}=i,r=o.getFocusedCell();if(!r)return!1;let n=Gt(i,r);return!n&&(n=s.getRowByPosition(r),!n?.isFullWidth())?!1:!!this.tabToNextCellCommon(n,e,t,"api")}tabToNextCellCommon(e,t,i,o="ui"){const{editSvc:s,focusSvc:r}=this.beans;let n;const a=e instanceof vi?e:e.getAllCellCtrls()?.[0],l=s?.isEditing();return l&&(n=s?.moveToNextCell(a,t,i,o)),(!l||n===!1&&!s?.isEditing())&&(n=this.moveToNextCellNotEditing(e,t)),n===null?n:n||!!r.focusedHeader}moveToNextCellNotEditing(e,t){const i=this.beans.visibleCols.allCols;let o;e instanceof Vs?(o={...e.getRowPosition(),column:t?i[0]:za(i)},this.gos.get("embedFullWidthRows")&&(o.column=e.getNavigationColumn())):o=e.getFocusedCellPosition();const s=this.findNextCellToFocusOn(o,{backwards:t,startEditing:!1});if(s===!1)return null;if(s instanceof vi)s.focusCell({forceBrowserFocus:!0});else if(s)return this.tryToFocusFullWidthRow(s,t);return Ci(s)}findNextCellToFocusOn(e,{backwards:t,startEditing:i,skipToNextEditableCell:o}){let s=e;const r=this.beans,{cellNavigation:n,gos:a,focusSvc:l,rowRenderer:d}=r;for(;;){e!==s&&(e=s),t||(s=this.getLastCellOfColSpan(s)),s=n.getNextTabbedCell(s,t);const c=a.getCallback("tabToNextCell");if(Ci(c)){const p=c({backwards:t,editing:i,previousCellPosition:e,nextCellPosition:s||null});if(p===!0)s=e;else{if(p===!1)return!1;s={rowIndex:p.rowIndex,column:p.column,rowPinned:p.rowPinned}}}if(!s)return null;if(s.rowIndex<0){const g=Pe(r);return l.focusHeaderPosition({headerPosition:{headerRowIndex:g+s.rowIndex,column:s.column},fromCell:!0}),null}const u=a.get("editType")==="fullRow";if(i&&(!u||o)&&!this.isCellEditable(s))continue;this.ensureCellVisible(s);const h=Gt(r,s);if(!h){const g=d.getRowByPosition(s);if(!g||!g.isFullWidth()||i)continue;return{...g.getRowPosition(),column:s?.column}}if(!n.isSuppressNavigable(h.column,h.rowNode))return h.setFocusedCellPosition(s),this.setRangeToCellIfSupported(s),h}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:i,rowModel:o}=this.beans;return t==="top"?i?.getPinnedTopRow(e):t==="bottom"?i?.getPinnedBottomRow(e):o.getRow(e)}navigateToNextCell(e,t,i,o){const r=(t===pe.UP||t===pe.DOWN)&&this.currentColumnWithoutSpan?{...i,column:this.currentColumnWithoutSpan}:i;let n=r,a=!1;const l=this.beans,{cellNavigation:d,focusSvc:c,gos:u}=l;for(;n&&(n===r||!this.isValidNavigateCell(n));)u.get("enableRtl")?t===pe.LEFT&&(n=this.getLastCellOfColSpan(n)):t===pe.RIGHT&&(n=this.getLastCellOfColSpan(n)),n=d.getNextCellToFocus(t,n),a=jp(n);if(a&&e?.key===pe.UP&&(n={rowIndex:-1,rowPinned:null,column:r.column}),o){const g=u.getCallback("navigateToNextCell");if(Ci(g)){const f=g({key:t,previousCellPosition:i,nextCellPosition:n||null,event:e});Ci(f)?n={rowPinned:f.rowPinned,rowIndex:f.rowIndex,column:f.column}:n=null}}if(!n)return;if(n.rowIndex<0){const g=Pe(l);c.focusHeaderPosition({headerPosition:{headerRowIndex:g+n.rowIndex,column:n.column??i.column},event:e||void 0,fromCell:!0});return}const h=this.getNormalisedPosition(n);h?(this.focusPosition(h),n.column!==h.column&&this.setCurrentColumnWithoutSpan(n.column)):this.tryToFocusFullWidthRow(n)}setCurrentColumnWithoutSpan(e){if(!this.hasColumnWithoutSpanListener){const t=()=>{this.currentColumnWithoutSpan=null};this.addManagedEventListeners({cellFocused:t,headerFocused:t}),this.hasColumnWithoutSpanListener=!0}this.currentColumnWithoutSpan=e}getNormalisedPosition(e){if(!!this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);const i=Gt(this.beans,e);return i?(e=i.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:i,rowRenderer:o,focusSvc:s,eventSvc:r}=this.beans,n=i.allCols;if(!o.getRowByPosition(e)?.isFullWidth())return!1;const l=s.getFocusedCell(),d={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?za(n):n[0])};this.focusPosition(d);const c=t??(l!=null&&uu(d,l));return r.dispatchEvent({type:"fullWidthRowFocused",rowIndex:d.rowIndex,rowPinned:d.rowPinned,column:d.column,isFullWidthCell:!0,fromBelow:c}),!0}focusPosition(e){const{focusSvc:t}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.setRangeToCellIfSupported(e)}setRangeToCellIfSupported(e){Re(e.column)||this.beans.rangeSvc?.setRangeToCell(e)}isValidNavigateCell(e){return!!Fe(this.beans,e)}getLastCellOfColSpan(e){const t=Gt(this.beans,e);if(!t)return e;const i=t.getColSpanningList();return i.length===1?e:{rowIndex:e.rowIndex,column:za(i),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=xr(this.gos),i=this.beans.rowModel.getRow(e.rowIndex),o=t&&i?.sticky,{scrollFeature:s}=this.gridBodyCon;!o&&jp(e.rowPinned)&&s.ensureIndexVisible(e.rowIndex),e.column.isPinned()||s.ensureColumnVisible(e.column)}ensureColumnVisible(e){const t=this.gridBodyCon.scrollFeature;e.isPinned()||t.ensureColumnVisible(e)}ensureRowVisible(e){this.gridBodyCon.scrollFeature.ensureIndexVisible(e)}};function ja(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var sf={moduleName:"KeyboardNavigation",version:E,beans:[l4,tP,JF],apiFunctions:{getFocusedCell:iP,clearFocusedCell:oP,setFocusedCell:sP,setFocusedHeader:aP,tabToNextCell:rP,tabToPreviousCell:nP}},d4=class extends y{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:e?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){const{pageBounds:e,pagination:t,rowModel:i}=this.beans;t?t.calculatePages():e.calculateBounds(0,i.getRowCount()-1)}},c4=class extends y{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){const{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){const{topRowBounds:e,bottomRowBounds:t}=this,i=e?.rowTop??0,o=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:i,pageLastPixel:o}}calculateBounds(e,t){const{rowModel:i}=this.beans,o=i.getRowBounds(e);o&&(o.rowIndex=e),this.topRowBounds=o;const s=i.getRowBounds(t);s&&(s.rowIndex=t),this.bottomRowBounds=s,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},u4=".ag-header-row .ag-grid-pinned-right-cells .ag-grid-container-wrapper{border-left:var(--ag-pinned-column-border)}.ag-header-row .ag-grid-pinned-left-cells .ag-grid-container-wrapper{border-right:var(--ag-pinned-column-border)}.ag-layout-print .ag-header-row .ag-grid-pinned-left-cells,.ag-layout-print .ag-header-row .ag-grid-pinned-right-cells{display:none}.ag-layout-print .ag-header-cell-last-left-pinned{border-right:var(--ag-pinned-column-border)}.ag-layout-print .ag-header-cell-first-right-pinned{border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-grid-pinned-left-cells .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-grid-pinned-right-cells .ag-header-cell-resize:after{left:50%}.ag-grid-pinned-left-cells .ag-header-cell-resize{right:-3px}.ag-grid-pinned-right-cells .ag-header-cell-resize{left:-3px}";import{_setDisplayed as h4,_setFixedWidth as g4}from"ag-stack";var p4=class extends y{constructor(e,t){super(),this.isLeft=e,this.elements=t,this.getWidth=e?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[`${this.isLeft?"left":"right"}PinnedWidthChanged`]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){const e=this.getWidth(),t=e>0;for(const i of this.elements)i&&(h4(i,t),g4(i,e))}},Hs=50,f4=class extends y{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,columnPinned:this.keepPinnedColumnsNarrowerThanViewport.bind(this)}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const{gos:e,visibleCols:t,eventSvc:i}=this.beans,o=oe(e,"print"),s=o?0:t.getLeftStickyColumnContainerWidth(),r=o?0:t.getRightStickyColumnContainerWidth();s!=this.leftWidth&&(this.leftWidth=s,i.dispatchEvent({type:"leftPinnedWidthChanged"})),r!=this.rightWidth&&(this.rightWidth=r,i.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){if(!this.gridBodyCtrl)return;const e=this.getAvailableViewportWidth();if(e<=Hs)return;const t=this.getPinnedColumnsOverflowingViewport(e-Hs),i=this.gos.getCallback("processUnpinnedColumns"),{columns:o,hasLockedPinned:s}=t;let r=o;!r.length&&!s||(i&&(r=i({columns:r,viewportWidth:e})),r?.length&&(r=r.filter(n=>!Re(n)),this.setColsPinned(r,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new p4(e,t)}setColsPinned(e,t,i){const{colModel:o,visibleCols:s,gos:r,colAnimation:n}=this.beans;if(!o.ready||!e?.length)return;if(oe(r,"print")){this.warn(37);return}let a;t===!0||t==="left"?a="left":t==="right"?a="right":a=null;const l=[];for(const d of e){if(!d)continue;const c=o.getCol(d);c&&c.getPinned()!==a&&(this.setColPinned(c,a),l.push(c))}if(l.length){n?.start();try{s.refresh(i,!1),dc(this.eventSvc,l,i)}finally{n?.finish()}}}initCol(e){const{pinned:t,initialPinned:i}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,i)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}getHeaderResizeDiff(e,t){if(t.getPinned()){const{leftWidth:o,rightWidth:s}=this,r=this.getAvailableViewportWidth()-Hs;if(o+s+e>r)if(r>o+s)e=r-o-s;else return 0}return e}getAvailableViewportWidth(){return this.gridBodyCtrl?.getViewportWidthWithoutScrollbar()??0}getPinnedColumnsOverflowingViewport(e){const t=this.rightWidth??0,i=this.leftWidth??0,o=t+i;let s=!1;if(o<e)return{columns:[],hasLockedPinned:s};const{visibleCols:r}=this.beans,n=[...r.leftCols],a=[...r.rightCols];let l=0,d=0;const c=0,u=[];let h=o-c-e;for(;(d<n.length||l<a.length)&&h>0;){if(l<a.length){const g=a[l++];if(g.colDef.lockPinned){s=!0;continue}h-=g.getActualWidth(),u.push(g)}if(d<n.length&&h>0){const g=n[d++];if(g.colDef.lockPinned){s=!0;continue}h-=g.getActualWidth(),u.push(g)}}return{columns:u,hasLockedPinned:s}}},m4={moduleName:"PinnedColumn",version:E,beans:[f4],css:[u4]};import{BaseAriaAnnouncementService as C4}from"ag-stack";var v4=class extends Ww{},w4={moduleName:"Aria",version:E,beans:[v4]},S4=":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}",rf="ag-delay-render",b4=class extends y{constructor(){super(...arguments),this.beanName="colDelayRenderSvc",this.hideRequested=!1,this.alreadyRevealed=!1,this.timesRetried=0,this.requesters=new Set}hideColumns(e){this.alreadyRevealed||this.requesters.has(e)||(this.requesters.add(e),this.hideRequested||(this.beans.ctrlsSvc.whenReady(this,t=>{t.gridBodyCtrl.eGridBody.classList.add(rf)}),this.hideRequested=!0))}revealColumns(e){this.alreadyRevealed||!this.isAlive()||!this.requesters.has(e)||(this.requesters.delete(e),this.revealWhenRendered())}revealWhenRendered(){if(this.alreadyRevealed||!this.isAlive()||this.requesters.size>0)return;const{renderStatus:e,ctrlsSvc:t}=this.beans;if(e){if(!e.areHeaderCellsRendered()&&this.timesRetried<5){this.timesRetried++,setTimeout(()=>this.revealWhenRendered());return}this.timesRetried=0}t.getGridBodyCtrl().eGridBody.classList.remove(rf),this.alreadyRevealed=!0}},y4={moduleName:"ColumnDelayRender",version:E,beans:[b4],css:[S4]};import{RefPlaceholder as nf}from"ag-stack";var wi=class extends K{constructor(){super()}},R4={tag:"div",cls:"ag-overlay-exporting-center",children:[{tag:"span",ref:"eExportingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eExportingText",cls:"ag-exporting-text"}]},E4=class extends wi{constructor(){super(...arguments),this.eExportingIcon=nf,this.eExportingText=nf}init(e){const{beans:t}=this;this.setTemplate(R4);const i=X("overlayExporting",t,null);i&&this.eExportingIcon.appendChild(i);const o=e.exporting?.overlayText??this.getLocaleTextFunc()("exportingOoo","Exporting...");this.eExportingText.textContent=o,t.ariaAnnounce.announceValue(o,"overlay")}};import{RefPlaceholder as af,_makeNull as x4}from"ag-stack";var F4={tag:"div",cls:"ag-overlay-loading-center",children:[{tag:"span",ref:"eLoadingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eLoadingText",cls:"ag-loading-text"}]},P4=class extends wi{constructor(){super(...arguments),this.eLoadingIcon=af,this.eLoadingText=af}init(e){const{beans:t,gos:i}=this,o=x4(i.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(o??F4),!o){const s=X("overlayLoading",t,null);s&&this.eLoadingIcon.appendChild(s);const r=e.loading?.overlayText??this.getLocaleTextFunc()("loadingOoo","Loading...");this.eLoadingText.textContent=r,t.ariaAnnounce.announceValue(r,"overlay")}}},D4={tag:"span",cls:"ag-overlay-no-matching-rows-center"},M4=class extends wi{init(e){const{beans:t}=this;this.setTemplate(D4);const i=e.noMatchingRows?.overlayText??this.getLocaleTextFunc()("noMatchingRows","No Matching Rows");this.getGui().textContent=i,t.ariaAnnounce.announceValue(i,"overlay")}};import{_makeNull as T4}from"ag-stack";var A4={tag:"span",cls:"ag-overlay-no-rows-center"},I4=class extends wi{init(e){const{beans:t,gos:i}=this,o=T4(i.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(o??A4),!o){const s=e.noRows?.overlayText??this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=s,t.ariaAnnounce.announceValue(s,"overlay")}}};function k4(e){e.overlays?.showLoadingOverlay()}function L4(e){e.overlays?.showNoRowsOverlay()}function V4(e){e.overlays?.hideOverlay()}import{AgPromise as H4,FAST_TEST_TIMINGS as B4}from"ag-stack";import{AgPromise as O4,KeyCode as G4,RefPlaceholder as N4,_clearElement as _4,_findNextFocusableElement as z4,_focusInto as W4,_getActiveDomElement as lf,_isNothingFocused as U4,_last as q4}from"ag-stack";var $4=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-no-matching-rows-wrapper,.ag-overlay-no-rows-wrapper{align-items:safe center}.ag-overlay-exporting-wrapper,.ag-overlay-file-input-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{pointer-events:all}.ag-overlay-exporting-center,.ag-overlay-loading-center{padding:var(--ag-spacing)}.ag-overlay-exporting-center,.ag-overlay-file-input-center,.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);display:flex}.ag-overlay-file-input-center{align-items:center;flex-direction:column;gap:calc(var(--ag-spacing)*2);max-width:420px;padding:calc(var(--ag-spacing)*2)}.ag-file-input-error-banner{background:color-mix(in srgb,var(--ag-invalid-color) 10%,var(--ag-background-color));border-radius:var(--ag-border-radius);color:var(--ag-invalid-color);font-size:.9em;padding:calc(var(--ag-spacing)*.75) calc(var(--ag-spacing)*2);text-align:center;width:100%}.ag-file-input-drop-zone{align-items:center;border:dashed calc(var(--ag-border-width)*2) var(--ag-border-color);border-radius:var(--ag-border-radius);display:flex;flex-direction:column;gap:var(--ag-spacing);padding:calc(var(--ag-spacing)*4);width:100%}.ag-file-input-drop-zone-active{background:var(--ag-row-hover-color);border-color:var(--ag-accent-color)}.ag-file-input-processing{padding:calc(var(--ag-spacing)*4)}.ag-file-input-processing,.ag-file-input-text-row{align-items:center;display:flex;gap:calc(var(--ag-spacing)*.75)}.ag-file-input-text{font-weight:600}.ag-file-input-browse{background:transparent;border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);color:var(--ag-text-color);cursor:pointer;font:inherit;padding:calc(var(--ag-spacing)*.5) calc(var(--ag-spacing)*2)}",K4={tag:"div",cls:"ag-overlay",role:"presentation",children:[{tag:"div",cls:"ag-overlay-panel",role:"presentation",children:[{tag:"div",ref:"eOverlayWrapper",cls:"ag-overlay-wrapper",role:"presentation"}]}]},df=class extends K{constructor(){super(K4),this.eOverlayWrapper=N4,this.activeOverlay=null,this.activePromise=null,this.activeCssClass=null,this.elToFocusAfter=null,this.overlayExclusive=!1,this.oldWrapperPadding=null,this.registerCSS($4)}handleKeyDown(e){if(e.key!==G4.TAB||e.defaultPrevented||We(e))return;const{beans:t,eOverlayWrapper:i}=this;if(i&&z4({beans:t,rootNode:i,backwards:e.shiftKey}))return;let s;e.shiftKey?s=t.focusSvc.focusGridView({column:q4(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):s=Nt(t,!1),s&&e.preventDefault()}updateLayoutClasses(e,t){const i=this.eOverlayWrapper;if(!i)return;const o=i.classList,{AUTO_HEIGHT:s,NORMAL:r,PRINT:n}=Le;o.toggle(s,t.autoHeight),o.toggle(r,t.normal),o.toggle(n,t.print)}postConstruct(){this.createManagedBean(new En(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setWrapperComp(this,!1),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)}),this.addManagedEventListeners({gridSizeChanged:this.refreshWrapperPadding.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper?.classList;if(!t){this.activeCssClass=null;return}this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,i){if(this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,this.overlayExclusive=i,!e)return this.refreshWrapperPadding(),O4.resolve();if(this.setWrapperTypeClass(t),this.setDisplayed(!0,{skipAriaHidden:!0}),this.refreshWrapperPadding(),i&&this.isGridFocused()){const o=lf(this.beans);o&&!U4(this.beans)&&(this.elToFocusAfter=o)}return e.then(o=>{const s=this.eOverlayWrapper;if(!s){this.destroyBean(o);return}if(this.activePromise!==e){this.activeOverlay!==o&&this.destroyBean(o);return}this.activePromise=null,o&&(this.activeOverlay!==o&&(s.appendChild(o.getGui()),this.activeOverlay=o),i&&this.isGridFocused()&&W4(s))}),e}refreshWrapperPadding(){if(!this.eOverlayWrapper){this.oldWrapperPadding=null;return}const e=!!this.activeOverlay||!!this.activePromise;let t=0;e&&!this.overlayExclusive&&(t=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0),t!==this.oldWrapperPadding&&(this.oldWrapperPadding=t,this.eOverlayWrapper.style.setProperty("padding-top",`${t}px`))}destroyActiveOverlay(){this.activePromise=null;const e=this.activeOverlay;if(!e){this.overlayExclusive=!1,this.elToFocusAfter=null,this.refreshWrapperPadding();return}let t=this.elToFocusAfter;this.elToFocusAfter=null,this.activeOverlay=null,this.overlayExclusive=!1,t&&!this.isGridFocused()&&(t=null),this.destroyBean(e);const i=this.eOverlayWrapper;i&&_4(i),t?.focus?.({preventScroll:!0}),this.refreshWrapperPadding()}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=lf(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setWrapperComp(this,!0),super.destroy(),this.eOverlayWrapper=null}},j4={selector:"AG-OVERLAY-WRAPPER",component:df},Q4=B4?150:300,Z4=["refresh"],Zt=e=>({name:e,optionalMethods:Z4}),Yt={id:"agLoadingOverlay",overlayType:"loading",comp:Zt("loadingOverlayComponent"),wrapperCls:"ag-overlay-loading-wrapper",exclusive:!0,compKey:"loadingOverlayComponent",paramsKey:"loadingOverlayComponentParams",isSuppressed:e=>{const t=e.get("loading");return t===!1||e.get("suppressLoadingOverlay")===!0&&!t}},Si={id:"agNoRowsOverlay",overlayType:"noRows",comp:Zt("noRowsOverlayComponent"),wrapperCls:"ag-overlay-no-rows-wrapper",compKey:"noRowsOverlayComponent",paramsKey:"noRowsOverlayComponentParams",isSuppressed:e=>e.get("suppressNoRowsOverlay")},Qa={id:"agNoMatchingRowsOverlay",overlayType:"noMatchingRows",comp:Zt("noMatchingRowsOverlayComponent"),wrapperCls:"ag-overlay-no-matching-rows-wrapper"},Bs={id:"agExportingOverlay",overlayType:"exporting",comp:Zt("exportingOverlayComponent"),wrapperCls:"ag-overlay-exporting-wrapper",exclusive:!0},Os={id:"agFileInputOverlay",overlayType:"fileInput",comp:Zt("fileInputOverlayComponent"),wrapperCls:"ag-overlay-file-input-wrapper",exclusive:!0},Gs={id:"activeOverlay",comp:Zt("activeOverlay"),wrapperCls:"ag-overlay-modal-wrapper",exclusive:!0},Y4={id:"agErrorOverlay",comp:Zt("agErrorOverlay"),wrapperCls:"ag-overlay-error-wrapper",exclusive:!1,noUserOverride:!0},J4=e=>e?{agLoadingOverlay:Yt,agNoRowsOverlay:Si,agNoMatchingRowsOverlay:Qa,agExportingOverlay:Bs,agFileInputOverlay:Os}[e]??Gs:null,X4=e=>e?{loading:Yt,noRows:Si,noMatchingRows:Qa,exporting:Bs,fileInput:Os}[e]:null,eD=class extends y{constructor(){super(...arguments),this.beanName="overlays",this.eWrapper=void 0,this.exclusive=!1,this.oldExclusive=!1,this.currentDef=null,this.showInitialOverlay=!0,this.userForcedNoRows=!1,this.exportsInProgress=0,this.devErrorOverlayActive=!1,this.newColumnsLoadedCleanup=null}postConstruct(){const e=this.gos;this.showInitialOverlay=ae(e);const t=()=>{this.userForcedNoRows||this.updateOverlay(!1)},[i,o,s,r]=this.addManagedEventListeners({newColumnsLoaded:t,rowCountReady:()=>{this.disableInitialOverlay(),t(),o()},rowDataUpdated:t,modelUpdated:t});this.newColumnsLoadedCleanup=i,this.addManagedPropertyListeners(["loading","loadingRows","activeOverlay","activeOverlayParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","autoGenerateColumnDefs","processFileInput"],n=>this.onPropChange(new Set(n.changeSet?.properties)))}destroy(){this.doHideOverlay(),super.destroy(),this.eWrapper=void 0}setWrapperComp(e,t){this.isAlive()&&(t?this.eWrapper===e&&(this.eWrapper=void 0):this.eWrapper=e,this.updateOverlay(!1))}isVisible(){return!!this.currentDef}setDevErrorOverlay(e){this.devErrorOverlayActive!==e&&(this.devErrorOverlayActive=e,this.updateOverlay(!1))}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos;if(!this.eWrapper||e.get("activeOverlay")||this.devErrorOverlayActive||Rr(e)||this.isDisabled(Yt))return;const t=e.get("loading");!t&&t!==void 0||this.doShowOverlay(Yt)}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;!this.eWrapper||e.get("activeOverlay")||e.get("loading")||this.isDisabled(Si)||this.devErrorOverlayActive||(this.userForcedNoRows=!0,this.doShowOverlay(Si))}async showExportOverlay(e){const{gos:t,beans:i}=this;if(!this.eWrapper||t.get("activeOverlay")||t.get("loading")||this.isDisabled(Bs)||this.devErrorOverlayActive||this.userForcedNoRows&&this.currentDef===Si){e();return}const o=this.getDesiredDefWithOverride(Bs);if(!o){e();return}this.exportsInProgress++,this.focusedCell=i.focusSvc.getFocusedCell(),await this.doShowOverlay(o),await new Promise(r=>setTimeout(()=>r()));const s=Date.now();try{e()}finally{const r=Date.now()-s,n=Math.max(0,Q4-r),a=()=>{this.exportsInProgress--,this.exportsInProgress===0&&(this.updateOverlay(!1),mu(i,this.focusedCell),this.focusedCell=null)};n>0?setTimeout(()=>a(),n):a()}}hideOverlay(){const e=this.gos;this.showInitialOverlay=!1;const t=this.userForcedNoRows;if(this.userForcedNoRows=!1,e.get("loading")){this.warn(99);return}if(e.get("activeOverlay")){this.warn(296);return}if(this.currentDef===Qa){this.warn(297);return}this.doHideOverlay(),t&&this.getOverlayDef()!==Si&&this.updateOverlay(!1)}getOverlayWrapperSelector(){return j4}getOverlayWrapperCompClass(){return df}onPropChange(e){const t=e.has("activeOverlay");if((t||e.has("loading")||e.has("loadingRows"))&&this.updateOverlay(t))return;const i=this.currentDef,o=this.eWrapper?.activeOverlay;if(o&&i){const s=e.has("activeOverlayParams");if(i===Gs)s&&o.refresh?.(this.makeCompParams(!0));else{const r=i.paramsKey;(e.has("overlayComponentParams")||r&&e.has(r))&&o.refresh?.(this.makeCompParams(!1,r,i.overlayType))}}}updateOverlay(e){const t=this.eWrapper;if(!t)return this.currentDef=null,!1;const i=this.getDesiredDefWithOverride(),o=this.currentDef,s=i===Gs&&e;return i!==o?i?(this.doShowOverlay(i),!0):(this.disableInitialOverlay(),this.doHideOverlay()):s&&i?(t.hideOverlay(),this.doShowOverlay(i),!0):(i||this.disableInitialOverlay(),!1)}getDesiredDefWithOverride(e){const{gos:t}=this;let i=J4(t.get("activeOverlay"));return i||(i=e??this.getOverlayDef(),i&&this.isDisabled(i)&&(i=null)),i}getOverlayDef(){const{gos:e,beans:t}=this,{rowModel:i}=t;if(this.devErrorOverlayActive&&this.eWrapper)return Y4;const o=e.get("loading");if(o!==void 0){if(this.disableInitialOverlay(),o)return Rr(e)?null:Yt}else if(this.showInitialOverlay){const n=!e.get("columnDefs")&&!e.get("autoGenerateColumnDefs"),a=!e.get("rowData");if(n||a){if(a&&e.get("processFileInput")&&!this.isDisabled(Os))return Os;if(!this.isDisabled(Yt))return Yt}this.disableInitialOverlay()}else this.disableInitialOverlay();const r=i.getOverlayType();return X4(r)}disableInitialOverlay(){this.showInitialOverlay=!1,this.newColumnsLoadedCleanup?.(),this.newColumnsLoadedCleanup=null}doShowOverlay(e){const{gos:t,beans:i}=this,{userCompFactory:o}=i;this.currentDef=e;const s=e!==Gs,r=!!e.exclusive;this.exclusive=r;let n;(e.paramsKey&&t.get(e.paramsKey)||e.compKey&&t.get(e.compKey))&&(n=e.paramsKey);let a;s&&!e.noUserOverride&&(t.get("overlayComponent")||t.get("overlayComponentSelector"))&&(a=o.getCompDetailsFromGridOptions({name:"overlayComponent",optionalMethods:["refresh"]},void 0,this.makeCompParams(!1,e.paramsKey,e.overlayType))),a??(a=o.getCompDetailsFromGridOptions(e.comp,s?e.id:void 0,this.makeCompParams(!s,n,e.overlayType),!1));const l=a?.newAgStackInstance()??null,d=this.eWrapper?this.eWrapper.showOverlay(l,e.wrapperCls,r):H4.resolve();return this.eWrapper?.refreshWrapperPadding(),this.setExclusive(r),d}makeCompParams(e,t,i){const{gos:o}=this,s=e?o.get("activeOverlayParams"):{...o.get("overlayComponentParams"),...t&&o.get(t)||null,overlayType:i};return G(o,s??{})}doHideOverlay(){let e=!1;this.currentDef&&(this.currentDef=null,e=!0),this.exclusive=!1;const t=this.eWrapper;return t&&(t.hideOverlay(),t.refreshWrapperPadding(),this.setExclusive(!1)),e}setExclusive(e){this.oldExclusive!==e&&(this.oldExclusive=e,this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"}))}isDisabled(e){const{gos:t}=this;return e.overlayType&&t.get("suppressOverlays")?.includes(e.overlayType)||e.isSuppressed?.(t)===!0}},cf={moduleName:"Overlay",version:E,userComponents:{agLoadingOverlay:P4,agNoRowsOverlay:I4,agNoMatchingRowsOverlay:M4,agExportingOverlay:E4},apiFunctions:{showLoadingOverlay:k4,showNoRowsOverlay:L4,hideOverlay:V4},icons:{overlayLoading:"loading",overlayExporting:"loading"},beans:[eD]};import{_getMaxDivHeight as tD}from"ag-stack";var iD=class extends y{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.stickyBottomRowsHeight=0,this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=tD(),St(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;St(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getAdjustedUiContainerHeight(){return this.uiContainerHeight==null?null:this.uiContainerHeight-this.stickyBottomRowsHeight}getUiBodyHeight(){const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),i=e/t;return this.maxScrollY*i}};import{_exists as So,_removeFromArray as uf,_requestAnimationFrame as oD}from"ag-stack";var sD=400,rD=class extends y{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{for(const r of this.getAllCellCtrls())r.onCellSelectionChanged()},t=()=>{for(const r of this.getAllCellCtrls())r.updateRangeBordersIfRangeCount()},i=()=>{this.eventSvc.addListener("cellSelectionChanged",e),this.eventSvc.addListener("columnMoved",t),this.eventSvc.addListener("columnPinned",t),this.eventSvc.addListener("columnVisible",t)},o=()=>{this.eventSvc.removeListener("cellSelectionChanged",e),this.eventSvc.removeListener("columnMoved",t),this.eventSvc.removeListener("columnPinned",t),this.eventSvc.removeListener("columnVisible",t)};this.addDestroyFunc(()=>o()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{_e(this.gos)?i():o()}),_e(this.gos)&&i()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc,this.editSvc=e.editSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer","stickyRowsMaxViewportRatio"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",o=>this.onSuppressCellFocusChanged(o.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:o,previousValue:s})=>{(!s&&o||s&&!o)&&this.redrawRows()});const{stickyRowSvc:e,gos:t,showRowGroupCols:i}=this.beans;if(i&&this.addManagedPropertyListener("showOpenedGroup",()=>{const o=i.columns;o.length&&this.refreshCells({columns:o,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const o=this.gridBodyCtrl;o.setStickyTopHeight(0),o.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=oe(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=e??3;this.cachedRowCtrls=new nD(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),i=this.cachedRowCtrls?.getEntries()??[];t.length>0||i.length>0?this.allRowCtrls=[...e,...t,...i]:this.allRowCtrls=e}isCellBeingRendered(e,t){const i=this.getRowByPosition({rowIndex:e,rowPinned:null});return!t||!i?!!i:i.isFullWidth()?!0:!!this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:e,column:t,rowPinned:null})||!!i.getCellCtrl(t)||!i.isRowRendered()}updateCellFocus(e){for(const t of this.getAllCellCtrls())t.onCellFocused(e);for(const t of this.getFullWidthRowCtrls())t.onRowFocused(e)}onCellFocusChanged(e){if(e?.rowIndex!=null&&!e.rowPinned){const t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){for(const t of this.getAllCellCtrls())t.onSuppressCellFocusChanged(e);for(const t of this.getFullWidthRowCtrls())t.onSuppressCellFocusChanged(e)}registerCellEventListeners(){const e=()=>{for(const t of this.getAllCellCtrls())t.column.getPinned()==="right"&&t.onLeftChanged()};this.addManagedEventListeners({cellFocused:t=>this.onCellFocusChanged(t),cellFocusCleared:()=>this.updateCellFocus(),flashCells:t=>{const{cellFlashSvc:i}=this.beans;if(i)for(const o of this.getAllCellCtrls())i.onFlashCells(o,t)},columnHoverChanged:()=>{for(const t of this.getAllCellCtrls())t.onColumnHover()},displayedColumnsChanged:()=>{for(const t of this.getAllCellCtrls())t.onDisplayedColumnsChanged()},displayedColumnsWidthChanged:()=>{if(this.printLayout)for(const t of this.getAllCellCtrls())t.onLeftChanged()},rightPinnedWidthChanged:e}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){for(const e of this.destroyFuncsForColumnListeners)e();this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();const e=this.colModel.colsList;for(const t of e){const i=l=>{for(const d of this.getAllCellCtrls())d.column===t&&l(d)},o=()=>{i(l=>l.onLeftChanged())},s=()=>{i(l=>l.onWidthChanged())},r=()=>{i(l=>l.onFirstRightPinnedChanged())},n=()=>{i(l=>l.onLastLeftPinnedChanged())},a=()=>{i(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",o),t.__addEventListener("widthChanged",s),t.__addEventListener("firstRightPinnedChanged",r),t.__addEventListener("lastLeftPinnedChanged",n),t.__addEventListener("colDefChanged",a),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",o),t.__removeEventListener("widthChanged",s),t.__removeEventListener("firstRightPinnedChanged",r),t.__removeEventListener("lastLeftPinnedChanged",n),t.__removeEventListener("colDefChanged",a)})}}onDomLayoutChanged(){const e=oe(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),i=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,i&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){const t=[];for(const i of this.getAllRowCtrls()){const o=i.getCellCtrl(e,!0)?.eGui;o&&t.push(o)}return t}refreshPinnedRowComps(e=!0){this.topRowCtrls=this.refreshPinnedRows(this.topRowCtrls,"top",e),this.bottomRowCtrls=this.refreshPinnedRows(this.bottomRowCtrls,"bottom",e)}refreshPinnedRows(e,t,i){const{pinnedRowModel:o,beans:s,printLayout:r}=this,n=Object.fromEntries(e.map(d=>[d.rowNode.id,d])),a=[];o?.forEachPinnedRow(t,(d,c)=>{const u=e[c];u&&o.getPinnedRowById(u.rowNode.id,t)===void 0&&(u.destroyFirstPass(),u.destroySecondPass()),d.id in n&&i?(a[c]=n[d.id],delete n[d.id]):a[c]=new Vs(d,s,!1,!1,r)});const l=(t==="top"?o?.getPinnedTopRowCount():o?.getPinnedBottomRowCount())??0;return a.length=l,a}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else if(this.cachedRowCtrls?.has(e)){this.cachedRowCtrls.removeRow(e);return}else{const i=o=>{const s=o[e.rowIndex];s&&s.rowNode===e&&(s.destroyFirstPass(),s.destroySecondPass(),o[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":i(this.topRowCtrls);break;case"bottom":i(this.bottomRowCtrls);break;default:i(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){const{editSvc:t}=this.beans;if(t?.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:"api"})),e!=null){for(const o of e??[])this.redrawRow(o,!0);this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const i=!e.domLayoutChanged&&!!e.recycleRows,o=e.animate&&Tt(this.gos),s=i?this.getRowsToRecycle():null;i||this.removeAllRowComps(!o),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:r,gos:n}=this;if(r){r.checkStickyRows();const a=r.extraTopHeight+r.extraBottomHeight;a&&this.updateContainerHeights(a)}this.recycleRows(s,o),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshPinnedRowComps(n.get("enableRowPinning")?i:void 0),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh(),this.beans.aggStage?.refreshAggregateDependentCells()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,i=this.gos.get("suppressScrollOnNewData");t&&!i&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}const i=this.pageBounds.getCurrentPageHeight();t.setModelHeight(i+e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error(Me(252));this.refreshInProgress=!0,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.beans.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;const t=this.beans.focusSvc,i=this.findPositionToFocus(e);if(!i){t.focusHeaderPosition({headerPosition:{headerRowIndex:Pe(this.beans)-1,column:e.column}});return}if(e.rowIndex!==i.rowIndex||e.rowPinned!=i.rowPinned){t.setFocusedCell({...i,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(G(this.gos,{...i,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){const{pagination:t,pageBounds:i}=this.beans;let o=e;for(o.rowPinned==null&&t&&i&&!t.isRowInPage(o.rowIndex)&&(o={rowPinned:null,rowIndex:i.getFirstRow()});o;){if(o.rowPinned==null&&i)if(o.rowIndex<i.getFirstRow()){if(o=qi(this.beans,{rowPinned:null,rowIndex:0}),!o)return null}else o.rowIndex>i.getLastRow()&&(o={rowPinned:null,rowIndex:i.getLastRow()});const s=this.getRowByPosition(o);if(s?.isAlive())return{...s.getRowPosition(),column:e.column};o=qi(this.beans,o)}return null}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),i=t.length;for(let o=0;o<i;o++){const s=t[o].getAllCellCtrls(),r=s.length;for(let n=0;n<r;n++)e.push(s[n])}return e}getAllRowCtrls(){const{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),i=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...i,...e?.getCtrls("top")??[],...e?.getCtrls("bottom")??[],...e?.getCtrls("center")??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,i){const o=this.getRowByPosition({rowIndex:t,rowPinned:null});o&&o.addEventListener(e,i)}refreshCells({rowNodes:e,columns:t,force:i,suppressFlash:o}={}){const s={force:i,newData:!1,suppressFlash:o};for(const r of this.getCellCtrls(e,t))r.refreshOrDestroyCell(s);if(e?.length)for(const r of this.getRowCtrls(e))r.isFullWidth()&&r.refreshRow(s)}refreshRows(e={}){for(const t of this.getRowCtrls(e.rowNodes))t.refreshRow(e)}getRowCtrlByNode(e){const t=this.getIndexedRowCtrlByNode(e);return t||e.rowPinned?t:this.getStickyRowCtrlByNode(e)}getIndexedRowCtrlByNode(e){const t=e.rowIndex;if(t==null)return;const i=e.rowPinned;if(i==="top"){const s=this.topRowCtrls[t];return s?.rowNode===e?s:void 0}if(i==="bottom"){const s=this.bottomRowCtrls[t];return s?.rowNode===e?s:void 0}const o=this.rowCtrlsByRowIndex[t];return o?.rowNode===e?o:void 0}getStickyRowCtrlByNode(e){const t=this.stickyRowFeature;if(t){for(const i of t.stickyTopRowCtrls)if(i.rowNode===e)return i;for(const i of t.stickyBottomRowCtrls)if(i.rowNode===e)return i}}refreshRowByNode(e){if(!e)return;const t=this.getIndexedRowCtrlByNode(e);t?.refreshRow();const i=e.rowPinned?void 0:this.getStickyRowCtrlByNode(e);i&&i!==t&&i.refreshRow();const o=this.beans.spannedRowRenderer;o&&(Ja(o.getCtrls("top"),e,t,i),Ja(o.getCtrls("bottom"),e,t,i),Ja(o.getCtrls("center"),e,t,i))}getRowCtrls(e){const t=Za(e),i=this.getAllRowCtrls();return!e||!t?i:i.filter(o=>{const s=o.rowNode;return Ya(s,t)})}getCellCtrls(e,t){let i;So(t)&&(i={},t.forEach(s=>{const r=this.colModel.getCol(s);So(r)&&(i[r.getId()]=!0)}));const o=[];for(const s of this.getRowCtrls(e))for(const r of s.getAllCellCtrls()){const n=r.column.getId();i&&!i[n]||o.push(r)}return o}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e){const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const i of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[i].rowNode.id==null&&e.push(i);this.removeRowCtrls(e);const t={};for(const i of Object.values(this.rowCtrlsByRowIndex)){const o=i.rowNode;t[o.id]=i}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){for(const i of e){const o=this.rowCtrlsByRowIndex[i];o&&(o.destroyFirstPass(t),o.destroySecondPass()),delete this.rowCtrlsByRowIndex[i]}}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){const{focusSvc:t,animationFrameSvc:i}=this.beans,{afterScroll:o,force:s}=e;let r;const n=this.stickyRowFeature;n&&(r=t?.getFocusCellToUseAfterRefresh()||void 0);const a=this.firstRenderedRow,l=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let d=!1;if(n){d=n.checkStickyRows();const u=n.extraTopHeight+n.extraBottomHeight;u&&this.updateContainerHeights(u)}const c=this.firstRenderedRow!==a||this.lastRenderedRow!==l;if(!(o&&!d&&!c&&!s)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,o),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(o&&!d),r!=null)){const u=t?.getFocusCellToUseAfterRefresh();r!=null&&u==null&&(i?.flushAllFrames(),this.restoreFocusedCell(r))}}removeRowCompsNotToDraw(e,t){const i={};for(const r of e)i[r]=!0;const s=Object.keys(this.rowCtrlsByRowIndex).filter(r=>!i[r]);this.removeRowCtrls(s,t)}calculateIndexesToDraw(e){const t=[];for(let n=this.firstRenderedRow;n<=this.lastRenderedRow;n++)t.push(n);const i=this.beans.pagination,o=this.beans.focusSvc?.getFocusedCell()?.rowIndex;o!=null&&(o<this.firstRenderedRow||o>this.lastRenderedRow)&&(!i||i.isRowInPage(o))&&o<this.rowModel.getRowCount()&&t.push(o);const s=n=>{const a=n.rowNode.rowIndex;a==null||a===o||(a<this.firstRenderedRow||a>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(n)&&t.push(a)};for(const n of Object.values(this.rowCtrlsByRowIndex))s(n);if(e)for(const n of Object.values(e))s(n);t.sort((n,a)=>n-a);const r=[];for(let n=0;n<t.length;n++){const a=t[n],l=this.rowModel.getRow(a);l&&!l.sticky&&r.push(a)}return r}recycleRows(e,t=!1,i=!1){const o=this.calculateIndexesToDraw(e);(this.printLayout||i)&&(t=!1),this.removeRowCompsNotToDraw(o,!t);for(const s of o)this.createOrUpdateRowCtrl(s,e,t,i);if(e){const{animationFrameSvc:s}=this.beans;s?.active&&i&&!this.printLayout?s.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){const{visibleCols:e}=this.beans,t=e.leftCols.length>0,i=e.rightCols.length>0;(this.pinningLeft!==t||i!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=i,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];for(const t of this.getFullWidthRowCtrls()){const i=t.rowNode.rowIndex;e.push(i.toString())}this.refreshPinnedRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0,force:!0})}getFullWidthRowCtrls(e){const t=Za(e);return this.getAllRowCtrls().filter(i=>{if(!i.isFullWidth())return!1;const o=i.rowNode;return!(t!=null&&!Ya(o,t))})}createOrUpdateRowCtrl(e,t,i,o){let s,r=this.rowCtrlsByRowIndex[e];if(r||(s=this.rowModel.getRow(e),So(s)&&So(t)&&t[s.id]&&s.alreadyRendered&&(r=t[s.id],t[s.id]=null)),!r)if(s||(s=this.rowModel.getRow(e)),So(s))r=this.createRowCon(s,i,o);else return;s&&(s.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=r}destroyRowCtrls(e,t){const i=[];if(e){for(const o of Object.values(e))if(o){if(this.cachedRowCtrls&&o.isCacheable()){this.cachedRowCtrls.addRow(o);continue}if(o.destroyFirstPass(!t),t){const s=o.instanceId;this.zombieRowCtrls[s]=o,i.push(()=>{o.destroySecondPass(),delete this.zombieRowCtrls[s]})}else o.destroySecondPass()}}t&&(i.push(()=>{this.isAlive()&&(this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged())}),window.setTimeout(()=>{for(const o of i)o()},sD))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=Ne(this.beans);return e*t}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:i}=this;e.updateOffset();let o,s;if(!i.isRowsToRender())o=0,s=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),o=t.getFirstRow(),s=t.getLastRow();else{const c=this.getRowBufferInPixels(),u=this.ctrlsSvc.getScrollFeature(),h=this.gos.get("suppressRowVirtualisation");let g,p,f;do{const w=t.getPixelOffset(),{pageFirstPixel:b,pageLastPixel:R}=t.getCurrentPagePixelRange(),x=e.divStretchOffset,D=u.getVScrollPosition(),T=D.top,B=D.bottom;h?(p=b+x,f=R+x):(p=Math.max(T+w-c,b)+x,f=Math.min(B+w+c,R)+x),this.firstVisibleVPixel=Math.max(T+w,b)+x,this.lastVisibleVPixel=Math.min(B+w,R)+x,g=this.ensureAllRowsInRangeHaveHeightsCalculated(p,f)}while(g);let m=i.getRowIndexAtPixel(p),C=i.getRowIndexAtPixel(f);const v=t.getFirstRow(),S=t.getLastRow();m<v&&(m=v),C>S&&(C=S),o=m,s=C}const r=oe(this.gos,"normal"),n=this.gos.get("suppressMaxRenderedRowRestriction"),a=Math.max(this.getRowBuffer(),500);r&&!n&&s-o>a&&(s=o+a);const l=o!==this.firstRenderedRow,d=s!==this.lastRenderedRow;(l||d)&&(this.firstRenderedRow=o,this.lastRenderedRow=s,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:o,lastRow:s}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,oD(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const i=this.pinnedRowModel?.ensureRowHeightsValid(),o=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:s,rowModel:r}=this,n=r.ensureRowHeightsValid(e,t,s.getFirstRow(),s.getLastRow());return(n||o)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),o||n||i?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){const o=e.rowNode,s=this.focusSvc.isRowFocused(o.rowIndex,o.rowPinned),r=this.editSvc?.isEditing(e),n=o.detail;return s||r||n?!!this.isRowPresent(o):!1}isRowPresent(e){return this.rowModel.isRowPresent(e)?this.beans.pagination?.isRowInPage(e.rowIndex)??!0:!1}createRowCon(e,t,i){const o=this.cachedRowCtrls?.getRow(e)??null;if(o)return o;const s=i&&!this.printLayout&&!!this.beans.animationFrameSvc?.active;return new Vs(e,this.beans,t,s,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(o=>o.rowNode),t=this.getStickyTopRowCtrls().map(o=>o.rowNode),i=this.getStickyBottomRowCtrls().map(o=>o.rowNode);return[...t,...e,...i]}getRowByPosition(e){let t;const{rowIndex:i}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[i];break;case"bottom":t=this.bottomRowCtrls[i];break;default:t=this.rowCtrlsByRowIndex[i],t||(t=this.getStickyTopRowCtrls().find(o=>o.rowNode.rowIndex===i)||null,t||(t=this.getStickyBottomRowCtrls().find(o=>o.rowNode.rowIndex===i)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const o=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!o}},nD=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.rowNode.id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if(e?.id==null)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){const t=e.id,i=this.entriesMap[t];delete this.entriesMap[t],uf(this.entriesList,i)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],uf(this.entriesList,e)}getEntries(){return this.entriesList}};function Za(e){if(!e)return;const t={top:{},bottom:{},normal:{}};for(const i of e){const o=i.id;switch(i.rowPinned){case"top":t.top[o]=i;break;case"bottom":t.bottom[o]=i;break;default:t.normal[o]=i;break}}return t}function Ya(e,t){const i=e.id;switch(e.rowPinned){case"top":return t.top[i]!=null;case"bottom":return t.bottom[i]!=null;default:return t.normal[i]!=null}}var Ja=(e,t,i,o)=>{for(let s=0,r=e.length;s<r;++s){const n=e[s];n.rowNode===t&&n!==i&&n!==o&&n.refreshRow()}},aD=class extends y{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){const{colModel:t,rowModel:i}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),i.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),St(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,Bt(e.source))}}},lD=class extends y{constructor(){super(...arguments),this.beanName="log"}wireBeans(e){this.gridId=e.context.getId()}warn(...e){Kn(this.gridId,e[0],e[1])}deprecated(...e){uy(this.gridId,e[0],e[1])}error(...e){Vh(this.gridId,e[0],e[1])}};import{_toString as dD}from"ag-stack";function cD(e){e.valueCache?.expire()}function uD(e,t){const{colKey:i,rowNode:o,useFormatter:s,from:r="edit",transformValues:n}=t,a=e.colModel.getCol(i);if(!a)return null;const l=e.valueSvc.getValueForDisplay({column:gt(a,o),node:o,includeValueFormatted:s,from:r,transformValues:n});return s?l.valueFormatted??dD(l.value):l.value}var hD="paste",gD=class extends y{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.deferredDepth=0,this.batchedPath=null,this.batchedNodes=null}destroy(){super.destroy(),this.batchedPath=null,this.batchedNodes=null}postConstruct(){this.csrm=xe(this.beans),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}beginDeferred(){this.deferredDepth++}endDeferred(){if(this.deferredDepth===0||--this.deferredDepth>0)return;const e=this.batchedPath,t=this.batchedNodes;this.batchedPath=null,this.batchedNodes=null,e&&this.csrm?.doAggregate(e);const{rowRenderer:i}=this.beans;if(t)for(const o of t)hf(i,o);if(e){const o=e.getSortedRows();for(let s=0,r=o.length;s<r;++s)hf(i,o[s])}this.beans.aggStage?.refreshAggregateDependentCells(t,e),(this.batchedPath||this.batchedNodes)&&(this.deferredDepth=1,this.endDeferred())}onCellValueChanged(e){const{gos:t,rowModel:i,changedPathFactory:o}=this.beans;if(e.source===hD||t.get("suppressChangeDetection")||!i.rootNode)return;const s=e.node.primaryRow;if(this.csrm){let r=this.batchedPath;r||(r=o?.newPath(t.get("aggregateOnlyChangedColumns"))??null,this.batchedPath=r);let n=s;s.group||((this.batchedNodes??(this.batchedNodes=new Set)).add(s),n=s.parent),r?.addCell(n,e.column.colId)}else(this.batchedNodes??(this.batchedNodes=new Set)).add(s);this.deferredDepth===0&&(this.deferredDepth=1,this.endDeferred())}},hf=(e,t)=>{const{sibling:i,pinnedSibling:o}=t;e.refreshRowByNode(t),e.refreshRowByNode(i),e.refreshRowByNode(o),e.refreshRowByNode(i?.pinnedSibling),e.refreshRowByNode(o?.sibling)},pD=class extends y{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);this.error(15,{expression:e})}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(i){return this.error(16,{expression:e,params:t,e:i}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const i=this.createFunctionBody(e),o=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",i);return t[e]=o,o}createFunctionBody(e){return e.includes("return")?e:"return "+e+";"}},fD=class extends y{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0,this.neverExpires=!1}postConstruct(){this.neverExpires=this.gos.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,i){const o=this.cacheVersion;e.__cacheVersion!==o&&(e.__cacheVersion=o,e.__cacheData={}),e.__cacheData[t]=i}getValue(e,t){if(e.__cacheVersion===this.cacheVersion)return e.__cacheData[t]}},gf={moduleName:"ValueCache",version:E,beans:[fD],apiFunctions:{expireValueCache:cD}},mD={moduleName:"Expression",version:E,beans:[pD]},CD={moduleName:"ChangeDetection",version:E,beans:[gD]},pf={moduleName:"CellApi",version:E,apiFunctions:{getCellValue:uD}};import{_isExpressionString as vD}from"ag-stack";function Ns(e,t){let i=e;for(let o=0,s=t.length;o<s;o++){if(i==null)return;i=i[t[o]]}return i}var wD=class extends y{constructor(){super(...arguments),this.beanName="valueSvc",this.isTreeData=!1,this.isSsrm=!1,this.cellExpressions=!1,this.groupSuppressBlankHeader=!1,this.editSvc=void 0,this.valueCache=void 0,this.expressionSvc=void 0,this.dataTypeSvc=void 0,this.formula=void 0,this.showValuesAsSvc=void 0,this.formulaDataSvc=void 0,this.changeDetectionSvc=void 0,this.showRowGroupColValueSvc=void 0,this.rowGroupingEditValueSvc=void 0,this.frameworkOverrides=void 0,this.gridApi=void 0,this.gridOptions=void 0}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc,this.editSvc=e.editSvc,this.formulaDataSvc=e.formulaDataSvc,this.formula=e.formula,this.showValuesAsSvc=e.showValuesAsSvc,this.changeDetectionSvc=e.changeDetectionSvc,this.showRowGroupColValueSvc=e.showRowGroupColValueSvc,this.rowGroupingEditValueSvc=e.rowGroupingEditValueSvc,this.frameworkOverrides=e.frameworkOverrides,this.gridApi=e.gridApi,this.gridOptions=e.gridOptions,this.init()}init(){const e=this.gos;this.isSsrm=ri(e),this.cellExpressions=e.get("enableCellExpressions"),this.isTreeData=e.get("treeData"),this.groupSuppressBlankHeader=e.get("groupSuppressBlankHeader"),e.get("valueCache")||(this.valueCache=void 0)}postConstruct(){this.init();const e=t=>this.callColumnCellValueChangedHandler(t);this.eventSvc.addListener("cellValueChanged",e,!0),this.addDestroyFunc(()=>this.eventSvc.removeListener("cellValueChanged",e,!0)),this.addManagedPropertyListener("treeData",t=>this.isTreeData=t.currentValue),this.addManagedPropertyListener("groupSuppressBlankHeader",t=>this.groupSuppressBlankHeader=t.currentValue)}getValueForDisplay(e){const t=e.column,i=e.node,o=i.group,s=this.showRowGroupColValueSvc;if(s&&(!t&&o||t?.showRowGroup)&&(!this.isTreeData||i.footer)){const c=s.getGroupValue(i,t,o?this.displayIgnoresAggData(i):!1);return c==null?{value:null,valueFormatted:null}:{value:c.value,valueFormatted:e.includeValueFormatted?s.formatAndPrefixGroupColValue(c,t,e.exporting):null}}if(!t)return{value:i.key,valueFormatted:null};const n=o?this.displayIgnoresAggData(i):!1;let a=this.getValue(t,i,e.from,n),l=a;if(t.allowFormula){const c=this.formula;c?.isFormula(a)&&(e.useRawFormula?(a=c.normaliseFormula(a,!0),l=c.resolveValue(t,i)):(a=c.resolveValue(t,i),l=a))}const d=e.includeValueFormatted&&!(e.exporting&&t.colDef.useValueFormatterForExport===!1);if(e.transformValues){const c=this.showValuesAsSvc;if(c&&!n&&t.showValuesAs!=null){const u=c.isApplying(t),h=u?c.transform(t,i,l):l;return{value:h,valueFormatted:d?c.formatValue(t,i,h,l,!u):null}}}return{value:a,valueFormatted:d?this.formatValue(t,i,l):null}}getTransformedValue(e,t){const i=t.group?this.displayIgnoresAggData(t):!1,o=this.getValue(e,t,"edit",i);return this.resolveTransformed(e,t,o,i)}resolveTransformed(e,t,i,o){if(e.allowFormula){const r=this.formula;r?.isFormula(i)&&(i=r.resolveValue(e,t))}const s=this.transformingSvc(e,o);return s?s.transform(e,t,i):i}getDisplayValue(e,t,i,o){const s=t.group,r=this.showRowGroupColValueSvc;if(r&&(!e&&s||e?.showRowGroup)&&(!this.isTreeData||t.footer)){const d=r.getGroupValue(t,e,s?this.displayIgnoresAggData(t):!1);return d==null?null:d.value}if(!e)return t.key;const a=s?this.displayIgnoresAggData(t):!1,l=this.getValue(e,t,i,a);if(o)return this.resolveTransformed(e,t,l,a);if(e.allowFormula){const d=this.formula;if(d?.isFormula(l))return d.resolveValue(e,t)}return l}getValueFromData(e,t,i=!1){let s=e.isCalculatedCol&&!(e.aggregationActive&&t.group)?this.formula?.resolveValue(e,t):this.resolveCoreValue(e,t,i);if(this.cellExpressions&&vD(s)){const r=s.substring(1);s=this.executeValueGetter(r,t.data,e,t)}return s}getValue(e,t,i,o=!1){if(t){if(i!=="data"){const s=this.editSvc?.getPendingEditValue(t,e,i);if(s!==void 0)return s}return this.getValueFromData(e,t,o)}}displayIgnoresAggData(e){return e.footer||e.level===-1||!e.sibling||this.groupSuppressBlankHeader||e.leafGroup&&this.colModel.pivotMode?!1:!!e.expanded}transformingSvc(e,t){const i=this.showValuesAsSvc;return i&&!t&&e.showValuesAs&&i.isApplying(e)?i:void 0}resolveCoreValue(e,t,i){const o=t.group;if(!o&&e.allowFormula){const c=this.formula?.getDataSourceFormula(t,e);if(c!==void 0)return c}const s=t.data,r=this.isTreeData;if(o||r){const c=o&&!i?t.aggData:void 0,u=e.colId,h=c?.[u];if(r){if(h!==void 0)return h;const p=e.valueGetter;let f;if(p)f=this.executeValueGetter(p,s,e,t);else if(s){const m=e.field;if(m){const C=e.fieldPath;f=C?Ns(s,C):s[m]}}if(f!==void 0)return f}const g=t.groupData;if(g&&u in g)return g[u];if(h!==void 0)return h}const n=e.valueGetter,a=i&&this.isSsrm&&!!e.aggFunc;if(o){const c=e.showRowGroup;if(n&&!a)return typeof c=="string"?ff(this.colModel,c,t.level):this.executeValueGetter(n,s,e,t);if(this.isSsrm&&s){const u=bD(t,s,c);if(u!==void 0)return u}if(typeof c=="string")return ff(this.colModel,c,t.level)}if(n)return a?void 0:this.executeValueGetter(n,s,e,t);const l=e.field;if(!l||!s||a)return;const d=e.fieldPath;return d?Ns(s,d):s[l]}parseValue(e,t,i,o){const s=e.colDef;if(e.allowFormula&&this.formula?.isFormula(i))return i;const r=s.valueParser;if(r!=null&&r!==""){const n={api:this.gridApi,context:this.gridOptions.context,node:t,data:t?.data,oldValue:o,newValue:i,colDef:s,column:e};return typeof r=="function"?r(n):this.expressionSvc?.evaluate(r,n)}return i}getDeleteValue(e,t){const i=e.colDef.valueParser;return i!=null&&i!==""?this.parseValue(e,t,"",this.getDisplayValue(e,t,"edit",!1))??null:null}formatValue(e,t,i,o,s=!0){let r=null;const n=o??(s?e.valueFormatter:void 0);if(n){const a={api:this.gridApi,context:this.gridOptions.context,value:i,node:t,data:t?t.data:null,colDef:e.colDef,column:e};if(typeof n=="function")r=n(a);else{const l=this.expressionSvc;r=l?l.evaluate(n,a):null}}else{const a=e.refData;if(a)return a[i]||""}return r==null&&Array.isArray(i)&&(r=i.join(", ")),r}formatTransformedValue(e,t,i){if(!t)return;const o=this.showValuesAsSvc,s=t.group?this.displayIgnoresAggData(t):!1;if(!o||s||e.showValuesAs==null)return;const r=this.getValue(e,t,"edit",s);return o.formatValue(e,t,i,r,!o.isApplying(e))}setValue(e,t,i,o){const s=t.colDef;if(!e.data&&SD(e,s)&&(e.data={}),!this.isSetValueSupported(t,e,i,s))return!1;const r=this.getValueFromData(t,e),n=e.data,a={api:this.gridApi,context:this.gridOptions.context,node:e,data:n,oldValue:r,newValue:i,colDef:s,column:t};let l=!1;if(n){const c=this.handleExternalFormulaChange({column:t,eventSource:o,newValue:i,setterParams:a,rowNode:e});if(c!==null)return c;l=this.computeValueChange({column:t,rowNode:e,newValue:i,params:a,rowData:n,valueSetter:s.valueSetter,field:s.field})??!0}const d=this.changeDetectionSvc;d?.beginDeferred();try{if(e.group){const c=this.rowGroupingEditValueSvc?.setGroupDataValue(e,t,i,r,o,l||i!==r);if(c!==void 0)return!l&&!c?!1:this.finishValueChange(e,t,a,o,i)}return l?this.finishValueChange(e,t,a,o):!1}finally{d?.endDeferred()}}finishValueChange(e,t,i,o,s){e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const r=s===void 0?this.getValueFromData(t,e):s;this.dispatchCellValueChangedEvent(e,i,r,o);const n=e.pinnedSibling;return n&&this.dispatchCellValueChangedEvent(n,i,r,o),!0}isSetValueSupported(e,t,i,o){const{field:s,valueSetter:r}=o;if(e.isCalculatedCol)return!1;const n=this.formula,a=e.allowFormula&&n?.isFormula(i),l=!!this.formulaDataSvc?.hasDataSource(),d=s==null||s==="",c=r==null||r==="";return d&&c&&!(l&&a)?t.group&&(o.groupRowValueSetter||o.groupRowEditable)?!0:(this.warn(17),!1):this.dataTypeSvc&&!this.dataTypeSvc.checkType(e,i)?(this.warn(135),!1):!0}handleExternalFormulaChange(e){const{column:t,rowNode:i,newValue:o,eventSource:s,setterParams:r}=e,n=this.formula,a=this.formulaDataSvc;if(!t.allowFormula||!a?.hasDataSource())return null;const l=n?.isFormula(o),d=a.getFormula({column:t,rowNode:i});if(l){if(!(d!==o))return!1;a.setFormula({column:t,rowNode:i,formula:o});const u=n?.resolveValue(t,i),{valueSetter:h,field:g}=t.colDef;return(h!=null&&h!==""||g!=null&&g!=="")&&this.computeValueChange({column:t,rowNode:i,newValue:u,params:{...r,newValue:u},rowData:i.data,valueSetter:h,field:g}),this.finishValueChange(i,t,r,s)}return d!==void 0&&a.setFormula({column:t,rowNode:i,formula:void 0}),null}computeValueChange(e){const{valueSetter:t,params:i,rowData:o,field:s,column:r,newValue:n}=e;if(t!=null&&t!=="")return typeof t=="function"?t(i):this.expressionSvc?.evaluate(t,i);if(!o||!s)return!1;const a=r.fieldPath;let l=!1;if(a===null)l=o[s]===n,l||(o[s]=n);else{let d=o;const c=a.length-1;for(let u=0;u<c&&d;++u)d=d[a[u]];if(d){const u=a[c];l=d[u]===n,l||(d[u]=n)}}return!l}dispatchCellValueChangedEvent(e,t,i,o){this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:t.column,colDef:t.colDef,data:e.data,node:e,oldValue:t.oldValue,newValue:i,newRawValue:t.newValue,value:i,source:o})}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&this.frameworkOverrides.wrapOutgoing(()=>t(e))}executeValueGetter(e,t,i,o){const s=this.valueCache;if(s){const a=s.getValue(o,i.colId);if(a!==void 0)return a}const r={api:this.gridApi,context:this.gridOptions.context,data:t,node:o,column:i,colDef:i.colDef,getValue:a=>this.getValueCallback(o,a)},n=typeof e=="function"?e(r):this.expressionSvc?.evaluate(e,r);return s&&s.setValue(o,i.colId,n),n}getValueCallback(e,t){const i=this.colModel.getCol(t);return i?this.getValueFromData(gt(i,e),e):null}getKeyForNode(e,t){let i=this.getValueFromData(e,t);const o=e.colDef,s=o.keyCreator;if(s){const r={api:this.gridApi,context:this.gridOptions.context,value:i,colDef:o,column:e,node:t,data:t.data};i=s(r)}return typeof i=="string"||i==null||(i=String(i),i==="[object Object]"&&this.warn(121)),i}},SD=(e,t)=>e.group?!(t.groupRowValueSetter!=null||t.groupRowEditable!=null||t.pivotValueColumn):!0,ff=(e,t,i)=>{const o=e.colsById[t];return o?.rowGroupActive&&o.rowGroupActiveIndex>i?null:void 0},bD=(e,t,i)=>{if(!e.footer)return;const o=e.field;if(!(!o||i!==!0&&i!==o))return o.includes(".")?Ns(t,o.split(".")):t[o]},yD={moduleName:"CommunityCore",version:E,beans:[lD,s6,fy,px,W0,iD,ax,jF,P6,qR,c4,d4,rD,wD,t6,$F,o6,mx,aD,ox,rx,N6],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId:Gh,getGridElement:Sy,destroy:my,isDestroyed:Cy,getGridOption:vy,setGridOption:wy,updateGridOptions:Nh,isModuleRegistered:by},dependsOn:[ia,ex,Sg,xR,ta,V6,Eg,H6,cf,CD,G6,sf,m4,w4,X6,ux,tx,mD,mE,y4]},mf=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.usesAgGridProvider=void 0,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${uh}/${this.frameworkName}-data-grid`,Y3(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?"/"+e:"")}},Xa=new WeakMap,el=new WeakMap;function RD(e,t,i){if(!t)return $n(11),{};const[o,s]=K1();return e.appendChild(o),new Cf().create(o,s,t,n=>{const a=new z3(s);n.createBean(a)},void 0,i,()=>o.remove())}var ED=1,Cf=class{create(e,t,i,o,s,r,n){const a=Di.applyGlobalGridOptions(i),l=a.gridId??String(ED++),d=this.getRegisteredModules(r,l,a.rowModelType),c=this.createBeansList(a.rowModelType,d,l),u=this.createProvidedBeans(t,a,r);if(!c){ey(e);return}const g={providedBeanInstances:u,beanClasses:c,id:l,beanInitComparator:Y1,beanDestroyComparator:J1,derivedBeans:[Q1],destroyCallback:()=>{el.delete(f),Xa.delete(e),q3(l),n?.()}},p=new $1(g);this.registerModuleFeatures(p,d),o(p),p.getBean("syncSvc").start(),s?.(p);const f=p.getBean("gridApi");return Xa.set(e,f),el.set(f,e),f}getRegisteredModules(e,t,i){return zt(yD,void 0),e?.modules?.forEach(o=>zt(o,t)),$3(t,vf(i))}registerModuleFeatures(e,t){const i=e.getBean("registry"),o=e.getBean("apiFunctionSvc");for(const s of t){i.registerModule(s);const r=s.apiFunctions;if(r){const n=Object.keys(r);for(const a of n)o?.addFunction(a,r[a])}}}createProvidedBeans(e,t,i){let o=i?i.frameworkOverrides:null;j1(o)&&(o=new mf);const s={gridOptions:t,eGridDiv:e,eRootDiv:e,globalListener:i?i.globalListener:null,globalSyncListener:i?i.globalSyncListener:null,frameworkOverrides:o,hasAncestorStyledRoot:i?.hasAncestorStyledRoot};return i?.providedBeanInstances&&Object.assign(s,i.providedBeanInstances),s}createBeansList(e,t,i){const o={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},s=vf(e),r=o[s];if(!r){jn(201,{rowModelType:s},`Unknown rowModelType ${s}.`);return}if(!fh(r,i,s)){const a=Bn(),l=`rowModelType = '${s}'`,d=a?`Unable to use ${l} as that requires the ag-grid-enterprise script to be included.
`:`Missing module ${r}Module for rowModelType ${s}.`;jn(200,{reasonOrId:l,moduleName:r,gridScoped:mh(),gridId:i,rowModelType:s,isUmd:a},d);return}const n=new Set;for(const a of t)for(const l of a.beans??[])n.add(l);return Array.from(n)}};function vf(e){return e??"clientSide"}function xD(e){if(typeof e=="string")try{e=document.querySelector(`[grid-id="${e}"]`)??document.querySelector(e)??document.getElementById(e)}catch{e=null}for(e=e?.firstElementChild??e;e;){const t=Xa.get(e);if(t)return t;e=e.parentElement}}function wf(e){return el.get(e)}function Sf(e,t=!1){const i=[],o=[],s=[],r=[],n=[],a=[],l=[],d=[],c=[],u=[],h=[],g=[];let p=0;for(let f=0;f<e.length;f++){const{colId:m,sort:C,sortType:v,sortIndex:S,rowGroup:w,rowGroupIndex:b,aggFunc:R,valueIndex:x,showValuesAs:D,pivot:T,pivotIndex:B,pivotSort:W,pinned:fe,hide:ne,width:te,flex:O,headerName:_}=e[f];g.push(m),_!=null&&h.push({colId:m,headerName:_}),C&&(i[S??p++]={colId:m,sort:C,type:v??void 0}),w&&(o[b??0]=m),typeof R=="string"&&s.push({colId:m,aggFunc:R,valueIndex:x}),D!=null&&r.push({colId:m,showValuesAs:Oo(D)}),T&&(n[B??0]=m,W!==void 0&&a.push({colId:m,sort:W})),fe&&(fe==="right"?d:l).push(m),ne&&c.push(m),(O!=null||te)&&u.push({colId:m,flex:O??void 0,width:te===null?void 0:te})}return{sort:i.length?{sortModel:tl(i)}:void 0,rowGroup:o.length?{groupColIds:tl(o)}:void 0,aggregation:s.length?{aggregationModel:FD(s)}:void 0,showValuesAs:r.length?{showValuesAsModel:r}:void 0,pivot:n.length||t?{pivotMode:t,pivotColIds:tl(n),pivotSortModel:a.length?a:void 0}:void 0,columnPinning:l.length||d.length?{leftColIds:l,rightColIds:d}:void 0,columnVisibility:c.length?{hiddenColIds:c}:void 0,columnSizing:u.length?{columnSizingModel:u}:void 0,columnOrder:g.length?{orderedColIds:g}:void 0,columnHeaderName:h.length?{columnHeaderNames:h}:void 0}}function tl(e){return e.filter(t=>t!=null)}function FD(e){return e.sort((t,i)=>(t.valueIndex??1/0)-(i.valueIndex??1/0)).map(t=>({colId:t.colId,aggFunc:t.aggFunc}))}function bf(e){const t=[],i=[];for(const{groupId:o,open:s,headerName:r}of e)s&&t.push(o),r!=null&&i.push({groupId:o,headerName:r});if(!(!t.length&&!i.length))return{openColumnGroupIds:t,headerNames:i.length?i:void 0}}function PD(e){return{columnGroup:bf(e)}}var DD=class extends y{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(o=>{if(!o){this.error(18),t||this.error(20);return}if(this.isGridApi(o))return o;const s=o;return"current"in s?s.current?.api:(s.api||this.error(19),s.api)}).filter(o=>!!o&&!o.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){if(!this.consuming)for(const t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){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 i=[];return e.columns?e.columns.forEach(o=>{i.push(t(o))}):e.column&&i.push(t(e.column)),i}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.colId)}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":this.warn(21);break}})}processGroupOpenedEvent(e){const t=this.beans,i=t.colModel.colsGroupsById;for(const o of e.columnGroups){let s;o&&(s=i.get(o.getGroupId())),!(o&&!s)&&ji(t,s,o.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){const t=e.column;let i;const o=this.beans,{colResize:s,colModel:r,scrollVisibleSvc:n}=o;if(t&&(i=r.getNonPivotCol(t.getColId())),t&&!i)return;const a=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const c=e.api.getColumnState().map(u=>({colId:u.colId}));et(o,{state:c,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const c=e.api.getColumnState().map(u=>({colId:u.colId,hide:u.hide}));et(o,{state:c},"alignedGridChanged")}break;case"columnPinned":{const c=e.api.getColumnState().map(u=>({colId:u.colId,pinned:u.pinned}));et(o,{state:c},"alignedGridChanged")}break;case"columnResized":{const d=e,c=new Set((d.flexColumns??[]).map(h=>h.getColId())),u=[];for(const h of a){const g=h.getColId();c.has(g)||u.push({key:g,newWidth:h.getActualWidth(),userSized:h.isUserSized()})}s?.setColumnWidths(u,!1,d.finished,"alignedGridChanged");for(const{key:h,newWidth:g,userSized:p}of u){const f=r.getNonPivotCol(h);f?.getActualWidth()===g&&f.setUserSized(p)}break}}const l=n.isVerticalScrollShowing();for(const d of this.getAlignedGridApis())d.setGridOption("alwaysShowVerticalScroll",l)}},yf={moduleName:"AlignedGrids",version:E,beans:[DD],dependsOn:[fa]};function MD(e,t={}){const i=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(i))}function Rf(e,t,i,o,s){t&&(o&&t.parent&&t.parent.level!==-1&&Rf(e,t.parent,i,o,s),t.setExpanded(i,void 0,s))}function TD(e,t){return e.rowModel.getRowNode(t)}function AD(e,t,i,o){e.rowRenderer.addRenderedRowListener(t,i,o)}function ID(e){return e.rowRenderer.getRenderedNodes()}function kD(e,t,i){e.rowModel.forEachNode(t,i)}function LD(e){return e.rowRenderer.firstRenderedRow}function VD(e){return e.rowRenderer.lastRenderedRow}function HD(e,t){return e.rowModel.getRow(t)}function BD(e){return e.rowModel.getRowCount()}function OD(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function GD(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function Ef(e,t,i="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,i),"ensureVisible")}function xf(e,t,i){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,i),"ensureVisible")}function ND(e,t,i=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,i),"ensureVisible")}var Ff={moduleName:"RowApi",version:E,apiFunctions:{redrawRows:MD,setRowNodeExpanded:Rf,getRowNode:TD,addRenderedRowListener:AD,getRenderedNodes:ID,forEachNode:kD,getFirstDisplayedRowIndex:LD,getLastDisplayedRowIndex:VD,getDisplayedRowAtIndex:HD,getDisplayedRowCount:BD}},Pf={moduleName:"ScrollApi",version:E,apiFunctions:{getVerticalPixelRange:OD,getHorizontalPixelRange:GD,ensureColumnVisible:Ef,ensureIndexVisible:xf,ensureNodeVisible:ND}};import{RefPlaceholder as il,_clearElement as Df}from"ag-stack";var _D={tag:"div",cls:"ag-overlay-file-input-center",children:[{tag:"div",ref:"eErrorBanner",cls:"ag-file-input-error-banner"},{tag:"div",ref:"eDropZone",cls:"ag-file-input-drop-zone"},{tag:"div",ref:"eProcessingState",cls:"ag-file-input-processing"}]},zD=class extends wi{constructor(){super(...arguments),this.eErrorBanner=il,this.eDropZone=il,this.eProcessingState=il,this.state="ready",this.dragCounter=0,this.processingToken=0}init(e){this.setTemplate(_D),this.buildDropZone(e),this.showState("ready"),this.setupDragListeners(),this.gos.get("processFileInput")||(this.beans.log.warn(305),this.showError("gridOptions.processFileInput is missing"))}buildDropZone(e){const{beans:t}=this,i=this.getLocaleTextFunc(),o=e.fileInput?.overlayText??i("fileInputOverlay","Drag & Drop file to import data"),s=X("document",t,null),r={tag:"span",cls:"ag-file-input-text",children:o},n=V({tag:"div",cls:"ag-file-input-text-row",children:s?[()=>s,r]:[r]});this.eDropZone.appendChild(n),this.appendBrowseButton(this.eDropZone),t.ariaAnnounce.announceValue(o,"overlay")}updateProcessingState(e){const{beans:t}=this,i=this.getLocaleTextFunc();Df(this.eProcessingState);const o=X("overlayLoading",t,null);o&&(o.classList.add("ag-loading-icon"),this.eProcessingState.appendChild(o));const s=i("fileInputProcessing",`Processing ${e}`,[e]),r=V({tag:"span",cls:"ag-file-input-text",children:s});this.eProcessingState.appendChild(r),t.ariaAnnounce.announceValue(s,"overlay")}showError(e){this.eErrorBanner.textContent=e,this.showState("error"),this.beans.ariaAnnounce.announceValue(e,"overlay")}appendBrowseButton(e){const t=this.getLocaleTextFunc(),i=V({tag:"input",cls:"ag-file-input-input",attrs:{type:"file",style:"display:none"}});this.addManagedElementListeners(i,{change:()=>this.onFileInputChange(i)}),e.appendChild(i);const o=V({tag:"button",cls:"ag-file-input-browse",attrs:{type:"button"},children:t("fileInputOverlayBrowse","Browse files")});this.addManagedElementListeners(o,{click:()=>i.click()}),e.appendChild(o)}showState(e){this.state=e;const t=this.getGui();switch(Df(t),e){case"error":t.appendChild(this.eErrorBanner),t.appendChild(this.eDropZone);break;case"processing":t.appendChild(this.eProcessingState);break;default:t.appendChild(this.eDropZone);break}}setupDragListeners(){const e=this.getGui();this.addManagedElementListeners(e,{dragenter:t=>{this.isFileDrag(t)&&(t.preventDefault(),this.dragCounter++,this.dragCounter===1&&this.eDropZone.classList.add("ag-file-input-drop-zone-active"))},dragover:t=>{this.isFileDrag(t)&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="copy"))},dragleave:t=>{this.isFileDrag(t)&&(t.preventDefault(),this.dragCounter--,this.dragCounter<=0&&(this.dragCounter=0,this.eDropZone.classList.remove("ag-file-input-drop-zone-active")))},drop:t=>{this.isFileDrag(t)&&(t.preventDefault(),this.dragCounter=0,this.eDropZone.classList.remove("ag-file-input-drop-zone-active"),this.handleFileList(t.dataTransfer?.files))}})}isFileDrag(e){return e.dataTransfer?.types?.includes("Files")??!1}onFileInputChange(e){this.handleFileList(e.files),e.value=""}handleFileList(e){e&&e.length>0&&this.handleFiles(Array.from(e))}handleFiles(e){if(this.state==="processing")return;const{gos:t}=this,i=t.get("processFileInput"),o=e[0].name;this.updateProcessingState(o),this.showState("processing");const s=++this.processingToken,r=a=>{if(!this.isAlive()||s!==this.processingToken)return;const l={rowData:a};t.get("activeOverlay")==="agFileInputOverlay"&&(l.activeOverlay=void 0),t.updateGridOptions({options:l,source:"api"})},n=a=>{if(!this.isAlive()||s!==this.processingToken)return;const l=this.getLocaleTextFunc(),d=a??l("fileInputProcessingFailed",`Error processing ${o}`,[o]);this.showError(d)};if(!i)n();else try{i(G(t,{files:e,success:r,fail:n}))}catch(a){n(a instanceof Error?a.message:void 0)}}},Mf={moduleName:"FileInputOverlay",version:E,userComponents:{agFileInputOverlay:zD},icons:{document:"document"},dependsOn:[cf]};import{_camelCaseToHumanText as Tf}from"ag-stack";var WD=class extends y{constructor(){super(...arguments),this.beanName="autoGenColsSvc"}postConstruct(){this.generateColumns(!0),this.addManagedPropertyListener("rowData",()=>this.generateColumns(!1)),this.addManagedPropertyListener("autoGenerateColumnDefs",()=>this.generateColumns(!1))}generateColumns(e){const t=this.gos,i=t.get("autoGenerateColumnDefs");if(!i)return;const o=t.get("rowData")??[],s=typeof i=="object"?i:{};let r;for(let l=0,d=o.length;l<d;++l)if(Bo(o[l])){r=o[l];break}if(!r){e||t.updateGridOptions({options:{columnDefs:[]},source:"optionsUpdated"});return}let n=ol(r,void 0,s);const a=t.getCallback("processAutoGeneratedColumnDefs");if(a){const l=a({columnDefs:n,rowData:o});Array.isArray(l)&&(n=l)}t.updateGridOptions({options:{columnDefs:n},source:"optionsUpdated"})}};function ol(e,t,i,o=new Set){const{objectValues:s="group",arrayValues:r="primitives",nullishValues:n="include"}=i,a=Object.keys(e),l=[];for(let d=0,c=a.length;d<c;++d){const u=a[d],h=e[u],g=t?`${t}.${u}`:u;if(Bo(h)){if(o.has(h))continue;if(o.add(h),s==="group"){const p=ol(h,g,i,o);p.length>0&&l.push({headerName:Tf(u)??u,children:p})}else if(s==="flatten"){const p=ol(h,g,i,o);l.push(...p)}continue}else if(Array.isArray(h)){if(r==="skip"||r==="primitives"&&!UD(h))continue;l.push(Af(g,u,t,!0));continue}else if(h==null){if(n!=="include")continue}else if(typeof h=="function")continue;l.push(Af(g,u,t))}return l}function Af(e,t,i,o){const s={field:e};return i&&(s.headerName=Tf(t)??t),o&&(s.cellDataType=!1),s}function UD(e){if(e.length===0)return!1;const t=e[0];return t!=null&&!Array.isArray(t)&&!Bo(t)&&typeof t!="function"}var If={moduleName:"AutoGenerateColumns",version:E,beans:[WD],dependsOn:[Mf]},qD=":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 $D(e,t){typeof t=="number"?e.colAutosize?.sizeColumnsToFit(t,"api"):e.colAutosize?.sizeColumnsToFitGridBody(t)}function kf({colAutosize:e,visibleCols:t},i,o){Array.isArray(i)?e?.autoSizeCols({colKeys:i,skipHeader:o,source:"api"}):e?.autoSizeCols({...i,colKeys:i.colIds??t.allCols,source:"api"})}function KD(e,t){t&&typeof t=="object"?kf(e,t):e.colAutosize?.autoSizeAllColumns({source:"api",skipHeader:t})}import{_debounce as jD,_getInnerWidth as QD,_removeFromArray as ZD,_requestAnimationFrame as Lf}from"ag-stack";var YD=new Set(["autosizeColumns","sizeColumnsToFit"]),JD=new Set(["columnMenu","contextMenu"]),XD=150,eM=[0,100,500],tM=["dataChanged","columnsChanged","gridSizeChanged","viewportChanged"],iM=class extends y{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[],this.continuousStrategy=null,this.continuousRunning=!1,this.continuousFrameScheduled=!1,this.pendingReasons=null,this.continuousRetries=0,this.continuousRetryScheduled=!1,this.continuousEchoing=!1,this.gridSizeSettling=!1,this.runDebouncedContinuousAutoSize=jD(this,()=>{this.gridSizeSettling=!1,this.scheduleContinuousAutoSize()},XD)}postConstruct(){const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let i=!1;const o=t.type;if(o==="fitGridWidth"||o==="fitProvidedWidth")i=!0;else if(o==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const s=e.get("rowData");i=s!=null&&s.length>0&&ae(e),i&&this.revealOnEmptyModel()}t.continuous&&this.initContinuousAutoSize(t),i&&this.beans.colDelayRenderSvc?.hideColumns(o)}}withUiActionStrategyParams(e){const{source:t}=e;if(!t||!JD.has(t))return e;const i=this.gos.get("autoSizeStrategy");return i?.type!=="fitCellContents"||!i.applyToUiActions?e:{...e,skipHeader:i.skipHeader??e.skipHeader,defaultMinWidth:i.defaultMinWidth??e.defaultMinWidth,defaultMaxWidth:i.defaultMaxWidth??e.defaultMaxWidth,columnLimits:i.columnLimits??e.columnLimits,scaleUpToFitGridWidth:i.scaleUpToFitGridWidth??e.scaleUpToFitGridWidth}}autoSizeCols(e){this.autoSizeColsAsync(this.withUiActionStrategyParams(e)).then(t=>this.dispatchAutoSized(t))}dispatchAutoSized(e){li(this.beans.eventSvc,Array.from(e),!0,"autosizeColumns")}autoSizeColsAsync(e){const{colModel:t}=this.beans;return bo(this.beans,!0),this.innerAutoSizeCols(e).then(i=>{if(!e.scaleUpToFitGridWidth)return bo(this.beans,!1),i;const o=sl(this.beans),s=e.colKeys.filter(r=>{const n=t.getCol(r);if(!n||n.colDef.suppressAutoSize||n.colKind==="row-number")return!1;const a=n.pinned;return!(n.displayed&&(a==="left"||a==="right"))});return this.sizeColumnsToFit(o,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:e.columnLimits?.map(r=>({...r,key:r.colId})),colKeys:s,onlyScaleUp:!0,animate:!1}),bo(this.beans,!1),i})}innerAutoSizeCols(e){return new Promise((t,i)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,i));const{colKeys:o,skipHeader:s,skipHeaderGroups:r,stopAtGroup:n,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:d=[],source:c="api"}=e,{animationFrameSvc:u,renderStatus:h,colModel:g,autoWidthCalc:p,visibleCols:f}=this.beans;if(u?.flushAllFrames(),this.timesDelayed<5&&h&&(!h.areHeaderCellsRendered()||!h.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,i)});return}this.timesDelayed=0;const m=new Set;let C=-1;const v=Object.fromEntries(d.map(({colId:b,...R})=>[b,R])),S=s??this.gos.get("skipHeaderOnAutoSize"),w=r??S;for(;C!==0;){C=0;let b=!1;const R=[];for(const x of o){if(!x)continue;const D=g.getCol(x);if(!D||m.has(D)||D.colDef.suppressAutoSize||Gr(D))continue;const T=p.getPreferredWidthForColumn(D,S);if(T>0){const B=v[D.colId]??{};B.minWidth??(B.minWidth=l),B.maxWidth??(B.maxWidth=a);const W=oM(D,T,B);b||(b=W!==D.getActualWidth()),D.setActualWidth(W,c),m.add(D),C++}R.push(D)}R.length&&b&&f.refresh(c,!0)}w||this.autoSizeColumnGroupsByColumns(o,c,n),t(m)})}autoSizeColumn(e,t,i){this.autoSizeCols({colKeys:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){const{colModel:o,ctrlsSvc:s}=this.beans,r=new Set;for(let a=0,l=e.length;a<l;++a){let c=o.getCol(e[a])?.parent;for(;c&&c!=i;)c.providedColumnGroup.padding||r.add(c),c=c.parent}const n=s.getHeaderRowContainerCtrl();if(n)for(const a of r)n.getHeaderCtrlForColumn(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 i=this.gos.get("skipHeaderOnAutoSize"),o=()=>{this.autoSizeColumn(t,"uiColumnResized",i)};e.addEventListener("dblclick",o);const s=new Ct(e);return s.addEventListener("doubleTap",o),()=>{e.removeEventListener("dblclick",o),s.destroy()}}addColumnGroupResize(e,t,i){const o=this.gos.get("skipHeaderOnAutoSize"),s=()=>{const r=[],n=t.getDisplayedLeafColumns();for(const a of n)a.colDef.suppressAutoSize||r.push(a.colId);r.length>0&&this.autoSizeCols({colKeys:r,skipHeader:o,stopAtGroup:t,source:"uiColumnResized"}),i()};return e.addEventListener("dblclick",s),()=>e.removeEventListener("dblclick",s)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;let i=sl(this.beans);if(i>0&&this.beans.visibleCols.centerCols.length===0&&(i=Math.max(i-Hs,0)),i>0){this.sizeColumnsToFit(i,"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):this.warn(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",i,o){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,i,o));return}const{beans:s}=this,r=o?.animate??!0;r&&bo(s,!0);const n=Object.create(null);for(const{key:C,...v}of o?.columnLimits??[])n[typeof C=="string"?C:C.getColId()]=v;const a=s.visibleCols.allCols;if(e<=0||!a.length)return;const l=ft(a);if(o?.onlyScaleUp&&l>e||e===l&&a.every(v=>{if(v.colDef.suppressSizeToFit)return!0;const S=n?.[v.getId()],w=S?.minWidth??o?.defaultMinWidth,b=S?.maxWidth??o?.defaultMaxWidth,R=v.getActualWidth();return(w==null||R>=w)&&(b==null||R<=b)}))return;const c=[],u=[];for(const C of a){const v=o?.colKeys?.some(S=>rM(C,S))??!0;C.colDef.suppressSizeToFit||!v?u.push(C):c.push(C)}const h=c.slice(0);let g=!1;const p=C=>{ZD(c,C),u.push(C)},f=Object.create(null);for(const C of c){o?.onlyScaleUp&&(f[C.colId]=C.getActualWidth()),C.resetActualWidth(t);const v=n?.[C.getId()],S=v?.minWidth??o?.defaultMinWidth??-1/0,w=v?.maxWidth??o?.defaultMaxWidth??1/0,b=C.getActualWidth(),R=Dt(b,S,w);R!=b&&C.setActualWidth(R,t,!0)}for(;!g;){g=!0;const C=e-ft(u);if(C<=0)for(const v of c){const S=n?.[v.getId()]?.minWidth??o?.defaultMinWidth??v.minWidth;v.setActualWidth(S,t,!0)}else{const v=C/ft(c);let S=C;for(let w=c.length-1;w>=0;w--){const b=c[w],R=b.colId,x=f[R],D=n?.[R],T=D?.minWidth??o?.defaultMinWidth??x,B=D?.maxWidth??o?.defaultMaxWidth,W=Math.max(T??-1/0,b.getMinWidth()),fe=Math.min(B??1/0,b.getMaxWidth());let ne=Math.round(b.getActualWidth()*v);ne<W?(ne=W,p(b),g=!1):ne>fe?(ne=fe,p(b),g=!1):w===0&&(ne=S),b.setActualWidth(ne,t,!0),S-=ne}}}for(const C of h)C.fireColumnWidthChangedEvent(t);const m=this.beans.visibleCols;m.updateBodyWidths(m.setLeftValues(t)),!i&&(li(this.eventSvc,h,!0,t),r&&bo(s,!1))}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,i=e.get("autoSizeStrategy");i?.type!=="fitGridWidth"&&i?.type!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const o=i.type;if(this.continuousStrategy)this.runContinuousNow("dataChanged");else if(o==="fitGridWidth"){const{columnLimits:s,defaultMinWidth:r,defaultMaxWidth:n}=i,a=s?.map(({colId:l,minWidth:d,maxWidth:c})=>({key:l,minWidth:d,maxWidth:c}));this.sizeColumnsToFitGridBody({defaultMinWidth:r,defaultMaxWidth:n,columnLimits:a})}else this.sizeColumnsToFit(i.width,"sizeColumnsToFit");t?.revealColumns(o)})}revealOnEmptyModel(){const[e]=this.addManagedEventListeners({modelUpdated:()=>{this.beans.rowModel.getRowCount()>0||(e?.(),this.beans.colDelayRenderSvc?.revealColumns("fitCellContents"))}})}onFirstDataRendered(e){const{colIds:t,...i}=e;setTimeout(()=>{if(!this.isAlive())return;const o="autosizeColumns";this.continuousStrategy?this.runContinuousNow("dataChanged"):t?this.autoSizeCols({...i,source:o,colKeys:t}):this.autoSizeAllColumns({...i,source:o}),this.beans.colDelayRenderSvc?.revealColumns(i.type)})}initContinuousAutoSize(e){const t=e.type==="fitCellContents";if(t&&!sM(this.gos)){this.warn(328,{rowModel:this.gos.get("rowModelType")});return}this.continuousStrategy=e,this.addManagedEventListeners({modelUpdated:i=>{(t||i.newData)&&this.scheduleContinuousAutoSize("dataChanged")},paginationChanged:i=>{(i.newPage||i.newPageSize)&&this.scheduleContinuousAutoSize("dataChanged")},cellValueChanged:()=>this.scheduleContinuousAutoSize("dataChanged"),displayedColumnsChanged:i=>{YD.has(i.source)||this.scheduleContinuousAutoSize("columnsChanged")},newColumnsLoaded:()=>this.scheduleContinuousAutoSize("columnsChanged"),gridSizeChanged:()=>this.scheduleDebouncedContinuousAutoSize("gridSizeChanged"),scrollVisibilityChanged:()=>{this.isContinuousEcho()||(this.gridSizeSettling?this.scheduleDebouncedContinuousAutoSize("gridSizeChanged"):this.scheduleContinuousAutoSize("gridSizeChanged"))}}),this.addManagedEventListeners({rowNodeDataChanged:()=>this.scheduleContinuousAutoSize("dataChanged")}),!(!t||!e.shouldAutoSizeColumns)&&this.addManagedEventListeners({virtualColumnsChanged:()=>this.scheduleDebouncedContinuousAutoSize("viewportChanged"),viewportChanged:()=>this.scheduleDebouncedContinuousAutoSize("viewportChanged"),bodyScroll:i=>{i.direction==="horizontal"&&this.scheduleDebouncedContinuousAutoSize("viewportChanged")}})}scheduleDebouncedContinuousAutoSize(e){this.isContinuousEcho()||(e==="gridSizeChanged"&&(this.gridSizeSettling=!0),(this.pendingReasons??(this.pendingReasons=new Set)).add(e),this.runDebouncedContinuousAutoSize())}isContinuousEcho(){return this.continuousRunning||this.continuousEchoing}scheduleContinuousAutoSize(e){const t=this.pendingReasons??(this.pendingReasons=new Set);e&&t.add(e),!(this.continuousRunning||this.continuousFrameScheduled)&&(this.continuousFrameScheduled=!0,Lf(this.beans,()=>{this.continuousFrameScheduled=!1,this.isAlive()&&this.runContinuousAutoSize()}))}runContinuousAutoSize(){if(!this.pendingReasons?.size)return;const e=this.pendingReasons;this.pendingReasons=null,this.runContinuousNow(tM.find(t=>e.has(t)))}runContinuousNow(e){const t=this.continuousStrategy;if(!t||this.continuousRunning)return;if(t.type!=="fitProvidedWidth"&&sl(this.beans)<=0){this.retryContinuousWhenSized(e);return}this.continuousRetries=0;const i=this.getAutoSizeCandidates(t);if(!i.length)return;const o=t.shouldAutoSizeColumns;if(o){let s;try{s=o(G(this.gos,{reason:e,columns:i}))}catch(r){this.warn(329,{error:r});return}if(!s)return}this.continuousRunning=!0,this.reapplyStrategy(t,i).then(()=>this.onContinuousAutoSizeComplete(),()=>this.onContinuousAutoSizeComplete())}reapplyStrategy(e,t){const i=e.type;if(i==="fitCellContents"){const{skipHeader:o,defaultMinWidth:s,defaultMaxWidth:r,columnLimits:n,scaleUpToFitGridWidth:a}=e;return this.autoSizeColsAsync({colKeys:t,skipHeader:o,defaultMinWidth:s,defaultMaxWidth:r,columnLimits:n,scaleUpToFitGridWidth:a,source:"autosizeColumns"}).then(l=>this.dispatchAutoSized(l))}if(i==="fitProvidedWidth")this.sizeColumnsToFit(e.width,"sizeColumnsToFit",!1,{colKeys:t});else{const{defaultMinWidth:o,defaultMaxWidth:s,columnLimits:r}=e;this.sizeColumnsToFitGridBody({defaultMinWidth:o,defaultMaxWidth:s,colKeys:t,columnLimits:r?.map(({colId:n,minWidth:a,maxWidth:l})=>({key:n,minWidth:a,maxWidth:l}))})}return Promise.resolve()}retryContinuousWhenSized(e){const t=eM[this.continuousRetries];t===void 0||this.continuousRetryScheduled||(this.continuousRetries++,this.continuousRetryScheduled=!0,window.setTimeout(()=>{this.continuousRetryScheduled=!1,this.isAlive()&&this.runContinuousNow(e)},t))}onContinuousAutoSizeComplete(){if(this.continuousRunning=!1,this.continuousEchoing=!0,Lf(this.beans,()=>{this.continuousEchoing=!1}),this.pendingReasons?.size&&this.isAlive()){const e=this.pendingReasons;this.pendingReasons=null;for(const t of e)this.scheduleContinuousAutoSize(t)}}getAutoSizeCandidates(e){const{colModel:t,visibleCols:i}=this.beans,o=e.type==="fitCellContents",s=o?e.colIds:void 0,r=s?s.map(a=>t.getCol(a)):i.allCols,n=[];for(let a=0,l=r.length;a<l;++a){const d=r[a];if(!d||d.isUserSized()||Gr(d))continue;const c=d.colDef;if(o?c.suppressAutoSize:c.suppressSizeToFit)continue;const u=d.getFlex();u!=null&&u>0||n.push(d)}return n}processResizeOperations(){this.shouldQueueResizeOperations=!1;const e=this.resizeOperationQueue;this.resizeOperationQueue=[];for(let t=0,i=e.length;t<i;++t)e[t]()}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.continuousStrategy=null,this.pendingReasons=null,this.resizeOperationQueue.length=0,super.destroy()}};function oM(e,t,i={}){const o=i.minWidth??e.getMinWidth();t<o&&(t=o);const s=i.maxWidth??e.getMaxWidth();return t>s&&(t=s),t}function sM(e){return e.get("rowModelType")!=="viewport"}function sl({ctrlsSvc:e,scrollVisibleSvc:t}){const i=e.getGridBodyCtrl(),s=t.isVerticalScrollShowing()?t.getScrollbarWidth():0;return QD(i.eGridBody)-s}var Vf="ag-animate-autosize";function bo({ctrlsSvc:e,gos:t},i){if(!t.get("animateColumnResizing")||t.get("enableRtl")||!e.isAlive())return;const o=e.getGridBodyCtrl().eGridBody.classList;i?o.add(Vf):o.remove(Vf)}function rM(e,t){return e===t||e.colId==t||e.colDef===t}var Hf={moduleName:"ColumnAutoSize",version:E,beans:[iM],apiFunctions:{sizeColumnsToFit:$D,autoSizeColumns:kf,autoSizeAllColumns:KD},dependsOn:[bg],css:[qD]};function nM(e,t){return!!e.colHover?.isHovered(t)}var aM=class extends y{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=i=>{const{beans:o,gos:s,element:r,columns:n}=this,a=o.colHover;if(i??!!s.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(r,{mouseover:a.setMouseOver.bind(a,n),mouseout:a.clearMouseOver.bind(a)});else{for(const d of this.destroyManagedListeners)d();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},lM="ag-column-hover",dM=class extends y{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,i){const o=()=>{const s=this.isHovered(i);t.toggleCss("ag-column-hover",s)};e.addManagedEventListeners({columnHoverChanged:o}),o()}onCellColumnHover(e,t){if(!t)return;const i=this.isHovered(e);t.toggleCss(lM,i)}addHeaderFilterColumnHoverListener(e,t,i,o){this.createHoverFeature(e,[i],o);const s=()=>{const r=this.isHovered(i);t.toggleCss("ag-column-hover",r)};e.addManagedEventListeners({columnHoverChanged:s}),s()}createHoverFeature(e,t,i){e.createManagedBean(new aM(t,i))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},Bf={moduleName:"ColumnHover",version:E,beans:[dM],apiFunctions:{isColumnHovered:nM}};function cM(e,t,i,o,s){const r=[];Of(e,r);const n=mM(r,i),a=uM(n,o,t.length);return hM(a,r,t,n,o,s),o&&gM(a,t,n,s),fM(a,t.length),a.rows}function uM(e,t,i){const o=e+(t?1:0),s=[],r=[];for(let n=0;n<o;n++)s.push({cells:[],grouping:n<e}),r.push(new Array(i).fill(!1));return{rows:s,occupied:r}}function hM(e,t,i,o,s,r){const n=new Map;for(let a=0;a<i.length;a++)n.set(i[a],a);for(const a of t){const l=a.getProvidedColumnGroup(),d=l.getLevel();if(d>=o)continue;const c=[];for(const u of a.getLeafColumns()){const h=n.get(u);if(h==null)continue;l.isPadding()&&s&&r&&u.isSpanHeaderHeight()||c.push(h)}CM(e.rows[d].cells,e.occupied[d],a,c)}}function gM(e,t,i,o){const{rows:s,occupied:r}=e;for(let n=0;n<t.length;n++){const a=t[n],l=o?pM(a,i):i;s[l].cells.push({type:"column",column:a,columnIndex:n,columnSpan:1,rowSpan:i-l+1}),r[l][n]=!0;for(let d=l+1;d<=i;d++)r[d][n]||(s[d].cells.push({type:"covered",columnIndex:n,columnSpan:1,rowSpan:1}),r[d][n]=!0)}}function pM(e,t){if(!e.isSpanHeaderHeight())return t;let i=t,o=e.getOriginalParent();for(;o;){const s=o.getLevel();o.isPadding()&&s<i&&(i=s),o=o.getOriginalParent()}return i}function fM(e,t){const{rows:i,occupied:o}=e;for(let s=0;s<i.length;s++){const r=i[s];for(let n=0;n<t;n++)o[s][n]||r.cells.push({type:"padding",columnIndex:n,columnSpan:1,rowSpan:1});r.cells.sort((n,a)=>n.columnIndex-a.columnIndex)}}function Of(e,t){for(const i of e)Ee(i)&&(t.push(i),Of(i.children??[],t))}function mM(e,t){let i=0;for(const o of e){const s=o.getProvidedColumnGroup();(!t||!s.isPadding())&&(i=Math.max(i,s.getLevel()+1))}return i}function CM(e,t,i,o){o.sort((r,n)=>r-n);let s=0;for(;s<o.length;){let r=s;for(;r+1<o.length&&o[r+1]===o[r]+1;)r+=1;const n=o[s],a=o[r]-n+1;e.push({type:i.isPadding()?"padding":"group",column:i,columnIndex:n,columnSpan:a,rowSpan:1});for(let l=n;l<n+a;l++)t[l]=!0;s=r+1}}var vM=class extends y{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:i,columnKeys:o,skipRowGroups:s,exportRowNumbers:r}=t,n=this.getColumnsToExport({allColumns:i,skipRowGroups:s,columnKeys:o,exportRowNumbers:r});return[this.prepareSession(n),this.prependContent(t),this.exportHeaders(t,n),this.processPinnedTopRows(t,n),this.processRows(t,n),this.processPinnedBottomRows(t,n),this.appendContent(t)].reduce((a,l)=>l(a),e).parse()}processRow(e,t,i,o){const s=t.shouldRowBeSkipped||(()=>!1),n=t.rowPositions!=null||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!n,l=this.colModel.pivotMode?o.leafGroup:!o.group,d=!!o.footer,c=Ud(this.gos,o);if(!l&&!d&&(t.skipRowGroups||c||a)||t.onlySelected&&!o.isSelected()||t.skipPinnedTop&&o.rowPinned==="top"||t.skipPinnedBottom&&o.rowPinned==="bottom"||o.stub||o.level===-1&&!l&&!d||s(G(this.gos,{node:o})))return;const g=e.onNewBodyRow(o);if(i.forEach((p,f)=>{g.onColumn(p,f,o)}),t.getCustomContentBelowRow){const p=t.getCustomContentBelowRow(G(this.gos,{node:o}));p&&e.addCustomContent(p)}}appendContent(e){return t=>{const i=e.appendContent;return i&&t.addCustomContent(i),t}}prependContent(e){return t=>{const i=e.prependContent;return i&&t.addCustomContent(i),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportHeaders(e,t){return i=>{if(e.skipColumnGroupHeaders&&e.skipColumnHeaders)return i;let o=[];e.skipColumnGroupHeaders||(o=this.beans.colGroupSvc.createGroups(t,new zg,null,void 0,!0));const s=cM(o,t,i.useGridHeaderLayout&&!!this.gos.get("hidePaddedHeaderRows"),!e.skipColumnHeaders,i.isSpanColumnHeader());for(const r of s){const n=r.grouping?i.onNewHeaderGroupingRow():i.onNewHeaderRow();for(const a of r.cells)n.onCell(this.withCollapsibleGroupRanges(a,t))}return i}}processPinnedTopRows(e,t){return i=>{const o=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(s=>s.rowPinned==="top").sort((s,r)=>s.rowIndex-r.rowIndex).map(s=>this.pinnedRowModel?.getPinnedTopRow(s.rowIndex)).forEach(o):this.pinnedRowModel?.forEachPinnedRow("top",o),i}}processRows(e,t){return i=>{const o=this.rowModel,s=ae(this.gos,o),r=ri(this.gos,o),n=!s&&e.onlySelected,a=this.processRow.bind(this,i,e,t),l=this.pinnedRowModel,d=u=>{if(!e.skipPinnedRowDuplicates){a(u);return}const h=u.pinnedSibling,g=h?.rowPinned;l?.isManual()&&h?.id!=null&&g&&l.getPinnedRowById(h.id,g)===h||a(u)},{exportedRows:c="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(u=>u.rowPinned==null).sort((u,h)=>u.rowIndex-h.rowIndex).map(u=>o.getRow(u.rowIndex)).filter(u=>u!=null).forEach(d);else if(this.colModel.pivotMode)s?o.forEachPivotNode(d,!0,c==="filteredAndSorted"):r?o.forEachNodeAfterFilterAndSort(d,!0):o.forEachNode(d);else if(e.onlySelectedAllPages||n){const u=(this.beans.selectionSvc?.getSelectedNodes()??[]).map(h=>h.level===-1&&h.sibling?.footer?h.sibling:h);this.replicateSortedOrder(u),u.forEach(d)}else c==="all"?o.forEachNode(d):s||r?o.forEachNodeAfterFilterAndSort(d,!0):o.forEachNode(d);return i}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:i}=this.beans;if(!t||!i)return;const o=t.getSortOptions(),s=(r,n)=>r.rowIndex!=null&&n.rowIndex!=null?r.rowIndex-n.rowIndex:r.level===n.level?r.parent?.id===n.parent?.id?i.compareRowNodes(o,r,n)||(r.rowIndex??-1)-(n.rowIndex??-1):s(r.parent,n.parent):r.level>n.level?s(r.parent,n):s(r,n.parent);e.sort(s)}processPinnedBottomRows(e,t){return i=>{const o=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(s=>s.rowPinned==="bottom").sort((s,r)=>s.rowIndex-r.rowIndex).map(s=>this.pinnedRowModel?.getPinnedBottomRow(s.rowIndex)).forEach(o):this.pinnedRowModel?.forEachPinnedRow("bottom",o),i}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:i=!1,exportRowNumbers:o=!1,columnKeys:s}=e,{colModel:r,gos:n,visibleCols:a}=this,l=r.pivotMode,d=h=>Oi(h)?!1:!Re(h)||o;if(s?.length){const h=[];for(let g=0,p=s.length;g<p;++g){const f=r.getCol(s[g]);f&&d(f)&&h.push(f)}return h}const c=n.get("treeData");let u;return t&&!l?u=r.colsList:u=a.allCols,u=u.filter(h=>d(h)&&(i&&!c?!Or(h):!0)),u}withCollapsibleGroupRanges(e,t){if(e.type!=="group"||!e.column?.isExpandable())return e;const i=[];let o=-1;for(let s=0;s<=e.columnSpan;s++){const n=(s<e.columnSpan?t[e.columnIndex+s]:void 0)?.getColumnGroupShow()==="open";n&&o<0?o=s:!n&&o>=0&&(i.push([o,s-1]),o=-1)}return{...e,collapsibleGroupRanges:i}}},Gf={moduleName:"SharedExport",version:E,beans:[vM]};import{_downloadFile as wM}from"ag-stack";var Nf=class extends y{getFileName(e){const t=this.getDefaultFileExtension();return e?.length||(e=this.getDefaultFileName()),e.includes(".")?e:`${e}.${t}`}resolveFileName(e){const{fileName:t}=e,i=typeof t=="function"?t(G(this.gos,{})):t;return this.getFileName(i)}runExport(e){const{overlays:t}=this.beans;t?t.showExportOverlay(e):e()}getData(e){return this.beans.gridSerializer.serialize(this.createSerializingSession(e),e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},_f=class{constructor(e){this.useGridHeaderLayout=!1;const{colModel:t,rowGroupColsSvc:i,colNames:o,valueSvc:s,gos:r,log:n,processCellCallback:a,processHeaderCallback:l,processGroupHeaderCallback:d,processRowGroupCallback:c,valueFrom:u,transformValues:h}=e;this.colModel=t,this.rowGroupColsSvc=i,this.colNames=o,this.valueSvc=s,this.gos=r,this.log=n,this.processCellCallback=a,this.processHeaderCallback=l,this.processGroupHeaderCallback=d,this.processRowGroupCallback=c,this.valueFrom=u||"data",this.transformValues=h??!0}isSpanColumnHeader(){return this.useGridHeaderLayout}prepare(e){}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractGroupHeaderValue(e){return(this.processGroupHeaderCallback?this.processGroupHeaderCallback(G(this.gos,{columnGroup:e})):this.colNames.getDisplayNameForColumnGroup(e,"header"))??""}extractRowCellValue(e){const{column:t,node:i,currentColumnIndex:o,accumulatedRowIndex:s,type:r,useRawFormula:n}=e,a=o===0&&Dr(this.gos,i,this.colModel.pivotMode);if(this.processRowGroupCallback&&(this.gos.get("treeData")||i.group)&&(t.isRowGroupDisplayed(i.rowGroupColumn?.colId??"")||a))return{value:this.processRowGroupCallback(G(this.gos,{column:t,node:i}))??""};const l=this.valueSvc;if(this.processCellCallback){const p=this.valueFrom;return{value:this.processCellCallback(G(this.gos,{accumulatedRowIndex:s,column:t,node:i,value:l.getDisplayValue(t,i,p,this.transformValues),type:r,parseValue:f=>l.parseValue(t,i,f,l.getValue(t,i,p)),formatValue:f=>(this.transformValues?l.formatTransformedValue(t,i,f):void 0)??l.formatValue(t,i,f)??f}))??""}}const d=this.gos.get("treeData"),c=i.level===-1&&i.footer,u=t.showRowGroup===!0&&(i.group||d);if(!c&&(a||u)){let p="",f=i;for(;f&&f.level!==-1;){const{value:m,valueFormatted:C}=l.getValueForDisplay({column:a?void 0:t,node:f,includeValueFormatted:!0,exporting:!0,from:this.valueFrom,transformValues:this.transformValues});p=` -> ${C??m??""}${p}`,f=f.parent}return{value:p,valueFormatted:p}}const{value:h,valueFormatted:g}=l.getValueForDisplay({column:t,node:i,includeValueFormatted:!0,exporting:!0,useRawFormula:n,from:this.valueFrom,transformValues:this.transformValues});return{value:h??"",valueFormatted:g}}getHeaderName(e,t){return e?e(G(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}},zf=`\r
`,SM=class extends _f{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:i}=e;this.suppressQuotes=t,this.columnSeparator=i}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,zf),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((i,o)=>{o!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(i.data.value||""),i.mergeAcross&&this.appendEmptyCells(i.mergeAcross)})}))}onNewHeaderRow(){return this.beginNewLine(),{onCell:this.onNewHeaderCell.bind(this)}}onNewHeaderGroupingRow(){return this.onNewHeaderRow()}onNewHeaderCell(e){e.columnIndex!=0&&(this.result+=this.columnSeparator);let t="";e.type==="column"?t=this.extractHeaderValue(e.column):e.type!=="covered"&&e.column&&(t=this.extractGroupHeaderValue(e.column)),this.result+=this.putInQuotes(t),this.appendEmptyCells(e.columnSpan-1)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,i){t!=0&&(this.result+=this.columnSeparator);const o=this.extractRowCellValue({column:e,node:i,currentColumnIndex:t,accumulatedRowIndex:t,type:"csv",useRawFormula:!1});this.result+=this.putInQuotes(o.valueFormatted??o.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():(this.log.warn(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=zf),this.isFirstLine=!1}},bM=class extends Nf{constructor(){super(...arguments),this.beanName="csvCreator"}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){this.warn(51);return}this.runExport(()=>{const t=this.getMergedParams(e),i=this.getData(t),o=new Blob(["\uFEFF",i],{type:"text/plain"});wM(this.resolveFileName(t),o)})}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const i=t?Object.assign({},e):this.getMergedParams(e);return this.getData(i)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:i,rowGroupColsSvc:o,valueSvc:s,gos:r,log:n}=this.beans,{processCellCallback:a,processHeaderCallback:l,processGroupHeaderCallback:d,processRowGroupCallback:c,suppressQuotes:u,columnSeparator:h,valueFrom:g,transformValues:p}=e;return new SM({colModel:t,colNames:i,valueSvc:s,gos:r,log:n,processCellCallback:a||void 0,processHeaderCallback:l||void 0,processGroupHeaderCallback:d||void 0,processRowGroupCallback:c||void 0,suppressQuotes:u||!1,columnSeparator:h||",",rowGroupColsSvc:o,valueFrom:g,transformValues:p})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function yM(e,t){return e.csvCreator?.getDataAsCsv(t)}function RM(e,t){e.csvCreator?.exportDataAsCsv(t)}var Wf={moduleName:"CsvExport",version:E,beans:[bM],apiFunctions:{getDataAsCsv:yM,exportDataAsCsv:RM},dependsOn:[Gf]};import{AgHighlightTooltipFeature as EM,AgTooltipComponent as xM,AgTooltipFeature as FM}from"ag-stack";import{BasePopupService as PM}from"ag-stack";var DM=class extends Uw{getDefaultPopupParent(){return this.beans.ctrlsSvc.get("gridCtrl").getGui()}callPostProcessPopup(e,t,i,o,s){const r=this.gos.getCallback("postProcessPopup");if(r){const{column:n,rowNode:a,tooltipLocation:l}=e??{};r({column:n,rowNode:a,tooltipLocation:l,ePopup:i,type:t,eventSource:o,mouseEvent:s})}}getActivePopups(){return this.popupList.map(e=>e.element)}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return We(e)}},yo={moduleName:"Popup",version:E,beans:[DM]},MM=".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);overflow-wrap:break-word;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-calculated-column-expression-tooltip),&: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}}";import{_exists as TM,_getLocaleTextFunc as Uf,_isElementOverflowingCallback as rl}from"ag-stack";var nl=/\p{Sentence_Terminal}(?:["']|\p{Pe}|\p{Pf})*$/u,Ke=(e,t,i)=>{const o=t("tooltipValidationErrorSeparator",". ");if(i==="inline")return e.join(o);const s=[];for(let a=0,l=e.length;a<l;++a){const d=e[a].trim();d.length>0&&s.push(d)}const r=o.trimEnd();if(!nl.test(r)){const a=s.join(o);return a.length>0&&!nl.test(a)?`${a}.`:a}const n=o.slice(r.length);for(let a=0,l=s.length;a<l;++a)nl.test(s[a])||(s[a]+=r);return s.join(n)};import{_isElementOverflowingCallback as AM}from"ag-stack";function al(e){return e?.tooltip===!1?void 0:e}function qf(e){return!e||e.headerTooltip===!1?void 0:e}function _s(e){return e.get("tooltipShowMode")==="whenTruncated"}function IM(e,t){return _s(e)?AM(t):void 0}import{_exists as ll,_getValueUsingDotField as kM}from"ag-stack";function zs(e,t){if(e===!0)return t.valueFormatted??t.value;if(!(e===!1||e==null))return typeof e=="function"?e(t):e}function $f(e,t,i){if(e.tooltip!==void 0)return zs(e.tooltip,t);if(ll(e.tooltipField)){const s=i();if(s.resolved)return s.value}const o=e.tooltipValueGetter;return o?.(t)}function Kf(e,t,i){if(e.tooltip!==void 0)return zs(e.tooltip,t);const o=e.tooltipValueGetter;if(o)return o(t);if(ll(e.tooltipField)){const s=i();if(s.resolved)return s.value}}function jf(e,t,i){if(i!=null)return i;const o=e?.headerTooltip,s=e?.headerTooltipValueGetter;return s&&(o===void 0||typeof o=="string")?s(t)??zs(o,t):zs(o,t)}function Ws(e){return e.tooltip!==void 0?e.tooltip!==!1:ll(e.tooltipField)||e.tooltipValueGetter!=null}function dl(e,t,i){if(e!=null)return i?kM(e,t):e[t]}function LM(e){const{colDef:t}=e;e.tooltipEnabled=t.tooltip!==!1&&(Ws(t)||t.tooltipComponent!=null||t.tooltipComponentSelector!=null)}var VM=(e,t)=>e.getTranslatedMessage?.(t)??e.message,cl=(e,t,i)=>{const o=e.editModelSvc?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,s=e.editModelSvc?.getRowValidationModel().getRowValidation(t)?.errorMessages,r=o?.length?o:s;return r?.length?Ke(r,i,"inline"):void 0},Qf=e=>{const t=e.eGui;return t.children.length===0?t:t.querySelector(".ag-cell-value")},HM=(e,t)=>{if(!_s(e.gos))return;if(!t.isCellRenderer())return rl(()=>Qf(t));const i=t.column.colDef;return!!i.showRowGroup||i.cellRenderer==="agGroupCellRenderer"?rl(()=>{const s=t.eGui;return s.querySelector(".ag-group-value")||s.querySelector(".ag-cell-value")||s}):t.hasActiveCellRenderer()?void 0:rl(()=>Qf(t))},Zf=(e,t,i)=>{if(e.editSvc?.isEditing(t,{withOpenEditor:!0}))return!1;const o=HM(e,t);return o?(!i||t.column.isTooltipEnabled())&&o():!0},BM=(e,t,i)=>{const o=t.colDef.tooltipField;if(!o)return{resolved:!1};if(i.group&&(!i.data||!e.valueSvc.displayIgnoresAggData(i)&&i.aggData?.[t.colId]!==void 0))return{resolved:!0,value:e.valueSvc.getValueForDisplay({column:t,node:i,from:"edit",transformValues:!1}).value};const r=i.data;if(!TM(r))return{resolved:!1};const n=e.colModel.getCol(o);if(n){const a=e.editSvc?.getPendingEditValue(i,n,"batch");if(a!==void 0)return{resolved:!0,value:a}}return{resolved:!0,value:dl(r,o,t.tooltipFieldContainsDots)}},OM=(e,t,i)=>{const{column:o,rowNode:s}=t,{editSvc:r,formula:n}=e;if(o.allowFormula&&n?.active||o.isCalculatedCol&&n){const d=n.getFormulaError(o,s);if(d)return{value:VM(d,i),location:"cellFormula",componentDefinition:o.colDef,shouldDisplay:()=>!!n.getFormulaError(o,s)}}if(!r?.isEditing(t)){const d=cl(e,t,i);if(d)return{value:d,location:"cellEditor",componentDefinition:o.colDef,shouldDisplay:()=>!r?.isEditing(t)&&!!cl(e,t,i)}}if(t.rendererTooltipValue!=null)return{value:t.rendererTooltipValue,location:"cell",componentDefinition:o.colDef,shouldDisplay:t.rendererTooltipShouldDisplay??(()=>Zf(e,t,!1))};const a=o.colDef;if(!Ws(a))return null;const l=G(e.gos,{location:"cell",colDef:a,column:o,rowIndex:t.cellPosition.rowIndex,node:s,data:s.data,value:t.value,valueFormatted:t.valueFormatted});return{value:$f(a,l,()=>BM(e,o,s)),location:"cell",componentDefinition:al(a),shouldDisplay:()=>Zf(e,t,!0)}};function GM(e,t){const i=Uf(e.localeSvc);let o=null;const s=()=>o=OM(e,t,i);return{getGui:()=>t.eGui,getTooltipComponentDefinition:()=>(o??s())?.componentDefinition,getTooltipValue:()=>s()?.value,getLocation:()=>o?.location??"cell",shouldDisplayTooltip:()=>{const r=o??s();return!!r&&(r.shouldDisplay?.()??!0)},getAdditionalParams:()=>({column:t.column,colDef:t.column.colDef,rowIndex:t.cellPosition.rowIndex,node:t.rowNode,data:t.rowNode.data,valueFormatted:t.valueFormatted})}}function NM(e,t,i){const o=i.getValidationElement?.(!0)||!i.isPopup?.()&&t.eGui;if(!o)return;const s=Uf(e.localeSvc);return{getGui:()=>o,getTooltipComponentDefinition:()=>t.column.colDef,getTooltipValue:()=>cl(e,t,s),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{const r=e.editModelSvc?.getRowValidationModel()?.getRowValidationMap(),n=e.editModelSvc?.getCellValidationModel()?.getCellValidationMap();return!!r?.size||!!n?.size},getAdditionalParams:()=>({column:t.column,colDef:t.column.colDef,rowIndex:t.cellPosition.rowIndex,node:t.rowNode,data:t.rowNode.data})}}var _M=class extends y{constructor(e){super(),this.rowCtrl=e,this.tooltipFeatures=new Map,this.rendererGuards=new Map}claimRenderer(e,t){const{rendererGuards:i}=this;let o=i.get(e);return o||(o=new os,i.set(e,o)),t?o.claim():o.provisionalClaim()}pruneStaleElements(){const{tooltipFeatures:e,rendererGuards:t,rowCtrl:i}=this;if(e.size===0&&t.size===0)return;const o=i.getCurrentRowComp(),s=new Set([i.getCurrentRowElement()??void 0,o?.getPinnedLeftRowElement(),o?.getScrollingRowElement(),o?.getPinnedRightRowElement()]);for(const[r,n]of e)s.has(r)||(this.destroyBean(n,this.beans.context),e.delete(r));for(const[r,n]of t)s.has(r)||(n.invalidate(),t.delete(r))}setRendererTooltip(e,t,i,o,s){if(!this.isAlive()||!s.isCurrent())return;const r=this.rowCtrl.getRowType()==="FullWidthGroup";if(i==null){this.clearTooltip(e),r&&this.setupGroupRowsTooltip(t,e);return}const n=r?t.rowGroupColumn:void 0,a=r?this.getGroupColDef(t):void 0;this.setupTooltip(e,()=>i,o,()=>({colDef:a,column:n,rowIndex:t.rowIndex??0,node:t,data:t.data}),()=>a)}setupGroupRowsTooltip(e,t){const i=e.rowGroupColumn,{gos:o}=this,s=this.getGroupColDef(e);if(!s){this.clearTooltip(t);return}const r=Ws(s),n=s.tooltip!==!1&&!r&&!!(s.tooltipComponent||s.tooltipComponentSelector);if(!r&&!n){this.clearTooltip(t);return}const{valueSvc:a}=this.beans;let l;const d=()=>{const c=a.getValueForDisplay({node:e,includeValueFormatted:!0,from:"edit"});return l=c.valueFormatted,c};this.setupTooltip(t,()=>{const{value:c,valueFormatted:u}=d(),h=G(o,{location:"fullWidthRow",colDef:s,column:i,rowIndex:e.rowIndex??0,node:e,data:e.data,value:c,valueFormatted:u??void 0});return r?Kf(s,h,()=>{const g=s.tooltipField;if(!g)return{resolved:!1};const p=e.data;if(!p)return{resolved:!0,value:c};const f=i?i.tooltipFieldContainsDots:!o.get("suppressFieldDotNotation")&&g.includes(".");return{resolved:!0,value:dl(p,g,f)}}):c},void 0,()=>({colDef:s,column:i,rowIndex:e.rowIndex??0,node:e,data:e.data,valueFormatted:l??void 0}),()=>al(s))}getGroupColDef(e){return e.rowGroupColumn?.colDef??this.gos.get("autoGroupColumnDef")}setupTooltip(e,t,i,o,s=()=>{}){const{tooltipFeatures:r,rowCtrl:n,beans:a}=this;if(!n.getCurrentRowElement())return;const l={getGui:()=>e,getTooltipComponentDefinition:s,getTooltipValue:t,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i,...o?{getAdditionalParams:o}:{}},d=a.tooltipSvc.registerTooltip(this,l,r.get(e));d?r.set(e,d):r.delete(e)}clearTooltip(e){const{tooltipFeatures:t}=this,i=t.get(e);i&&this.destroyBean(i,this.beans.context),t.delete(e)}destroy(){const{context:e}=this.beans,{tooltipFeatures:t,rendererGuards:i}=this;for(const o of t.values())this.destroyBean(o,e);t.clear();for(const o of i.values())o.invalidate();i.clear(),super.destroy()}};import{_isElementOverflowingCallback as zM}from"ag-stack";function Yf(e){const{beans:t,eGui:i,location:o,column:s,getColDef:r,getComponentTooltip:n,getDisplayName:a}=e;let l;const d=zM(()=>i.querySelector(e.overflowElementSelector)),c=()=>{const u=a(),h=r();return l=u,G(t.gos,{location:o,colDef:h,column:s,value:u,valueFormatted:u})};return{getGui:()=>i,getTooltipComponentDefinition:()=>{const u=r()??void 0;return n().value!=null?u:qf(u)},getLocation:()=>o,getTooltipValue:()=>{const{value:u}=n();return jf(r(),c(),u)},shouldDisplayTooltip:()=>{const u=n().shouldDisplay;return u?u():!_s(t.gos)||e.hasCustomHeader()||d()},getAdditionalParams:()=>{const u=r();return{column:s,...u?{colDef:u}:{},valueFormatted:l}}}}function WM(e,t,i,o){if(!t.isAlive())return i;const{column:s,eGui:r}=t,n=Yf({beans:e,eGui:r,location:"header",column:s,getColDef:()=>s.colDef,getComponentTooltip:o,getDisplayName:()=>e.colNames.getDisplayNameForColumn(s,"header",!0),overflowElementSelector:".ag-header-cell-text",hasCustomHeader:()=>!!s.colDef.headerComponent});return e.tooltipSvc.registerTooltip(t,n,i)}function UM(e,t,i,o){if(!t.isAlive())return i;const{column:s,eGui:r}=t,n=Yf({beans:e,eGui:r,location:"headerGroup",column:s,getColDef:()=>s.getColGroupDef(),getComponentTooltip:o,getDisplayName:()=>e.colNames.getDisplayNameForColumnGroup(s,"header"),overflowElementSelector:".ag-header-group-text",hasCustomHeader:()=>!!s.getColGroupDef()?.headerGroupComponent});return e.tooltipSvc.registerTooltip(t,n,i)}var qM=class extends y{constructor(){super(...arguments),this.beanName="tooltipSvc"}createTooltip(e){const{beans:t}=this;return t.registry.createDynamicBean("tooltipFeature",!1,e,t)}createHighlightTooltip(e,t){const{beans:i}=this;return i.registry.createDynamicBean("highlightTooltipFeature",!1,e,t,i)}registerTooltip(e,t,i){const{beans:o}=this;e.destroyBean(i,o.context);const s=this.createTooltip(t);return s?e.createBean(s,o.context):void 0}initCol(e){LM(e)}setupHeaderTooltip(e,t,i){return WM(this.beans,e,t,i)}setupHeaderGroupTooltip(e,t,i){return UM(this.beans,e,t,i)}enableCellTooltipFeature(e){return this.createTooltip(GM(this.beans,e))}setupCellEditorTooltip(e,t){const i=NM(this.beans,e,t);return i?this.registerTooltip(e,i):void 0}createFullWidthRowTooltips(e){return this.createBean(new _M(e))}};import{BaseTooltipStateManager as $M}from"ag-stack";var KM=class extends qw{postConstruct(){super.postConstruct();const e=this.beans.tooltipTouchSvc?.registerSource(this.tooltipCtrl.getGui(),()=>this.canShowTooltip(),t=>this.prepareToShowTooltip(t,0));e&&this.addDestroyFunc(e)}onMouseEnter(e){this.beans.tooltipTouchSvc?.isCompatibilityMouseEvent(this.tooltipCtrl.getGui())||super.onMouseEnter(e)}createTooltipComp(e,t){const i=this.tooltipCtrl;w1(this.beans.userCompFactory,e,i.getTooltipComponentDefinition?.())?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}getPopupPositionParams(){const e=this.tooltipCtrl.getAdditionalParams?.(),t=e?.column;return{column:t&&wc(t)?t:void 0,rowNode:e?.node,tooltipLocation:this.tooltipCtrl.getLocation?.()??"UNKNOWN"}}},jM=800,QM=class extends y{constructor(){super(...arguments),this.beanName="tooltipTouchSvc",this.targets=new Map,this.lastTouchEventTime=0}postConstruct(){const e=this.beans.eRootDiv.ownerDocument,t=new Ct(e,{capture:!0,yieldsLongTap:!0,shouldTrackTouch:s=>this.startTracking(s),getLongTapTarget:s=>this.resolveLongTapTarget(s)});t.addEventListener("longTap",({touchStart:s})=>{const r=this.selectedTarget;this.selectedTarget=void 0,r?.active&&r.show(s)});const i=s=>{!this.gos.get("suppressTouch")&&this.getCandidates(s).length&&this.recordTouchAt(s)},o={capture:!0,passive:!0};e.addEventListener("touchend",i,o),e.addEventListener("touchcancel",i,o),this.addDestroyFunc(()=>{t.destroy(),e.removeEventListener("touchend",i,!0),e.removeEventListener("touchcancel",i,!0)})}registerSource(e,t,i){const o={element:e,canShow:t,show:i,active:!0},s=this.targets.get(e);return s?s.push(o):this.targets.set(e,[o]),()=>this.unregisterSource(o)}isCompatibilityMouseEvent(e){const t=this.lastTouchTarget;return!t||Date.now()-this.lastTouchEventTime>=jM?!1:e.contains(t)||t.contains(e)}recordTouchAt(e){this.lastTouchEventTime=Date.now(),this.lastTouchTarget=e.target instanceof Node?e.target:void 0}startTracking(e){if(this.selectedTarget=void 0,this.gos.get("suppressTouch"))return!1;const t=this.getCandidates(e).length>0;return t&&this.recordTouchAt(e),t}resolveLongTapTarget(e){for(const t of this.getCandidates(e))if(t.canShow())return this.selectedTarget=t,t.element;this.selectedTarget=void 0}getCandidates(e){const t=[];for(const i of this.getEventPath(e)){const o=this.targets.get(i);if(o)for(let s=o.length-1;s>=0;s--)o[s].active&&t.push(o[s])}return t}getEventPath(e){const t=e.composedPath?.();if(t?.length)return t;const i=[];let o=e.target;for(;o;)i.push(o),o=o.parentNode;return i}unregisterSource(e){e.active=!1;const t=this.targets.get(e.element);if(!t)return;const i=t.indexOf(e);i>=0&&t.splice(i,1),t.length===0&&this.targets.delete(e.element)}destroy(){this.targets.clear(),this.selectedTarget=void 0,this.lastTouchTarget=void 0,super.destroy()}},ul={moduleName:"Tooltip",version:E,beans:[qM,QM],dynamicBeans:{tooltipFeature:FM,highlightTooltipFeature:EM,tooltipStateManager:KM},userComponents:{agTooltipComponent:xM},dependsOn:[yo],css:[MM]},bi=class{constructor(e){this.cellValueChanges=e}},hl=class extends bi{constructor(e,t,i,o){super(e),this.initialRange=t,this.finalRange=i,this.ranges=o}},ZM=10,Jf=class{constructor(e){this.actionStack=[],this.maxStackSize=e||ZM,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}},YM=class extends y{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},i=this.activeCellEdit!==null&&es(this.activeCellEdit,t),o=this.activeRowEdit!==null&&hu(this.activeRowEdit,t);if(!(i||o||this.isPasting||this.isRangeInAction))return;const{rowPinned:r,rowIndex:n,column:a,oldValue:l,value:d}=e,c={rowPinned:r,rowIndex:n,columnId:a.getColId(),newValue:d,oldValue:l};this.cellValueChanges.push(c)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const i=e.get("undoRedoCellEditingLimit");if(i<=0)return;this.undoStack=new Jf(i),this.redoStack=new Jf(i),this.addListeners();const o=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:s=>{s.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:o,newColumnsLoaded:o,columnGroupOpened:o,columnRowGroupChanged:o,columnMoved:o,columnPinned:o,columnVisible:o,rowDragEnd:o}),t.whenReady(this,s=>{this.gridBodyCtrl=s.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){const{eventSvc:t,undoStack:i,redoStack:o}=this;t.dispatchEvent({type:"undoStarted",source:e});const s=this.undoRedo(i,o,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:s})}redo(e){const{eventSvc:t,undoStack:i,redoStack:o}=this;t.dispatchEvent({type:"redoStarted",source:e});const s=this.undoRedo(o,i,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:s})}undoRedo(e,t,i,o,s){if(!e)return!1;const r=e.pop();return r?.cellValueChanges?(this.processAction(r,n=>n[o],s),r instanceof hl?this.processRange(r.ranges||[r[i]]):this.processCell(r.cellValueChanges),t.push(r),!0):!1}processAction(e,t,i){const{changeDetectionSvc:o,editSvc:s}=this.beans;s?.beginBulkWrite();try{o?.beginDeferred();for(const r of e.cellValueChanges){const{rowIndex:n,rowPinned:a,columnId:l}=r,d={rowIndex:n,rowPinned:a},c=Fe(this.beans,d);c?.displayed&&c.setDataValue(l,t(r),i)}}finally{o?.endDeferred(),s?.endBulkWrite()}}processRange(e){let t;const i=this.beans.rangeSvc;i.removeAllCellRanges(!0),e.forEach((o,s)=>{if(!o)return;const r=o.startRow,n=o.endRow;s===e.length-1&&(t={rowPinned:r.rowPinned,rowIndex:r.rowIndex,columnId:o.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:n.rowIndex,rowEndPinned:n.rowPinned,columnStart:o.startColumn,columns:o.columns};i.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:i,rowPinned:o}=t,s={rowIndex:i,rowPinned:o},r=Fe(this.beans,s),n={rowPinned:t.rowPinned,rowIndex:r.rowIndex,columnId:t.columnId};this.setLastFocusedCell(n)}setLastFocusedCell(e){const{rowIndex:t,columnId:i,rowPinned:o}=e,{colModel:s,focusSvc:r,rangeSvc:n}=this.beans,a=s.getCol(i);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const d={rowIndex:t,column:a,rowPinned:o};r.setFocusedCell({...d,forceBrowserFocus:!0}),n?.setRangeToCell(d)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new bi(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const i=new bi(this.cellValueChanges);this.pushActionsToUndoStack(i)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new bi(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new hl(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:i}=this.beans;t&&_e(i)?e=new hl(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new bi(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 i=new bi(t??[]);this.pushActionsToUndoStack(i),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},JM=".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,&.ag-cell-editor-input-invalid{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}";import{RefPlaceholder as XM,_getAriaCheckboxStateName as e5}from"ag-stack";var t5={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},i5=class extends _i{constructor(){super(t5,[bs]),this.eEditor=XM,this.seededValue=this}initialiseEditor(e){this.agSetEditValue(e.value),this.eEditor.getInputElement().setAttribute("tabindex","-1"),this.addManagedListeners(this.eEditor,{fieldValueChanged:i=>this.setAriaLabel(i.selected)})}agSetEditValue(e){this.params.value=e;const t=e??void 0;this.eEditor.setValue(t,!0),this.seededValue=this.eEditor.getValue(),this.setAriaLabel(t)}getValue(){const e=this.eEditor.getValue();return e===this.seededValue?this.params.value:e}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),i=e5(t,e),o=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${o} (${i})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,i=this.getValue();return t?t({value:i,internalErrors:null,cellEditorParams:e}):null}};import{_exists as Xf,_parseDateTimeFromString as gl,_serialiseDate as o5}from"ag-stack";import{_addOrRemoveAttribute as pl,_getActiveDomElement as em,_isBrowserFirefox as s5,_isBrowserSafari as r5,_parseDateTimeFromString as n5,_serialiseDate as fl}from"ag-stack";import{_createAgElement as tm,_exists as a5,_setAriaInvalid as l5,_setAriaLabel as d5,_setDisplayed as im}from"ag-stack";var c5=new Set(["number","text"]),lt=class extends st{constructor(e,t="ag-text-field",i="text"){super(e,t,i),this.clearButtonEnabled=!1}postConstruct(){super.postConstruct();const{clearButton:e,onValueClear:t,searchIcon:i}=this.config;e&&this.setClearButtonEnabled(!0),t&&this.onValueClear(t),i&&this.setSearchIcon(!0),this.addManagedPropertyListener("suppressInputClearButton",()=>this.refreshClearButton())}setInputType(e){super.setInputType(e),this.refreshClearButton()}setValue(e,t){const i=this.eInput;return i.value!==e&&(i.value=a5(e)?e:""),this.refreshClearButton(),super.setValue(e,t)}setClearButtonEnabled(e){return this.clearButtonEnabled=e,e&&!this.eClearButton&&this.createClearButton(),this.refreshClearButton(),this}onValueClear(e){return this.addManagedListeners(this,{fieldValueCleared:e}),this}setSearchIcon(e){this.toggleCss("ag-input-field-search",e),e&&!this.eSearchIcon&&this.createSearchIcon();const{eSearchIcon:t}=this;return t&&im(t,e,{skipAriaHidden:!0}),this}setDisabled(e){return super.setDisabled(e),this.refreshClearButton(),this}setStartValue(e){this.setValue(e,!0)}setCustomValidity(e){const t=this.eInput,i=e.length>0;t.setCustomValidity(e),i&&t.reportValidity(),l5(t,i)}clearInput(){const{eInput:e}=this;e.focus(),e.value&&(this.setValue("",!0),this.dispatchLocalEvent({type:"fieldValueCleared"}))}createClearButton(){const e=tm({tag:"button",cls:"ag-input-field-clear-button",attrs:{type:"button"}}),t=this.beans.iconSvc.createIconNoSpan("cancel");t&&e.appendChild(t),d5(e,this.getLocaleTextFunc()("ariaLabelInputClear","Clear")),this.addManagedElementListeners(e,{mousedown:i=>i.preventDefault(),click:()=>this.clearInput()}),this.eWrapper.appendChild(e),this.eClearButton=e}createSearchIcon(){const e=this.beans.iconSvc.createIconNoSpan("search");if(!e)return;const t=tm({tag:"span",cls:"ag-input-field-search-icon",attrs:{"aria-hidden":"true"}});t.appendChild(e),this.eWrapper.insertBefore(t,this.eWrapper.firstChild),this.eSearchIcon=t}refreshClearButton(){const{eClearButton:e,eInput:t}=this;if(!e||!t)return;const o=this.clearButtonEnabled&&!this.gos.get("suppressInputClearButton")&&c5.has(t.type)&&!this.isDisabled();t.classList.toggle("ag-input-field-input-with-clear-button",o),im(e,o&&!!t.value)}},Ro={selector:"AG-INPUT-TEXT-FIELD",component:lt},om=class extends lt{constructor(e){super(e,"ag-date-field","date"),this.includeTime=!1}postConstruct(){super.postConstruct();const e=r5();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}});const{includeTime:t,min:i,max:o,step:s}=this.config;t!=null&&this.setIncludeTime(t),typeof i=="string"&&this.setMin(i),typeof o=="string"&&this.setMax(o),typeof s=="number"?this.setStep(s):this.eInput.step="any"}onWheel(e){em(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?fl(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,pl(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?fl(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,pl(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,pl(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)}flushPendingSegment(){s5()&&em(this.beans)===this.eInput&&u5(this.eInput)}getDate(){if(this.eInput.validity.valid)return n5(this.getValue())??void 0}setDate(e,t){this.setValue(fl(e??null,this.includeTime),t)}},Us=e=>e.stopImmediatePropagation(),u5=e=>{e.addEventListener("focusout",Us,!0),e.addEventListener("focusin",Us,!0);try{e.blur(),e.focus({preventScroll:!0})}finally{e.removeEventListener("focusout",Us,!0),e.removeEventListener("focusin",Us,!0)}},ml={selector:"AG-INPUT-DATE-FIELD",component:om},Cl="ag-cell-editor-input-invalid";function sm(e,t){const i=e.getInputElement(),o=()=>qs(t,i);e.addManagedElementListeners(i,{input:o,change:o,keyup:o,focus:o,blur:o}),e.addDestroyFunc(()=>t.classList.remove(Cl)),o()}function qs(e,t){e.classList.toggle(Cl,!t.validity.valid)}import{KeyCode as Eo,RefPlaceholder as h5,_isBrowserSafari as g5}from"ag-stack";var $s=class extends _i{constructor(e){super(),this.cellEditorInput=e,this.seededText=this,this.eEditor=h5}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:i}=this,{cellStartedEdit:o,eventKey:s,suppressPreventDefault:r}=e;i.getInputElement().setAttribute("title",""),t.init(i,e);let n,a=!0,l=!1;o?(this.focusAfterAttached=!0,s===Eo.BACKSPACE||s===Eo.DELETE?n="":s?.length===1?r?a=!1:n=s:(n=t.getStartValue(),l=!0,s!==Eo.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,n=t.getStartValue(),l=!0),a&&n!=null&&i.setStartValue(n),this.seededText=l?i.getInputElement().value:this,this.addGuiEventListener("keydown",d=>{const{key:c}=d;(c===Eo.PAGE_UP||c===Eo.PAGE_DOWN)&&d.preventDefault()})}afterGuiAttached(){const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;g5()||t.getFocusableElement().focus();const i=t.getInputElement();this.highlightAllOnFocus?i.select():this.cellEditorInput.setCaret?.()}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),i=e.getInputElement();t.focus(),i.select()}agFlushInput(){this.cellEditorInput.flushInput?.()}isUntouched(){return this.eEditor.getInputElement().value===this.seededText}getValue(){return this.isUntouched()?this.params.value:this.cellEditorInput.getValue()}agSetEditValue(e){this.params.value=e;const t=this.cellEditorInput.getStartValue();this.eEditor.setStartValue(t??null),this.seededText=this.eEditor.getInputElement().value}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors(this.isUntouched())}},p5={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},f5=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return p5}getAgComponents(){return[ml]}init(e,t){this.eEditor=e,this.params=t;const{browserAutoComplete:i,min:o,max:s,step:r,colDef:n}=t;e.setAutoComplete(i),o!=null&&e.setMin(o),s!=null&&e.setMax(s),r!=null&&e.setStep(r),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(e){const t=this.eEditor.getInputElement(),i=gl(t.value),{params:o}=this,{getValidationErrors:s}=o,r=this.getInternalValidationErrors(i);if(s){const n=e?o.value:i;return s({value:n,cellEditorParams:o,internalErrors:r})}return r}getInternalValidationErrors(e){if(!e)return null;const{min:t,max:i}=this.params,o=this.getLocaleTextFunc(),s=[];if(t){const r=t instanceof Date?t:gl(t);if(r&&e<r){const n=r.toLocaleDateString();s.push(o("minDateValidation",`Date must be after ${n}`,[n]))}}if(i){const r=i instanceof Date?i:gl(i);if(r&&e>r){const n=r.toLocaleDateString();s.push(o("maxDateValidation",`Date must be before ${n}`,[n]))}}return s.length?s:null}flushInput(){this.eEditor.flushPendingSegment()}getValue(){const{eEditor:e,params:t}=this,i=e.getDate();return!Xf(i)&&!Xf(t.value)?t.value:i??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return o5(e,this.includeTime??!1)}},m5=class extends $s{constructor(){super(new f5(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}initialiseEditor(e){super.initialiseEditor(e),sm(this.eEditor,e.eGridCell)}agSetEditValue(e){super.agSetEditValue(e),qs(this.params.eGridCell,this.eEditor.getInputElement())}};import{_exists as rm,_parseDateTimeFromString as Ks,_serialiseDate as nm}from"ag-stack";var C5={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},v5=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t,this.cachedRaw=this}getTemplate(){return C5}getAgComponents(){return[ml]}init(e,t){this.eEditor=e,this.params=t;const{browserAutoComplete:i,min:o,max:s,step:r,colDef:n}=t;e.setAutoComplete(i),o!=null&&e.setMin(o),s!=null&&e.setMax(s),r!=null&&e.setStep(r),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(e){const{eEditor:t,params:i}=this,o=Ks(t.getInputElement().value)??void 0,s=this.formatDate(o),r=this.getInternalValidationErrors(o);return i.getValidationErrors?i.getValidationErrors({value:e?i.value:this.parseEditorValue(s),cellEditorParams:i,internalErrors:r}):r}flushInput(){this.eEditor.flushPendingSegment()}getValue(){const e=this.formatDate(this.eEditor.getDate());return this.parseEditorValue(e)}parseEditorValue(e){const{params:t}=this;if(Object.is(this.cachedRaw,e))return this.cachedParsed;let i;return!rm(e)&&!rm(t.value)?i=t.value:i=t.parseValue(e??""),this.cachedRaw=e,this.cachedParsed=i,i}getStartValue(){return nm(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}getInternalValidationErrors(e){if(!e)return null;const{min:t,max:i}=this.params,o=this.getLocaleTextFunc(),s=[];if(t){const r=t instanceof Date?t:Ks(t);if(r&&e<r){const n=r.toLocaleDateString();s.push(o("minDateValidation",`Date must be after ${n}`,[n]))}}if(i){const r=i instanceof Date?i:Ks(i);if(r&&e>r){const n=r.toLocaleDateString();s.push(o("maxDateValidation",`Date must be before ${n}`,[n]))}}return s.length?s:null}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):Ks(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):nm(e??null,this.includeTime??!1)??void 0}},w5=class extends $s{constructor(){super(new v5(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}initialiseEditor(e){super.initialiseEditor(e),sm(this.eEditor,e.eGridCell)}agSetEditValue(e){super.agSetEditValue(e),qs(this.params.eGridCell,this.eEditor.getInputElement())}};import{KeyCode as Et,RefPlaceholder as S5,_exists as am,_isStringLargerThan as b5}from"ag-stack";var lm=class extends st{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const i=super.setValue(e,t);return this.eInput.value=e,i}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},dm={selector:"AG-INPUT-TEXT-AREA",component:lm},y5={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},R5=class extends _i{constructor(){super(y5,[dm]),this.eEditor=S5,this.cachedRaw=this,this.seededText=this}initialiseEditor(e){const{eEditor:t}=this,{browserAutoComplete:i,cellStartedEdit:o,eventKey:s,maxLength:r,cols:n,rows:a}=e;this.focusAfterAttached=o,t.getInputElement().setAttribute("title",""),t.setAutoComplete(i).setMaxLength(r||200).setCols(n||60).setRows(a||10);let l,d=!1;o?(this.focusAfterAttached=!0,s===Et.BACKSPACE||s===Et.DELETE?l="":s?.length===1?l=s:(l=this.getStartValue(e),d=!0,s!==Et.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,l=this.getStartValue(e),d=!0),l!=null&&t.setValue(l,!0),this.seededText=d?t.getValue():this,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),this.seededText=this.eEditor.getValue()}onKeyDown(e){const t=e.key;(t===Et.LEFT||t===Et.UP||t===Et.RIGHT||t===Et.DOWN||e.shiftKey&&t===Et.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:i}=this,o=this.getLocaleTextFunc();e.setInputAriaLabel(o("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),i&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:i}=t,o=e.getValue();if(o===this.seededText||!am(o)&&!am(i))return i;if(Object.is(this.cachedRaw,o))return this.cachedParsed;const s=t.parseValue(o);return this.cachedRaw=o,this.cachedParsed=s,s}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:i}=e,o=this.getLocaleTextFunc(),s=this.getValue();let r=[];return t!=null&&b5(s,t)&&r.push(o("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),r.length||(r=null),i?i({value:s,internalErrors:r,cellEditorParams:e}):r}};import{KeyCode as cm,_exists as um,_isBrowserSafari as E5}from"ag-stack";import{_addOrRemoveAttribute as vl,_exists as x5,_getActiveDomElement as F5}from"ag-stack";var js=class extends lt{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),n=isNaN(r)?"":this.normalizeValue(r.toString());this.value!==n&&this.setValue(n)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:i,max:o,step:s}=this.config;typeof t=="number"&&this.setPrecision(t),typeof i=="number"&&this.setMin(i),typeof o=="number"&&this.setMax(o),typeof s=="number"&&this.setStep(s)}onWheel(e){F5(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const i=this.precision;if(i==null)return e;if(t){const s=Number.parseFloat(e).toFixed(i);return Number.parseFloat(s).toString()}const o=String(e).split(".");if(o.length>1){if(o[1].length<=i)return e;if(i>0)return`${o[0]}.${o[1].slice(0,i)}`}return o[0]}setMin(e){return this.min===e?this:(this.min=e,vl(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,vl(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,vl(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(i=>super.setValue(i,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,i){if(x5(i)){let o=this.isScientificNotation(i);if(o&&this.eInput.validity.valid)return e(i);if(!o){i=this.adjustPrecision(i);const s=this.normalizeValue(i);o=i!=s}if(o)return t(i)}return e(i)}getValue(e=!1){const t=this.eInput;if(!t.validity.valid&&!e)return;const i=t.value;return this.isScientificNotation(i)?this.adjustPrecision(i,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},wl={selector:"AG-INPUT-NUMBER-FIELD",component:js},P5={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},D5=class{constructor(e){this.getLocaleTextFunc=e,this.cachedRaw=this}getTemplate(){return P5}getAgComponents(){return[wl]}init(e,t){this.eEditor=e,this.params=t;const{browserAutoComplete:i,max:o,min:s,precision:r,step:n}=t;e.setAutoComplete(i),o!=null&&e.setMax(o),s!=null&&e.setMin(s),r!=null&&e.setPrecision(r),n!=null&&e.setStep(n);const a=e.getInputElement();t.preventStepping?e.addManagedElementListeners(a,{keydown:this.preventStepping}):t.showStepperButtons&&a.classList.add("ag-number-field-input-stepper")}getValidationErrors(e){const{params:t}=this,{min:i,max:o,getValidationErrors:s}=t,n=this.eEditor.getInputElement().valueAsNumber,a=this.getLocaleTextFunc();let l=[];return typeof n=="number"&&(i!=null&&n<i&&l.push(a("minValueValidation",`Must be greater than or equal to ${i}.`,[String(i)])),o!=null&&n>o&&l.push(a("maxValueValidation",`Must be less than or equal to ${o}.`,[String(o)]))),l.length||(l=null),s?s({value:e?t.value:this.parseRaw(this.eEditor.getValue(!0)),cellEditorParams:t,internalErrors:l}):l}preventStepping(e){(e.key===cm.UP||e.key===cm.DOWN)&&e.preventDefault()}getValue(){return this.parseRaw(this.eEditor.getValue(!0))}parseRaw(e){const{params:t}=this;if(!um(e)&&!um(t.value))return t.value;if(Object.is(this.cachedRaw,e))return this.cachedParsed;const i=t.parseValue(e);let o;if(i==null)o=i;else if(typeof i=="string")if(i==="")o=null;else{const s=Number(i);o=Number.isNaN(s)?null:s}else o=Number.isNaN(i)?null:i;return this.cachedRaw=e,this.cachedParsed=o,o}getStartValue(){return this.params.value}setCaret(){E5()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},M5=class extends $s{constructor(){super(new D5(()=>this.getLocaleTextFunc()))}};import{KeyCode as T5,RefPlaceholder as A5,_missing as I5}from"ag-stack";import{KeyCode as Be,_isElementOverflowingCallback as k5,_setAriaLabelledBy as L5}from"ag-stack";import{AgComponentStub as V5,KeyCode as Ae,_clearElement as H5,_isVisible as B5,_last as O5,_setAriaRole as G5}from"ag-stack";var N5=".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)}}";import{AgComponentStub as _5,RefPlaceholder as z5,_isHorizontalScrollShowing as W5,_setAriaPosInSet as U5,_setAriaSelected as q5,_setAriaSetSize as $5}from"ag-stack";var K5="ag-active-item",j5=(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}]}),Q5=class extends $w{constructor(e,t,i){super(j5(e,t)),this.label=t,this.value=i,this.eText=z5}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(K5,e),q5(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const i=this.getGui();U5(i,e),$5(i,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getTooltipComponentDefinition:()=>{},getLocation:()=>"listItem",shouldDisplayTooltip:()=>W5(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)}))}},Z5=class extends Kw{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(N5)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case Ae.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const i=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(i)}break;case Ae.DOWN:case Ae.UP:e.preventDefault(),this.navigate(t);break;case Ae.PAGE_DOWN:case Ae.PAGE_UP:case Ae.PAGE_HOME:case Ae.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:i}=e,o=i??t;return this.options.push({value:t,text:o}),this.renderOption(t,o),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();H5(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 i=this.options.findIndex(o=>o.value===e);if(i!==-1){const o=this.options[i];this.value=o.value,this.displayValue=o.text,this.highlightItem(this.listItems[i]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!B5(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const i=this.getGui(),{scrollTop:o,clientHeight:s}=i,{offsetTop:r,offsetHeight:n}=t;(r+n>o+s||r<o)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){this.highlightedItem?.tooltipFeature?.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){this.highlightedItem?.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const i=new Q5(this.cssIdentifier,t,e);i.setParentComponent(this);const o=this.createManagedBean(i);this.listItems.push(o),this.getGui().appendChild(o.getGui())}navigate(e){const t=e===Ae.DOWN;let i;const{listItems:o,highlightedItem:s}=this;if(!s)i=t?o[0]:O5(o);else{let n=o.indexOf(s)+(t?1:-1);n=Math.max(0,Math.min(n,o.length-1)),i=o[n]}this.highlightItem(i)}navigateToPage(e){const{listItems:t,highlightedItem:i}=this;if(!i||t.length===0)return;const o=t.indexOf(i),s=this.options.length-1,r=t[0].getHeight(),n=Math.floor(this.getGui().clientHeight/r);let a=-1;e===Ae.PAGE_HOME?a=0:e===Ae.PAGE_END?a=s:e===Ae.PAGE_DOWN?a=Math.min(o+n,s):e===Ae.PAGE_UP&&(a=Math.max(o-n,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){G5(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((i,o)=>{i.setIndex(o+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}};import{KeyCode as xo,RefPlaceholder as Qs,_formatSize as Y5,_getAbsoluteWidth as hm,_getInnerHeight as J5,_isNothingFocused as X5,_setAriaControls as eT,_setAriaExpanded as gm,_setAriaRole as tT,_setElementWidth as pm}from"ag-stack";var iT=".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:var(--ag-picker-button-border-radius);min-height:var(--ag-picker-field-height);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}",oT={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"}}]}]},fm=class extends ua{constructor(e){if(super(e,e?.template||oT,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=Qs,this.eWrapper=Qs,this.eDisplayField=Qs,this.eIcon=Qs,this.registerCSS(iT),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:i,variableWidth:o,minPickerWidth:s,maxPickerWidth:r}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!o,i!=null&&this.setPickerMaxHeight(i),s!=null&&this.setPickerMinWidth(s),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:i,inputWidth:o}=this.config;if(i){const s=this.beans.iconSvc.createIconNoSpan(i);s&&this.eIcon.appendChild(s)}o!=null&&this.setInputWidth(o)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),gm(e,!1),this.ariaRole&&tT(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 xo.UP:case xo.DOWN:case xo.ENTER:case xo.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case xo.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:i,pickerAriaLabelValue:o,modalPicker:s=!0},maxPickerHeight:r,minPickerWidth:n,maxPickerWidth:a,variableWidth:l,beans:d,eWrapper:c}=this,u={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const f=X5(d);this.beforeHidePicker(),f&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(i,o),anchorToElement:c};e.style.position="absolute";const h=d.popupSvc,g=h.addPopup(u);l?(n&&(e.style.minWidth=n),e.style.width=Y5(hm(c)),a&&(e.style.maxWidth=a)):pm(e,a??hm(c));const p=r??`${J5(h.getPopupParent())}px`;return e.style.setProperty("max-height",p),this.alignPickerToComponent(),g.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:i,gos:o},eWrapper:s,pickerComponent:r}=this,n=o.get("enableRtl")?"right":"left";i.positionPopupByComponent({type:t,eventSource:s,ePopup:r.getGui(),position:"under",alignSide:n,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();gm(t,e),this.ariaControlsId!=null&&eT(t,e?this.ariaControlsId:null);const i=this.eWrapper.classList;i.toggle("ag-picker-expanded",e),i.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return pm(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setAriaControlsId(e){this.ariaControlsId=e}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()}},sT=".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}",Zs=class extends fm{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(sT)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:k5(()=>this.eDisplayField),getGui:()=>this.getGui(),getTooltipComponentDefinition:()=>{},getLocation:()=>"select"})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:i}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),i&&t==null&&(this.eDisplayField.textContent=i),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new Z5("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),i=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",i),L5(t,this.getAriaElement().id),this.setAriaControlsId(i),e.addManagedElementListeners(e.getGui(),{mousedown:o=>{o?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem",keyboardEvent:this.commitKeyboardEvent})},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===Be.TAB&&this.hidePicker(),t){case Be.ENTER:case Be.UP:case Be.DOWN:case Be.PAGE_UP:case Be.PAGE_DOWN:case Be.PAGE_HOME:case Be.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(this.commitKeyboardEvent=t===Be.ENTER?e:void 0,this.listComponent?.handleKeyDown(e),this.commitKeyboardEvent=void 0):super.onKeyDown(e);break;case Be.ESCAPE:super.onKeyDown(e);break;case Be.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,i){const{listComponent:o,config:{placeholder:s},eDisplayField:r,tooltipFeature:n}=this;if(this.value===e||!o)return this;if(i||o.setValue(e,!0),o.getValue()===this.getValue())return this;let l=o.getDisplayValue();return l==null&&s&&(l=s),r.textContent=l,n?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},mm={selector:"AG-SELECT",component:Zs},rT={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},nT=class extends _i{constructor(){super(rT,[mm]),this.eEditor=A5,this.startedByEnter=!1,this.seededValue=this,this.picked=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:i,gos:o}=this,{values:s,value:r,eventKey:n}=e;if(I5(s)){this.beans.log.warn(58);return}this.startedByEnter=n!=null?n===T5.ENTER:!1;let a=!1;s.forEach(h=>{const g={value:h},p=i.formatValue(e.column,null,h),f=p!=null;g.text=f?p:h,t.addOption(g),a=a||r===h}),a?t.setValue(e.value??void 0,!0):e.values.length&&t.setValue(e.values[0],!0),this.seededValue=t.getValue();const{valueListGap:l,valueListMaxWidth:d,valueListMaxHeight:c}=e;l!=null&&t.setPickerGap(l),c!=null&&t.setPickerMaxHeight(c),d!=null&&t.setPickerMaxWidth(d);const u=o.get("editType")!=="fullRow";this.addManagedListeners(this.eEditor,{selectedItem:h=>{this.picked=!0,u&&e.stopEditing(h.keyboardEvent==null,h.keyboardEvent)}})}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),this.seededValue=this.eEditor.getValue(),this.picked=!1}getValue(){const e=this.eEditor.getValue();return!this.picked&&e===this.seededValue?this.params.value:e}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:i}=e,o=this.getValue();let s=[];if(t&&o!=null&&!t.includes(o)){const r=this.getLocaleTextFunc();s.push(r("invalidSelectionValidation","Invalid selection."))}else s=null;return i?i({value:o,internalErrors:s,cellEditorParams:e}):s}};import{_exists as Sl,_isBrowserSafari as aT,_isStringLargerThan as lT}from"ag-stack";var dT={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},cT=class{constructor(e){this.getLocaleTextFunc=e,this.cachedRaw=this}getTemplate(){return dT}getAgComponents(){return[Ro]}init(e,t){this.eEditor=e,this.params=t;const{maxLength:i,browserAutoComplete:o}=t;e.setAutoComplete(o),i!=null&&e.setMaxLength(i)}getValidationErrors(e){const{params:t}=this,{maxLength:i,getValidationErrors:o}=t,s=e?t.value:this.getValue(),r=this.getLocaleTextFunc();let n=[];return i!=null&&lT(s,i)&&n.push(r("maxLengthValidation",`Must be ${i} characters or fewer.`,[String(i)])),n.length||(n=null),o?o({value:s,cellEditorParams:t,internalErrors:n}):n}getValue(){const{eEditor:e,params:t}=this,i=e.getValue();if(!Sl(i)&&!Sl(t.value))return t.value;if(Object.is(this.cachedRaw,i))return this.cachedParsed;const o=t.parseValue(i);return this.cachedRaw=i,this.cachedParsed=o,o}getStartValue(){const e=this.params;return e.useFormatter?e.formatValue(e.value):e.value}setCaret(){aT()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),i=Sl(t)&&t.length||0;i&&e.getInputElement().setSelectionRange(i,i)}},Cm=class extends $s{constructor(){super(new cT(()=>this.getLocaleTextFunc()))}};import{KeyCode as uT,_getLocaleTextFunc as hT,_setAriaInvalid as gT}from"ag-stack";function je(e){const t=e;return t?.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var pT=class extends y{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.editingCount=0,this.cellValidations=new vm,this.rowValidations=new wm,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}hasOpenEditors(){return this.editingCount>0}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;const i=this.getEditRow(e);t?(i.get(t)?.state==="editing"&&this.editingCount--,i.delete(t)):(i.forEach(o=>{o.state==="editing"&&this.editingCount--}),i.clear()),i.size===0&&this.edits.delete(e)}getEditRow(e,t){if(this.suspendEdits||this.edits.size===0)return;const i=e&&this.edits.get(e);if(i)return i;if(t){const o=e.pinnedSibling;if(o)return this.getEditRow(o)}}getEditRowDataValue(e){if(!e||this.edits.size===0)return;const t=this.getEditRow(e),i=e.pinnedSibling,o=i?this.getEditRow(i):void 0;if(!t&&!o)return;const s={...e.data};return t&&Sm(t,s),o&&Sm(o,s),s}getEdit(e={}){return this.getCellEdit(e.rowNode,e.column)}getCellEdit(e,t){const i=this.edits;if(!(i.size===0||this.suspendEdits||!e||!t))return i.get(e)?.get(t)}getCellEditWithSibling(e,t){return this.getCellEdit(e,t)??this.getCellEdit(e?.pinnedSibling,t)}getEditMap(){return this.suspendEdits?null:this.edits}getEditMapCopy(){const e=new Map;return this.suspendEdits||this.edits.forEach((t,i)=>{const o=new Map;t.forEach(({editorState:s,...r},n)=>o.set(n,{...r})),e.set(i,o)}),e}setEditMap(e){const t=new Map;let i=0;e.forEach((s,r)=>{const n=new Map;s.forEach((a,l)=>{a.state==="editing"&&i++,n.set(l,{...a})}),t.set(r,n)});const o=this.edits;o.clear(),t.forEach((s,r)=>o.set(r,s)),this.editingCount=i}setEdit(e,t){const{rowNode:i,column:o}=e,s=this.edits;let r=s.get(i);r||(r=new Map,s.set(i,r));const n=r.get(o),a=this.suspendEdits?void 0:n,l={editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...a,...t},d=n?.state==="editing",c=l.state==="editing";return d!==c&&(this.editingCount+=c?1:-1),r.set(o,l),l}clearEditValue(e){const{rowNode:t,column:i}=e;if(!t)return;const o=r=>{r.state==="editing"&&this.editingCount--,r.editorValue=void 0,r.pendingValue=r.sourceValue,r.state="changed"};if(!i){this.getEditRow(t)?.forEach(o);return}const s=this.getEdit(e);s&&o(s)}getState(e){if(!this.suspendEdits)return this.getEdit(e)?.state}getEditPositions(e){if(this.suspendEdits||(e??this.edits).size===0)return[];const t=[];return(e??this.edits).forEach((i,o)=>{for(const s of i.keys()){const{editorState:r,...n}=i.get(s);t.push({rowNode:o,column:s,...n})}}),t}hasRowEdits(e,t){return this.suspendEdits||this.edits.size===0?!1:!!this.getEditRow(e,t)}hasEdits(e={},t={}){if(this.suspendEdits||this.edits.size===0)return!1;const{rowNode:i,column:o}=e,{withOpenEditor:s}=t;if(i){const r=this.getEditRow(i,t.checkSiblings);return r?o?s?this.getEdit(e)?.state==="editing":r.has(o):r.size!==0?s?Array.from(r.values()).some(({state:n})=>n==="editing"):!0:!1:!1}return s?this.hasOpenEditors():this.edits.size>0}start(e){const{rowNode:t,column:i}=e;let o=this.edits.get(t);o||(o=new Map,this.edits.set(t,o)),i&&!o.has(i)&&(o.set(i,{editorValue:void 0,pendingValue:de,sourceValue:this.beans.valueSvc.getValueFromData(i,t),state:"editing",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}}),this.editingCount++)}stop(e,t,i){if(this.hasEdits(e))if(t){const o=this.getEditRow(e.rowNode)?.get(e.column);o&&(o.pendingValue===de||o.pendingValue===o.sourceValue)?this.removeEdits(e):o&&i&&(o.editorValue=void 0)}else this.removeEdits(e)}clear(){for(const e of this.edits.values())e.clear();this.edits.clear(),this.editingCount=0}hasValidationErrors(e){return this.rowValidations.hasRowValidation(e)||this.cellValidations.hasCellValidation(e)}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(e){this.cellValidations=e}setRowValidationModel(e){this.rowValidations=e}destroy(){super.destroy(),this.clear()}},vm=class{constructor(){this.cellValidations=new Map}getCellValidation(e){const{rowNode:t,column:i}=e||{};return this.cellValidations?.get(t)?.get(i)}hasCellValidation(e){const t=e?.rowNode;return t?e.column?!!this.getCellValidation(e):this.cellValidations.has(t):this.cellValidations.size>0}setCellValidation(e,t){const{rowNode:i,column:o}=e;this.cellValidations.has(i)||this.cellValidations.set(i,new Map),this.cellValidations.get(i).set(o,{errorMessages:[...t.errorMessages]})}clearCellValidation(e){const{rowNode:t,column:i}=e,o=this.cellValidations,s=o.get(t);s&&(s.delete(i),s.size===0&&o.delete(t))}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},wm=class{constructor(){this.rowValidations=new Map}getRowValidation(e){const{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return e?.rowNode?!!this.getRowValidation(e):this.rowValidations.size>0}setRowValidation({rowNode:e},t){this.rowValidations.set(e,{errorMessages:[...t.errorMessages]})}clearRowValidation({rowNode:e}){this.rowValidations.delete(e)}setRowValidationMap(e){this.rowValidations=e}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}},Sm=(e,t)=>{e.forEach(({editorValue:i,pendingValue:o},s)=>{const r=i===void 0?o:i;r!==de&&(t[s.getColId()]=r)})};import{_getTabIndex as fT}from"ag-stack";function Jt(e,t={}){const{rowIndex:i,rowId:o,rowCtrl:s,rowPinned:r}=t;if(s)return s;const{rowModel:n,rowRenderer:a}=e;let{rowNode:l}=t;return l||(o?l=pS(e,o,r):i!=null&&(l=n.getRow(i))),l?a.getRowCtrlByNode(l):void 0}function q(e,t={}){const{cellCtrl:i,colId:o,columnId:s,column:r}=t;if(i)return i;const n=e.colModel.getCol(o??s??bl(r)),a=t.rowCtrl??Jt(e,t),l=a?.getCellCtrl(n)??void 0;if(l)return l;const d=t.rowNode??a?.rowNode;if(d)return e.rowRenderer.getCellCtrls([d],[n])?.[0]}function bm(e){const{editSvc:t}=e;t?.isBatchEditing()?t.stopBatchEditors(!1):t?.stopEditing(void 0,{source:"api"})}function mT(e,t,i){const{gos:o,popupSvc:s}=t;if(!o.get("stopEditingWhenCellsLoseFocus"))return;const r=n=>{const a=n.relatedTarget;if(fT(a)===null){bm(t);return}let l=i.some(d=>d.contains(a))&&o.isElementInThisInstance(a);l||(l=!!s&&(s.getActivePopups().some(d=>d.contains(a))||s.isElementWithinCustomPopup(a))),l||bm(t)};for(const n of i)e.addManagedElementListeners(n,{focusout:r})}function bl(e){if(e)return typeof e=="string"?e:e.getColId()}import{_getLocaleTextFunc as ym}from"ag-stack";var yl=(e,t,{previous:i}={})=>{const o=[];for(const[r,n]of t.cell.getCellValidationMap())for(const[a,{errorMessages:l}]of n){const d=Ke(l,e,"announcement"),c=i?.cell.getCellValidation({rowNode:r,column:a})?.errorMessages;d.length>0&&(!c||d!==Ke(c,e,"announcement"))&&o.push({rowNode:r,column:a,message:d})}const s=[];for(const[r,{errorMessages:n}]of t.row.getRowValidationMap()){const a=Ke(n,e,"announcement"),l=i?.row.getRowValidation({rowNode:r})?.errorMessages;a.length>0&&(!l||a!==Ke(l,e,"announcement"))&&s.push({rowNode:r,message:a})}return{cells:o,rows:s}},CT=(e,t,i)=>{for(const[o,s]of t.cell.getCellValidationMap())for(const[r,{errorMessages:n}]of s){const a=Ke(n,e,"announcement"),l=i.cell.getCellValidation({rowNode:o,column:r})?.errorMessages??[];if(a.length>0&&Ke(l,e,"announcement").length===0)return!0}for(const[o,{errorMessages:s}]of t.row.getRowValidationMap()){const r=Ke(s,e,"announcement"),n=i.row.getRowValidation({rowNode:o})?.errorMessages??[];if(r.length>0&&Ke(n,e,"announcement").length===0)return!0}return!1},vT=(e,t)=>e.colNames.getDisplayNameForColumn(t,"header",!0)||t.getColId(),wT=(e,t)=>{const{rowIndex:i,rowPinned:o}=t;if(i==null)return;const s={rowIndex:i,rowPinned:o??null};return an(e)+rn(e,s)+1},Rm=(e,t)=>e("ariaRowIndex",`Row ${t}`,[String(t)]),Em=(e,t,{cells:i,rows:o},s,r)=>{const n=new Map,a=e.visibleCols.allCols;for(let d=0,c=a.length;d<c;++d)n.set(a[d],d);const l=[];for(let d=0,c=i.length;d<c;++d){const{rowNode:u,column:h,message:g}=i[d],p=s?.get(u),f=p==null?"":`${Rm(t,p)}, `;l.push({rowNode:u,columnOrder:n.get(h)??Number.MAX_SAFE_INTEGER,rowError:!1,message:`${f}${vT(e,h)}: ${g}`})}for(let d=0,c=o.length;d<c;++d)l.push({rowNode:o[d].rowNode,columnOrder:Number.MAX_SAFE_INTEGER,rowError:!0,message:ST(t,o[d],s)});if(l.sort((d,c)=>{const u=(s?.get(d.rowNode)??Number.MAX_SAFE_INTEGER)-(s?.get(c.rowNode)??Number.MAX_SAFE_INTEGER);return u!==0?u:d.rowError!==c.rowError?d.rowError?1:-1:d.columnOrder-c.columnOrder}),r){const d=l.find(({rowError:c})=>!c);d&&(d.message=`${r} ${d.message}`)}return l.map(({message:d})=>d).join(" ")},ST=(e,{rowNode:t,message:i},o)=>{const s=e("ariaFullRowValidationError",`Full Row Validation: ${i}`,[i]),r=o?.get(t);return r==null?s:`${Rm(e,r)}, ${s}`},xm=(e,{cells:t,rows:i},o,s=!1)=>{const r=new Set;for(let a=0,l=t.length;a<l;++a)r.add(t[a].rowNode);for(let a=0,l=i.length;a<l;++a)r.add(i[a].rowNode);if(r.size===0||!s&&r.size===1&&(!o||r.has(o)))return;const n=new Map;for(const a of r){const l=wT(e,a);l!=null&&n.set(a,l)}return n},Fm=(e,t,{cells:i,rows:o})=>{const s=xm(e,{cells:i,rows:o}),r=i.length>0?t("ariaValidationErrorPrefix","Cell Editor Validation"):void 0;return Em(e,t,{cells:i,rows:o},s,r)},Pm=(e,t,i)=>{const o=ym(e.localeSvc),s=yl(o,i,{previous:t}),r=Fm(e,o,s);if(r.length>0)e.ariaAnnounce.announceValue(r,"editorValidation");else if(CT(o,t,i)){const n=yl(o,i);e.ariaAnnounce.announceValue(Fm(e,o,n),"editorValidation")}},Dm=(e,t)=>{const{editModelSvc:i,ariaAnnounce:o,localeSvc:s}=e;if(!i)return;const r=ym(s),{cells:n,rows:a}=yl(r,{cell:i.getCellValidationModel(),row:i.getRowValidationModel()}),l=xm(e,{cells:n,rows:a},t,!t&&(e.editSvc?.isBatchEditing()??!1)),d=Em(e,r,{cells:n,rows:a},l);if(d.length===0)return;const c=r("ariaFullRowEditValidationFailed",`Cannot complete row edit. ${d}`,[d]);o.announceValue(c,"editorValidation")},de=Symbol("unedited"),bT=(e,t={})=>{const i=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns),o=new Array(i.length);let s=0;for(let r=0,n=i.length;r<n;++r){const l=i[r].comp?.getCellEditor();l&&(o[s++]=je(l))}return o.length=s,o};function yT(e,t,i,o,s,r){t.length===0&&i?.rowNode&&i?.column&&Xt(e,i,{key:o,event:s,cellStartedEdit:r});const{valueSvc:n,editSvc:a,editModelSvc:l}=e,{rowNode:d,column:c}=i??{},u=new Map;for(const h of t){const{rowNode:g,column:p}=h,f=q(e,h);if(!f){if(g&&p){const C=n.getValueFromData(p,g),w=(i?.rowNode===g&&i?.column===p&&o||void 0)??a?.getCellDataValue(h)??n.getDisplayValue(p,g,"edit",!1)??C??de;l?.setEdit(h,{pendingValue:yi(e,w,!1,p),sourceValue:C,state:"editing"})}continue}const m=r&&d===f.rowNode&&f.column===c;a.withEditorAttachValidationCache(u,f,()=>Xt(e,{rowNode:d,column:f.column},{key:m?o:null,event:m?s:null,cellStartedEdit:m&&r}))}}function Oe({pendingValue:e,sourceValue:t}){return e===de&&(e=t),e!==t}function RT(e){const t=new Map;for(const[i,o]of e){const s=new Map;for(const[r,n]of o)Oe(n)&&s.set(r,n);s.size>0&&t.set(i,s)}return t}function Xt(e,t,i){const{key:o,event:s,cellStartedEdit:r,silent:n}=i??{},{editModelSvc:a,gos:l,userCompFactory:d}=e,c=q(e,t),u=c?.comp?.getCellEditor(),h=Tm(e,t,o,r&&!n),g=a?.getEdit(t),p=h.value??g?.sourceValue;if(u){a?.setEdit(t,{editorValue:yi(e,p,!0,t.column),state:"editing"}),u.refresh?.(h);return}const f=t.column.getColDef(),m=Lc(d,f,h);if(!m)return;const{popupFromSelector:C,popupPositionFromSelector:v}=m,S=C??!!f.cellEditorPopup,w=v??f.cellEditorPopupPosition;if(km(m.params,s),!c)return;const{rowCtrl:b,comp:R}=c,{cellStartedEditing:x,cellStoppedEditing:D}=(n?g?.editorState:void 0)??{};a?.setEdit(t,{editorValue:yi(e,p,!0,t.column),state:"editing",editorState:{cellStartedEditing:x,cellStoppedEditing:D}}),c.editCompDetails=m,e.editSvc?.invalidateEditorsValidation(),R?.setEditDetails(m,S,w,l.get("reactiveCustomComponents")),b?.refreshRow({suppressFlash:!0}),c.refreshNoteState(),ET(e,t,s,p,n)}function ET(e,t,i,o,s){const{editSvc:r,editModelSvc:n}=e,a=n?.getEdit(t);!s&&a?.state==="editing"&&!a?.editorState?.cellStartedEditing&&(r?.dispatchCellEvent(t,i,"cellEditingStarted",{value:o}),n?.setEdit(t,{editorState:{cellStartedEditing:!0}}))}function Mm(e,t,i,o){const s={editorValueExists:!1};if(i?.isCancelling||(o===void 0&&e.editSvc.hasValidationRules()&&(o=(t.getValidationErrors?.()?.length??0)>0),o))return s;if(i?.isStopping){const n=t.isCancelAfterEnd?.();if(n)return{...s,isCancelAfterEnd:n}}return{editorValue:t.getValue(),editorValueExists:!0}}function Tm(e,t,i,o){const{valueSvc:s,gos:r,editSvc:n}=e,a=e.gos.get("enableGroupEdit"),l=q(e,t),d=t.rowNode?.rowIndex??void 0,c=n?.isBatchEditing(),u=e.colModel.getCol(t.column),{rowNode:h,column:g}=t,p=l.comp?.getCellEditor(),f=n?.getCellDataValue(t),m=f===void 0?p?Mm(e,p)?.editorValue:void 0:f,C=m===de?s.getDisplayValue(u,h,"edit",!1):m;let v=a?m:C;return u.allowFormula&&e.formula?.isFormula(v)&&(v=e.formula?.normaliseFormula(v,!0)??v),G(r,{value:v,eventKey:i??null,column:g,colDef:g.getColDef(),rowIndex:d,node:h,data:h.data,cellStartedEdit:!!o,onKeyDown:l?.onKeyDown.bind(l),stopEditing:(S,w)=>{n.stopEditing(t,{source:c?"ui":"api",suppressNavigateAfterEdit:S,event:w}),n.cellEditingInvalidCommitBlocks()&&e.editModelSvc?.hasValidationErrors({rowNode:h})||Qe(e,t,{})},eGridCell:l?.eGui,parseValue:S=>s.parseValue(u,h,S,l?.value),formatValue:l?.formatValue.bind(l),validate:()=>{Gm(e)}})}function Am(e,t,i,o,s){!s&&(o.state==="editing"||o.pendingValue===de)||Oe(o)||e.removeEdits({rowNode:t,column:i})}function Rl(e,t){const{editModelSvc:i}=e;i?.getEditMap()?.forEach((o,s)=>{o.forEach((r,n)=>Am(i,s,n,r,t))})}function Im(e,t,i){const{editModelSvc:o}=e;if(!o)return;const s=o.getEdit(t);s&&Am(o,t.rowNode,t.column,s,i)}function xT(e,t){const i=t.comp?.getCellEditor();if(!i?.refresh)return;const{eventKey:o,cellStartedEdit:s}=t.editCompDetails.params,{column:r}=t,n=Tm(e,t,o,s),a=r.getColDef(),l=Lc(e.userCompFactory,a,n);i.refresh(km(l.params,o))}function km(e,t){return t instanceof KeyboardEvent&&e.column.getColDef().cellEditor==="agNumberCellEditor"?e.suppressPreventDefault=["-","+",".","e"].includes(t?.key??"")||e.suppressPreventDefault:t?.preventDefault?.(),e}function Ys(e){const t=e.editModelSvc;if(!t?.hasOpenEditors())return;const i={};t.getEditMap()?.forEach((o,s)=>{i.rowNode=s;for(const r of o.keys()){i.column=r;const n=q(e,i)?.comp?.getCellEditor();n&&je(n).agFlushInput?.()}})}var FT=(e,t)=>{if(Ys(e),!e.editSvc.cellEditingInvalidCommitBlocks()){const o=t.comp?.getCellEditor();let s;return o&&e.editSvc.hasValidationRules()&&(s=new Map,Lm(s,o,je(o))),{revertBlockedInvalid:!1,validationCache:s}}const i=xt(e);return{revertBlockedInvalid:!!e.editModelSvc?.getCellValidationModel().hasCellValidation(t),validationCache:i}},PT=(e,t,i)=>{const o=e.editSvc;if(!o?.isEditing(t,{withOpenEditor:!0}))return;const s=i instanceof KeyboardEvent,r=i instanceof MouseEvent,n=s&&i.key===uT.ESCAPE,a=e.gos.get("editType")==="fullRow",l=n?void 0:FT(e,t),d=l?.revertBlockedInvalid??!1,c=l?.validationCache,u=o.isBatchEditing(),{rowNode:h,column:g}=t;if(!n&&a&&o.isRowEditing(h,{checkSiblings:!0})){d?o.revertCellEdit({rowNode:h,column:g},c):o.closeCellEditor({rowNode:h,column:g},c);return}if(d&&u){o.revertCellEdit({rowNode:h,column:g},c);return}o.stopEditing(t,{source:u?"ui":"api",cancel:n||d,event:s||r?i:void 0},c),n&&t.focusCell({forceBrowserFocus:!0,sourceEvent:i})},Lm=(e,t,i)=>{let o=e.get(t);return o===void 0&&(o=[...i.getValidationErrors?.()??[]],e.set(t,o)),o},Vm=(e,t,i=new Map)=>{for(const o of e.rowRenderer.getCellCtrls()){const s=o.comp?.getCellEditor();if(!s)continue;const r=je(s),n=Lm(i,s,r);t?.(o,r,n)}return i},DT=e=>Vm(e),ei=(e,t,i)=>{const o={};e.editModelSvc?.getEditMap()?.forEach((s,r)=>{o.rowNode=r;for(const n of s.keys())o.column=n,Hm(e,o,t,i)})},Hm=(e,t,i,o)=>{const s=q(e,t)?.comp?.getCellEditor();if(!s)return;const r=o?.get(s),n=r===void 0?void 0:r.length>0,{editorValue:a,editorValueExists:l,isCancelAfterEnd:d}=Mm(e,s,i,n);if(d){const{cellStartedEditing:c,cellStoppedEditing:u}=e.editModelSvc?.getEdit(t)?.editorState||{};e.editModelSvc?.setEdit(t,{editorState:{isCancelAfterEnd:d,cellStartedEditing:c,cellStoppedEditing:u}})}Bm(e,t,a,!l,i)};function Fo(e,t,i,o){Bm(e,t,i,!1,o)}function Bm(e,t,i,o,s){const{editModelSvc:r,valueSvc:n}=e;if(!r)return;const{rowNode:a,column:l}=t;let d=r.getEdit(t);if(d?.sourceValue===void 0){const c=d?yi(e,d.editorValue,!1,l):de,u={sourceValue:n.getValueFromData(l,a),pendingValue:c};s?.persist&&(u.state="changed"),d=r.setEdit(t,u)}r.setEdit(t,{editorValue:o?yi(e,d.sourceValue,!0,l):i}),s?.persist&&MT(e,t)}function yi(e,t,i,o){const{formula:s}=e;return o.allowFormula&&s?.isFormula(t)?s?.normaliseFormula(t,i)??t:t}function MT(e,t){const{editModelSvc:i}=e,o=i?.getEdit(t),r={pendingValue:yi(e,o?.editorValue,!1,t.column)};!o?.editorState?.cellStoppedEditing&&o?.state!=="editing"&&(r.state="changed"),i?.setEdit(t,r)}function Js(e,t,i={},o){for(let s=0,r=t.length;s<r;++s)Qe(e,t[s],i,void 0,o)}function Qe(e,t,i,o=q(e,t),s){const r=e.editModelSvc;o&&e.editSvc?.clearPendingEditorAttachValidation(o);const n=r?.getEdit(t);let a;if(n&&n.state!=="editing"&&n.editorState?.cellStoppedEditing?a=n.state:a="changed",!o){if(n){r?.getCellValidationModel().clearCellValidation(t),r?.setEdit(t,{state:a}),El(e,t,n,i);const c=Jt(e,{rowNode:t.rowNode});c&&e.editSvc?.applyRowEditStyles(c)}return}const l=o.comp,d=l?.getCellEditor();if(l&&!d){o?.refreshCell(),n&&(r?.setEdit(t,{state:a}),El(e,t,n,i));return}if(!i.cancel&&e.editSvc.hasValidationRules()){const c=d?s?.get(d):void 0,u=n&&(c??d?.getValidationErrors?.()),h=r?.getCellValidationModel();u?.length?h?.setCellValidation(t,{errorMessages:u}):h?.clearCellValidation(t)}n&&r?.setEdit(t,{state:a}),l?.setEditDetails(),l?.refreshEditStyles(!1,!1),o?.refreshCell({force:!0,suppressFlash:!0}),El(e,t,n,i)}function TT(e,t){const{sourceValue:i,pendingValue:o}=e;let s;return!t&&o!==de&&(s=o),{valueChanged:!t&&Oe(e),newValue:s,oldValue:i,value:i}}function AT(e,t,i){if(i||e.editorState.isCancelAfterEnd)return{valueChanged:!1,newValue:void 0,oldValue:e.sourceValue};let o=e.editorValue;return(o==null||o===de)&&(o=t?.pendingValue),o===de&&(o=void 0),{valueChanged:Oe(e),newValue:o,oldValue:e.sourceValue}}var El=(e,t,i,o)=>{const s=e.editModelSvc?.getEdit(t);if(!s||s.state==="editing")return;const r=o?.cancel,n=e.gos.get("enableGroupEdit")?TT(s,r):AT(s,i,r);IT(e,t,n,o)};function IT(e,t,i,{silent:o,event:s}={}){const{editSvc:r,editModelSvc:n}=e,a=n?.getEdit(t),{editorState:l}=a||{},{isCancelBeforeStart:d,cellStartedEditing:c,cellStoppedEditing:u}=l||{};!o&&!d&&c&&!u&&(r?.dispatchCellEvent(t,s,"cellEditingStopped",i),n?.setEdit(t,{editorState:{cellStoppedEditing:!0}}))}function kT(e){const t=e.rowRenderer.getCellCtrls();for(let i=0,o=t.length;i<o;++i){const r=t[i].comp?.getCellEditor();if(r){const n=je(r);if(n.getValidationElement||n.getValidationErrors)return!0}}return!1}function xt(e,t,i){const o=e.editSvc;if(!(t||o?.hasValidationRules()||e.editModelSvc?.hasValidationErrors()))return new Map;const s=new vm,{editModelSvc:r}=e,n=r?.getCellValidationModel(),a=r?.getRowValidationModel(),l=hT(e.localeSvc),d=new Set;i=Vm(e,(c,u,h)=>{const{rowNode:g,column:p}=c,f=h.length>0,m=u.getValidationElement?.(!1)||!u.isPopup?.()&&c.eGui;if(m){const C=f?Ke(h,l,"inline"):"";if(gT(m,f),m instanceof HTMLInputElement){m.setCustomValidity(C);const v=c.eGui;v.classList.contains(Cl)&&qs(v,m)}else m.classList.toggle("invalid",f)}f&&s.setCellValidation({rowNode:g,column:p},{errorMessages:h}),d.add(c.rowCtrl)},i),ei(e,{persist:!1},i),r?.setCellValidationModel(s),Om(e),r&&n&&a&&Pm(e,{cell:n,row:a},{cell:s,row:r.getRowValidationModel()});for(const c of d.values()){o?.applyRowEditStyles(c);for(const u of c.getAllCellCtrls())u.tooltipFeature?.refreshTooltip(!0),u.editorTooltipFeature?.refreshTooltip(!0),o?.applyCellEditStyles(u)}return i}var Om=e=>{e.gos.get("editType")==="fullRow"&&e.editModelSvc?.setRowValidationModel(LT(e))},LT=e=>{const t=new wm,i=e.gos.get("getFullRowEditValidationErrors"),o=e.editModelSvc?.getEditMap();if(!i||!o)return t;for(const[s,r]of o){const n=[],{rowIndex:a,rowPinned:l}=s;for(const[c,u]of r){const{editorValue:h,pendingValue:g,sourceValue:p}=u,f=h??(g===de?void 0:g)??p;n.push({column:c,colId:c.getColId(),rowIndex:a,rowPinned:l,oldValue:p,newValue:f})}const d=i({editorsState:n})??[];d.length>0&&t.setRowValidation({rowNode:s},{errorMessages:d})}return t};function Gm(e){return xt(e,!0),Nm(e)}function Nm(e){const t=e.editModelSvc?.getCellValidationModel().getCellValidationMap();if(!t)return null;const i=[];return t.forEach((o,s)=>{o.forEach(({errorMessages:r},n)=>{i.push({column:n,rowIndex:s.rowIndex,rowPinned:s.rowPinned,messages:r??null})})}),i}function VT(e){e.undoRedo?.undo("api")}function HT(e){e.undoRedo?.redo("api")}function BT(e,t){return e.editModelSvc?.getEditRowDataValue(t)}function OT(e){const t=e.editModelSvc?.getEditMap(),i=[];return t?.forEach((o,s)=>{o.forEach((r,n)=>{const a=r.state==="editing",l=!a&&Oe(r);if(a||l){const d=n.colId;let c=r.editorValue??r.pendingValue;c===de&&(c=void 0),i.push({newValue:c,oldValue:r.sourceValue,state:r.state,column:n,colId:d,colKey:d,rowIndex:s.rowIndex,rowPinned:s.rowPinned})}})}),i}function GT(e,t=!1){const{editSvc:i}=e;i?.isBatchEditing()?i.stopBatchEditors(t):i?.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function NT(e,t){const i=Fe(e,t);return!!i&&!!e.editSvc?.isEditing({rowNode:i,column:t.column})}function _T(e,t){const{key:i,colKey:o,rowIndex:s,rowPinned:r}=t,{editSvc:n,colModel:a}=e,l=a.getCol(o);if(!l){e.log.warn(12,{colKey:o});return}const c=Fe(e,{rowIndex:s,rowPinned:r||null,column:l});if(!c){e.log.warn(290,{rowIndex:s,rowPinned:r});return}if(!n?.isCellEditable({rowNode:c,column:l},"api"))return;r==null&&xf(e,s),Ef(e,o),n?.startEditing({rowNode:c,column:l},{event:i?new KeyboardEvent("keydown",{key:i}):void 0,source:"api",editable:!0})}function zT(e){return Ys(e),Gm(e)}var WT=Nm;function UT(e){return e.undoRedo?.getCurrentUndoStackSize()??0}function qT(e){return e.undoRedo?.getCurrentRedoStackSize()??0}import{KeyCode as Ri}from"ag-stack";import{AgPopupComponent as $T}from"ag-stack";var KT={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},jT=class extends jw{constructor(e){super(KT),this.params=e}postConstruct(){Mt(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,i=o=>{Ln(this.gos,o,t.node,t.column,!0)||t.onKeyDown(o)};this.addManagedElementListeners(e,{keydown:i})}};import{KeyCode as Xs}from"ag-stack";function QT(e,{column:t},i,o,s="ui"){if(i instanceof KeyboardEvent&&(i.key===Xs.TAB||i.key===Xs.ENTER||i.key===Xs.F2||i.key===Xs.BACKSPACE&&o))return!0;if(i?.shiftKey&&e.rangeSvc?.getCellRanges().length!=0)return!1;const n=t?.getColDef(),a=ZT(e.gos,n),l=i?.type;return l==="click"&&i?.detail===1&&a===1||l==="dblclick"&&i?.detail===2&&a===2?!0:s==="api"?!!o:!1}function ZT(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t?.singleClickEdit?1:2}function xl(e,t){return e.editModelSvc?.hasEdits(t,{withOpenEditor:!0})??!1}function Fl(e,t){const i=t.column,o=t.rowNode,s=i.getColDef();if(i.isCalculatedCol)return!1;if(!o)return xl(e,t);if(ut(e.gos,o))return!1;const r=s.editable;return o.group&&s.groupRowEditable!=null?e.rowGroupingEditValueSvc?.isGroupCellEditable(o,i)?!0:xl(e,t):i.isColumnFunc(o,r)?!0:xl(e,t)}function YT(e,t,i="ui"){const o=Fl(e,t);if(o||i==="ui")return o;const{rowNode:s,column:r}=t;for(const n of e.colModel.colsList)if(n!==r&&Fl(e,{rowNode:s,column:n}))return!0;return!1}var er=(e,t=!1)=>{if(e!==void 0)return Oe(e)||t&&e.state==="editing"};function _m(e,t,i=!1){return er(e.editModelSvc?.getEdit(t),i)}var zm=(e,t,i)=>{if(e)for(let o=0,s=e.length;o<s;++o){const r=e[o];if(r.data&&(er(t?.getCellEdit(r,i))||er(t?.getCellEdit(r.pinnedSibling,i)))||zm(r.childrenAfterGroup,t,i))return!0}};function Wm(e,t){const{column:i,rowNode:o}=t;return e.gos.get("groupTotalRow")&&!o?.footer?!1:zm(o?.childrenAfterGroup,e.editModelSvc,i)}function Um(e,{rowNode:t,column:i}){if(t=t.pinnedSibling,!!t)return er(e.editModelSvc?.getCellEdit(t,i))}function Pl(e,t){if(!t.comp)return;const{editSvc:i,editModelSvc:o}=e;if(i?.isBatchEditing()&&i.isEditing()){const r=_m(e,t)||Wm(e,t)||Um(e,t);qm(e,t,r)}else qm(e,t,!1);const s=!!o?.getCellValidationModel().hasCellValidation(t);t.comp.toggleCss("ag-cell-editing-error",s)}function qm(e,t,i){t.comp.toggleCss("ag-cell-editing",i??!1),t.comp.toggleCss("ag-cell-batch-edit",(i&&e.editSvc?.isBatchEditing())??!1)}function JT(e,t){const i=e.editModelSvc;let o=t.rowNode,s=i?.getEditRow(o);const r=i?.getRowValidationModel().hasRowValidation({rowNode:o});if(!s&&o.pinnedSibling&&(o=o.pinnedSibling,s=i?.getEditRow(o)),s){const n=Array.from(s.keys()).some(a=>{const l={rowNode:o,column:a};return _m(e,l,!0)||Wm(e,l)||Um(e,l)});$m(e,t,r,n);return}$m(e,t,r)}function $m(e,t,i=!1,o=!1){const s=!!e.editSvc?.isBatchEditing(),r=e.gos.get("editType")==="fullRow",n=t.getGui()?.rowComp;n&&(n.toggleCss("ag-row-editing",r&&o),n.toggleCss("ag-row-batch-edit",r&&o&&s),n.toggleCss("ag-row-inline-editing",o),n.toggleCss("ag-row-not-inline-editing",!o),n.toggleCss("ag-row-editing-invalid",r&&o&&i))}var XT=e=>()=>{const t=e.editModelSvc?.getEditMap();if(!t?.size)return;const i=e.pinnedRowModel;let o;t.forEach((s,r)=>{const n=r.rowPinned,a=r.id;if(!(n==null||a==null||i?.getPinnedRowById(a,n)===r))for(const l of s.keys())o??(o=[]),o.push({rowNode:r,column:l})}),o&&Dl(e,o)},Dl=(e,t)=>{const i=e.editModelSvc,o=e.editSvc,s={cancel:!0},r=i.getCellValidationModel(),n=new Set;for(let c=0,u=t.length;c<u;++c){const h=t[c];Qe(e,h,s),r.clearCellValidation(h),i.removeEdits(h),n.add(h.rowNode)}const a=new Set,l=i.getRowValidationModel();let d=!1;for(const c of n)i.getEditRow(c)?.size?d=!0:(a.add(c),l.clearRowValidation({rowNode:c}));d&&xt(e);for(const c of n){const u=Jt(e,{rowNode:c});u&&o.applyRowEditStyles(u)}a.size&&o.releasePurgedRows(a)},e8=new Set(["undo","redo","paste","bulk","rangeSvc"]),t8=new Set(["ui","api"]),Km={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},i8=new Set(Object.keys(Km)),o8=new Set(["paste","rangeSvc","cellClear","redo","undo"]),Ml={cancel:!0,source:"api"},s8={cancel:!1,source:"api"},Tl={checkSiblings:!0},Ft={force:!0,suppressFlash:!0},r8={force:!0};function n8(e,t){const i=e.formulaRowIndex,o=t.formulaRowIndex;return i==null||o==null?1:o-i}var a8=class extends y{constructor(){super(...arguments),this.beanName="editSvc",this.committing=!1,this.csrm=!1,this.batch=!1,this.batchStartDispatched=!1,this.stopping=!1,this.rangeSelectionWhileEditing=0,this.stopBlockRejected=!1,this.validationConfigVersion=-1,this.validationConfigResult=!1,this.pendingEditorAttachValidation=new WeakMap,this.pendingEditorFocus=null,this.pendingEditorFocusCell=!1,this.bulkWriteDepth=0,this.bulkWriteTouched=[]}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.csrm=ae(this.gos,e.rowModel),this.addManagedPropertyListener("getFullRowEditValidationErrors",()=>{this.validationConfigVersion=-1}),this.addManagedPropertyListener("editType",({currentValue:o})=>{this.stopEditing(void 0,Ml),this.createStrategy(o)});const t=XT(e),i=()=>{if(!this.isEditing())return;const o=this.revalidate();this.checkValidated()?this.stopEditing(void 0,Ml,o):this.batch?Js(e,this.model.getEditPositions(),{},o):this.stopEditing(void 0,s8,o)};this.addManagedEventListeners({pinnedRowsChanged:t,pinnedRowDataChanged:t,sortChanged:i,filterChanged:i,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}startBatchEditing(){this.batch||(this.batch=!0,this.batchStartDispatched=!1,this.stopEditing(void 0,Ml))}stopBatchEditing(e){this.batch&&(e&&(this.stopEditing(void 0,e),e.commit&&this.stopBlockRejected)||(this.batchStartDispatched&&this.dispatchBatchStopped(new Map,!1),this.batch=!1,this.batchStartDispatched=!1))}stopBatchEditors(e){const{beans:t,model:i}=this;let o;if(e){const s=i.getEditPositions();this.strategy?.stopCancelled(!1);for(let r=0,n=s.length;r<n;++r)this.bulkRefreshCell(s[r],{force:!0,suppressFlash:!0});this.clearValidationIfNoOpenEditors();return}else{if(this.cellEditingInvalidCommitBlocks()){if(o=this.revalidate(),this.checkValidated())return}else this.hasValidationRules()&&(o=DT(t));ei(t,{persist:!0},o)}Js(t,i.getEditPositions(),{cancel:e},o),this.clearValidationIfNoOpenEditors()}ensureBatchStarted(){!this.batch||this.batchStartDispatched||(this.batchStartDispatched=!0,this.dispatchBatchEvent("batchEditingStarted",new Map))}createStrategy(e){const{beans:t,gos:i,strategy:o}=this,s=jm(i,e);if(o){if(o.beanName===s)return o;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(s,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,i,o="ui"){const s=QT(this.beans,e,t,i,o);return s&&(this.strategy??(this.strategy=this.createStrategy())),s}shouldStopEditing(e,t,i="ui"){return this.strategy?.shouldStop(e,t,i)??null}shouldCancelEditing(e,t,i="ui"){return this.strategy?.shouldCancel(e,t,i)??null}isEditing(e,t){return this.model.hasEdits(e??void 0,t??Tl)}isRowEditing(e,t){return!!e&&this.model.hasRowEdits(e,t?.checkSiblings)}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:i=!0,event:o=null,source:s="ui",ignoreEventKey:r=!1,silent:n}=t;if(this.strategy??(this.strategy=this.createStrategy()),!(t.editable??this.isCellEditable(e,"api")))return;const l=q(this.beans,e);if(l&&!l.comp){t.editable=void 0,l.pendingEditStart=t;return}const d=this.shouldStartEditing(e,o,i,s);if(d===!1&&s!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,s)&&!t.continueEditing&&this.stopEditing(void 0,{source:s}),d&&this.ensureBatchStarted(),this.strategy.start({position:e,event:o,source:s,ignoreEventKey:r,startedEdit:i,silent:n})}stopEditing(e,t,i){this.stopping||(this.stopBlockRejected=!1);const o=this.prepareStopContext(e,t);if(!o)return!1;this.stopping=!0;let s=!1;try{const r=this.processStopRequest(o,i);return s||(s=r.res),this.finishStopEditing({...o,edits:r.edits,params:t,position:e,res:s}),s}finally{this.rangeSelectionWhileEditing=0,this.stopping=!1}}prepareStopContext(e,t){const{event:i=null,cancel:o=!1,source:s="ui",forceCancel:r=!1,forceStop:n=!1,commit:a=!1}=t||{};if(i8.has(s)&&this.batch)return e?.rowNode&&e?.column&&this.bulkRefreshCell(e),null;const l=this.committing?Km[s]:s;if(!(this.committing||this.isEditing(e)||this.batch&&this.model.hasEdits(e,Tl))||!this.strategy||this.stopping)return null;this.pendingEditorFocus=null;const c=q(this.beans,e),u=!o&&(!!this.shouldStopEditing(e,i,l)||(this.committing||s==="paste")&&!this.batch)||n,h=o&&!!this.shouldCancelEditing(e,i,l)||r;return{cancel:o,cellCtrl:c,edits:this.model.getEditMapCopy(),event:i??null,forceCancel:r,forceStop:n,commit:a,position:e,source:s,treatAsSource:l,willCancel:h,willStop:u}}processStopRequest(e,t){const{event:i,position:o,willCancel:s,willStop:r}=e;return r||s?this.handleStopOrCancel(e,t):this.shouldHandleMidBatchKey(i,o)?{res:!1,edits:this.handleMidBatchKey(i,o,e,t)}:(ei(this.beans,{persist:!0},t),this.batch&&this.strategy?.cleanupEditors(o,void 0,t),{res:!1,edits:this.model.getEditMapCopy()})}handleStopOrCancel(e,t){const{model:i}=this,{cancel:o,commit:s,edits:r,event:n,forceCancel:a,source:l,willCancel:d,willStop:c}=e,{blockRejected:u,skipAllCommits:h,validationCache:g}=this.resolveStopValidation(e,t),p=(!this.batch||!d)&&!u;ei(this.beans,{persist:p,isCancelling:d||o,isStopping:c},g);const f=i.getEditMapCopy(),C=!d&&(!this.batch||s)?this.processEdits(f,l,h):[];return o?this.strategy?.stopCancelled(a,g):u||this.strategy?.stopCommitted(n,s,g),this.cleanupAfterStop(r,f,C),{res:c&&!u,edits:f}}resolveStopValidation(e,t){const{beans:i,model:o}=this,{cancel:s,willCancel:r}=e,n=!r&&!s;let a=t;return n&&(Ys(i),a??(a=xt(i))),{...this.applyInvalidEditPolicy(e,n,o.hasValidationErrors()),validationCache:a}}applyInvalidEditPolicy(e,t,i){const{beans:o}=this,{commit:s,position:r,willStop:n}=e,a=this.cellEditingInvalidCommitBlocks(),l=i&&!a&&this.batch&&s;l&&this.revertInvalidEdits();const d=i&&a&&n&&t;return this.stopBlockRejected=d,d&&this.gos.get("editType")==="fullRow"&&Dm(o,r?.rowNode??this.getOpenEditorRowNode()),{blockRejected:d,skipAllCommits:i&&!l}}cleanupAfterStop(e,t,i){const{beans:o,model:s}=this;this.clearValidationIfNoOpenEditors();for(const r of i)s.clearEditValue(r);this.bulkRefreshMap(e);for(const r of s.getEditPositions(t)){const n=q(o,r),a=Oe(r);n?.refreshCell({force:!0,suppressFlash:!a})}}getOpenEditorRowNode(){const e=this.beans.rowRenderer.getCellCtrls();for(let t=0,i=e.length;t<i;++t){const o=e[t];if(o.comp?.getCellEditor())return o.rowNode}}shouldHandleMidBatchKey(e,t){return e instanceof KeyboardEvent&&this.batch&&!!this.strategy?.midBatchInputsAllowed(t)&&this.isEditing(t,{withOpenEditor:!0})}handleMidBatchKey(e,t,i,o){const{beans:s,model:r}=this,{edits:n}=i,{key:a}=e,l=a===Ri.ENTER,d=a===Ri.ESCAPE,c=a===Ri.TAB;return l||c||d?(l||c?ei(s,{persist:!0},o):this.strategy?.stopCancelled(!1),!d&&this.batch?this.strategy?.cleanupEditors(void 0,void 0,o):this.batch||Js(s,r.getEditPositions(),{event:e,cancel:d},o),e.preventDefault(),this.bulkRefreshMap(n,{suppressFlash:!0}),r.getEditMapCopy()):n}finishStopEditing({cellCtrl:e,edits:t,params:i,position:o,res:s,commit:r,forceCancel:n,willCancel:a}){const l=this.beans;s&&o&&(!this.batch||r)&&this.model.removeEdits(o),this.stopBlockRejected||this.navigateAfterEdit(i,e?.cellPosition),Rl(l),this.clearValidationIfNoOpenEditors();const{rowRenderer:d,formula:c}=l;if(a&&d.refreshRows({rowNodes:Array.from(t.keys())}),this.batch){c?c.refreshFormulas(!0):d.refreshRows({suppressFlash:!0,force:!0});const u=s&&r;(u||a&&n)&&this.dispatchBatchStopped(t,u)}}dispatchBatchStopped(e,t){let i;t&&(i=RT(e),i.size>0&&this.ensureBatchStarted()),this.batchStartDispatched&&(this.batchStartDispatched=!1,this.dispatchBatchEvent("batchEditingStopped",i??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:i,suppressNavigateAfterEdit:o}=e;if(!(i instanceof KeyboardEvent)||o)return;const{key:r,shiftKey:n}=i,a=this.gos.get("enterNavigatesVerticallyAfterEdit");if(r!==Ri.ENTER||!a)return;const l=n?Ri.UP:Ri.DOWN;this.beans.navigation?.navigateToNextCell(null,l,t,!1)}revertInvalidEdits(){const e=this.model,t=e.getEditPositions(),i=[];for(let o=0,s=t.length;o<s;++o){const r=t[o];e.hasValidationErrors(r)&&i.push(r)}for(let o=0,s=i.length;o<s;++o)this.revertCellEdit(i[o])}closeCellEditor(e,t){const i=this.beans;Hm(i,e,{persist:!0,isStopping:!0},t),Qe(i,e,{},void 0,t)}revertCellEdit(e,t){const i=this.beans;Qe(i,e,{cancel:!0},void 0,t);const o=this.model,s=o.getRowValidationModel();o.stop(e,!0,!0),o.getCellValidationModel().clearCellValidation(e),Om(i);const r=o.getCellValidationModel();Pm(i,{cell:r,row:s},{cell:r,row:o.getRowValidationModel()});const n=Jt(i,e);n&&this.applyRowEditStyles(n),q(i,e)?.refreshCell(Ft)}processEdits(e,t,i){const o=Array.from(e.keys()),s=[],{changeDetectionSvc:r}=this.beans;r?.beginDeferred();try{for(const n of o){const a=e.get(n);for(const l of a.keys()){const d=a.get(l),c={rowNode:n,column:l};if(Oe(d)&&!i){const u=q(this.beans,c);this.setNodeDataValue(n,l,d.pendingValue,u,t)||s.push(c)}}}}finally{r?.endDeferred()}return s}setNodeDataValue(e,t,i,o,s="edit"){const r=t8.has(s)?"edit":s;o&&(o.suppressRefreshCell=!0),this.committing=!0;try{return e.setDataValue(t,i,r)}finally{this.committing=!1,o&&(o.suppressRefreshCell=!1)}}syncEditAfterCommit(e,t){const i=this.model.getEdit(e);i&&i.state!=="editing"&&(t?this.model.setEdit(e,{sourceValue:i.pendingValue}):this.model.clearEditValue(e))}setEditMap(e,t){this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(e,t),this.bulkRefreshMap(e);let i=Ft;if(t?.forceRefreshOfEditCellsOnly){const o=[],s=new Set;e.forEach((r,n)=>{o.push(n);for(const a of r.keys())s.add(a)}),i={rowNodes:o,columns:Array.from(s),...Ft}}this.beans.rowRenderer.refreshCells(i)}dispatchEditValuesChanged(e,t,i={}){const{pendingValue:o,sourceValue:s}=i,{rowIndex:r,rowPinned:n,data:a}=e;this.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:r,rowPinned:n,column:t,source:"api",data:a,newValue:o,oldValue:s,value:o,colDef:t.getColDef()})}beginBulkWrite(){this.bulkWriteDepth++}endBulkWrite(){--this.bulkWriteDepth===0&&this.flushBulkWrite()}flushBulkWrite(){const e=this.bulkWriteTouched;if(this.bulkWriteTouched=[],!this.batch||e.length===0||(this.model.hasOpenEditors()&&this.cleanupEditors(),!this.csrm))return;const t=new Map,i=new Map;for(let o=0,s=e.length;o<s;++o){const r=e[o],{rowNode:n,column:a}=r;Qm(t,n,a)&&this.refCell(n,a,this.model.getCellEdit(n,a),void 0,i)}}bulkRefreshCell(e,t){if(this.csrm){const{rowNode:i,column:o}=e;this.refCell(i,o,this.model.getCellEdit(i,o),t)}}bulkRefreshMap(e,t){this.csrm&&e.forEach((i,o)=>{for(const s of i.keys())this.refCell(o,s,i.get(s),t)})}refCell(e,t,i,o={},s){const{beans:r,gos:n}=this,a=e.pinnedSibling;this.dispatchEditValuesChanged(e,t,i),a&&this.dispatchEditValuesChanged(a,t,i),q(r,{rowNode:e,column:t})?.refreshCell(o),a&&q(r,{rowNode:a,column:t})?.refreshCell(o);const l=this.batch,d=e.sibling;d&&Zm(r,d,t,o,l,s);let c=e.parent;if(!c)return;const u=n.get("groupTotalRow"),h=n.get("grandTotalRow");for(;c;){const g=c.sibling,p=g&&(g.footer&&u||!c.parent&&h)?g:c;Zm(r,p,t,o,l,s),c=c.parent}}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{gos:i,beans:o}=this,s=e.rowNode;if(s.group&&e.column.getColDef().groupRowEditable==null){if(i.get("treeData")){if(!s.data&&!i.get("enableGroupEdit"))return!1}else if(!i.get("enableGroupEdit"))return!1}const r=jm(i)==="fullRow"?YT(o,e,t):Fl(o,e);return r&&(this.strategy??(this.strategy=this.createStrategy())),r}hasValidationRules(){return this.hasConfiguredValidation()||this.editorsRequireValidation()}hasConfiguredValidation(){const e=this.beans.colModel,t=e.colDefsVersion;if(this.validationConfigVersion===t)return this.validationConfigResult;this.validationConfigVersion=t;let i=!!this.gos.get("getFullRowEditValidationErrors");const o=e.colDefList;for(let s=0,r=o.length;!i&&s<r;++s){const n=o[s].colDef,a=n.cellEditorParams;!a||!n.editable&&!n.groupRowEditable||(i=typeof a=="function"||a.minLength!==void 0||a.maxLength!==void 0||a.getValidationErrors!==void 0||a.min!==void 0||a.max!==void 0)}return this.validationConfigResult=i,i}editorsRequireValidation(){return this.model.hasOpenEditors()?(this.editorsValidation??(this.editorsValidation=kT(this.beans)),this.editorsValidation):!1}invalidateEditorsValidation(){this.editorsValidation=void 0}releasePurgedRows(e){this.strategy?.releaseRows(e)}releaseRowEdits(e){const t=this.model.getEditRow(e);if(!t?.size||this.beans.gridDestroySvc.destroyCalled)return;const i=[];for(const o of t.keys())i.push({rowNode:e,column:o});Dl(this.beans,i)}releaseColumnsLeaving(e){const t=this.model.getEditMap();if(!t?.size)return;const i=new Set;for(const s of t.values())for(const r of s.keys())i.add(r);for(let s=0,r=e.length;i.size>0&&s<r;++s)i.delete(e[s]);if(!i.size)return;const o=[];t.forEach((s,r)=>{for(const n of s.keys())i.has(n)&&o.push({rowNode:r,column:n})}),Dl(this.beans,o)}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,i=!0){return this.checkNavWithValidationAndCache(e,t,i).result}checkNavWithValidationAndCache(e,t,i=!0){const o=this.revalidate();if(this.checkValidated(e)){const s=q(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),i&&(s&&!s.hasBrowserFocus()&&s.focusCell(),s?.comp?.getCellEditor()?.focusIn?.()),{result:"block-stop",validationCache:o}):(s&&this.revertSingleCellEdit(s),{result:"revert-continue",validationCache:o})}return{result:"continue",validationCache:o}}withEditorAttachValidationCache(e,t,i){if(this.pendingEditorAttachValidation.delete(t),!e){i();return}const o=t.editCompDetails,s=this.editorAttachValidationCache,r=e;this.editorAttachValidationCache=r;try{i()}finally{this.editorAttachValidationCache=s}const n=t.editCompDetails;return n&&n!==o&&!t.comp?.getCellEditor()&&this.pendingEditorAttachValidation.set(t,{compDetails:n,validationCache:r}),r}populateModelValidationErrors(e){let t=this.editorAttachValidationCache;if(!t&&e){const i=this.pendingEditorAttachValidation.get(e);this.pendingEditorAttachValidation.delete(e),i&&i.compDetails===e.editCompDetails&&(t=i.validationCache)}xt(this.beans,!1,t)}clearPendingEditorAttachValidation(e){this.pendingEditorAttachValidation.delete(e)}hasPendingEditorAttachValidation(e){const t=this.pendingEditorAttachValidation.get(e);return t&&t.compDetails===e.editCompDetails?!0:(this.pendingEditorAttachValidation.delete(e),!1)}announceFullRowEditValidationErrors(e){Dm(this.beans,e)}onCompAttached(e,t){const i=t?e.isCellEditable():void 0,o=!!i||this.isEditing(e,{withOpenEditor:!0});return o&&this.startEditing(e,{startedEdit:!1,source:"api",silent:!0,continueEditing:!0,editable:i}),o}replayPendingStart(e){const t=e.pendingEditStart;e.pendingEditStart=null,this.startEditing(e,t)}onCellDestroyed(e){this.pendingEditorAttachValidation.delete(e),this.pendingEditorFocus===e&&(this.pendingEditorFocus=null),e.comp?.getCellEditor()&&this.invalidateEditorsValidation()}focusEditorOnAttach(e,t){this.pendingEditorFocus=e,this.pendingEditorFocusCell=t}onEditorAttached(e){if(this.invalidateEditorsValidation(),e.rangeFeature?.unsetComp(),this.pendingEditorFocus!==e)return;const t=this.pendingEditorFocusCell;this.pendingEditorFocus=null,t&&e.focusCell({forceBrowserFocus:!0}),e.comp?.getCellEditor()?.focusIn?.()}onPopupEditorClosed(e,t){PT(this.beans,e,t)}revertSingleCellEdit(e,t=!1){const i=q(this.beans,e);i?.comp?.getCellEditor()&&(Qe(this.beans,e,{silent:!0}),this.model.clearEditValue(e),Xt(this.beans,e,{silent:!0}),xt(this.beans),i?.refreshCell(Ft),t&&(i?.focusCell(),i?.comp?.getCellEditor()?.focusIn?.()))}revalidateAndCheck(e){return this.revalidate(),this.checkValidated(e)}revalidate(){return Ys(this.beans),xt(this.beans)}checkValidated(e){const t=q(this.beans,e);return t&&(t.refreshCell(Ft),this.applyRowEditStyles(t.rowCtrl)),this.model.hasValidationErrors(e)}moveToNextCell(e,t,i,o="ui"){let s;const r=this.isEditing(),n=r?this.checkNavWithValidationAndCache(void 0,i):void 0,a=n?.result==="block-stop";return e instanceof vi&&r&&(s=this.strategy?.moveToNextEditingCell(e,t,i,o,a,n?.validationCache)),s===null||(s=s||!!this.beans.focusSvc.focusedHeader,s===!1&&!a&&this.stopEditing(void 0,void 0,n?.validationCache)),s}getPendingEditValue(e,t,i){const o=this.batch;if(i==="batch"&&!o)return;const s=this.model.getCellEditWithSibling(e,t);if(!s||this.stopping&&!o&&!s.editorState?.cellStartedEditing)return;if(i==="edit"){const n=s.editorValue;if(n!=null&&n!==de)return n}const r=s.pendingValue;if(r!==de)return r}getCellDataValue(e){const t=this.model.getCellEditWithSibling(e.rowNode,e.column);if(t){const i=t.pendingValue;if(i!==de)return i;const o=t.sourceValue;if(o!=null)return o}return this.valueSvc.getValueFromData(e.column,e.rowNode)}addStopEditingWhenGridLosesFocus(e){mT(this,this.beans,e)}createPopupEditorWrapper(e){return new jT(e)}batchResetToSourceValue(e){if(!this.batch)return!1;const t=this.model.getEdit(e);if(!t)return!1;const{pendingValue:i,sourceValue:o,state:s}=t;return i===o||s==="editing"?!1:(this.dispatchEditValuesChanged(e.rowNode,e.column,{...t,pendingValue:o}),this.model.removeEdits(e),q(this.beans,e)?.refreshCell(Ft),!0)}setDataValue(e,t,i){try{const o=this.batch,s=this.isEditing(o?void 0:e);if((!s||this.committing)&&!o&&!o8.has(i)||!s&&!o&&i==="paste"||i==="batch"&&!o)return;if(i==="edit"){if(s&&this.applyEditorValue(e,t))return!0;if(!o)return}if(this.strategy??(this.strategy=this.createStrategy()),i==="batch"||i==="edit")return this.applyDirectValue(e,t,i);const r=this.beans;let n;if(o?n="ui":this.committing?n=i??"api":n="api",!i||e8.has(i))return this.applyDirectValue(e,t,i);const a=this.applyExistingEdit(e,t,i,n);return a!==void 0?a:(Fo(r,e,t,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:n,suppressNavigateAfterEdit:!0}),!0)}finally{this.committing=!1}}applyExistingEdit(e,t,i,o){const s=this.model.getEdit(e);if(s)return s.pendingValue===t?!1:s.sourceValue!==t?(Fo(this.beans,e,t,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:o,suppressNavigateAfterEdit:!0}),!0):(this.model.removeEdits(e),this.ensureBatchStarted(),this.dispatchEditValuesChanged(e.rowNode,e.column,{...s,pendingValue:t}),!0)}applyEditorValue(e,t){const i=this.beans,o=q(i,e),s=o?.comp?.getCellEditor();return!o||!s?!1:(Fo(i,e,t,{persist:!0}),Pl(i,o),"agSetEditValue"in s?(s.agSetEditValue(t),!0):s.refresh&&o.editCompDetails?(s.refresh({...o.editCompDetails.params,value:t}),!0):(o.hasBrowserFocus()&&this.focusEditorOnAttach(o,!0),Qe(i,e,{silent:!0,cancel:!0}),Xt(i,e,{silent:!0}),xt(i),q(i,e)?.refreshCell(Ft),!0))}applyDirectValue(e,t,i){const o=this.beans;if(this.batch){const n=this.bulkWriteDepth>0;if(i==="batch"&&q(o,e)?.comp?.getCellEditor()){const{editModelSvc:a,valueSvc:l}=o,{rowNode:d,column:c}=e;a?.getEdit(e)?.sourceValue===void 0&&a?.setEdit(e,{sourceValue:l.getValueFromData(c,d)}),a?.setEdit(e,{pendingValue:t})}else Fo(o,e,t,{persist:!0}),i!=="batch"&&!n&&this.cleanupEditors();return Im(o,e),this.ensureBatchStarted(),n?this.bulkWriteTouched.push(e):this.bulkRefreshCell(e),!0}Fo(o,e,t,{persist:!0});const s=q(o,e),r=this.setNodeDataValue(e.rowNode,e.column,t,s,i);return this.syncEditAfterCommit(e,r),Im(o,e),q(o,e)?.refreshCell(r?r8:Ft),r}handleColDefChanged(e){xT(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){const{model:i}=this;if(!this.batch||!i.hasRowEdits(e.rowNode,!0))return;const{rowNode:s}=e,{compDetails:r,valueToDisplay:n}=t;if(r){const{params:a}=r;return a.data=i.getEditRowDataValue(s),{compDetails:r}}return{valueToDisplay:n}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,i,o){this.strategy?.dispatchCellEvent(e,t,i,o)}dispatchBatchEvent(e,t){const i=G(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}});this.eventSvc.dispatchEvent(i)}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},i){if(!i||i.length===0)return;const{beans:o}=this,{formula:s}=o;ei(o,{persist:!0});const r=this.model.getEditMapCopy(),n=r.get(e)?.get(t)?.pendingValue;let a=!1;this.batch||(this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),a=!0);const l=s?.isFormula(n)??!1;let d={value:n};for(let u=0,h=i.length;u<h;++u)d=this.applyBulkEditToRange(i[u],r,l,d);if(this.setEditMap(r),this.batch)this.cleanupEditors(),Rl(o),this.ensureBatchStarted();else{this.committing=!0;try{this.stopEditing(void 0,{source:"bulk"})}finally{this.committing=!1,a&&this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(r)})}}const c=q(o,{rowNode:e,column:t});c&&c.focusCell({forceBrowserFocus:!0})}applyBulkEditToRange(e,t,i,o){const{beans:s,rangeSvc:r}=this,{formula:n}=s,a=e.columns,l=i&&a.some(h=>h?.allowFormula);let{value:d,lastRowNode:c}=o,u=!0;return r?.forEachRowInRange(e,h=>{const g=Fe(s,h);if(g===void 0)return;const p=c?.rowIndex;let f=c?1:0;l&&c&&(!u||p!=null&&g.rowPinned===c.rowPinned&&g.rowIndex===p+1)&&(f=n8(c,g));const m=f===0?d:n?.updateFormulaByOffset({value:d,rowDelta:f});this.applyBulkEditToRow(g,a,t,m,i),u=!1,l&&(d=m,c=g)}),{value:d,lastRowNode:c}}applyBulkEditToRow(e,t,i,o,s){const{beans:r,valueSvc:n}=this,{formula:a}=r,l=i.get(e)??new Map;let d=o;for(const c of t)if(c){if(this.isCellEditable({rowNode:e,column:c},"api")){const u=n.getValueFromData(c,e,!0);let h=n.parseValue(c,e,d,u);Number.isNaN(h)&&(h=null),l.set(c,{editorValue:void 0,pendingValue:h,sourceValue:u,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}s&&c.allowFormula&&(d=a?.updateFormulaByOffset({value:d,columnDelta:1}))}l.size>0&&i.set(e,l)}applyCellEditStyles(e){Pl(this.beans,e)}applyRowEditStyles(e){JT(this.beans,e)}setEditingCells(e,t){const{beans:i}=this,{colModel:o,valueSvc:s}=i,r=new Map;for(let{colId:n,column:a,colKey:l,rowIndex:d,rowPinned:c,newValue:u,state:h}of e){const g=n?o.colsById[n]:l?o.getCol(l):a;if(!g)continue;const p=Fe(i,{rowIndex:d,rowPinned:c});if(!p)continue;const f=s.getValueFromData(g,p,!0);if(!t?.forceRefreshOfEditCellsOnly&&!Oe({pendingValue:u,sourceValue:f})&&h!=="editing")continue;let m=r.get(p);m||(m=new Map,r.set(p,m)),u===void 0&&(u=de),m.set(g,{editorValue:void 0,pendingValue:u,sourceValue:f,state:h??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(r,t)}onCellFocused(e){const t=q(this.beans,e);if(!t||!this.isEditing(t,Tl))return;const i=this.model.getEdit(t);if(!i||!Oe(i))return;const s=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(s,"pendingChange")}allowedFocusTargetOnValidation(e){return q(this.beans,e)}};function jm(e,t){return t??e.get("editType")??"singleCell"}var Qm=(e,t,i)=>{let o=e.get(t);return o||(o=new Set,e.set(t,o)),o.has(i)?!1:(o.add(i),!0)},Zm=(e,t,i,o,s,r)=>{if(r&&!Qm(r,t,i))return;const n=q(e,{rowNode:t,column:i});n&&(n.refreshCell(o),!o.force&&s&&Pl(e,n))};import{KeyCode as Ym}from"ag-stack";var Jm=class extends y{postConstruct(){this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:this.onCellFocusChanged?.bind(this),cellFocusCleared:this.onCellFocusChanged?.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const i=e.previousParams,{editSvc:o,beans:s}=this,r=e.type==="cellFocused"?e.sourceEvent:null;i&&(t=q(s,i));const{gos:n,editModelSvc:a}=s,l=e.type==="cellFocusCleared";if(o.isEditing(void 0,{withOpenEditor:!0})){const{column:d,rowIndex:c,rowPinned:u}=e,h={column:d,rowNode:Fe(s,{rowIndex:c,rowPinned:u})},g=n.get("invalidEditValueMode")==="block";if(g)return;const p=!g,f=!!a?.getCellValidationModel().hasCellValidation(h),m=p&&f;!(i||l)||o.stopEditing(void 0,{cancel:m,source:l&&p?"api":void 0,event:r})||(o.isBatchEditing()?o.cleanupEditors():o.stopEditing(void 0,{source:"api"}))}t?.refreshCell({suppressFlash:!0,force:!0})}stopCancelled(e,t){const i=this.editSvc.isBatchEditing()&&!e;for(const o of this.model.getEditPositions())Qe(this.beans,o,{cancel:!0},q(this.beans,o),t),this.model.stop(o,i,!0);return!0}stopCommitted(e,t,i){const o=this.model.getEditPositions(),s={all:[],pass:[],fail:[]};for(const a of o)s.all.push(a),(this.model.getCellValidationModel().getCellValidation(a)?.errorMessages?.length??0)>0?s.fail.push(a):s.pass.push(a);const r=this.processValidationResults(s),n=this.editSvc.isBatchEditing()&&!t;for(const a of r.destroy)Qe(this.beans,a,{event:e},q(this.beans,a),i),this.model.stop(a,n,!1);for(const a of r.keep){const l=q(this.beans,a);!this.editSvc.cellEditingInvalidCommitBlocks()&&l&&this.editSvc.revertSingleCellEdit(l)}return!0}cleanupEditors({rowNode:e}={},t,i){ei(this.beans,{persist:!1},i);const o=this.model.getEditPositions(),s=[];if(e)for(const r of o)r.rowNode!==e&&s.push(r);else for(const r of o)s.push(r);Js(this.beans,s,{},i),Rl(this.beans,t)}setFocusOutOnEditor(e){e.comp?.getCellEditor()?.focusOut?.()}focusFirstInvalidCell(e,t){const i=l8(this.beans,this.model,e.rowNode)??e;i.focusCell({forceBrowserFocus:!0,sourceEvent:t}),i.isCellEditable()&&this.setFocusInOnEditor(i)}setFocusInOnEditor(e){const i=e.comp?.getCellEditor();if(i?.focusIn)i.focusIn();else{const o=this.beans.gos.get("editType")==="fullRow";e.focusCell({forceBrowserFocus:o}),this.editSvc.focusEditorOnAttach(e,!1)}}setupEditors(e){const{event:t,ignoreEventKey:i=!1,startedEdit:o,position:s,cells:r=this.model.getEditPositions()}=e,n=t instanceof KeyboardEvent&&!i&&t.key||void 0;yT(this.beans,r,s,n,t,o)}dispatchCellEvent(e,t,i,o){const{beans:s}=this,r=q(s,e),n=r?r.value:s.valueSvc.getDisplayValue(e.column,e.rowNode,"edit",!1);this.eventSvc.dispatchEvent({...Yp(s,t??null,i,e,n),...o})}dispatchRowEvent(e,t,i){if(i)return;const o=Jt(this.beans,e);this.eventSvc.dispatchEvent(o?o.createRowEvent(t):Kr(e.rowNode,this.gos,t))}shouldStop(e,t,i="ui"){const o=this.editSvc.isBatchEditing();return o&&i==="api"?!0:o&&(i==="ui"||i==="edit")?!1:i==="api"?!0:t instanceof KeyboardEvent&&!o?t.key===Ym.ENTER:null}shouldCancel(e,t,i="ui"){const o=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!o&&t.key===Ym.ESCAPE||o&&i==="api"||i==="api")}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const i=[];e.forEach((s,r)=>{s.forEach((n,a)=>{n.state==="editing"&&i.push({...n,rowNode:r,column:a})})});let o=e;if(t?.update){const s=new Map(e);this.model.getEditMap()?.forEach((r,n)=>{s.has(n)||s.set(n,r)}),o=s}if(this.model?.setEditMap(o),i.length>0){const s=i.at(-1),r=s.pendingValue===de?void 0:s.pendingValue;this.start({position:s,event:new KeyboardEvent("keydown",{key:r}),source:"api"});const n=q(this.beans,s);n&&this.setFocusInOnEditor(n)}}destroy(){this.cleanupEditors(),super.destroy()}},l8=(e,t,i)=>{const o=t.getCellValidationModel().getCellValidationMap().get(i);if(!o)return;const s=e.visibleCols.allCols;let r;for(let a=0,l=s.length;a<l;++a){const d=s[a];if(o.has(d)){r=d;break}}if(!r)return;const n=q(e,{rowNode:i,column:r});return n||(e.navigation?.ensureColumnVisible(r),q(e,{rowNode:i,column:r}))},d8=class extends Jm{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=new Set}shouldStop(e,t,i="ui"){const{rowNode:o,beans:s}=this,{rowNode:r}=e||{};if(!Jt(s,{rowNode:o}))return!0;const a=super.shouldStop({rowNode:o},t,i);return a!==null?a:o?r!==o:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:i,startedEdit:o,event:s,ignoreEventKey:r}=e,{rowNode:n}=t,{beans:a,model:l,startedRows:d}=this;this.rowNode!==n&&super.cleanupEditors(t);const c=a.visibleCols.allCols,u=[],h=[];for(const g of c)g.isCellEditable(n)&&h.push(g);if(h.length!=0){d.has(n)||(this.dispatchRowEvent({rowNode:n},"rowEditingStarted",i),d.add(n));for(const g of h){const p={rowNode:n,column:g};u.push(p),l.start(p)}this.rowNode=n,this.setupEditors({cells:u,position:t,startedEdit:o,event:s,ignoreEventKey:r})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e,t){const{rowNode:i,model:o}=this;return i&&!o.hasEdits()?!1:(super.stopCancelled(e,t),this.cleanupEditors({rowNode:i},!0,t),this.rowNode=void 0,!0)}stopCommitted(e,t,i){const{rowNode:o,model:s,editSvc:r}=this;if(o&&!s.hasEdits())return!1;const n=[];if(s.getEditMap()?.forEach((a,l)=>{if(!(!a||a.size===0)){for(const d of a.values())if(Oe(d)){n.push(l);break}}}),super.stopCommitted(e,t,i),t||!r.isBatchEditing())for(const a of n)this.dispatchRowEvent({rowNode:a},"rowValueChanged");return this.cleanupEditors({rowNode:o},!0,i),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,i=e.previousParams;if(i?.rowIndex===t||e.sourceEvent instanceof KeyboardEvent)return;const{beans:o,gos:s,model:r}=this;if(o.editSvc?.isRangeSelectionEnabledWhileEditing())return;const n=q(o,i);s.get("invalidEditValueMode")==="block"&&n&&(r.getCellValidationModel().getCellValidation(n)||r.getRowValidationModel().getRowValidation(n))||super.onCellFocusChanged(e)}releaseRows(e){const{startedRows:t}=this;for(const i of e)t.delete(i)&&this.dispatchRowEvent({rowNode:i},"rowEditingStopped"),this.rowNode===i&&(this.rowNode=void 0)}cleanupEditors(e={},t,i){super.cleanupEditors(e,t,i);const{startedRows:o}=this;for(const s of o)this.dispatchRowEvent({rowNode:s},"rowEditingStopped"),this.destroyEditorsForRow(s,i);o.clear()}destroyEditorsForRow(e,t){const i=Jt(this.beans,{rowNode:e});if(!i)return;const o={};for(const s of i.getAllCellCtrls())s.comp?.getCellEditor()&&Qe(this.beans,s,o,s,t)}moveToNextEditingCell(e,t,i,o="ui",s=!1,r){const{beans:n,model:a,gos:l,editSvc:d}=this,c=e.cellPosition;let u;a.suspend(!0);try{u=n.navigation?.findNextCellToFocusOn(c,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{a.suspend(!1)}if(u===!1)return null;if(u==null)return s?(d.announceFullRowEditValidationErrors(e.rowNode),this.focusFirstInvalidCell(e,i),!0):!1;const h=u.cellPosition,g=e.isCellEditable(),p=u.isCellEditable(),f=c.rowIndex===h?.rowIndex&&c.rowPinned===h.rowPinned;g&&this.setFocusOutOnEditor(e),r=this.restoreEditors(r);const m=l.get("suppressStartEditOnTab");return p&&!s?m?u.focusCell({forceBrowserFocus:!0,sourceEvent:i}):(!u.comp?.getCellEditor()&&!(f&&d.hasPendingEditorAttachValidation(u))&&(r=d.withEditorAttachValidationCache(r,u,()=>Xt(n,u,{event:i,cellStartedEdit:!0}))),this.setFocusInOnEditor(u),u.focusCell({sourceEvent:i})):s&&!f?(d.announceFullRowEditValidationErrors(e.rowNode),this.focusFirstInvalidCell(e,i)):(u.focusCell({forceBrowserFocus:!0,sourceEvent:i}),p&&this.setFocusInOnEditor(u)),!f&&!s&&(d.stopEditing({rowNode:e.rowNode},{event:i,forceStop:!0},r),d.isRowEditing(e.rowNode,{withOpenEditor:!0})&&this.cleanupEditors(u,!0,r),m?u.focusCell({forceBrowserFocus:!0,sourceEvent:i}):d.startEditing(u,{startedEdit:!0,event:i,source:o,ignoreEventKey:!0,editable:p||void 0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(e){const{beans:t,editSvc:i,model:o}=this;return o.getEditMap()?.forEach((s,r)=>s.forEach(({state:n},a)=>{if(n!=="editing")return;const l=q(t,{rowNode:r,column:a});l&&!l.comp?.getCellEditor()&&(e=i.withEditorAttachValidationCache(e,l,()=>Xt(t,l,{silent:!0})))})),e}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.clear()}},c8=class extends Jm{constructor(){super(...arguments),this.beanName="singleCell"}releaseRows(e){this.rowNode&&e.has(this.rowNode)&&(this.rowNode=void 0,this.column=void 0)}shouldStop(e,t,i="ui"){const o=super.shouldStop(e,t,i);if(o!==null)return o;const s=e?.rowNode,r=e?.column,n=this.rowNode,a=this.column;return(!n||!a)&&s&&r?null:n!==s||a!==r?!0:!n&&!a?this.model.hasEdits(void 0,{withOpenEditor:!0}):!1}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:i,event:o,ignoreEventKey:s}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:i,event:o,ignoreEventKey:s})}dispatchRowEvent(e,t,i){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e,t){return super.stopCancelled(e,t),this.clearPosition()}stopCommitted(e,t,i){return super.stopCommitted(e,t,i),this.clearPosition()}clearPosition(){return this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:i}=this.beans,{rowIndex:o,column:s,rowPinned:r}=e,n=Fe(this.beans,{rowIndex:o,rowPinned:r}),a=bl(s),l=t.getCol(a),d=e.previousParams;if(d){const c=bl(d.column);if(d?.rowIndex===o&&c===a&&d?.rowPinned===r)return}e.type=="cellFocused"&&(i?.isRangeSelectionEnabledWhileEditing()||i?.isEditing({rowNode:n,column:l},{withOpenEditor:!0}))||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,i,o="ui",s=!1,r){const n=this.beans.focusSvc.getFocusedCell();n&&(e=Gt(this.beans,n)??e);const a=e.cellPosition;let l;const d=this.beans.gos.get("editType")==="fullRow";d&&this.model.suspend(!0),s||(e.eGui.focus(),this.editSvc?.stopEditing(e,{source:this.editSvc?.isBatchEditing()?"ui":"api",event:i},r));try{l=this.beans.navigation?.findNextCellToFocusOn(a,{backwards:t,startEditing:!0})}finally{d&&this.model.suspend(!1)}if(l===!1)return null;if(l==null)return!1;const c=l.cellPosition,u=e.isCellEditable(),h=l.isCellEditable(),g=a.rowIndex===c?.rowIndex&&a.rowPinned===c.rowPinned;u&&!s&&this.setFocusOutOnEditor(e);const p=this.gos.get("suppressStartEditOnTab");let f=!1;if(!g&&!s&&(super.cleanupEditors(l,!0,r),p?l.focusCell({forceBrowserFocus:!0,sourceEvent:i}):(f=!0,this.editSvc.startEditing(l,{startedEdit:!0,event:i,source:o,ignoreEventKey:!0,editable:h}))),h&&!s){if(l.focusCell({sourceEvent:i}),p)l.focusCell({forceBrowserFocus:!0,sourceEvent:i});else if(!l.comp?.getCellEditor()){if(!f){const m=this.editSvc?.isEditing(l,{withOpenEditor:!0});Xt(this.beans,l,{event:i,cellStartedEdit:!0,silent:m})}this.setFocusInOnEditor(l),this.cleanupEditors(l,void 0,r)}}else s?this.focusFirstInvalidCell(e,i):l.focusCell({forceBrowserFocus:!0,sourceEvent:i});return e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},dt={moduleName:"EditCore",version:E,beans:[pT,a8],apiFunctions:{getEditingCells:OT,getEditRowValues:BT,getCellEditorInstances:bT,startEditingCell:_T,stopEditing:GT,isEditing:NT,validateEdit:zT,getEditValidationErrors:WT},dynamicBeans:{singleCell:c8,fullRow:d8},dependsOn:[yo,ul],css:[JM]},Xm={moduleName:"UndoRedoEdit",version:E,beans:[YM],apiFunctions:{undoCellEditing:VT,redoCellEditing:HT,getCurrentUndoSize:UT,getCurrentRedoSize:qT},dependsOn:[dt]},eC={moduleName:"TextEditor",version:E,userComponents:{agCellEditor:Cm,agTextCellEditor:Cm},dependsOn:[dt]},tC={moduleName:"NumberEditor",version:E,userComponents:{agNumberCellEditor:{classImp:M5}},dependsOn:[dt]},iC={moduleName:"DateEditor",version:E,userComponents:{agDateCellEditor:m5,agDateStringCellEditor:w5},dependsOn:[dt]},oC={moduleName:"CheckboxEditor",version:E,userComponents:{agCheckboxCellEditor:i5},dependsOn:[dt]},sC={moduleName:"SelectEditor",version:E,userComponents:{agSelectCellEditor:nT},dependsOn:[dt]},rC={moduleName:"LargeTextEditor",version:E,userComponents:{agLargeTextCellEditor:R5},dependsOn:[dt]},nC={moduleName:"CustomEditor",version:E,dependsOn:[dt]};import{KeyCode as ti,_findNextFocusableElement as u8,_focusInto as aC,_getActiveDomElement as h8,_isElementChildOfClass as g8,_setAriaLabel as p8}from"ag-stack";var lC={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agBigIntColumnFilter:"agBigIntColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},f8=new Set(Object.values(lC));function Pt(e,t){const i=e.filterUi;if(!i)return null;if(i.created)return i.promise;if(t)return null;const o=i.create(i.refreshed),s=i;return s.created=!0,s.promise=o,o}function dC(e,t,i,o,s,r,n){return t.refresh?.({...i,model:o,source:r,additionalEventAttributes:n}),e().then(a=>{if(a){const{filter:l,filterParams:d}=a;Al(l,d,o,s,r,n)}})}function Al(e,t,i,o,s,r){e?.refresh?.({...t,model:i,state:o,source:s,additionalEventAttributes:r})}function cC(e,t,i,o){const s=e();s?.created&&s.promise.then(r=>{const n=t();Al(r,s.filterParams,n,i()??{model:n},"ui",o)})}function Il(e){let t,i=!1,o;const{action:s,filterParams:r,getFilterUi:n,getModel:a,getState:l,updateState:d,updateModel:c,processModelToApply:u}=e;switch(s){case"apply":{const h=l();o=h?.model??null,u&&(o=u(o)),t={state:h?.state,model:o},i=!0;break}case"clear":{t={model:null},r?.buttons?.includes("apply")||(i=!0,o=null);break}case"reset":{t={model:null},i=!0,o=null;break}case"cancel":{t={model:a()};break}}d(t),i?c(o):cC(n,a,l,{fromAction:s})}function re(e,t){return e[t]??null}var m8=class extends Sn{wireComp(e,t,i,o,s){this.comp=e;const r=Zi(this,this.beans.context,s);this.eButtonShowMainFilter=i,this.eFloatingFilterBody=o,this.setGui(t,r),this.setupActive(),this.refreshHeaderStyles(),this.setupCalculatedColumnCssClasses(),this.setupWidth(r),this.setupLeft(r),this.setupHover(r),this.setupFocus(r),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(r),this.setupUi(),Ga(r,this.eButtonShowMainFilter,()=>this.toggleParentFilter()),this.setupFilterChangedListener(r);const n=()=>this.onColDefChanged(r);r.addManagedListeners(this.column,{colDefChanged:n}),r.addManagedEventListeners({filterSwitched:({column:a})=>{a===this.column&&n()}}),r.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.userHeaderClasses?.clear(),this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,i=e.colDef;return G(t.gos,{colDef:i,column:e,floatingFilter:!0})}setupActive(){const e=this.column.colDef,t=!!e.filter,i=!!e.floatingFilter;this.active=t&&i}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.eButtonShowMainFilter.firstElementChild)return;const e=X("filter",this.beans,this.column);e&&this.eButtonShowMainFilter.appendChild(e)}setupFocus(e){e.createManagedBean(new ci(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();p8(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(h8(t)===this.eGui)return;const s=u8({beans:t,rootNode:this.eGui,backwards:e.shiftKey});if(s){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),s.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 i=this.column;do if(i=e?t.getColBefore(i):t.getColAfter(i),!i)break;while(!i.colDef.filter||!i.colDef.floatingFilter);return i}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case ti.UP:case ti.DOWN:case ti.LEFT:case ti.RIGHT:if(t)return;mt(e);case ti.ENTER:t&&aC(this.eGui)&&e.preventDefault();break;case ti.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const i=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),o=!!e.relatedTarget&&g8(e.relatedTarget,"ag-floating-filter");if(i&&o&&e.target===this.eGui){const s=this.lastFocusEvent,r=s?.key===ti.TAB;if(s&&r){const n=s.shiftKey;aC(this.eGui,n)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new fn(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!ge(this.gos)}setupUserComp(){if(!this.active)return;const e=this.beans.colFilter?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setupCalculatedColumnCssClasses(){this.refreshCalculatedColumnCssClasses()}refreshCalculatedColumnCssClasses(){const e=Tu(this.column,this.beans.calculatedColsSvc);this.userHeaderClasses=Iu(this.comp,this.userHeaderClasses,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"})}toggleParentFilter(){return this.beans.menuSvc?.toggleFilterMenu({column:this.column,buttonElement:this.eButtonShowMainFilter,containerType:"floatingFilter",positionBy:"button"})??"declined"}setupSyncWithFilter(e){if(!this.active)return;const{beans:{colFilter:t},column:i,gos:o}=this,s=r=>{if(r?.source==="filterDestroyed"&&(!this.isAlive()||!t?.isAlive()))return;const n=this.comp.getFloatingFilterComp();n&&n.then(a=>{if(a){if(o.get("enableFilterHandlers")){const c=r;let u="filter";c?.afterFloatingFilter?u="ui":c?.afterDataChange?u="dataChanged":r?.source==="api"&&(u="api"),this.updateFloatingFilterParams(this.userCompDetails,u);return}const l=t?.getCurrentFloatingFilterParentModel(i),d=r?{...r,columns:r.columns??[],source:r.source==="api"?"api":"columnFilter"}:null;a.onParentModelChanged(l,d)}})};[this.destroySyncListener]=e.addManagedListeners(i,{filterChanged:s}),t?.isFilterActive(i)&&s(null)}setupWidth(e){const t=()=>{const i=`${this.column.getActualWidth()}px`;this.comp.setWidth(i)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive(),this.refreshCalculatedColumnCssClasses();const i=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const o=this.beans.colFilter,s=this.active?o?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,r=this.comp.getFloatingFilterComp();!r||!s?this.updateCompDetails(e,s,i):r.then(n=>{!n||o?.areFilterCompsDifferent(this.userCompDetails??null,s)?this.updateCompDetails(e,s,i):this.updateFloatingFilterParams(s,"colDef")})}updateCompDetails(e,t,i){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),i&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){if(!e)return;let i=e.params;this.comp.getFloatingFilterComp()?.then(o=>{typeof o?.refresh=="function"&&(this.gos.get("enableFilterHandlers")&&(i={...i,model:re(this.beans.colFilter?.model??{},this.column.colId),source:t}),o.refresh(i))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function C8(e,t){const i=e.colModel.getCol(t);if(!i){e.log.error(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:i,positionBy:"auto"})}function v8(e){e.menuSvc?.hidePopupMenu()}import{_isIOSUserAgent as w8,_requestAnimationFrame as S8}from"ag-stack";var uC="ag-has-menu-open",b8=class extends y{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}destroy(){this.setActiveButtonMenu(),super.destroy()}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){this.showColumnMenuCommon(Ll(this.beans),e,e.containerType,!0)}toggleColumnMenu(e){return this.toggleMenu(this.activeMenuFactory,e,"columnMenu")}toggleFilterMenu(e){return this.toggleMenu(Ll(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,i){this.setActiveButtonMenu(),this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,i)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}hideFilterMenu(){Ll(this.beans)?.hideActiveMenu()}toggleMenu(e,t,i,o){if(!e)return"declined";const{activeButtonMenu:s}=this,{buttonElement:r}=t;return s?.menuFactory===e&&s.buttonElement===r?(this.setActiveButtonMenu(),e.hideActiveMenu(),"closed"):(this.setActiveButtonMenu(),this.hidePopupMenu(),this.hideFilterMenu(),this.showButtonMenu(e,t,i,{filtersOnly:o,suppressCloseOnEventSource:!0})?"opened":"declined")}showButtonMenu(e,t,i,o){if(!e)return!1;const{buttonElement:s}=t,r={};let n=!1;const a=d=>{n=!0,this.activeButtonMenu?.token===r&&this.setActiveButtonMenu(),d instanceof KeyboardEvent&&s.isConnected&&s.focus({preventScroll:!0}),t.onClosedCallback?.()};return!e.showMenuAfterButtonClick(t.column,s,i,a,o)||n?!1:(this.setActiveButtonMenu({buttonElement:s,menuFactory:e,token:r}),!0)}setActiveButtonMenu(e){this.activeButtonMenu?.buttonElement.classList.remove(uC),this.activeButtonMenu=e,e?.buttonElement.classList.add(uC)}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.colDef;return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(ge(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.colDef.suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){const t=e?.isColumn?e.colDef:e?.getColGroupDef();return!!this.beans.enterpriseMenuFactory&&!t?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(w8()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!ge(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!ge(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 ge(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,i,o){const{positionBy:s,onClosedCallback:r}=t,n=t.column;if(s==="button")this.setActiveButtonMenu(),this.showButtonMenu(e,t,i,{filtersOnly:o,suppressCloseOnEventSource:!0});else if(s==="mouse"){this.setActiveButtonMenu();const{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(n,a,i,r,o)}else if(n){this.setActiveButtonMenu();const a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(n,"auto"),S8(a,()=>{const d=l.getHeaderRowContainerCtrl()?.getHeaderCtrlForColumn(n);d&&this.showButtonMenu(e,{column:n,buttonElement:d.getAnchorElementForMenu(o),onClosedCallback:r},i,{filtersOnly:o,suppressCloseOnEventSource:!0})})}}};function kl(e,t,i){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",i))}function Ll(e){const{enterpriseMenuFactory:t,filterMenuFactory:i,gos:o}=e;return t&&ge(o)?t:i}var hC={moduleName:"SharedMenu",version:E,beans:[b8],apiFunctions:{showColumnMenu:C8,hidePopupMenu:v8}},y8=".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:max(200px,100%)}.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 R8(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function E8(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function x8(e,t){const i=e.colModel.getCol(t);if(i)return e.colFilter?.destroyFilter(i,"api")}function F8(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function P8(e){return e.filterManager?.getFilterModel()??{}}function D8(e,t,i){const{gos:o,colModel:s,colFilter:r}=e;i&&!o.get("enableFilterHandlers")&&(e.log.warn(288),i=!1);const n=s.getCol(t);return n?r?.getModelForColumn(n,i)??null:null}function M8(e,t,i){return e.filterManager?.setColumnFilterModel(t,i)??Promise.resolve()}function T8(e,t){const i=e.colModel.getCol(t);if(!i){e.log.error(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:i,containerType:"columnFilter",positionBy:"auto"})}function A8(e){e.menuSvc?.hideFilterMenu()}function I8(e,t){const i=e.colModel.getCol(t);if(!i){e.log.error(12,{colKey:t});return}return e.colFilter?.getHandler(i,!0)}function k8(e,t){const{colModel:i,colFilter:o,gos:s}=e;if(!s.get("enableFilterHandlers")){e.log.warn(287);return}const{colId:r,action:n}=t;if(r){const a=i.colsById[r];a&&o?.updateModel(a,n)}else o?.updateAllModels(n)}import{AgPromise as we,_exists as tr,_jsonEquals as L8,_removeAllFromArray as V8}from"ag-stack";import{_getDateParts as Vl,_parseBigIntOrNull as gC}from"ag-stack";import{_getOwn as H8}from"ag-stack";var B8=1,ir=null,O8=()=>{if(ir!=null)return ir;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 ir=e==null?B8:e%7,ir},Ie=e=>(e.setHours(0,0,0,0),e),Hl=e=>{const t=e.getDay(),i=O8(),o=(t-i+7)%7;return e.setDate(e.getDate()-o),Ie(e)},or=(e,t=1)=>(e.setDate(e.getDate()-t),e),Ge=e=>(e.setDate(e.getDate()+1),Ie(e)),G8=e=>(Hl(e),e.setDate(e.getDate()+6),Ge(e)),Bl=e=>(e.setDate(1),Ie(e)),pC=e=>(e.setDate(1),e.setMonth(e.getMonth()+1),Ie(e)),fC=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3),Bl(e)},N8=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3+2),pC(e)},mC=e=>(e.setMonth(0,1),Ie(e)),_8=e=>(e.setMonth(12,0),Ge(e)),Po=e=>or(e),CC=e=>Po(Hl(e)),vC=e=>Po(Bl(e)),wC=e=>Po(fC(e)),Ol=(e,t)=>[Ie(e),Ge(t)],z8=(e,t)=>Ol(Po(e),Po(t)),Gl=(e,t)=>[Hl(e),G8(t)],W8=(e,t)=>Gl(CC(e),CC(t)),Nl=(e,t)=>[Bl(e),pC(t)],U8=(e,t)=>Nl(vC(e),vC(t)),_l=(e,t)=>[fC(e),N8(t)],q8=(e,t)=>_l(wC(e),wC(t)),zl=(e,t)=>[mC(e),_8(t)],$8=(e,t)=>[mC(e),Ge(t)],K8=(e,t)=>[Ie(or(e,7)),Ge(t)],j8=(e,t)=>[Ie(or(e,30)),Ge(t)],Q8=(e,t)=>[Ie(or(e,90)),Ge(t)],Z8=(e,t)=>(e.setFullYear(e.getFullYear()-1),e.setMonth(e.getMonth()+6),[Ie(e),Ge(t)]),Y8=(e,t)=>(e.setFullYear(e.getFullYear()-1),[Ie(e),Ge(t)]),J8=(e,t)=>(e.setFullYear(e.getFullYear()-2),[Ie(e),Ge(t)]),X8=(e,t)=>(e.setFullYear(e.getFullYear()-1),t.setFullYear(t.getFullYear()-1),zl(e,t)),eA=(e,t)=>(e.setFullYear(e.getFullYear()+1),t.setFullYear(t.getFullYear()+1),zl(e,t)),tA=(e,t)=>(e.setMonth(e.getMonth()+3),t.setMonth(t.getMonth()+3),_l(e,t)),iA=(e,t)=>(e.setMonth(e.getMonth()+1),t.setMonth(t.getMonth()+1),Nl(e,t)),oA=(e,t)=>(e.setDate(e.getDate()+7),t.setDate(t.getDate()+7),Gl(e,t)),sA=(e,t)=>(e.setDate(e.getDate()+1),t.setDate(t.getDate()+1),Ol(e,t)),Wl={today:Ol,yesterday:z8,tomorrow:sA,thisWeek:Gl,lastWeek:W8,nextWeek:oA,thisMonth:Nl,lastMonth:U8,nextMonth:iA,thisQuarter:_l,lastQuarter:q8,nextQuarter:tA,thisYear:zl,lastYear:X8,nextYear:eA,yearToDate:$8,last7Days:K8,last30Days:j8,last90Days:Q8,last6Months:Z8,last12Months:Y8,last24Months:J8},SC=Object.keys(Wl),bC=class{constructor(){this.ranges=new Map}getRange(e,t){const i=this.ranges,o=Date.now();let s=i.get(e);if(s&&s.expires<=o&&(s=void 0),!s){const[r,n]=t(new Date(o),new Date(o)),a=Ge(new Date(o)).getTime();s={fromTime:r.getTime(),toTime:n.getTime(),expires:a},i.set(e,s)}return s}};function Ei(e,t,i){return G(e,{column:t,colDef:t.getColDef(),source:i})}function Do(e,t,i,o){return e&&i?s=>e(s,Ei(t,i,o)):void 0}function Ul(e){return e<1||Number.isNaN(e)}function rA(e){return typeof e!="number"?null:Ul(e)?1:Math.floor(e)}function Mo(e,t,i){return i==null?e.splice(t):e.splice(t,i)}function To(e){if(typeof e=="string"){const t=e.codePointAt(0)??0;return t>32&&t<160?!1:!e.trim()}return e==null}function yC(e){return!To(e)}function nA(e){return e==="AND"||e==="OR"?e:"AND"}function aA(e,t,i,o,s){const r=e?.predicate;if(r!=null&&!t.some(n=>n==null))return r(t,i,Ei(o,s,"columnFilter"))}function lA(e,t,i){let o=t.length;return o>i&&(t.splice(i),e.warn(78),o=i),o}var dA=new Set(["empty","notBlank","blank",...SC]),cA=["displayKey","displayName","predicate"],RC={isAnyOf:!0,isNoneOf:!0,true:!0,false:!0};function EC(e,t,i){const o=new Map,s=new Map;for(let r=0,n=e.length;r<n;++r){const a=e[r];if(a!=null)if(typeof a=="string"){if(i&&H8(i,a))continue;o.set(a,o.get(a)??a)}else{const l=cA.filter(c=>a[c]==null);if(l.length){t(l);continue}const d=a.displayKey;o.set(d,a),s.set(d,a)}}return{offered:o,customOptions:s}}function xC(e,t){const i=String(e.displayKey);return t(i,e.displayName).trim()||i.trim()}function ql(e){const t=Math.trunc(e.numberOfInputs??1);return t>0?Math.min(t,2):0}function ii(e,t){const i=t.getCustomOption(e);return i?ql(i):e&&dA.has(e)?0:e==="inRange"?2:1}function FC(e,t,i){return e==null||t==null?!1:i?e>t:e>=t}function $l(e,t,i,o){return FC(e,t,o)?e instanceof Date?o?i?"maxDateInclusiveValidation":"minDateInclusiveValidation":i?"maxDateValidation":"minDateValidation":o?i?"maxValueValidation":"minValueValidation":i?"strictMaxValueValidation":"strictMinValueValidation":null}var PC={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},DC=["january","february","march","april","may","june","july","august","september","october","november","december"];function uA(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function hA(e,t){if(e==null)return-1;if(t==null)return 1;const i=gC(e),o=gC(t);return i!=null&&o!=null?i===o?0:i>o?1:-1:String(e).localeCompare(String(t))}function MC(e){return e instanceof Date&&!isNaN(e.getTime())}var TC=new WeakSet;function Kl(e){return TC.add(e),e}var gA=Kl(MC);function pA(e){return typeof e=="function"&&TC.has(e)}var sr=["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>t===!1,numberOfInputs:0}];function fA(e){if(!Array.isArray(e)||e.length!==sr.length)return!1;for(let t=0,i=sr.length;t<i;++t)if(e[t]!==sr[t])return!1;return!0}var jl={number:()=>{},bigint:()=>{},boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:[...sr]}),date:()=>({isValidDate:gA}),dateString:({dataTypeDefinition:e})=>({comparator:Kl((t,i)=>{const o=e.dateParser(i);return i==null||o<t?-1:o>t?1:0}),isValidDate:Kl(t=>typeof t=="string"&&MC(e.dateParser(t)))}),dateTime:e=>jl.date(e),dateTimeString:e=>jl.dateString(e),object:()=>{},text:()=>{}};function AC(e,t){return e instanceof Date?Vl(e,t):null}var Ql={number:()=>({comparator:uA}),bigint:()=>({comparator:hA}),boolean:({t:e})=>({valueFormatter:t=>{const i=t.value;return To(i)?e("blanks","(Blanks)"):e(String(i),i?"True":"False")}}),date:({formatValue:e,t})=>({valueFormatter:i=>e(i)||t("blanks","(Blanks)"),treeList:!0,treeListFormatter:(i,o)=>{if(i==="NaN")return t("invalidDate","Invalid Date");if(o===1&&i!=null){const s=DC[Number(i)-1];return t(s,PC[s])}return i??t("blanks","(Blanks)")},treeListPathGetter:i=>AC(i,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:i})=>({valueFormatter:o=>e(o)||i("blanks","(Blanks)"),treeList:!0,treeListPathGetter:o=>Vl(t.dateParser(o??void 0),!1),treeListFormatter:(o,s)=>{if(s===1&&o!=null){const r=DC[Number(o)-1];return i(r,PC[r])}return o??i("blanks","(Blanks)")}}),dateTime:e=>{const t=Ql.date(e);return t.treeListPathGetter=i=>AC(i),t},dateTimeString(e){const t=e.dataTypeDefinition.dateParser,i=Ql.dateString(e);return i.treeListPathGetter=o=>Vl(t(o??void 0)),i},object:({formatValue:e,t})=>({valueFormatter:i=>e(i)||t("blanks","(Blanks)")}),text:()=>{}};function IC(e,t,i,o,s,r,n){let a=i;const l=e==="agSetColumnFilter";!a&&o.baseDataType==="object"&&!l&&(a=({column:g,node:p})=>s({column:g,node:p,value:p?r.valueSvc.getValueFromData(g,p):void 0}));const c=(l?Ql:jl)[o.baseDataType],u=c({dataTypeDefinition:o,formatValue:s,t:n});return{filterParams:typeof t=="object"?{...u,...t}:u,filterValueGetter:a}}var mA={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",bigint:"agBigIntColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},CA={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",bigint:"agBigIntColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};function kC(e,t=!1){return(t?CA:mA)[e??"text"]}function LC(e,t,i){if(t==null)return null;let o=null;const{compName:s,jsComp:r,fwComp:n}=Bc(e,t);return s?o={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agBigIntColumnFilter:"agBigIntColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[s]:r==null&&n==null&&t.filter===!0&&(o=i()),o}var vA={filterHandler:()=>({doesFilterPass:()=>!0})};function VC(e,t,i,o){if(!e.isPrimary())return!0;const r=!i;return!e.isValueActive()||!r?!1:t?!0:o}var wA=class extends y{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={...lC},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",i){const{colModel:o,dataTypeSvc:s,filterManager:r}=this.beans;if(s?.isPendingInference){this.modelUpdates.push({model:e,source:t});return}const n=[],a=this.getModel(!0);if(e){const l=new Set(Object.keys(e));this.allColumnFilters.forEach((d,c)=>{const u=e[c];n.push(this.setModelOnFilterWrapper(d,u)),l.delete(c)}),l.forEach(d=>{const c=o.colsById[d];if(!c){this.warn(62,{colId:d});return}if(!c.isFilterAllowed()){this.warn(63,{colId:d});return}const u=this.getOrCreateFilterWrapper(c,!0);if(!u){this.warn(64,{colId:d});return}n.push(this.setModelOnFilterWrapper(u,e[d],!0))})}else this.model={},this.allColumnFilters.forEach(l=>{n.push(this.setModelOnFilterWrapper(l,null))});we.all(n).then(()=>{const l=this.getModel(!0),d=[];this.allColumnFilters.forEach((c,u)=>{const h=a?a[u]:null,g=l?l[u]:null;L8(h,g)||d.push(c.column)}),d.length>0?r?.onFilterChanged({columns:d,source:t}):i&&this.updateActive("filterChanged")})}getModel(e){const t={},{allColumnFilters:i,initialModel:o,beans:{colModel:s}}=this;if(i.forEach((r,n)=>{const a=this.getModelFromFilterWrapper(r);tr(a)&&(t[n]=a)}),!e)for(const r of Object.keys(o)){const n=o[r];tr(n)&&!i.has(r)&&s.colsById[r]?.colDef.filter&&(t[r]=n)}return t}setState(e,t,i="api"){if(this.state.clear(),t)for(const o of Object.keys(t)){const s=t[o];this.state.set(o,{model:re(this.model,o),state:s})}this.setModel(e,i,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let i=!1;return e.forEach((o,s)=>{const r=o.state;r!=null&&(i=!0,t[s]=r)}),i?t:void 0}getModelFromFilterWrapper(e){const i=e.column.getColId();if(e.isHandler)return re(this.model,i);const o=e.filter;return o?typeof o.getModel!="function"?(this.warn(66),null):o.getModel():re(this.initialModel,i)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}updateActiveFilters(){const e=l=>l?l.isFilterActive?l.isFilterActive():(this.warn(67),!1):!1,{colModel:t,gos:i}=this.beans,o=!!Ti(i),s=[],r=[],n=(l,d,c)=>{d&&(VC(l,t.pivotMode,t.isPivotActive(),o)?s.push(c):r.push(c))},a=[];return this.allColumnFilters.forEach(l=>{const d=l.column,c=d.getColId();if(l.isHandler)a.push(we.resolve().then(()=>{n(d,this.isHandlerActive(d),{colId:c,isHandler:!0,handler:l.handler,handlerParams:l.handlerParams})}));else{const u=Pt(l);u&&a.push(u.then(h=>{n(d,e(h),{colId:c,isHandler:!1,comp:h})}))}}),we.all(a).then(()=>{this.activeAggregateFilters=s,this.activeColumnFilters=r})}updateFilterFlagInColumns(e,t){const i=[];return this.allColumnFilters.forEach(o=>{const s=o.column;if(o.isHandler)i.push(we.resolve().then(()=>{this.setColFilterActive(s,this.isHandlerActive(s),e,t)}));else{const r=Pt(o);r&&i.push(r.then(n=>{this.setColFilterActive(s,n.isFilterActive(),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),we.all(i)}doFiltersPass(e,t,i){const{data:o,aggData:s}=e,r=i?this.activeAggregateFilters:this.activeColumnFilters,n=i?s:o,a=this.model;for(let l=0;l<r.length;l++){const d=r[l],{colId:c,isHandler:u}=d;if(c!==t)if(u){const{handler:h,handlerParams:g}=d;if(!h.doesFilterPass({node:e,data:n,model:re(a,c),handlerParams:g}))return!1}else{const h=d.comp;if(typeof h.doesFilterPass!="function"){this.error(91);continue}if(!h.doesFilterPass({node:e,data:n}))return!1}}return!0}getHandlerParams(e){const t=this.allColumnFilters.get(e.getColId());return t?.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:i}=this.beans,o=()=>{this.isAlive()&&i?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(o,0):o()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:i}=e,o=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",i).then(()=>{this.allColumnFilters.forEach(s=>{const{column:r,isHandler:n}=s;o!==r.getColId()&&(n&&s.handler.onAnyFilterChanged?.(),Pt(s,n)?.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(i=>{const o=i.isHandler;o&&i.handler.onNewRowsLoaded?.();const s=Pt(i,o);s&&t.push(s.then(r=>{r.onNewRowsLoaded?.()}))}),we.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){const{filterValueSvc:i,colModel:o}=this.beans;return(s,r)=>{const n=r?o.getCol(r):e;return n?i.getValue(n,s,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t?.isHandler)return this.isHandlerActive(e);const i=t?.filter;return i?i.isFilterActive():re(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=tr(re(this.model,e.getColId()));if(t)return t;const i=this.beans.groupFilter;return i?.isGroupFilter(e)?i.isFilterActive(e):!1}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?Pt(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const i=Pt(t);return i?i.then(o=>({comp:o,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const i=this.getOrCreateFilterWrapper(e,t);return i?.isHandler?i.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let i=this.cachedFilter(e);return!i&&t&&(i=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,i)),i}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType(()=>this.beans.dataTypeSvc?.getBaseDataType(e),t)}getDefaultFilterFromDataType(e,t=!1){return Zd(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":kC(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,i,o,s,r){const n=()=>{const d=this.createFilterCompParams(e,s,r),c=o(d,s);return Vc(this.beans.userCompFactory,t,c,i)},a=n();return a?{compDetails:a,createFilterUi:d=>(d?n():a).newAgStackInstance()}:null}createFilterInstance(e,t,i,o){const s=this.beans.selectableFilter;s?.isSelectable(t)&&(t=s.getFilterDef(e,t));const{handler:r,handlerParams:n,handlerGenerator:a}=this.createHandler(e,t,i)??{},l=this.createFilterComp(e,t,i,o,!!r,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:r,handlerGenerator:a,handlerParams:n};const{compDetails:d,createFilterUi:c}=l;return this.isGlobalButtons&&(d.params?.buttons?.length||this.warn(281,{colId:e.getColId()})),{compDetails:d,handler:r,handlerGenerator:a,handlerParams:n,createFilterUi:c}}createBaseFilterParams(e,t){const{filterManager:i,rowModel:o}=this.beans;return G(this.gos,{column:e,colDef:e.colDef,getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:s=>i?.doesRowPassFilter(s,e.getColId())??!0,rowModel:o})}createFilterCompParams(e,t,i,o){const s=this.filterChangedCallbackFactory(e),r=this.createBaseFilterParams(e,o);if(r.filterChangedCallback=s,r.filterModifiedCallback=o?()=>{}:n=>this.filterModified(e,n),t){const n=r,a=e.getColId(),l=re(this.model,a);n.model=l,n.state=this.state.get(a)??{model:l},n.onModelChange=(d,c)=>{this.updateStoredModel(a,d),this.refreshHandlerAndUi(e,d,"ui",!1,c).then(()=>{s({...c,source:"columnFilter"})})},n.onStateChange=d=>{this.updateState(e,d),this.updateOrRefreshFilterUi(e)},n.onAction=(d,c,u)=>{this.updateModel(e,d,c),this.dispatchLocalEvent({type:"filterAction",column:e,action:d,event:u})},n.getHandler=()=>this.getHandler(e,!0),n.onUiChange=d=>this.filterUiChanged(e,d),n.source=i}return r}createFilterUiForHandler(e,t,i){return t?{created:!1,refreshed:i,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,i){const o=t(),s={created:!0,create:t,filterParams:e.params,compDetails:e,promise:o};return o.then(i),s}createFilterWrapper(e){const{compDetails:t,handler:i,handlerGenerator:o,handlerParams:s,createFilterUi:r}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),a=>a),n=e.getColId();if(i)return delete this.initialModel[n],i.init?.({...s,source:"init",model:re(this.model,n)}),{column:e,isHandler:!0,handler:i,handlerGenerator:o,handlerParams:s,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,i){const{gos:o,frameworkOverrides:s,registry:r}=this.beans;let n;const a=g=>{const p=g.filter;if(Ac(p)){const f=p.handler;return f||(n=p.doesFilterPass,n?()=>({doesFilterPass:n}):void 0)}return typeof p=="string"?p:void 0},l=o.get("enableFilterHandlers"),d=l?a(t):void 0,c=g=>()=>this.createBean(r.createDynamicBean(g,!0));let u,h;if(typeof d=="string"){const g=o.get("filterHandlers")?.[d];g!=null?u=g:f8.has(d)&&(u=c(d),h=d)}else u=d;if(!u){let g;const{compName:p,jsComp:f,fwComp:m}=Bc(s,t);p?g=p:f==null&&m==null&&t.filter===!0&&(g=i),h=this.handlerMap[g],h&&(u=c(h))}return u?{filterHandler:u,handlerNameOrCallback:n??h}:l?(ae(o)&&this.warn(277,{colId:e.getColId()}),vA):void 0}createHandler(e,t,i){const o=this.createHandlerFunc(e,t,i);if(!o)return;const s=jo(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:r,filterHandler:n}=o,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,n,s);return{handler:a,handlerParams:l,handlerGenerator:r??n}}createHandlerFromFunc(e,t,i){const o=e.getColDef(),s=t(G(this.gos,{column:e,colDef:o})),r=this.createHandlerParams(e,i);return{handler:s,handlerParams:r}}createHandlerParams(e,t){const i=e.getColDef(),o=e.getColId(),s=this.filterChangedCallbackFactory(e);return G(this.gos,{colDef:i,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:r=>this.beans.filterManager?.doesRowPassFilter(r,o)??!0,onModelChange:(r,n)=>{this.updateStoredModel(o,r),this.refreshHandlerAndUi(e,r,"handler",!1,n).then(()=>{s({...n,source:"columnFilter"})})},onModelAsStringChange:()=>{e.dispatchColEvent("filterChanged","filterChanged"),this.dispatchLocalEvent({type:"filterModelAsStringChanged",column:e})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:i,groupFilter:o}=this.beans;this.allColumnFilters.forEach((r,n)=>{let a;r.column.primary?a=t.getNonPivotColById(n):a=t.colsById[n],!(a&&a===r.column)&&(e.push(r.column),this.disposeFilterWrapper(r,"columnChanged"),this.disposeColumnListener(n))});const s=o&&e.every(r=>o.isGroupFilter(r));e.length>0&&!s&&i?.onFilterChanged({columns:e,source:"api"})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const i=this.beans.groupFilter;return i?.isGroupFilter(e)?i.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){const{userCompFactory:i,frameworkOverrides:o,selectableFilter:s,gos:r}=this.beans,n=g=>{this.getOrCreateFilterUi(e)?.then(f=>{g(je(f))})},a=e.getColDef(),l=s?.isSelectable(a)?s.getFilterDef(e,a):a,d=LC(o,l,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",c=r.get("enableFilterHandlers"),u=jo(i,l,this.createFilterCompParams(e,c,"init",!0)),h=G(r,{column:e,filterParams:u,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:n,showParentFilter:t});if(c){const g=h,p=e.getColId(),f=this.filterChangedCallbackFactory(e);g.onUiChange=m=>this.floatingFilterUiChanged(e,m),g.model=re(this.model,p),g.onModelChange=(m,C)=>{this.updateStoredModel(p,m),this.refreshHandlerAndUi(e,m,"floating",!0,C).then(()=>{f({...C,source:"columnFilter"})})},g.getHandler=()=>this.getHandler(e,!0),g.source="init"}return Hc(i,a,h,d)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,i,o){const s="paramsUpdated";if(e.isHandler){const r=t.getColId();delete this.initialModel[r],this.state.delete(r);const n=e.filterUi,a=this.createFilterUiForHandler(i,o,!0);e.filterUi=a;const l=this.eventSvc;n?.created?n.promise.then(d=>{this.destroyBean(d),l.dispatchEvent({type:"filterDestroyed",source:s,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:s,column:t})}else this.destroyFilter(t,s)}destroyFilter(e,t="api"){const i=e.getColId(),o=this.allColumnFilters.get(i);this.disposeColumnListener(i),delete this.initialModel[i],o&&this.disposeFilterWrapper(o,t).then(s=>{s&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:"api"})})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let i=!1;const{column:o,isHandler:s,filterUi:r}=e,n=o.getColId();s&&(i=this.isHandlerActive(o),this.destroyBean(e.handler),delete this.model[n],this.state.delete(n));const a=()=>{this.setColFilterActive(o,!1,"filterDestroyed"),this.allColumnFilters.delete(n),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:o})};if(r){if(r.created)return r.promise.then(l=>(i=s?i:!!l?.isFilterActive(),this.destroyBean(l),a(),i));a()}return we.resolve(i)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:t?.source??"columnFilter"})}}refreshOrRecreateHandler(e,t,i,o,s){const r=e.column,n=r.getColId(),a=t.handlerNameOrCallback??t.filterHandler,l=re(this.model,n);let d=e.handlerGenerator!=a;if(!d){const g=this.createHandlerParams(r,i?.params);e.handlerParams=g,d=e.handler.refresh?.({...g,source:"colDef",model:l})===!1}if(!d)return!1;const c=e.handler,{handler:u,handlerParams:h}=this.createHandlerFromFunc(r,t.filterHandler,o);return e.handler=u,e.handlerParams=h,e.handlerGenerator=a,delete this.model[n],this.state.delete(n),u.init?.({...h,source:"init",model:null}),this.destroyBean(c),l!=null&&this.beans.filterManager?.onFilterChanged({columns:[r],source:s}),!0}filterParamsChanged(e,t="api"){const i=this.allColumnFilters.get(e);if(!i)return;const o=this.beans,s=i.column,r=s.getColDef(),n=s.isFilterAllowed(),a=this.getDefaultFilter(s),l=o.selectableFilter,d=l?.isSelectable(r)?l.getFilterDef(s,r):r,c=n?this.createHandlerFunc(s,d,this.getDefaultFilter(s)):void 0,u=!!c,h=i.isHandler;if(h!=u){this.destroyFilter(s,"paramsUpdated");return}const{compDetails:g,createFilterUi:p}=(n?this.createFilterComp(s,d,a,v=>v,u,"colDef"):null)??{compDetails:null,createFilterUi:null},f=g?.params??jo(o.userCompFactory,d,this.createFilterCompParams(s,u,"colDef"));let m=!1;h&&(m=this.refreshOrRecreateHandler(i,c,g,f,t));const C=i.filterUi;if(h&&C&&g&&!C.created){i.filterUi=this.createFilterUiForHandler(g,p,m);return}if(this.areFilterCompsDifferent(C?.compDetails??null,g)||!C||!g){this.destroyFilterUi(i,s,g,p);return}C.filterParams=f,Pt(i,h)?.then(v=>{(v?.refresh?v.refresh(f):!0)===!1?this.destroyFilterUi(i,s,g,p):this.dispatchLocalEvent({type:"filterParamsChanged",column:s,params:f})})}refreshHandlerAndUi(e,t,i,o,s){const r=this.cachedFilter(e);if(!r)return o&&this.getOrCreateFilterWrapper(e,!0),we.resolve();if(!r.isHandler)return we.resolve();const{filterUi:n,handler:a,handlerParams:l}=r;return dC(()=>{if(n){const{created:d,filterParams:c}=n;if(d)return n.promise.then(u=>u?{filter:u,filterParams:c}:void 0);n.refreshed=!0}return we.resolve(void 0)},a,l,t,this.state.get(e.getColId())??{model:t},i,s)}setColumnFilterWrapper(e,t){const i=e.getColId();this.allColumnFilters.set(i,t),this.allColumnListeners.set(i,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(i)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:i}=e,{componentClass:o}=t;return!(i===o||i?.render&&o?.render&&i.render===o.render)}hasFloatingFilters(){return this.beans.colModel.colsList.some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){const t=this.beans.colModel.getCol(e);if(!t)return Promise.resolve(void 0);const i=this.getOrCreateFilterUi(t);return i?new Promise(o=>{i.then(s=>{o(je(s))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:e,source:t})=>this.setModel(e,t)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:e,model:t,resolve:i})=>{this.setModelForColumn(e,t).then(()=>i())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:o,model:s}=this,r=e.getColId(),n=o.get(r);return n?n.model??null:re(s,r)}const i=this.cachedFilter(e);return i?this.getModelFromFilterWrapper(i):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let i=()=>{};const o=new Promise(s=>{i=s});return this.columnModelUpdates.push({key:e,model:t,resolve:i}),o}return new Promise(i=>{this.setModelForColumnLegacy(e,t).then(o=>i(o))})}getStateForColumn(e){return this.state.get(e)??{model:re(this.model,e)}}setModelForColumnLegacy(e,t){const i=this.beans.colModel.getNonPivotCol(e),o=i?this.getOrCreateFilterWrapper(i,!0):null;return o?this.setModelOnFilterWrapper(o,t):we.resolve()}setColDefPropsForDataType(e,t,i){const o=e.filter,s=o===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):o;if(typeof s!="string")return;let r,n;const a=this.beans,{filterParams:l,filterValueGetter:d}=e;s==="agMultiColumnFilter"?{filterParams:r,filterValueGetter:n}=a.multiFilter?.getParamsForDataType(l,d,t,i)??{}:{filterParams:r,filterValueGetter:n}=IC(s,l,d,t,i,a,this.getLocaleTextFunc()),e.filterParams=r,n&&(e.filterValueGetter=n)}setColFilterActive(e,t,i,o){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",i)),e.dispatchColEvent("filterChanged",i,o)}setModelOnFilterWrapper(e,t,i){return new we(o=>{if(e.isHandler){const r=e.column,n=r.getColId(),a=this.model[n];if(this.updateStoredModel(n,t),i&&t===a){o();return}this.refreshHandlerAndUi(r,t,"api").then(()=>o());return}const s=Pt(e);if(s){s.then(r=>{if(typeof r?.setModel!="function"){this.warn(65),o();return}(r.setModel(t)||we.resolve()).then(()=>o())});return}o()})}updateStoredModel(e,t){tr(t)?this.model[e]=t:delete this.model[e];const i=this.state.get(e),o={model:t,state:i?.state};this.state.set(e,o)}filterModified(e,t){this.getOrCreateFilterUi(e)?.then(i=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:i,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,i){const o=e.getColId(),s=this.cachedFilter(e),r=()=>s?.filterUi;Il({action:t,filterParams:s?.filterUi?.filterParams,getFilterUi:r,getModel:()=>re(this.model,o),getState:()=>this.state.get(o),updateState:n=>this.updateState(e,n),updateModel:n=>r()?.filterParams?.onModelChange(n,{...i,fromAction:t}),processModelToApply:s?.isHandler?s.handler.processModelToApply?.bind(s.handler):void 0})}updateAllModels(e,t){const i=[];this.allColumnFilters.forEach((o,s)=>{const r=this.beans.colModel.getNonPivotColById(s);r&&Il({action:e,filterParams:o.filterUi?.filterParams,getFilterUi:()=>o.filterUi,getModel:()=>re(this.model,s),getState:()=>this.state.get(s),updateState:n=>this.updateState(r,n),updateModel:n=>{this.updateStoredModel(s,n),this.dispatchLocalEvent({type:"filterAction",column:r,action:e}),i.push(this.refreshHandlerAndUi(r,n,"ui"))},processModelToApply:o?.isHandler?o.handler.processModelToApply?.bind(o.handler):void 0})}),i.length&&we.all(i).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();cC(()=>this.cachedFilter(e)?.filterUi,()=>re(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){const{state:e,model:t,activeFilterComps:i}=this;for(const s of i)if(s.source==="COLUMN_MENU")return!1;let o=!1;for(const s of e.keys()){const r=e.get(s);if(r.valid===!1)return!1;(r.model??null)!==re(t,s)&&(o=!0)}return o}hasUnappliedModel(e){const{model:t,state:i}=this;return(i.get(e)?.model??null)!==re(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;const i=this.beans.filterPanelSvc;return i?.isActive?!!i.getState(e.getColId()):!1}onPivotModeChanged(e){const{colModel:t,pivotColsSvc:i}=this.beans,o=!!Ti(this.gos),s=e.currentValue,r=s?this.activeColumnFilters:this.activeAggregateFilters,n=s?this.activeAggregateFilters:this.activeColumnFilters,a=[];for(const l of r){const d=t.colsById[l.colId],c=s&&!!i?.columns.length;d&&s===VC(d,s,c,o)&&(n.push(l),a.push(l))}V8(r,a)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function SA(e){return!!e.filterManager?.isAnyFilterPresent()}function bA(e,t="api"){e.filterManager?.onFilterChanged({source:t})}import{AgPromise as yA}from"ag-stack";var RA=class extends y{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:this.onPivotColumnsChanged.bind(this),columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:o})=>this.onAdvFilterEnabledChanged(o),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:({source:o})=>this.onFilterChanged({source:o??"quickFilter"})});const{gos:i}=this;this.alwaysPassFilter=i.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=i.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,i="api"){this.isAdvFilterEnabled()||this.colFilter?.setState(e,t,i)}setFilterModel(e,t="api",i){if(this.isAdvFilterEnabled()){i||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(){Ti(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onPivotColumnsChanged(){this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:i,columns:o=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):yA.resolve()).then(()=>{const s={source:t,type:"filterChanged",columns:o};i&&he(s,i),this.eventSvc.dispatchEvent(s),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!Ti(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.pivotMode)&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}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,t){return this.alwaysPassFilter?.(e)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(e)||this.externalFilterPresent&&!this.doesExternalFilterPass(e)||this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(e,t)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(e))}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(){this.warn(68)}mountAdvFilterTopSectionComp(e){this.advancedFilter?.getCtrl().mountTopSectionComp(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()}};import{KeyCode as EA,_findNextFocusableElement as xA,_findTabbableParent as FA,_focusInto as PA,_isVisible as DA}from"ag-stack";import{AgPromise as MA,_clearElement as TA,_exists as AA}from"ag-stack";import{KeyCode as Zl,_jsonEquals as IA,_removeFromParent as kA}from"ag-stack";import{KeyCode as LA,_clearElement as VA,_setDisabled as HA}from"ag-stack";function BA(e){return{tag:"div",cls:e}}var Yl=class extends K{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super(BA(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){const i=this.buttons;if(this.buttons=e,i===e)return;const o=this.getGui();VA(o);let s;this.destroyListeners();const r=document.createDocumentFragment(),n=this.className,a=({type:d,label:c})=>{const u=C=>{this.dispatchLocalEvent({type:d,event:C})};["apply","clear","reset","cancel"].includes(d)||this.beans.log.warn(75);const h=d==="apply",p=V({tag:"button",attrs:{type:h&&t?"submit":"button"},ref:`${d}FilterButton`,cls:`ag-button ag-standard-button ${n}-button${h?" "+n+"-apply-button":""}`,children:c});this.activateTabIndex([p]),h&&(s=p);const f=C=>{C.key===LA.ENTER&&(C.preventDefault(),u(C))},m=this.listeners;p.addEventListener("click",u),m.push(()=>p.removeEventListener("click",u)),p.addEventListener("keydown",f),m.push(()=>p.removeEventListener("keydown",f)),r.append(p)};for(const d of e)a(d);this.eApply=s;const l=this.validationTooltipFeature;if(s&&!l){const d=s;this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.tooltipSvc?.createTooltip({getGui:()=>this.eApply??d,getTooltipComponentDefinition:()=>{},getLocation:()=>"filter",getTooltipShowDelayOverride:()=>1e3}))}else!s&&l&&(this.validationTooltipFeature=this.destroyBean(l));o.append(r)}getApplyButton(){return this.eApply}updateValidity(e,t=null){const i=this.eApply;i&&(HA(i,!e),this.validationMessage=t,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(const e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},OA={selector:"AG-FILTER-BUTTON",component:Yl},HC=class extends K{constructor(e,t,i,o,s,r){super(),this.column=e,this.wrapper=t,this.eventParent=i,this.updateModel=o,this.isGlobalButtons=s,this.enableGlobalButtonCheck=r,this.hidePopup=null,this.applyActive=!1}postConstruct(){const{comp:e,params:t}=this.wrapper,i=t,o=i.useForm,s=o?"form":"div";this.setTemplate({tag:s,cls:"ag-filter-wrapper"}),o&&this.addManagedElementListeners(this.getGui(),{submit:r=>{r?.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=i,this.resetButtonsPanel(i),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:r,params:n})=>{r===this.column&&this.resetButtonsPanel(n,this.params)},filterStateChanged:({column:r,state:n})=>{r===this.column&&this.eButtons?.updateValidity(n.valid!==!1)},filterAction:({column:r,action:n,event:a})=>{r===this.column&&this.afterAction(n,a)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:r})=>{if(r!==this.isGlobalButtons){this.isGlobalButtons=r;const n=this.params;this.resetButtonsPanel(n,n,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,i){const{buttons:o,readOnly:s}=t??{},{buttons:r,readOnly:n,useForm:a}=e;if(!i&&s===n&&IA(o,r))return;const l=r&&r.length>0&&!e.readOnly&&!this.isGlobalButtons;let d=this.eButtons;if(l){const c=r.map(u=>{const h=`${u}Filter`;return{type:u,label:ke(this,h)}});if(this.applyActive=ui(this.params),!d){d=this.createBean(new Yl),this.appendChild(d.getGui());const u=this.column,h=g=>({event:p})=>{this.updateModel(u,g,{fromButtons:!0}),this.afterAction(g,p)};d?.addManagedListeners(d,{apply:h("apply"),clear:h("clear"),reset:h("reset"),cancel:h("cancel")}),this.eButtons=d}d.updateButtons(c,a)}else this.applyActive=!1,d&&(kA(d.getGui()),this.eButtons=this.destroyBean(d))}close(e){const t=this.hidePopup;if(!t)return;const i=e,o=i?.key;let s;(o===Zl.ENTER||o===Zl.SPACE)&&(s={keyboardEvent:i}),t(s),this.hidePopup=null}afterAction(e,t){const{params:i,applyActive:o}=this,s=i?.closeOnApply;switch(e){case"apply":{t?.preventDefault(),s&&o&&this.close(t);break}case"reset":{s&&o&&this.close();break}case"cancel":{s&&this.close(t);break}}}handleKeyDown(e){!e.defaultPrevented&&e.key===Zl.ENTER&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},GA=":where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}",NA={tag:"div",cls:"ag-filter"},BC=class extends K{constructor(e,t,i){super(NA),this.column=e,this.source=t,this.enableGlobalButtonCheck=i,this.wrapper=null}postConstruct(){this.beans.colFilter?.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return this.wrapper!=null}getFilter(){return this.wrapper?.then(e=>e.comp)??null}afterInit(){return this.wrapper?.then(()=>{})??MA.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.wrapper?.then(t=>{this.comp?.afterGuiAttached(e),t?.comp?.afterGuiAttached?.(e)})}afterGuiDetached(){this.wrapper?.then(e=>{e?.comp?.afterGuiDetached?.()})}createFilter(e){const{column:t,source:i,beans:{colFilter:o}}=this,s=o.getFilterUiForDisplay(t)??null;this.wrapper=s,s?.then(r=>{if(!r)return;const{isHandler:n,comp:a}=r;let l;if(n){const d=!!this.enableGlobalButtonCheck,c=this.createBean(new HC(t,r,o,o.updateModel.bind(o),d&&o.isGlobalButtons,d));this.comp=c,l=c.getGui()}else this.registerCSS(GA),l=a.getGui(),AA(l)||this.beans.log.warn(69,{guiFromFilter:l});this.appendChild(l),e?this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:i,eGui:this.getGui()}):a.afterGuiAttached?.(this.afterGuiAttachedParams)})}onFilterDestroyed(e){const{source:t,column:i}=e;(t==="api"||t==="paramsUpdated")&&i.getId()===this.column.getId()&&this.beans.colModel.getNonPivotCol(this.column)&&(TA(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()}},_A=class extends y{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,i,o){e&&!e.isColumn||this.showPopup(e,s=>{this.popupSvc?.positionPopupUnderMouseEvent({additionalParams:{column:e},type:i,mouseEvent:t,ePopup:s})},i,t.target,ge(this.gos),o)}showMenuAfterButtonClick(e,t,i,o,s){if(e&&!e.isColumn)return!1;let r=-1,n="left";const a=ge(this.gos);!a&&this.gos.get("enableRtl")&&(r=1,n="right");const l=a?void 0:4*r,d=a?void 0:4;return this.showPopup(e,c=>{this.popupSvc?.positionPopupByComponent({type:i,eventSource:t,ePopup:c,nudgeX:l,nudgeY:d,alignSide:n,keepWithinBounds:!0,position:"under",additionalParams:{column:e}})},i,t,a,o,s?.suppressCloseOnEventSource)}showPopup(e,t,i,o,s,r,n){const a=e?this.createBean(new BC(e,"COLUMN_MENU")):void 0;if(!a?.hasFilter()||!e)return this.destroyBean(a),this.error(57),!1;const l=V({tag:"div",cls:`ag-menu${s?"":" ag-filter-menu"}`,role:"presentation"}),[d]=this.addManagedElementListeners(l,{keydown:C=>this.trapFocusWithin(C,l)});l.appendChild(a?.getGui());let c;const u=()=>a?.afterGuiDetached(),h=Yd(this.gos)?o??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,g=C=>{kl(e,!1,"contextMenu");const v=C instanceof KeyboardEvent;d(),v&&o&&DA(o)&&FA(o)?.focus({preventScroll:!0}),u(),this.destroyBean(a),this.activeMenu===a&&(this.activeMenu=void 0,this.hidePopup=void 0),this.dispatchVisibleChangedEvent(!1,i,e),r?.(C)},p=this.getLocaleTextFunc(),f=s&&i!=="columnFilter"?p("ariaLabelColumnMenu","Column Menu"):p("ariaLabelColumnFilter","Column Filter"),m=this.popupSvc?.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:g,positionCallback:()=>t(l),anchorToElement:h,eventSourceToIgnore:n?o:void 0,ariaLabel:f});return m?(this.activeMenu=a,this.hidePopup=c=m.hideFunc,a.afterInit().then(()=>{t(l),a.afterGuiAttached({container:i,hidePopup:c})}),kl(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,i,e),!0):(d(),this.destroyBean(a),!1)}trapFocusWithin(e,t){e.key!==EA.TAB||e.defaultPrevented||xA({beans:this.beans,rootNode:t,onlyUnmanaged:!0,backwards:e.shiftKey})||(e.preventDefault(),PA(t,e.shiftKey,!0))}dispatchVisibleChangedEvent(e,t,i){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:i??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.colDef.menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},zA=class extends y{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,i){const o=e.colDef,s=this.beans,r=i??s.selectableFilter?.getFilterValueGetter(e.colId)??o.filterValueGetter,n=s.valueSvc;if(r){const l=typeof r=="function",d=s.expressionSvc;if(!l&&!d)return;const c=s.colModel,u={api:s.gridApi,context:s.gridOptions.context,data:t.data,node:t,column:e,colDef:o,getValue:h=>{const g=c.getCol(h);return g?n.getValueFromData(gt(g,t),t):null}};return l?r(u):d.evaluate(r,u)}const a=n.getValueFromData(e,t);if(e.allowFormula){const l=s.formula;if(l?.isFormula(a))return l.resolveValue(e,t)}return a}};import{RefPlaceholder as WA}from"ag-stack";var UA={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},qA=class extends K{constructor(){super(UA,[Ro]),this.eFloatingFilterText=WA}init(e){this.params=e;const t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){const i=e,o=i.getHandler();if(o.getModelAsString){const s=o.getModelAsString(i.model);this.eFloatingFilterText.setValue(s)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const i=t.getModelAsString(e);this.eFloatingFilterText.setValue(i)}})}refresh(e){this.init(e)}};import{_getActiveDomElement as $A}from"ag-stack";var Jl=(e,t,i)=>{if(!t)return;const o=t.startsWith("[")&&t.endsWith("]");let s;try{s=new RegExp(o?t:`[${t}]`)}catch{i.log.warn(327,{pattern:t});return}e.addManagedElementListeners(e.getInputElement(),{beforeinput:r=>{const n=r.inputType;if(!n?.startsWith("insert")||n==="insertCompositionText")return;const a=r.data||r.dataTransfer?.getData("text/plain");if(!(!a||!r.cancelable)){for(const l of a)if(!s.test(l)){r.preventDefault();return}}}})};import{AgPromise as OC,_addOrRemoveAttribute as KA,_areEqual as jA,_isBrowserFirefox as QA,_isComponent as GC,_removeFromParent as NC,_setDisabled as _C,_setDisplayed as zC}from"ag-stack";var Xl=class extends ro{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)}},ZA={selector:"AG-RADIO-BUTTON",component:Xl},ed=class{init(e,t,i){this.configuredOptions=t.filterOptions??i,this.buildOptions(e,i),this.defaultOption=this.getDefaultItem(e,t.defaultOption)}refresh(e,t,i){const o=t.filterOptions??i;this.configuredOptions!==o&&(this.configuredOptions=o,this.buildOptions(e,i)),this.defaultOption=this.getDefaultItem(e,t.defaultOption)}buildOptions(e,t){this.collectUsableOptions(e,this.configuredOptions),this.filterOptions.length||(e.warn(74),this.collectUsableOptions(e,t))}collectUsableOptions(e,t){const{offered:i,customOptions:o}=EC(t,s=>e.warn(72,{keys:s}),RC);this.offeredOptions=i,this.filterOptions=[...i.values()],this.customFilterOptions=o}getDefaultItem(e,t){const i=this.filterOptions[0];if(i!=null){if(t!=null){if(this.hasOption(t))return t;e.warn(326,{defaultOption:t})}return typeof i=="string"?i:i.displayKey}}hasOption(e){return e!=null&&this.offeredOptions.has(e)}getCustomOption(e){return e==null?void 0:this.customFilterOptions.get(e)}},td=class extends $c{constructor(e,t,i){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=i,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.typeListener=()=>{this.refreshInputValidation(),this.onUiChanged()},this.lastUiCompletePosition=null,this.joinOperatorId=0}refreshInputValidation(e){for(let t=0,i=this.getNumConditions();t<i;++t)this.refreshPositionValidation(t,!1,e)}refreshPositionValidation(e,t,i){}conditionNumberOfInputs(e){return ii(this.getConditionType(e),this.optionsFactory)}setParams(e){super.setParams(e);const t=new ed;this.optionsFactory=t,t.init(this.beans.log,e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(this.beans.log,e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e),this.refreshInputValidation(),this.updateUiVisibility()}commonUpdateSimpleParams(e){this.setNumConditions(e),this.forEachInput(t=>{t instanceof st&&t.setAutoComplete(e.browserAutoComplete)}),this.defaultJoinOperator=nA(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions(),KA(this.getGui(),"tabindex",this.isReadOnly()?"-1":null)}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.refreshInputValidation(),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,i)=>{const o=i===0?e:this.optionsFactory.defaultOption;t.setValue(o,!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]}getConditionType(e){return this.eTypes[e]?.getValue()??null}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){const i=!e.operator,o=!t.operator;if(!i&&o||i&&!o)return!1;let r;if(i){const n=e,a=t;r=this.areSimpleModelsEqual(n,a)}else{const n=e,a=t;r=n.operator===a.operator&&jA(n.conditions,a.conditions,(l,d)=>this.areSimpleModelsEqual(l,d))}return r}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),OC.resolve();if(e.operator){const o=e;let s=o.conditions;s==null&&(s=[],this.beans.log.warn(77));const r=lA(this.beans.log,s,this.maxNumConditions),n=this.getNumConditions();r<n?this.removeConditionsForModel(r):r>n&&this.createConditionsUpTo(r);const a=o.operator==="OR";this.eJoinAnds.forEach(l=>l.setValue(!a,!0)),this.eJoinOrs.forEach(l=>l.setValue(a,!0)),s.forEach((l,d)=>{this.eTypes[d].setValue(l.type,!0),this.setConditionIntoUi(l,d)})}else{const o=e;this.getNumConditions()>1&&this.removeConditionsForModel(1),this.createConditionsUpTo(1),this.eTypes[0].setValue(o.type,!0),this.setConditionIntoUi(o,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.refreshInputValidation(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),OC.resolve()}setNumConditions(e){let t=Math.floor(e.maxNumConditions??2);Ul(t)&&(this.beans.log.warn(79),t=1),this.maxNumConditions=t;let i=Math.floor(e.numAlwaysVisibleConditions??1);Ul(i)&&(this.beans.log.warn(80),i=1),i>t&&(this.beans.log.warn(81),i=t),this.numAlwaysVisibleConditions=i}createOption(){const e=this.getGui(),t=this.createManagedBean(new Zs);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const i=this.createEValue();this.eConditionBodies.push(i),e.appendChild(i),this.putOptionsIntoDropdown(t),this.resetType(t);const o=this.getNumConditions()-1;this.forEachPositionInput(o,s=>this.resetInput(s)),this.addChangedListeners(t,o)}createJoinOperatorPanel(){const e=V({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),i=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const o=this.eJoinPanels.length-1,s=this.joinOperatorId++;this.resetJoinOperatorAnd(t,o,s),this.resetJoinOperatorOr(i,o,s),this.isReadOnly()||(t.onValueChange(this.listener),i.onValueChange(this.listener))}createJoinOperator(e,t,i){const o=this.createManagedBean(new Xl);e.push(o);const s="ag-filter-condition-operator";return o.addCss(s),o.addCss(`${s}-${i}`),t.appendChild(o.getGui()),o}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const i of t)e.addOption(i);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){const t=zc(e)?this.translate(e):this.getLocaleTextFunc()(e,e);return{value:e,text:t}}createCustomListOption(e){const t=e.displayKey;return{value:t,text:Uc(this,this.optionsFactory,t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let i=0;i<this.getNumConditions();i++)this.isConditionUiComplete(i)?e=i:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createConditionsUpTo(this.getNumConditions()+1);else{const i=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<i){const o=this.removeConditionsAndOperators(i+1),s=e+1,r=i-s;r>0&&this.removeConditionsAndOperators(s,r),this.createMissingConditionsAndOperators(),o||(e=i)}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((o,s)=>{const r=this.isConditionDisabled(s,e);o.setDisabled(r||this.filterListOptions.length<=1),s===1&&(_C(this.eJoinPanels[0],r),this.eJoinAnds[0].setDisabled(r),this.eJoinOrs[0].setDisabled(r))}),this.eConditionBodies.forEach((o,s)=>{zC(o,this.isConditionBodyVisible(s))});const i=(t??this.getJoinOperator())==="OR";for(const o of this.eJoinAnds)o.setValue(!i,!0);for(const o of this.eJoinOrs)o.setValue(i,!0);this.forEachInput((o,s,r,n)=>{this.setElementDisplayed(o,s<n),this.setElementDisabled(o,this.isConditionDisabled(r,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){return this.hasInvalidInputs()?!1:(this.removeConditionsForModel(e,t),!0)}removeConditionsForModel(e,t){if(e>=this.getNumConditions())return;const{eTypes:i,eConditionBodies:o,eJoinPanels:s,eJoinAnds:r,eJoinOrs:n}=this;this.removeComponents(i,e,t),this.removeElements(o,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(s,a,t),this.removeComponents(r,a,t),this.removeComponents(n,a,t)}removeElements(e,t,i){const o=Mo(e,t,i);for(const s of o)NC(s)}removeComponents(e,t,i){const o=Mo(e,t,i);for(const s of o)NC(s.getGui()),this.destroyBean(s)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let t;if(!this.isReadOnly()){const i=this.getInputs(0)[0];i instanceof st&&this.isConditionBodyVisible(0)?t=i.getInputElement():t=this.eTypes[0]?.getFocusableElement()}(t??this.getGui()).focus({preventScroll:!0})}this.onGuiAttached(e),this.refreshInputValidation(!0)}onGuiAttached(e){}shouldKeepInvalidInputState(){return!QA()&&this.hasInvalidInputs()}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,i=-1,o=!1;const s=this.getJoinOperator();for(let n=this.getNumConditions()-1;n>=0;n--)if(this.isConditionUiComplete(n))t===-1&&(t=n,i=n);else{const a=n>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(n-1),l=n<t;if(a||l){const d=this.removeConditionsAndOperators(n,1);o||(o=d),d&&l&&i--}}let r=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),r=!0),this.shouldAddNewConditionAtEnd(i===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),r=!0),r&&this.updateConditionStatusesAndValues(i,s),o&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=i}getModelAsString(e){return this.params.getHandler()?.getModelAsString?.(e)??""}resetPlaceholder(){const e=this.getLocaleTextFunc(),{filterPlaceholder:t,eTypes:i}=this;this.forEachInput((o,s,r,n)=>{if(!(o instanceof st))return;const a=s===0&&n>1?"inRangeStart":s===0?"filterOoo":"inRangeEnd",l=s===0&&n>1?e("ariaFilterFromValue","Filter from value"):s===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value"),d=i[r].getValue(),c=qc(this,t,a,d,this.optionsFactory);o.setInputPlaceholder(c),o.setInputAriaLabel(l)})}setElementValue(e,t,i){e instanceof st&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){GC(e)&&zC(e.getGui(),t)}setElementDisabled(e,t){GC(e)&&_C(e.getGui(),t)}attachElementOnChange(e,t){e instanceof st&&e.onValueChange(t),e instanceof lt&&e.onValueClear(()=>this.onUiCleared())}forEachInput(e){for(let t=0,i=this.getNumConditions();t<i;++t)this.forEachPositionTypeInput(t,this.getConditionType(t),e)}forEachPositionInput(e,t){const i=this.getConditionType(e);this.forEachPositionTypeInput(e,i,t)}forEachPositionTypeInput(e,t,i){const o=ii(t,this.optionsFactory),s=this.getInputs(e);for(let r=0;r<s.length;r++){const n=s[r];n!=null&&i(n,r,e,o)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){return this.conditionNumberOfInputs(e)>0}isConditionUiComplete(e){if(e>=this.getNumConditions())return!1;const t=this.getConditionType(e);return!(!t||t==="empty"||this.getValues(e).some(i=>i==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(){this.isReadOnly()||this.createConditionsUpTo(this.numAlwaysVisibleConditions)}createConditionsUpTo(e){for(let t=this.getNumConditions();t<e;t++)t>0&&this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){this.removeConditionsForModel(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinAnds.forEach((t,i)=>this.resetJoinOperatorAnd(t,i,this.joinOperatorId+i)),this.eJoinOrs.forEach((t,i)=>this.resetJoinOperatorOr(t,i,this.joinOperatorId+i)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.refreshInputValidation(),this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){const i=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(i).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,i){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),i)}resetJoinOperatorOr(e,t,i){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),i)}resetJoinOperator(e,t,i,o,s){this.updateJoinOperatorDisabled(e.setValue(i,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${s}`).setLabel(o),t)}updateJoinOperatorsDisabled(){const e=(t,i)=>this.updateJoinOperatorDisabled(t,i);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const i=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((o,s,r)=>{r===t&&this.setElementValue(o,i[s]!=null?i[s]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,i,o)=>{this.setElementValue(t,i===0&&o===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.typeListener),this.attachInputsOnChange(t))}attachInputsOnChange(e){this.isReadOnly()||this.forEachPositionInput(e,t=>{this.attachElementOnChange(t,this.listener)})}isInputInvalid(e){return!1}isInputValueSettled(e){return!0}hasInvalidInputs(){for(let e=0,t=this.getNumConditions();e<t;++e)if(this.positionHasInvalidInputs(e,!0))return!0;return!1}positionHasInvalidInputs(e,t){let i=!1;return this.forEachPositionInput(e,(o,s,r,n)=>{i||(i=s<n&&(!t||this.isInputValueSettled(o))&&this.isInputInvalid(o))}),i}canApply(e){return!this.hasInvalidInputs()}isReadOnly(){return!!this.params.readOnly}},WC=class extends td{constructor(){super(...arguments),this.eValuesFrom=[],this.eValuesTo=[],this.renderedValues=new WeakMap,this.defaultDebounceMs=500}isInputInvalid(e){return!e.getInputElement().validity.valid}refreshPositionValidation(e,t=!1){const[i,o]=this.getInputs(e);i&&o&&this.refreshInputPairValidation(i,o,t,this.conditionNumberOfInputs(e))}createTextInput(){return this.createBean(new lt({clearButton:!0,searchIcon:!0,autoComplete:this.params.browserAutoComplete}))}buildInput(e){const t=this.createInputWidget();return Jl(t,this.params.allowedCharPattern,this.beans),t.addCss(`ag-filter-${e}`),t.addCss("ag-filter-filter"),t}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=this.renderedWith;this.renderedWith=e;const i=this.getRenderChange(e,t);i&&this.refreshInputElements(i==="rebuild",t)}destroy(){this.destroyBeans(this.eValuesFrom),this.destroyBeans(this.eValuesTo),super.destroy()}createEValue(){const e=V({tag:"div",cls:"ag-filter-body",role:"presentation"}),t=this.buildInput("from"),i=this.buildInput("to");return this.eValuesFrom.push(t),this.eValuesTo.push(i),e.appendChild(t.getGui()),e.appendChild(i.getGui()),this.attachInputPairListeners(t,i),e}removeEValues(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)}getInputs(e){const t=this.eValuesFrom;return e>=0&&e<t.length?[t[e],this.eValuesTo[e]]:[null,null]}getValues(e){const t=[];return this.forEachPositionInput(e,(i,o,s,r)=>{o<r&&t.push(this.readValue(i))}),t}readValue(e,t){const i=this.getRenderedValue(e);return i?i.value:this.parseText(e.getValue(t),this.params)}setElementValue(e,t,i){const o=t,s=this.getValueFormatter(),r=!i&&s?s(o):t;super.setElementValue(e,r,i);const n=e.getInputElement().value;i||n===""&&o!==null?this.renderedValues.delete(e):this.renderedValues.set(e,{text:n,value:o}),(o===null||r===null)&&e.setCustomValidity("")}getRenderedValue(e){const t=this.renderedValues.get(e);return t?.text===e.getInputElement().value?t:void 0}attachInputPairListeners(e,t){this.attachInputListeners(e,!0),this.attachInputListeners(t,!1)}attachInputListeners(e,t){const i=t?this.eValuesFrom:this.eValuesTo,o=()=>this.refreshPositionValidation(i.indexOf(e),t);e.onValueChange(()=>{this.renderedValues.delete(e),o()}),e.addGuiEventListener("focusin",o)}refreshInputElements(e,t){const i=this.eValuesFrom,o=i.length;if(!o)return;const s=this.eValuesTo;for(let r=0;r<o;++r)this.refreshInputElement(r,"from",e,t),this.refreshInputElement(r,"to",e,t),e&&(this.attachInputPairListeners(i[r],s[r]),this.attachInputsOnChange(r))}refreshInputElement(e,t,i,o){const s=t==="from"?this.eValuesFrom:this.eValuesTo,r=s[e],n=r.getValue(!0),a=this.getRenderedValue(r),l=a?a.value:this.parseText(n,o),d=!a&&n!=null&&n!=="";let c=r,u;if(i&&(u=this.takeCaret(r),c=this.buildInput(t),r.getGui().replaceWith(c.getGui()),this.destroyBean(r),s[e]=c),d&&(c.setValue(n,!0),c.getInputElement().value===n)){this.restoreCaret(c,u);return}this.setElementValue(c,l),this.restoreCaret(c,u)}takeCaret(e){const t=e.getInputElement();if($A(this.beans)===t)return{start:t.selectionStart,end:t.selectionEnd}}restoreCaret(e,t){if(!t)return;const i=e.getInputElement();i.focus(),t.start!=null&&i.selectionStart!=null&&i.setSelectionRange(t.start,t.end)}},id=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];import{_parseBigIntOrNull as od}from"ag-stack";function rr(e){return e?.allowedCharPattern??null}function UC(e,t,i,o){return t==null||t.trim()===""?null:e?e(t,Ei(i,o,"columnFilter")):od(t)}function qC(e,t){const{filter:i,filterTo:o,type:s}=e||{};return[od(i),od(o)].slice(0,ii(s,t))}var YA=class extends WC{constructor(){super("bigintFilter",qC,id),this.filterType="bigint"}getRenderChange(e,t){if(rr(e)!==rr(t))return"rebuild";if(e.bigintParser!==t?.bigintParser||e.bigintFormatter!==t?.bigintFormatter)return"rerender"}parseText(e,t){return UC(t?.bigintParser,e,this.gos,this.params.column)}getValueFormatter(){return Do(this.params.bigintFormatter,this.gos,this.params.column,"columnFilter")}createInputWidget(){return this.createTextInput()}refreshInputPairValidation(e,t,i,o){const s=o>=2,r=o>0?this.readValue(e,!0):null,n=s?this.readValue(t,!0):null,a=o>0&&this.isInvalidValue(e,r),l=s&&this.isInvalidValue(t,n),d=i||!s,c=d?e:t,u=d?t:e,h=d?a:l,g=d?l:a;let p="";if(h)p=this.getLocaleTextFunc()("invalidBigInt","Invalid BigInt");else if(s&&!g){const f=$l(r,n,i,this.params.inRangeInclusive);f&&(p=this.translate(f,[String(u.getValue())]))}c.setCustomValidity(p),g||u.setCustomValidity(""),p.length>0&&this.beans.ariaAnnounce.announceValue(p,"filterValidation")}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),i={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(i.filter=String(o[0])),o.length>1&&(i.filterTo=String(o[1])),i}isInvalidValue(e,t){const i=e.getValue();return i!=null&&String(i).trim()!==""&&t===null}};import{_parseBigIntOrNull as $C}from"ag-stack";var KC=class extends y{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t,this.warnedKeys=new Set}isNullValue(e){return e==null}warnUnexpectedFilterType(e){this.optionsFactory.getCustomOption(e)||this.warnedKeys.has(e)||(this.warnedKeys.add(e),this.warn(76,{filterModelType:e}))}init(e){const t=e.filterParams,i=new ed;this.optionsFactory=i,i.init(this.beans.log,t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(this.createModelFormatter(i,t,e.column)),this.updateParams(e),this.validateModel(e)}refresh(e){if(e.source==="colDef"){const t=e.filterParams,i=this.optionsFactory;i.refresh(this.beans.log,t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:i,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(t==null)return!0;const{operator:i}=t,o=[];if(i){const n=t;o.push(...n.conditions??[])}else o.push(t);if(!o.length)return!0;const s=i&&i==="OR"?"some":"every",r=this.params.getValue(e.node);return o[s](n=>this.individualConditionPasses(e,n,r))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{maxNumConditions:i}}=e;if(t==null)return;const o=Ur(t);let s=(o?t.conditions:[t])??[];if(!s.every(l=>this.optionsFactory.hasOption(l.type))){this.params={...e,model:null},e.onModelChange(null);return}let r=!1;const n=this.filterType;(!s.every(l=>l.filterType===n)||t.filterType!==n)&&(s=s.map(l=>({...l,filterType:n})),r=!0);const a=rA(i);if(a!==null&&s.length>a&&(s=s.slice(0,a),r=!0),r){let l;s.length===1?l={...s[0],filterType:n}:(l={...t,filterType:n},o&&t.conditions&&(l.conditions=s)),this.params={...e,model:l},e.onModelChange(l)}}individualConditionPasses(e,t,i){const o=this.optionsFactory,s=this.mapValuesFromModel(t,o),r=o.getCustomOption(t.type),n=aA(r,s,i,this.beans.gos,this.params.column);return n??(this.isNullValue(i)?this.evaluateNullValue(t.type):this.evaluateNonNullValue(s,i,t,e))}},sd=class extends KC{isNullValue(e){return To(e)}evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:i,includeBlanksInGreaterThan:o,includeBlanksInLessThan:s,includeBlanksInRange:r}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(i)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(o)return!0;break;case"lessThan":case"lessThanOrEqual":if(s)return!0;break;case"inRange":if(r)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,i){const o=i.type;if(!this.isValid(t))return o==="notEqual"||o==="notBlank";if(o==="blank")return!1;if(o==="notBlank")return!0;const s=this.comparator(),r=e[0]!=null?s(e[0],t):0;switch(o){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 n=s(e[1],t);return this.params.filterParams.inRangeInclusive?r>=0&&n<=0:r>0&&n<0}default:return this.warnUnexpectedFilterType(o),!0}}};import{_parseBigIntOrNull as jC}from"ag-stack";var rd={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},JA={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},nr=class extends y{constructor(e,t,i){super(),this.optionsFactory=e,this.filterParams=t,this.column=i}getValueFormatter(){}getModelAsString(e,t){const i=this.getLocaleTextFunc(),o=t==="filterToolPanel";if(!e)return o?ke(this,"filterSummaryInactive"):null;if(e.operator!=null){const r=e,a=(r.conditions??[]).map(d=>this.getModelAsString(d,t)),l=r.operator==="AND"?"andCondition":"orCondition";return a.join(` ${ke(this,l)} `)}else{if(e.type==="blank"||e.type==="notBlank")return o?ke(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):i(e.type,e.type);{const r=e,n=this.optionsFactory.getCustomOption(r.type),a=n?ql(n):void 0;return n&&a===0?xC(n,i):this.conditionToString(r,o,r.type==="inRange"||a===2,n?.displayKey,n?.displayName)}}}updateParams(e){const{optionsFactory:t,filterParams:i}=e;this.optionsFactory=t,this.filterParams=i}conditionForToolPanel(e,t,i,o,s,r){let n;const a=this.getTypeKey(e);return a&&(n=ke(this,a)),s&&r&&(n=this.getLocaleTextFunc()(s,r)),n!=null?t?`${n} ${ke(this,"filterSummaryInRangeValues",[i(),o()])}`:`${n} ${i()}`:null}getTypeKey(e){const t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){const t=this.getValueFormatter();return t?t(e??null)??"":String(e)}},QC=class extends nr{constructor(){super(...arguments),this.filterTypeKeys=rd}getValueFormatter(){return Do(this.filterParams.bigintFormatter,this.gos,this.column,"columnFilter")}conditionToString(e,t,i,o,s){const{filter:r,filterTo:n,type:a}=e,l=this.formatValue.bind(this),d=jC(r),c=jC(n);if(t){const u=this.conditionForToolPanel(a,i,()=>l(d),()=>l(c),o,s);if(u!=null)return u}return i?`${l(d)}-${l(c)}`:r!=null?l(d):`${a}`}},XA=class extends sd{constructor(){super(qC,id),this.filterType="bigint"}createModelFormatter(e,t,i){return new QC(e,t,i)}comparator(){return(e,t)=>{const i=$C(t);return e===i?0:e<i?1:-1}}isValid(e){return $C(e)!==null}};import{RefPlaceholder as e7,_getActiveDomElement as t7}from"ag-stack";var nd=class extends y{constructor(e){super(),this.onInputCreated=e,this.eInput=e7,this.onValueChanged=()=>{},this.onValueCleared=()=>{}}setupGui(e){const t=this.createManagedBean(new lt({clearButton:!0,onValueClear:()=>this.onValueCleared()}));this.eInput=t,this.onInputCreated?.(t);const i=t.getGui();e.appendChild(i);const o=s=>this.onValueChanged(s);this.addManagedListeners(i,{input:o,keydown:o})}setEditable(e){this.eInput.setDisabled(!e)}isFocused(){return t7(this.beans)===this.eInput.getInputElement()}getValue(){return this.eInput.getValue()}getInputText(){return this.eInput.getInputElement().value}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setValueClearedListener(e){this.onValueCleared=e}setParams({ariaLabel:e,autoComplete:t,placeholder:i}){const{eInput:o}=this;o.setInputAriaLabel(e),o.setAutoComplete(t),o.setSearchIcon(!!i),o.setInputPlaceholder(i)}};import{KeyCode as i7,RefPlaceholder as o7,_clearElement as s7,_debounce as r7}from"ag-stack";var ZC=e=>e==null?null:e.toString().toLowerCase(),ad={contains:(e,t)=>e.includes(t),notContains:(e,t)=>!e.includes(t),equals:(e,t)=>e===t,notEqual:(e,t)=>e!=t,startsWith:(e,t)=>e.startsWith(t),endsWith:(e,t)=>e.endsWith(t)};function ar(e){const t=e?.trim();return t===""?e:t}function YC(e,t){const{filter:i,filterTo:o,type:s}=e||{};return[i||null,o||null].slice(0,ii(s,t))}var JC=class extends K{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}const t=e.operator;let i;t?i=e.conditions?.[0]:i=e,this.lastType=i?i.type:this.optionsFactory.defaultOption}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const i=e;return this.isTypeEditable(i.type)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){const i=e;this.onModelUpdated(i.model)}}setParams(e){const t=new ed;this.optionsFactory=t,t.init(this.beans.log,e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(this.createModelFormatter(t,e.filterParams,e.column)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const i=this.optionsFactory.defaultOption;t||(this.lastType=i),this.readOnly=!!e.filterParams.readOnly;const o=this.isTypeEditable(i);this.setEditable(o)}refresh(e){this.params=e;const t=e,i=this.reactive;if((!i||t.source==="colDef")&&this.updateParams(e),i){const{source:o,model:s}=t;if(o==="dataChanged"||o==="ui")return;this.onModelUpdated(s)}}updateParams(e){const t=this.optionsFactory;t.refresh(this.beans.log,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&&ii(e,this.optionsFactory)===1}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},n7={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},ld=class extends JC{constructor(){super(...arguments),this.eFloatingFilterInputContainer=o7,this.pendingEdit=!1,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(n7)}onModelUpdated(e){const{inputSvc:t}=this;this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),!(t.isFocused()&&this.pendingEdit)&&(t.setValue(this.filterModelFormatter.getModelAsString(e)),this.pendingEdit=!1)}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:i,readOnly:o}=this,{filterPlaceholder:s,column:r,browserAutoComplete:n,filterParams:a}=e,l=this.lastType??this.optionsFactory.defaultOption,d=e.filterParams.filterPlaceholder,c=s===!0?qc(this,d,"filterOoo",l,this.optionsFactory):s||void 0;if(t.setParams({ariaLabel:this.getAriaLabel(r),autoComplete:n??a.browserAutoComplete,placeholder:c}),this.applyActive=ui(a),!o){const u=qr(this.beans.log,a,i),h=r7(this,this.syncUpWithParentFilter.bind(this),u);let g;t.setValueChangedListener(p=>{this.pendingEdit=!0,g=h(p)}),t.setValueClearedListener(()=>{clearTimeout(g),this.syncUpWithParentFilter()})}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const t=this.inputSvc,i=t.getInputText();s7(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),this.inputSvc.setValue(i,!0)}syncUpWithParentFilter(e){const t=e?.key===i7.ENTER,i=this.reactive;if(i&&this.params.onUiChange(),this.applyActive&&!t)return;this.pendingEdit=!1;const{inputSvc:o,params:s,lastType:r}=this;let n=o.getValue();if(s.filterParams.trimInput&&(n=ar(n),o.setValue(n,!0)),i){const a=s,l=a.model,d=this.convertValue(n),c=d==null?null:{...l??{filterType:this.filterType,type:r??this.optionsFactory.defaultOption},filter:d};a.onModelChange(c,{afterFloatingFilter:!0})}else s.parentFilterInstance(a=>{a?.onFloatingFilterChanged(r||null,n||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},a7=class extends ld{constructor(){super(...arguments),this.filterType="bigint",this.defaultOptions=id}createModelFormatter(e,t,i){return new QC(e,t,i)}updateParams(e){const t=e.filterParams;rr(t)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),this.bigintParser=t?.bigintParser,super.updateParams(e)}createFloatingFilterInputService(e){const t=e.filterParams,i=rr(t);return this.allowedCharPattern=i,this.bigintParser=t?.bigintParser,this.createManagedBean(new nd(o=>Jl(o,i,this.beans)))}convertValue(e){const{gos:t,params:i}=this;return UC(this.bigintParser,e,t,i.column)}};import{_isBrowserFirefox as l7,_parseDateTimeFromString as XC,_serialiseDate as ev}from"ag-stack";import{FAST_TEST_TIMINGS as d7,_debounce as c7,_setAriaInvalid as u7,_setDisplayed as h7}from"ag-stack";var tv=".ag-input-field-input",g7=d7?0:500,iv=class{constructor(e,t,i,o,s,r){this.context=e,this.eParent=s,this.alive=!0,this.debouncedReport=c7({isAlive:()=>this.alive},ov,g7),this.timeoutHandle=null,this.lastValidityMessage=null,v1(t,i,o)?.newAgStackInstance().then(a=>{if(!this.alive){e.destroyBean(a);return}if(this.dateComp=a,!a)return;s.appendChild(a.getGui()),a?.afterGuiAttached?.();const{tempValue:l,disabled:d}=this;l&&a.setDate(l),d!=null&&a.setDisabled?.(d),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){h7(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="immediate"){const i=this.dateComp?.getGui().querySelector(tv);if(i&&"setCustomValidity"in i){const o=e.length>0,s=e!==this.lastValidityMessage;this.lastValidityMessage=e,i.setCustomValidity(e),o?t==="immediate"?ov(i):(t==="debounce"||s)&&(this.timeoutHandle=this.debouncedReport(i)):this.timeoutHandle&&window.clearTimeout(this.timeoutHandle),u7(i,o)}}getValidity(){return this.dateComp?.getGui().querySelector(tv)?.validity}};function ov(e){e.reportValidity()}var dd=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];import{_parseDateTimeFromString as sv}from"ag-stack";function rv(e,t){const{dateFrom:i,dateTo:o,type:s}=e||{};return[i&&sv(i,void 0,!0)||null,o&&sv(o,void 0,!0)||null].slice(0,ii(s,t))}var nv=1e3,av=1/0,p7=class extends td{constructor(){super("dateFilter",rv,dd),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=nv,this.maxValidYear=av,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}onGuiAttached(e){this.dateConditionFromComps[0]?.afterGuiAttached(e)}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(l,d)=>{const c=e[l];if(c!=null)if(isNaN(c))this.beans.log.warn(82,{param:l});else return c==null?d:Number(c);return d},i=t("minValidYear",nv),o=t("maxValidYear",av);this.minValidYear=i,this.maxValidYear=o,i>o&&this.beans.log.warn(83);const{minValidDate:s,maxValidDate:r}=e,n=s instanceof Date?s:XC(s);this.minValidDate=n;const a=r instanceof Date?r:XC(r);this.maxValidDate=a,n&&a&&n>a&&this.beans.log.warn(84)}refreshPositionValidation(e,t=!1,i){this.refreshInputPairValidation(e,t,i?"immediate":"debounceIfChanged")}refreshInputPairValidation(e,t,i){const[o,s]=this.getInputs(e);if(!o||!s)return;const r=o.getDate(),n=s.getDate(),l=this.conditionNumberOfInputs(e)>=2?$l(r,n,t,this.params.inRangeInclusive):null,d=l?this.translate(l,[String(t?n:r)]):"",c=l7()?"immediate":i;(t?o:s).setCustomValidity(d,c),(t?s:o).setCustomValidity("",c),d.length>0&&this.beans.ariaAnnounce.announceValue(d,"filterValidation")}createDateCompWrapper(e,t){const{beans:{userCompFactory:i,context:o,gos:s},params:r}=this,n=t==="from",a=n?this.eConditionPanelsFrom:this.eConditionPanelsTo,l=d=>this.refreshInputPairValidation(a.indexOf(e),n,d);return new iv(o,i,r.colDef,G(s,{onDateChanged:()=>{l("debounce"),this.onUiChanged()},onDateCleared:()=>{l("immediate"),this.onUiCleared()},onFocusIn:()=>l("debounceIfChanged"),filterParams:r,location:"filter"}),e)}destroy(){this.removeDateComps(this.dateConditionFromComps,0),this.removeDateComps(this.dateConditionToComps,0),super.destroy()}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=V({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,i,o){const s=V({tag:"div",cls:`ag-filter-${o} ag-filter-date-${o}`});t.push(s),e.appendChild(s),i.push(this.createDateCompWrapper(s,o))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),Mo(this.eConditionPanelsFrom,e,t),Mo(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,i){const o=Mo(e,t,i);for(const s of o)s.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:i,minValidYear:o,maxValidYear:s}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<o)return!1;if(i){if(e>i)return!1}else if(e.getUTCFullYear()>s)return!1;return!0}isInputInvalid(e){return!(e.getValidity()?.valid??!0)}isInputValueSettled(e){return e.getDate()!=null}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachPositionInput(e,(i,o,s,r)=>{!t||o>=r||t&&(t=this.isValidDateValue(i.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),i={},{params:o,filterType:s,beans:r}=this,n=r.dataTypeSvc,a=this.getValues(e),l=o.includeTime??n?.getDateIncludesTimeFlag(o.colDef.cellDataType)??!0,d=o.useIsoSeparator?"T":" ";return a.length>0&&(i.dateFrom=ev(a[0],l,d)),a.length>1&&(i.dateTo=ev(a[1],l,d)),{dateFrom:null,dateTo:null,filterType:s,type:t,...i}}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),i=e("ariaFilterValue","Filter Value");this.forEachInput(o=>{o.setInputPlaceholder(t),o.setInputAriaLabel(i)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:i}=this;return e<0||e>=t.length?[null,null]:[t[e],i[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(i,o,s,r)=>{o<r&&t.push(i.getDate())}),t}translate(e,t){let i=e;return e==="lessThan"?i="before":e==="greaterThan"&&(i="after"),super.translate(i,t)}};import{_getOwn as f7}from"ag-stack";import{_dateToFormattedString as m7,_parseDateTimeFromString as lv}from"ag-stack";var dv=class extends nr{constructor(){super(...arguments),this.filterTypeKeys=rd}formatValue(e=null){const{dataTypeSvc:t,valueSvc:i}=this.beans,o=this.filterParams.column,s=t?.getDateFormatterFunction(o),r=s?s(e??void 0):e;return i.formatValue(o,null,r)??""}conditionToString(e,t,i,o,s){const{type:r}=e,n=lv(e.dateFrom),a=lv(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,d=t?this.formatValue.bind(this):h=>m7(h,l),c=()=>n!==null?d(n):"null",u=()=>a!==null?d(a):"null";if(n==null&&a==null)return Wc(this,r);if(t){const h=this.conditionForToolPanel(r,i,c,u,o,s);if(h!=null)return h}return i?`${c()}-${u()}`:n!=null?d(n):`${r}`}};function C7(e,t){const i=t;return i<e?-1:i>e?1:0}var v7=class extends sd{constructor(){super(rv,dd),this.filterType="date",this.rangeCache=new bC}createModelFormatter(e,t,i){return new dv(e,t,i)}comparator(){return this.params.filterParams.comparator??C7}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}evaluateNonNullValue(e,t,i){const o=i.type;if(!this.isValid(t))return o==="notEqual"||o==="notBlank";const s=o==null?void 0:f7(Wl,o);if(s){const{fromTime:r,toTime:n}=this.rangeCache.getRange(o,s),a=this.params.filterParams.comparator;if(a)return a(new Date(r),t)>=0&&a(new Date(n),t)<0;const l=+t;return l>=r&&l<n}return super.evaluateNonNullValue(e,t,i)}};import{RefPlaceholder as cv,_debounce as w7,_parseDateTimeFromString as S7,_serialiseDate as b7,_setDisplayed as uv}from"ag-stack";var y7={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"}]},R7=class extends JC{constructor(){super(y7,[Ro]),this.eReadOnlyText=cv,this.eDateWrapper=cv,this.filterType="date",this.defaultOptions=dd}createModelFormatter(e,t,i){return new dv(e,t,i)}setParams(e){super.setParams(e),this.createDateComponent();const t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){const i=e?S7(e.dateFrom):null;this.dateComp.setDate(i),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){uv(this.eDateWrapper,e),uv(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){const e=this.dateComp.getDate();if(this.reactive){const t=this.params;t.onUiChange();const i=t.model,o=b7(e),s=o==null?null:{...i??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:o};t.onModelChange(s,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t?.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=qr(this.beans.log,e,this.defaultDebounceMs),i=w7(this,this.onDateChanged.bind(this),t);let o;return G(this.gos,{onDateChanged:()=>{o=i()},onDateCleared:ui(e)?void 0:()=>{clearTimeout(o),this.onDateChanged()},filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:i,params:{column:o}}=this;this.dateComp=new iv(e,t,o.getColDef(),this.getDateComponentParams(),i,s=>{s.setInputAriaLabel(this.getAriaLabel(o))}),this.addDestroyFunc(()=>this.dateComp.destroy())}};import{RefPlaceholder as E7,_isBrowserSafari as x7,_parseDateTimeFromString as cd,_serialiseDate as ud}from"ag-stack";var F7={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},P7=class extends K{constructor(){super(F7,[Ro]),this.eDateInput=E7,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.eDateInput.setClearButtonEnabled(!0).setSearchIcon(!0).onValueClear(()=>this.params.onDateCleared?.()),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){this.eDateInput.setAutoComplete(e.filterParams?.browserAutoComplete);const t=this.eDateInput.getInputElement(),i=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=i&&x7();const{minValidYear:o,maxValidYear:s,minValidDate:r,maxValidDate:n,buttons:a}=e.filterParams||{},l=this.includesTime(e);i?l?(this.eDateInput.setInputType("datetime-local"),t.step="1"):this.eDateInput.setInputType("date"):this.eDateInput.setInputType("text");const d=hv(this.beans.log,r,o,!0),c=hv(this.beans.log,n,s,!1);d&&c&&d.getTime()>c.getTime()&&this.beans.log.warn(87),d&&(t.min=ud(d,l)),c&&(t.max=ud(c,l)),this.isApply=e.location==="floatingFilter"&&!!a?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return cd(this.eDateInput.getValue())}setDate(e){this.eDateInput.setValue(ud(e,this.includesTime(this.params)))}includesTime(e){const{includeTime:t,colDef:i}=e.filterParams||{};return t??this.beans.dataTypeSvc?.getDateIncludesTimeFlag?.(i?.cellDataType)??!1}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 hv(e,t,i,o){return t&&i&&e.warn(o?85:86),t instanceof Date?t:t?cd(t):i?cd(`${i}-${o?"01-01":"12-31"}`):null}var hd=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function lr(e){return e?.allowedCharPattern??null}function Ao(e){const t=e?.filterInputType;return t?t==="text":e?.allowedCharPattern!=null||e?.numberFormatter!=null}function gv(e,t,i,o){if(typeof t=="number")return t;const s=t?.trim()??"",r=s===""?null:t??null;return e?e(r,Ei(i,o,"columnFilter")):r==null||s==="-"?null:Number.parseFloat(r)}function dr(e){return e==null||isNaN(e)?null:e}function pv(e,t){const{filter:i,filterTo:o,type:s}=e||{};return[dr(i),dr(o)].slice(0,ii(s,t))}var D7=class extends WC{constructor(){super("numberFilter",pv,hd),this.filterType="number"}getRenderChange(e,t){if(Ao(e)!==Ao(t)||lr(e)!==lr(t))return"rebuild";if(e.numberParser!==t?.numberParser||e.numberFormatter!==t?.numberFormatter)return"rerender"}parseText(e,t){return dr(gv(t?.numberParser,e,this.gos,this.params.column))}getValueFormatter(){return Do(this.params.numberFormatter,this.gos,this.params.column,"columnFilter")}createInputWidget(){const e=this.params;return Ao(e)?this.createTextInput():this.createBean(new js({clearButton:!0,searchIcon:!0,autoComplete:e.browserAutoComplete}))}refreshInputPairValidation(e,t,i,o){let s="";if(o>=2){const r=this.readValue(e,!0),n=this.readValue(t,!0),a=$l(r,n,i,this.params.inRangeInclusive);s=a?this.translate(a,[String(i?n:r)]):""}(i?e:t).setCustomValidity(s),(i?t:e).setCustomValidity(""),s.length>0&&this.beans.ariaAnnounce.announceValue(s,"filterValidation")}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),i={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(i.filter=o[0]),o.length>1&&(i.filterTo=o[1]),i}},fv=class extends nr{constructor(){super(...arguments),this.filterTypeKeys=rd}getValueFormatter(){return Do(this.filterParams.numberFormatter,this.gos,this.column,"columnFilter")}conditionToString(e,t,i,o,s){const{filter:r,filterTo:n,type:a}=e,l=this.formatValue.bind(this);if(t){const d=this.conditionForToolPanel(a,i,()=>l(r),()=>l(n),o,s);if(d!=null)return d}return i?`${l(r)}-${l(n)}`:r!=null?l(r):`${a}`}},M7=class extends sd{constructor(){super(pv,hd),this.filterType="number"}createModelFormatter(e,t,i){return new fv(e,t,i)}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}};import{_getActiveDomElement as T7}from"ag-stack";var A7=class extends y{constructor(e){super(),this.onInputCreated=e,this.onValueChanged=()=>{},this.onValueCleared=()=>{},this.numberInputActive=!0}setupGui(e){const t=this.createManagedBean(new js({clearButton:!0,onValueClear:()=>this.onValueCleared()}));this.eNumberInput=t,this.onInputCreated?.(t);const i=this.createManagedBean(new lt({clearButton:!0,onValueClear:()=>this.onValueCleared()}));this.eTextInput=i,i.setDisabled(!0);const o=t.getGui(),s=i.getGui();e.appendChild(o),e.appendChild(s),this.setupListeners(o,r=>this.onValueChanged(r)),this.setupListeners(s,r=>this.onValueChanged(r))}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)}isFocused(){return T7(this.beans)===this.getActiveInputElement().getInputElement()}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}getInputText(){return this.getActiveInputElement().getInputElement().value}setValueChangedListener(e){this.onValueChanged=e}setValueClearedListener(e){this.onValueCleared=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams({ariaLabel:e,autoComplete:t,placeholder:i}){this.setAriaLabel(e),this.setAutoComplete(t),this.setPlaceholder(this.eNumberInput,i),this.setPlaceholder(this.eTextInput,i)}setPlaceholder(e,t){e.setSearchIcon(!!t),e.setInputPlaceholder(t)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},I7=class extends ld{constructor(){super(...arguments),this.filterType="number",this.defaultOptions=hd}createModelFormatter(e,t,i){return new fv(e,t,i)}updateParams(e){const t=e.filterParams;(lr(t)!==this.allowedCharPattern||Ao(t)!==this.isTextInput)&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){const t=e.filterParams,i=lr(t);this.allowedCharPattern=i;const o=Ao(t);this.isTextInput=o;const s=r=>Jl(r,i,this.beans);return this.createManagedBean(o?new nd(s):new A7(s))}convertValue(e){const{gos:t,params:i}=this,o=i.filterParams?.numberParser;return dr(gv(o,e,t,i.column))}};import{_makeNull as k7}from"ag-stack";var gd=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],L7=class extends td{constructor(){super("textFilter",YC,gd),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),i={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(i.filter=o[0]),o.length>1&&(i.filterTo=o[1]),i}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:i}=this;return e>=t.length?[null,null]:[t[e],i[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(i,o,s,r)=>{o<r&&t.push(k7(i.getValue()))}),t}createEValue(){const e=V({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:i}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,i,"to"),e}createFromToElement(e,t,i){const o=this.createManagedBean(new lt({clearButton:!0,searchIcon:!0,autoComplete:this.params.browserAutoComplete}));o.addCss(`ag-filter-${i}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui())}removeEValues(e,t){const i=r=>this.removeComponents(r,e,t),{eValuesFrom:o,eValuesTo:s}=this;i(o),i(s)}};import{_getOwn as mv}from"ag-stack";var Cv=class extends nr{constructor(){super(...arguments),this.filterTypeKeys=JA}conditionToString(e,t,i,o,s){const{filter:r,filterTo:n,type:a}=e;if(t){const l=c=>()=>ke(this,"filterSummaryTextQuote",[c]),d=this.conditionForToolPanel(a,i,l(r),l(n),o,s);if(d!=null)return d}return i?`${r}-${n}`:r!=null?`${r}`:`${a}`}},vv=({filterOption:e,value:t,filterText:i})=>{if(i==null||t==null)return!1;const o=e==null?void 0:mv(ad,e);return o?o(t,i):!1},V7=e=>e,H7=class extends KC{constructor(){super(YC,gd),this.filterType="text"}createModelFormatter(e,t,i){return new Cv(e,t,i)}updateParams(e){super.updateParams(e);const t=e.filterParams,i=t.textFormatter;this.matcher=t.textMatcher??vv,this.textFormatter=i&&(o=>o==null?null:i(o,Ei(this.beans.gos,e.column,"columnFilter"))),this.formatter=this.textFormatter??(t.caseSensitive?V7:ZC)}isUnmatchable(e){return this.matcher===vv&&(e==null||!mv(ad,e))}evaluateNullValue(e){return e!=="blank"&&e!=="notBlank"&&this.isUnmatchable(e)?(this.warnUnexpectedFilterType(e),!1):e==="notEqual"||e==="notContains"||e==="blank"}evaluateNonNullValue(e,t,i,o){const s=e.map(g=>this.formatter(g))||[],r=this.formatter(t),{api:n,colDef:a,column:l,context:d}=this.params,c=i.type;if(c==="blank")return To(t);if(c==="notBlank")return yC(t);if(this.isUnmatchable(c))return this.warnUnexpectedFilterType(c),!1;const u=this.matcher,h={api:n,colDef:a,column:l,context:d,node:o.node,data:o.data,filterOption:c,value:r,textFormatter:this.textFormatter,source:"columnFilter"};return s.some(g=>u({...h,filterText:g}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=i=>{const o={...i},{filter:s,filterTo:r}=i;return s&&(o.filter=ar(s)??null),r&&(o.filterTo=ar(r)??null),o};return Ur(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},B7=class extends ld{constructor(){super(...arguments),this.filterType="text",this.defaultOptions=gd}createModelFormatter(e,t,i){return new Cv(e,t,i)}createFloatingFilterInputService(){return this.createManagedBean(new nd)}};function O7(e){return!!e.quickFilter?.isFilterPresent()}function G7(e){return e.quickFilter?.getText()}function N7(e){e.quickFilter?.resetCache()}import{_exists as cr}from"ag-stack";var _7=class extends y{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",i=>this.setFilter(i.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){const{autoColSvc:e,colModel:t,gos:i,pivotResultCols:o}=this.beans,s=t.pivotMode,r=e?.columns,n=t.colDefList;let a=(s&&!i.get("applyQuickFilterBeforePivotOrAgg")?o?.pivotCols:n)??[];r?.length&&(a=a.concat(r)),this.colsToUse=i.get("includeHiddenColumnsInQuickFilter")?a:a.filter(l=>l.visible||l.rowGroupActive)}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(i=>t?this.doesRowPassCache(e,i):this.doesRowPassNoCache(e,i))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}getState(){const e=this.getText()||void 0;return e?{text:e}:void 0}setState({text:e},t){if(e!==void 0){this.stateSource=t;try{this.gos.updateGridOptions({options:{quickFilterText:e}})}finally{this.stateSource=void 0}}}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return cr(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){this.warn(70,{newFilter:e});return}const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged",source:this.stateSource}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),i=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,i&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(i=>{const o=this.getTextForColumn(i,e);return cr(o)&&o.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let i;e?(this.checkGenerateAggText(t),i=t.quickFilterAggregateText):i=this.getAggText(t);const{quickFilterParts:o,matcher:s}=this;return s(o,i)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let i=this.beans.filterValueSvc.getValue(e,t);const o=e.colDef;if(o.getQuickFilterText){const s=G(this.gos,{value:i,node:t,data:t.data,column:e,colDef:o});i=o.getQuickFilterText(s)}return cr(i)?i.toString().toUpperCase():null}getAggText(e){const t=[];for(const i of this.colsToUse){const o=this.getTextForColumn(i,e);cr(o)&&t.push(o)}return t.join(`
`)}},ur={moduleName:"FilterCore",version:E,beans:[RA],apiFunctions:{isAnyFilterPresent:SA,onFilterChanged:bA},css:[y8]},pd={moduleName:"FilterValue",version:E,beans:[zA]},xi={moduleName:"ColumnFilter",version:E,beans:[wA,_A],dynamicBeans:{headerFilterCellCtrl:m8},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:R8,getColumnFilterInstance:E8,destroyFilter:x8,setFilterModel:F8,getFilterModel:P8,getColumnFilterModel:D8,setColumnFilterModel:M8,showColumnFilter:T8,hideColumnFilter:A8,getColumnFilterHandler:I8,doFilterAction:k8},dependsOn:[ur,yo,pd,hC]},wv={moduleName:"CustomFilter",version:E,userComponents:{agReadOnlyFloatingFilter:qA},dependsOn:[xi]},Sv={moduleName:"TextFilter",version:E,dependsOn:[xi],userComponents:{agTextColumnFilter:{classImp:L7,params:{useForm:!0}},agTextColumnFloatingFilter:B7},dynamicBeans:{agTextColumnFilterHandler:H7}},bv={moduleName:"NumberFilter",version:E,dependsOn:[xi],userComponents:{agNumberColumnFilter:{classImp:D7,params:{useForm:!0}},agNumberColumnFloatingFilter:I7},dynamicBeans:{agNumberColumnFilterHandler:M7}},yv={moduleName:"BigIntFilter",version:E,dependsOn:[xi],userComponents:{agBigIntColumnFilter:{classImp:YA,params:{useForm:!0}},agBigIntColumnFloatingFilter:a7},dynamicBeans:{agBigIntColumnFilterHandler:XA}},Rv={moduleName:"DateFilter",version:E,dependsOn:[xi],userComponents:{agDateColumnFilter:{classImp:p7,params:{useForm:!0}},agDateInput:P7,agDateColumnFloatingFilter:R7},dynamicBeans:{agDateColumnFilterHandler:v7}},z7={moduleName:"QuickFilterCore",version:E,rowModels:["clientSide"],beans:[_7],dependsOn:[ur,pd]},Ev={moduleName:"QuickFilter",version:E,apiFunctions:{isQuickFilterPresent:O7,getQuickFilter:G7,resetQuickFilter:N7},dependsOn:[z7]},xv={moduleName:"ExternalFilter",version:E,dependsOn:[ur]};import{_jsonEquals as W7}from"ag-stack";import{_exists as U7}from"ag-stack";import{_exists as q7,_missing as $7}from"ag-stack";var K7=class extends y{constructor(e,t,i){super(),this.id=e,this.parentCache=t,this.params=i,this.state="needsLoading",this.version=0,this.startRow=e*i.blockSize,this.endRow=this.startRow+i.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,i){this.successCommon(e,{rowData:t,rowCount:i})}isRequestMostRecentAndLive(e){const t=e===this.version,i=this.isAlive();return t&&i}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:i,beans:o,rowNodes:s}=this;for(let r=0;r<e;r++){const n=i+r,a=new Ue(o);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(n),a.setRowTop(t*n),s.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:i,state:o}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:i,pageStatus:o}}}setDataAndId(e,t,i){q7(t)?e.setDataAndId(t,i.toString()):e.setDataAndId(void 0,void 0),this.beans.selectionSvc?.updateRowSelectable(e)}loadFromDatasource(){const e=this.createLoadParams();if($7(this.params.datasource.getRows)){this.warn(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:i,params:{sortModel:o,filterModel:s},gos:r}=this;return G(r,{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,i),failCallback:this.pageLoadFailed.bind(this,i),sortModel:o,filterModel:s})}forEachNode(e,t,i){this.rowNodes.forEach((o,s)=>{this.startRow+s<i&&e(o,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const i=e-this.startRow;return this.rowNodes[i]}processServerResult(e){const{rowNodes:t,beans:i}=this;t.forEach((s,r)=>{const n=e.rowData?e.rowData[r]:void 0;!s.id&&s.alreadyRendered&&n&&(t[r]=new Ue(i),t[r].setRowIndex(s.rowIndex),t[r].setRowTop(s.rowTop),t[r].setRowHeight(s.rowHeight),s._destroy(!0)),this.setDataAndId(t[r],n,this.startRow+r)});const o=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,o)}destroy(){const e=this.rowNodes;for(let t=0,i=e.length;t<i;t++)e[t]._destroy(!1);e.length=0,super.destroy()}},j7=2,Q7=class extends y{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const i=Math.floor(e/this.params.blockSize);let o=this.blocks[i];if(!o){if(t)return;o=this.createBlock(i)}return o.getRow(e)}createBlock(e){const t=this.params,i=this.createBean(new K7(e,this,t));return this.blocks[i.id]=i,this.blockCount++,this.purgeBlocksIfNeeded(i),t.rowNodeBlockLoader.addBlock(i),i}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()&&(St(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(n=>n!=e),i=(n,a)=>a.lastAccessed-n.lastAccessed;t.sort(i);const o=this.params.maxBlocksInCache>0,s=o?this.params.maxBlocksInCache-1:null,r=j7-1;t.forEach((n,a)=>{const l=n.state==="needsLoading"&&a>=r,d=o?a>=s:!1;if(l||d){if(this.isBlockCurrentlyDisplayed(n)||this.isBlockFocused(n))return;this.removeBlockFromCache(n)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:i,endRow:o}=e;return t.rowIndex>=i&&t.rowIndex<o}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:i}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,i-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:i,overflowSize:o}=this.params,r=(e.id+1)*i+o;this.rowCount<r&&(this.rowCount=r)}}setRowCount(e,t){this.rowCount=e,U7(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const i of this.getBlocksInOrder())i.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(i,o)=>i.id-o.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 i=[];let o=-1,s=!1;const r={value:0};let n=!1;for(const l of this.getBlocksInOrder())if(!n){if(s&&o+1!==l.id){n=!0;continue}o=l.id,l.forEachNode(d=>{const c=d===e||d===t;(s||c)&&i.push(d),c&&(s=!s)},r,this.rowCount)}return n||s?[]:i}},Z7=class extends y{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 Ue(e);this.rootNode=t,t.level=-1,this.rowHeight=Ne(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)}),Mi(this,()=>this.refreshRowHeight()),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeight())}refreshRowHeight(){const e=Ne(this.beans);e!==this.rowHeight&&(this.rowHeight=e,this.cacheParams&&(this.cacheParams.rowHeight=e),this.updateRowHeights())}onColumnEverything(){let e;this.cacheParams?e=!W7(this.cacheParams.sortModel,ea(this.beans.sortSvc)):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;At(this.beans)!=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:i,rowNodeBlockLoader:o,eventSvc:s,gos:r}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:ea(i),rowNodeBlockLoader:o,initialRowCount:r.get("infiniteInitialRowCount"),maxBlocksInCache:r.get("maxBlocksInCache"),rowHeight:Ne(e),overflowSize:r.get("cacheOverflowSize"),blockSize:r.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new Q7(this.cacheParams)),s.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}forEachNode(e){this.infiniteCache?.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),i=this.getRowCount()-1;return t>i?i:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache?.refreshCache()}purgeCache(){this.infiniteCache?.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?.isLastRowIndexKnown()??!1}setRowCount(e,t){this.infiniteCache?.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function Y7(e){Qo(e)?.refreshCache()}function J7(e){Qo(e)?.purgeCache()}function X7(e){return Qo(e)?.getRowCount()}import{_debounce as eI,_removeFromArray as tI}from"ag-stack";var iI=class extends y{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=qd(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=eI(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){tI(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){St(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(i=>i.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const i of t)i.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:i,state:o}=t.getBlockStateJson();e[i]=o}),e}printCacheStatus(){St(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},oI={moduleName:"InfiniteRowModelCore",version:E,rowModels:["infinite"],beans:[Z7,iI]},Fv={moduleName:"InfiniteRowModel",version:E,apiFunctions:{refreshInfiniteCache:Y7,purgeInfiniteCache:J7,getInfiniteRowCount:X7},dependsOn:[oI,Wh]},sI=class extends y{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addListener(e,t){const i=this.wrapSvc?.wrap(e,t)??t,o=!Co.has(e),s=o?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(i),this.eventSvc.addListener(e,i,o)}removeListener(e,t){const i=this.wrapSvc?.unwrap(e,t)??t,s=!!this.asyncListeners.get(e)?.delete(i);s||this.syncListeners.get(e)?.delete(i),this.eventSvc.removeListener(e,i,s)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,i=(r,n)=>{Co.has(r)&&t(r,n)},o=(r,n)=>{Co.has(r)||t(r,n)};this.globalListenerPairs.set(e,{syncListener:i,asyncListener:o});const s=this.eventSvc;s.addGlobalListener(i,!1),s.addGlobalListener(o,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:i,globalListenerPairs:o}=this,s=i?.unwrapGlobal(e)??e;if(o.has(s)){const{syncListener:n,asyncListener:a}=o.get(s);t.removeGlobalListener(n,!1),t.removeGlobalListener(a,!0),o.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((i,o)=>{i.forEach(s=>this.eventSvc.removeListener(o,s,t)),i.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const i of e)this.eventSvc.removeGlobalListener(i,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:i,asyncListener:o})=>{t.removeGlobalListener(i,!1),t.removeGlobalListener(o,!0)}),e.clear()}};function rI(e,t,i){e.apiEventSvc?.addListener(t,i)}function nI(e,t,i){e.apiEventSvc?.removeListener(t,i)}function aI(e,t){e.apiEventSvc?.addGlobalListener(t)}function lI(e,t){e.apiEventSvc?.removeGlobalListener(t)}var Pv={moduleName:"EventApi",version:E,apiFunctions:{addEventListener:rI,addGlobalListener:aI,removeEventListener:nI,removeGlobalListener:lI},beans:[sI]};import{_getLocaleTextFromFunc as dI,_getLocaleTextFromMap as cI}from"ag-stack";var Dv=class extends y{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");return t?dI(t):cI(e.get("localeText"))}},Mv={moduleName:"Locale",version:E,beans:[Dv]},Tv=class extends y{constructor(){super(...arguments),this.beanName="userColumnSvc",this.entries=new Map,this.owners=[],this.ownedProperties=null,this.declaredDefs=new Map}registerOwner(e,t){this.owners.push(e);const i=this.ownedProperties??new Set;for(let o=0,s=t.length;o<s;++o)i.add(t[o]);this.ownedProperties=i}isActive(){const e=this.owners;for(let t=0,i=e.length;t<i;++t)if(e[t]())return!0;return!1}getDeclaredDef(e){const t=this.beans.colModel.colDefs??null;if(this.declaredDefsSource!==t){const i=new Map;hI(t,i),this.declaredDefs=i,this.declaredDefsSource=t}return this.declaredDefs.get(e)}isDeclared(e){return this.getDeclaredDef(e)!==void 0}getEntry(e){return this.entries.get(e)}forEachEntry(e){this.entries.forEach(e)}hasEntries(){return this.entries.size>0}setCreatedColumn(e,t,i){this.entries.set(e,{properties:t,parentGroupId:i,created:!0})}setOverride(e,t){this.entries.set(e,{properties:t})}removeColumn(e,t){t?this.entries.set(e,{removed:!0}):this.entries.delete(e)}clearColumn(e){this.entries.delete(e)}clear(){const{entries:e}=this;return this.declaredDefsSource=void 0,e.size?(e.clear(),!0):!1}overrideFor(e){const t=e.colId??e.field;if(t==null)return;const i=this.entries.get(t);if(i!==void 0&&this.isActive()){if(i.removed)return null;if(!i.created)return i.properties?{...e,...i.properties}:void 0}}getState(){const e=this.entries;if(!e.size)return;const t=[];return e.forEach((i,o)=>{if(i.removed){t.push({colId:o,removed:!0});return}const{parentGroupId:s,created:r}=i;t.push(r?{colId:o,created:r,parentGroupId:s??null,properties:Av(i.properties)}:{colId:o,properties:Av(i.properties)})}),t}setState(e){const t=this.entries,i=new Map;for(let o=0,s=e?.length??0;o<s;++o){const r=e[o],{colId:n}=r;n!=null&&(r.removed?i.set(n,{removed:!0}):r.created?i.set(n,{properties:this.acceptProperties(r.properties),parentGroupId:r.parentGroupId??null,created:!0}):this.isDeclared(n)&&i.set(n,{properties:this.acceptProperties(r.properties)}))}return uI(t,i)?!1:(t.clear(),i.forEach((o,s)=>t.set(s,o)),!0)}acceptProperties(e){const t=this.ownedProperties,i={};for(let o=0,s=e?.length??0;o<s;++o){const{property:r,value:n}=e[o];(t?t.has(r)&&typeof n!="function":r!=null)&&(i[r]=n)}return i}},Av=e=>{if(!e)return[];const t=Object.keys(e),i=[];for(let o=0,s=t.length;o<s;++o){const r=t[o],n=e[r];typeof n!="function"&&i.push({property:r,value:n})}return i},uI=(e,t)=>{if(e.size!==t.size)return!1;for(const[i,o]of e){const s=t.get(i);if(s===void 0||!!o.removed!=!!s.removed||!!o.created!=!!s.created||o.parentGroupId!==s.parentGroupId||!si(o.properties??{},s.properties??{}))return!1}return!0},hI=(e,t)=>{e&&Nr(e,i=>{const o=i.colId??i.field;o!=null&&!t.has(o)&&t.set(o,i)})};function gI(e){return e.stateSvc?.getState()??{}}function pI(e,t,i){return e.stateSvc?.setState(t,i)}import{_debounce as fd,_hasOwn as fI,_jsonEquals as Iv}from"ag-stack";function kv(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=mI(e)),e.version=E,e}function mI(e){return e.cellSelection=CI(e,"rangeSelection"),e}function CI(e,t){if(e&&typeof e=="object")return e[t]}var vI=class extends y{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=fd(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=fd(this,()=>this.updateGroupExpansionState(),0),this.onRowSelectedDebounced=fd(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:i}=this.beans;this.isClientSideRowModel=ae(e);const o=kv(e.get("initialState")??{}),s=o.partialColumnState;delete o.partialColumnState,this.cachedState=o;const r=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>r(()=>this.setupStateOnGridReady(o))),(o.columnOrder||o.columnVisibility||o.columnSizing||o.columnPinning||o.columnGroup)&&i?.hideColumns("columnState");const[n,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:d})=>{d==="gridInitializing"&&(n(),r(()=>{this.setupStateOnColumnsInitialised(o,!!s),i?.revealColumns("columnState")}))},rowCountReady:()=>{a?.(),r(()=>this.setupStateOnRowCountReady(o))},firstDataRendered:()=>{l?.(),r(()=>this.setupStateOnFirstDataRendered(o))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const i=kv(e);delete i.partialColumnState,this.cachedState=i,this.startSuppressEvents();const o="api",s=t?new Set(t):void 0;this.setGridReadyState(i,o,s),this.setColumnsInitialisedState(i,o,!!s,s),this.setRowCountState(i,o,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(i,o,s),this.stopSuppressEvents(o)})}setGridReadyState(e,t,i){t==="api"&&!i?.has("sideBar")&&this.beans.sideBar?.comp?.setState(e.sideBar),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","columnHeaderName","pivot","rowGroup","showValuesAs","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState()),this.updateCachedState("userColumns",this.beans.userColumnSvc.getState())}setColumnsInitialisedState(e,t,i,o){this.setUserColumnsState(e,t,o),this.applyColumnGridState(e,t,i,o),this.setColumnGroupState(e,t,o),this.updateColumnAndGroupState()}setUserColumnsState(e,t,i){if(i?.has("userColumns")||!e.userColumns&&t!=="api")return;const{userColumnSvc:o,calculatedColsSvc:s,colModel:r}=this.beans,n=o.setState(e.userColumns),a=s?.adoptUserColumns()??!1;!n&&!a||(s?s.refreshDynamicColumns(t):r.rebuildCols(t))}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const i=o=>()=>this.updateColumnState([o]);this.addManagedEventListeners({columnValueChanged:i("aggregation"),columnMoved:i("columnOrder"),columnPinned:i("columnPinning"),columnResized:i("columnSizing"),columnVisible:i("columnVisibility"),columnPivotChanged:i("pivot"),columnPivotModeChanged:i("pivot"),columnRowGroupChanged:i("rowGroup"),columnShowValuesAsChanged:i("showValuesAs"),sortChanged:i("sort"),newColumnsLoaded:({source:o})=>{this.updateColumnAndGroupState(),o!=="gridInitializing"&&this.isClientSideRowModel&&this.onRowGroupOpenedDebounced()},columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState()),columnHeaderNameChanged:()=>{this.updateColumnState(["columnHeaderName"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}})}setRowCountState(e,t,i){const{filter:o,quickFilter:s,rowGroupExpansion:r,ssrmRowGroupExpansion:n,rowSelection:a,pagination:l,rowPinning:d}=e,c=(h,g)=>!i?.has(h)&&(g||t==="api");c("filter",o)&&this.setFilterStateDeferringPivot(o,t),c("quickFilter",s)&&this.setQuickFilterState(s,t),(c("rowGroupExpansion",r)||c("ssrmRowGroupExpansion",n))&&this.setRowGroupExpansionState(n,r,t),c("rowSelection",a)&&this.setRowSelectionState(a,t),c("pagination",l)&&this.setPaginationState(l,t),c("rowPinning",d)&&this.setRowPinningState(d);const u=this.updateCachedState.bind(this);u("filter",this.getFilterState()),u("quickFilter",this.getQuickFilterState()),this.updateGroupExpansionState(),u("rowSelection",this.getRowSelectionState()),u("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),i=()=>{this.updateRowGroupExpansionStateTimer=0,this.updateGroupExpansionState()},o=()=>t("filter",this.getFilterState());this.addManagedPropertyListener("quickFilterText",()=>t("quickFilter",this.getQuickFilterState()));const{gos:s,colFilter:r,selectableFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:o,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:i,columnRowGroupChanged:i,rowDataUpdated:()=>{(s.get("groupDefaultExpanded")!==0||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(i)))},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:o}),n&&this.addManagedListeners(n,{selectedFilterChanged:o})}setFirstDataRenderedState(e,t,i){const{scroll:o,cellSelection:s,find:r,focusedCell:n,columnOrder:a}=e,l=(h,g)=>!i?.has(h)&&(g||t==="api");l("focusedCell",n)&&this.setFocusedCellState(n),l("cellSelection",s)&&this.setCellSelectionState(s),this.setColumnPivotState(!!a?.orderedColIds,t);const d=this.deferredFilterState;d&&(this.deferredFilterState=void 0,this.setFilterState(d,t)),l("find",r)&&this.setFindState(r,t),l("scroll",o)&&this.setScrollState(o);const c=this.updateCachedState.bind(this);c("sideBar",this.getSideBarState()),c("focusedCell",this.getFocusedCellState());const u=this.getRangeSelectionState();c("rangeSelection",u),c("cellSelection",u),c("scroll",this.getScrollState()),c("find",this.getFindState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),i=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:i,cellFocusCleared:i,cellSelectionChanged:o=>{if(o.finished){const s=this.getRangeSelectionState();t("rangeSelection",s),t("cellSelection",s)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),findChanged:()=>t("find",this.getFindState())})}getColumnGridState(){const e=this.beans;return Sf(mc(e),e.colModel.pivotMode)}applyColumnGridState(e,t,i,o){const{sort:s,rowGroup:r,aggregation:n,showValuesAs:a,pivot:l,columnPinning:d,columnVisibility:c,columnSizing:u,columnOrder:h,columnHeaderName:g}=e;let p=!1;const f=(O,_)=>{const Y=!o?.has(O)&&!!(_||t==="api");return p||(p=Y),Y},m=Object.create(null),C=O=>{let _=m[O];return _||(_={colId:O},m[O]=_,_)},v={},S=f("sort",s);if(S&&s){const O=s.sortModel;for(let _=0,Y=O.length;_<Y;++_){const{colId:ee,sort:$,type:Q}=O[_],A=C(ee);A.sort=$,A.sortIndex=_,A.sortType=Q}}(S||!i)&&(v.sort=null,v.sortIndex=null);const w=f("rowGroup",r);if(w&&r){const O=r.groupColIds;for(let _=0,Y=O.length;_<Y;++_){const ee=C(O[_]);ee.rowGroup=!0,ee.rowGroupIndex=_}}(w||!i)&&(v.rowGroup=null,v.rowGroupIndex=null);const b=f("aggregation",n);if(b&&n){const O=n.aggregationModel;for(let _=0,Y=O.length;_<Y;++_){const{colId:ee,aggFunc:$}=O[_],Q=C(ee);Q.aggFunc=$,Q.valueIndex=_}}(b||!i)&&(v.aggFunc=null,v.valueIndex=null);const R=f("showValuesAs",a);if(R&&a){const O=a.showValuesAsModel;for(let _=0,Y=O.length;_<Y;++_){const{colId:ee,showValuesAs:$}=O[_];C(ee).showValuesAs=Oo($)}}(R||!i)&&(v.showValuesAs=null);const x=f("pivot",l);if(x&&l){const O=l.pivotColIds;for(let _=0,Y=O.length;_<Y;++_){const ee=C(O[_]);ee.pivot=!0,ee.pivotIndex=_}for(const{colId:_,sort:Y}of l.pivotSortModel??[])C(_).pivotSort=Y;this.gos.updateGridOptions({options:{pivotMode:!!l.pivotMode},source:t})}(x||!i)&&(v.pivot=null,v.pivotIndex=null);const D=f("columnPinning",d);if(D){for(const O of d?.leftColIds??[])C(O).pinned="left";for(const O of d?.rightColIds??[])C(O).pinned="right"}(D||!i)&&(v.pinned=null);const T=f("columnVisibility",c);if(T)for(const O of c?.hiddenColIds??[])C(O).hide=!0;(T||!i)&&(v.hide=null);const B=f("columnSizing",u);if(B)for(const{colId:O,flex:_,width:Y}of u?.columnSizingModel??[]){const ee=C(O);ee.flex=_??null,ee.width=Y}(B||!i)&&(v.flex=null);const W=f("columnHeaderName",g);if(W)for(const{colId:O,headerName:_}of g?.columnHeaderNames??[])C(O).headerName=_;(W||!i)&&(v.headerName=null);const fe=h?.orderedColIds,ne=!!fe?.length&&!o?.has("columnOrder"),te=ne?fe.map(O=>C(O)):Object.values(m);(te.length||p)&&(this.columnStates=te,et(this.beans,{state:te,applyOrder:ne,defaultState:v},t))}setColumnPivotState(e,t){const i=this.columnStates;this.columnStates=void 0;const o=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:r,colModel:n}=s;if(r?.pivotCols){if(i){const a=[];for(const l of i)n.colsById[l.colId]?.colDef.pivotKeys!=null&&a.push(l);et(s,{state:a,applyOrder:e},t)}o&&Qi(s,o,t)}}getColumnGroupState(){const e=pn(this.beans);return bf(e)}setColumnGroupState(e,t,i){if(i?.has("columnGroup")||t!=="api"&&!fI(e,"columnGroup"))return;const o=new Set(e.columnGroup?.openColumnGroupIds),s=new Map((e.columnGroup?.headerNames??[]).map(({groupId:a,headerName:l})=>[a,l])),n=pn(this.beans).map(({groupId:a})=>{const l=o.has(a);return l&&o.delete(a),{groupId:a,open:l,headerName:s.get(a)??null}});for(const a of o)n.push({groupId:a,open:!0,headerName:s.get(a)??null});n.length&&(this.columnGroupStates=n),Qi(this.beans,n,t)}getFilterState(){const{filterManager:e,selectableFilter:t}=this.beans;let i=e?.getFilterModel();i&&Object.keys(i).length===0&&(i=void 0);const o=e?.getFilterState(),s=e?.getAdvFilterModel()??void 0,r=t?.getState();return i||s||o||r?{filterModel:i,columnFilterState:o,advancedFilterModel:s,selectableFilters:r}:void 0}setFilterState(e,t="api"){const{filterManager:i,selectableFilter:o}=this.beans,{filterModel:s,columnFilterState:r,advancedFilterModel:n,selectableFilters:a}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null,selectableFilters:null};a!==void 0&&o?.setState(a??void 0);const l=t==="api";if(s!==void 0||r!==void 0){const d=l?"api":"columnFilter";i?.setFilterState(s??null,r??null,d)}if(n!==void 0){const d=l?"api":"advancedFilter";i?.setAdvFilterModel(n??null,d)}}isToolbarStateManaged(e){return!!this.beans.toolbar?.hasItem(e)}getQuickFilterState(){return this.isToolbarStateManaged("agQuickFilterToolbarItem")?this.beans.quickFilter?.getState():void 0}setQuickFilterState(e,t="api"){if(!this.isToolbarStateManaged("agQuickFilterToolbarItem"))return;const{text:i}=e??{};this.beans.quickFilter?.setState({text:t==="api"?i??"":i},t==="api"?"api":void 0)}setFilterStateDeferringPivot(e,t){const{colModel:i,pivotResultCols:o}=this.beans,s=e?.filterModel;if(s&&t==="gridInitializing"&&i.pivotMode&&!o?.pivotCols){const r=i.colsById,n=Object.keys(s);for(let a=0,l=n.length;a<l;++a)if(r[n[a]]==null){this.deferredFilterState=e;return}}this.setFilterState(e,t)}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:i,type:o,startRow:s,endRow:r,columns:n,startColumn:a}=t;return{id:i,type:o,startRow:s,endRow:r,colIds:n.map(l=>l.getColId()),startColId:a.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:i,colModel:o,visibleCols:s}=this.beans;if(!_e(t)||!i)return;const r=[];for(const n of e?.cellRanges??[]){const a=[];for(const d of n.colIds){const c=o.colsById[d];c&&a.push(c)}if(!a.length)continue;let l=o.colsById[n.startColId];if(!l){const d=s.allCols,c=new Set(a);l=d.find(u=>c.has(u))}r.push({...n,columns:a,startColumn:l})}i.setCellRanges(r)}getFindState(){return this.isToolbarStateManaged("agFindToolbarItem")?this.beans.findSvc?.getState():void 0}setFindState(e,t="api"){if(!this.isToolbarStateManaged("agFindToolbarItem"))return;const{searchValue:i,activeMatch:o}=e??{};this.beans.findSvc?.setState({searchValue:t==="api"?i??"":i,activeMatch:o})}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:i}=e?.getVScrollPosition()??{top:0};return i||t?{top:i,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:i}=e??{top:0,left:0},{frameworkOverrides:o,rowRenderer:s,animationFrameSvc:r,ctrlsSvc:n}=this.beans;o.wrapIncoming(()=>{n.whenReady(this,()=>{const a=n.getScrollFeature();a?.setHorizontalScrollPosition(i),a?.setVerticalScrollPosition(t),s.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:i,rowPinned:o}=e;return{colId:t.getColId(),rowIndex:i,rowPinned:o}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:i}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:o,rowIndex:s,rowPinned:r}=e;t.setFocusedCell({column:i.colsById[o]??null,rowIndex:s,rowPinned:r,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const i=e.getCurrentPage(),o=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!i&&!o))return{page:i,pageSize:o}}setPaginationState(e,t){const{pagination:i,gos:o}=this.beans;if(!i)return;const{pageSize:s,page:r}=e??{page:0,pageSize:o.get("paginationPageSize")},n=t==="gridInitializing";s&&!o.get("paginationAutoPageSize")&&i.setPageSize(s,n?"initialState":"pageSizeSelector"),typeof r=="number"&&(n?i.setPage(r):i.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,i=e?.getExpansionState(),o=t.get("ssrmExpandAllAffectsAllRows");this.updateCachedState("ssrmRowGroupExpansion",o?i:void 0),this.updateCachedState("rowGroupExpansion",o?void 0:i)}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,i){const o=e??t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};this.beans.expansionSvc?.setExpansionState(o,i)}updateColumnState(e){const t=this.getColumnGridState();let i=!1;const o=this.cachedState;for(const s of Object.keys(t)){const r=t[s];Iv(r,o[s])||(i=!0)}this.cachedState={...o,...t},i&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const i=this.cachedState[e];this.setCachedStateValue(e,t),Iv(t,i)||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")}},Lv={moduleName:"GridState",version:E,beans:[vI,Tv],apiFunctions:{getState:gI,setState:pI}};function wI(e){return e.rowModel.isLastRowIndexKnown()}function SI(e){return e.pagination?.getPageSize()??100}function bI(e){return e.pagination?.getCurrentPage()??0}function yI(e){return e.pagination?.getTotalPages()??1}function RI(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function EI(e){e.pagination?.goToNextPage()}function xI(e){e.pagination?.goToPreviousPage()}function FI(e){e.pagination?.goToFirstPage()}function PI(e){e.pagination?.goToLastPage()}function DI(e,t){e.pagination?.goToPage(t)}import{_debounce as MI}from"ag-stack";var TI=class extends y{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.scrollingRowsCtrl=e.scrolling;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.scrollingRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.scrollingRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,i=()=>{const o=Math.max(Ne(t),1),s=Math.floor(e/o);t.pagination.setPageSize(s,"autoCalculated")};this.isBodyRendered?MI(this,i,50)():(i(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};import{RefPlaceholder as AI,_removeFromParent as II,_scrollHorizontallyToShow as kI}from"ag-stack";import{_areEqual as LI,_clearElement as VI}from"ag-stack";var md="paginationPageSizeSelector",HI={tag:"span",cls:"ag-paging-page-size"},BI=class extends K{constructor(e){super(HI),this.panelParams=e,this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const t=this.selectPageSizeComp.getValue();if(!t)return;const i=Vd(t);i==null||i<1||i===this.pagination.getPageSize()||(this.pagination.setPageSize(i,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}getPageSizeSelectorOption(){return this.panelParams?.paginationPageSizeSelector??this.gos.get(md)}postConstruct(){this.addManagedPropertyListener(md,()=>{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(){VI(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return!this.gos.get("paginationAutoPageSize")&&this.getPageSizeSelectorOption()!==!1}updateVisibility(){const e=this.shouldShowPageSizeSelector();this.toggleSelectDisplay(e),this.setDisplayed(e)}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),i=!t||!e.includes(t);if(i){const s=this.panelParams?.paginationPageSize!=null||this.gos.exists("paginationPageSize"),r=this.getPageSizeSelectorOption()!==!0;this.beans.log.warn(94,{pageSizeSet:s,pageSizesSet:r,pageSizeOptions:e,paginationPageSizeOption:t}),r||this.beans.log.warn(95,{paginationPageSizeOption:t,paginationPageSizeSelector:md}),e.unshift("")}const o=String(i?"":t);this.selectPageSizeComp?(LI(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(o,!0)):this.createPageSizeSelectorComp(e,o),this.hasEmptyOption=i}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const i=this.getLocaleTextFunc(),o=i("pageSizeSelectorLabel","Page Size:"),s=i("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Zs).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(s).setLabel(o).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.getPageSizeSelectorOption();return!Array.isArray(t)||!t?.length?e:[...t].sort((i,o)=>i-o)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}};import{KeyCode as Ze,RefPlaceholder as oi,_setAriaDisabled as OI,_setAriaLabel as GI,_setAriaRole as NI}from"ag-stack";function Cd(e,t,i){const o=t.getCallback("paginationNumberFormatter");return o?o({value:e}):Hd(e,i)}var _I=class extends K{constructor(e,t){super(),this.btFirst=oi,this.btPrevious=oi,this.btNext=oi,this.btLast=oi,this.lbCurrentInput=oi,this.lbCurrentStatic=oi,this.lbTotal=oi,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.ariaStatus="",this.idPrefix=e,this.suppressPageInput=t??!1}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination}postConstruct(){const e=this.getLocaleTextFunc();this.setTemplate(zI(this.idPrefix,this.suppressPageInput,e),this.suppressPageInput?[]:[wl]),WI(this.gos.get("enableRtl"),this.beans,this.btFirst,this.btPrevious,this.btNext,this.btLast),this.initNavButtons(),this.suppressPageInput||this.initPageInput(),this.refresh()}initNavButtons(){const{btFirst:e,btPrevious:t,btNext:i,btLast:o}=this;this.activateTabIndex([e,t,i,o]);for(const{el:s,fn:r}of[{el:e,fn:this.onBtFirst.bind(this)},{el:t,fn:this.onBtPrevious.bind(this)},{el:i,fn:this.onBtNext.bind(this)},{el:o,fn:this.onBtLast.bind(this)}])this.addManagedListeners(s,{click:r,keydown:n=>{(n.key===Ze.ENTER||n.key===Ze.SPACE)&&(n.preventDefault(),r())}})}initPageInput(){const{lbCurrentInput:e,pagination:t}=this,i=e.getInputElement();NI(i,"spinbutton"),this.addManagedListeners(i,{keydown:o=>{const{key:s}=o;if(s!==Ze.ENTER&&s!==Ze.ESCAPE&&s!==Ze.UP&&s!==Ze.DOWN)return;o.preventDefault();let r=null;const n=t.getCurrentPage(),a=t.getTotalPages();switch(s){case Ze.ENTER:this.commitPageInput();break;case Ze.ESCAPE:e.setValue(String(this.getDisplayPageNumber()),!0),i.blur();break;case Ze.UP:n+2<=a&&(r=n+2);break;case Ze.DOWN:n!==0&&(r=n);break}r!==null&&(e.setValue(String(r),!0),this.commitPageInput())},blur:()=>this.commitPageInput()})}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}commitPageInput(){const{pagination:e,lbCurrentInput:t}=this,i=t.getValue(!0);if(!i?.trim()){t.setValue(String(this.getDisplayPageNumber()),!0);return}const o=Number(i),s=e.getTotalPages();if(!(Number.isFinite(o)&&Number.isInteger(o)&&o>=1&&o<=s)){t.setValue(String(this.getDisplayPageNumber()),!0);return}e.goToPage(o-1)}getDisplayPageNumber(){const{rowModel:e,pagination:t}=this;return t.getTotalPages()>0?t.getCurrentPage()+1:e.isLastRowIndexKnown()?0:1}refresh(){this.enableOrDisableButtons(),this.updateLabels()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),i=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const o=t&&i===0,s=e===i-1;this.nextButtonDisabled=s||o,this.lastButtonDisabled=!t||o||s,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){OI(e,t),e.classList.toggle("ag-disabled",t)}updateLabels(){const{rowModel:e,pagination:t,lbCurrentInput:i,lbCurrentStatic:o,lbTotal:s}=this,r=e.isLastRowIndexKnown(),n=t.getTotalPages(),a=this.getLocaleTextFunc();let l;r?l=this.formatNumber(n):l=a("more","more"),s.textContent=l;const d=this.getDisplayPageNumber(),c=this.formatNumber(d);if(this.suppressPageInput)o.textContent=c;else{const g=Math.max(d,n);i.setMin(Math.min(1,d)),i.setMax(g),i.getInputElement().style.width=`${Math.floor(Math.log10(Math.max(1,g)))+3.5}ch`,i.setValue(d.toString());const p=i.getInputElement();GI(p,`${a("page","Page")} ${a("number","number")}, ${d} ${a("of","of")} ${l}`),p.setAttribute("aria-valuenow",String(d)),p.setAttribute("aria-valuemin",String(Math.min(1,d))),p.setAttribute("aria-valuemax",String(g))}const u=a("page","Page"),h=a("of","of");this.ariaStatus=`${u} ${c} ${h} ${l}`}formatNumber(e){return Cd(e,this.gos,this.getLocaleTextFunc.bind(this))}};function zI(e,t,i){const o={cls:"ag-paging-number",attrs:{id:`${e}-start-page-number`},tag:t?"span":"ag-input-number-field",ref:t?"lbCurrentStatic":"lbCurrentInput"};return{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":i("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":i("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${e}-start-page`},children:i("page","Page")},o,{tag:"span",attrs:{id:`${e}-of-page`},children:i("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${e}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":i("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":i("lastPage","Last Page")}}]}}function WI(e,t,i,o,s,r){i.insertAdjacentElement("afterbegin",X(e?"last":"first",t)),o.insertAdjacentElement("afterbegin",X(e?"next":"previous",t)),s.insertAdjacentElement("afterbegin",X(e?"previous":"next",t)),r.insertAdjacentElement("afterbegin",X(e?"first":"last",t))}var UI=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;height:var(--ag-pagination-panel-height);overflow:auto hidden;scrollbar-width:thin}.ag-paging-panel-content{align-items:center;display:flex;flex:0 0 auto;gap:calc(var(--ag-spacing)*4);justify-content:flex-end;min-width:100%;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}:where(.ag-number-field).ag-paging-number{display:inline-block}:where(.ag-number-field.ag-paging-number) .ag-input-field-input{text-align:end}.ag-paging-number,.ag-paging-row-summary-panel-number{font-variant-numeric:tabular-nums;font-weight:500}.ag-paging-description{line-height:0}.ag-paging-row-summary-panel{display:inline-grid}.ag-paging-row-summary-panel:before{content:var(--ag-internal-pagination-width-string);font-variant-numeric:tabular-nums;font-weight:500;grid-area:1/1;visibility:hidden}.ag-paging-row-summary-content{grid-area:1/1;justify-self:center}";import{RefPlaceholder as vd}from"ag-stack";var qI=class extends K{constructor(e){super(),this.lbFirstRowOnPage=vd,this.lbLastRowOnPage=vd,this.lbRecordCount=vd,this.ariaStatus="",this.idPrefix=e}wireBeans(e){this.pagination=e.pagination}postConstruct(){const e=this.idPrefix,t=this.getLocaleTextFunc();this.setTemplate({tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",cls:"ag-paging-row-summary-content",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${e}-first-row`}},{tag:"span",attrs:{id:`${e}-to`},children:t("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${e}-last-row`}},{tag:"span",attrs:{id:`${e}-of`},children:t("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${e}-row-count`}}]}]}),this.refresh()}isZeroPages(){return this.beans.rowModel.isLastRowIndexKnown()&&this.pagination.getTotalPages()===0}refresh(){const{pagination:e,beans:{rowModel:t},gos:i}=this,o=t.isLastRowIndexKnown(),s=e.getMasterRowCount(),r=o?s:null,n=e.getCurrentPage(),a=e.getPageSize(),l=this.getLocaleTextFunc();let d,c;this.isZeroPages()?d=c=0:(d=a*n+1,c=d+a-1,o&&c>r&&(c=r));const u=d+a-1,h=!o&&s<u,g=w=>Cd(w,i,this.getLocaleTextFunc.bind(this)),p=g(d);this.lbFirstRowOnPage.textContent=p;let f;h?f=l("pageLastRowUnknown","?"):f=g(c),this.lbLastRowOnPage.textContent=f;let m;o?m=g(r):m=l("more","more"),this.lbRecordCount.textContent=m;const C=l("to","to"),v=l("of","of");this.ariaStatus=`${p} ${C} ${f} ${v} ${m}`;const S=w=>w.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\s+/g," ");this.getGui().style.setProperty("--ag-internal-pagination-width-string",`'${m} ${S(C)} ${m} ${S(v)} ${m}'`.replaceAll(/\d/g,"0"))}},$I=["pageSize","rowSummary","pageSummary"],KI=class extends Hn{constructor(){super(),this.eContent=AI,this.hasVisiblePanel=!1,this.allowFocusInnerElement=!1,this.lastAriaAnnounced={paginationRow:"",paginationPage:"",paginationPageNumbers:""},this.registerCSS(UI)}postConstruct(){const e=`ag-${this.getCompId()}`;this.setTemplate({tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:e},children:[{tag:"div",cls:"ag-paging-panel-content",ref:"eContent"}]}),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:t=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(t):fu(this.beans,t),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.buildComponents(e),this.addManagedPropertyListeners(["pagination","suppressPaginationPanel"],()=>this.onPaginationChanged()),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.addManagedPropertyListener("paginationPanels",()=>this.rebuildComponents(e)),this.addManagedEventListeners({paginationChanged:()=>this.onPaginationEvent()}),pu(this.beans,this,this.getGui()),this.addManagedElementListeners(this.getGui(),{focusin:t=>{const i=t.target;i&&kI(i)}}),this.onPaginationChanged(),this.announceAriaStatus()}setAllowFocus(e){this.allowFocusInnerElement=e}getFocusableContainerName(){return"pagination"}buildComponents(e){const t=this.gos.get("paginationPanels")??$I,i=new Set;for(const o of t){const s=typeof o=="string"?o:o.type;if(!i.has(s)){if(i.add(s),s==="pageSize"){const r=typeof o=="object"&&o.type==="pageSize"?o:void 0;this.pageSizeComp=this.createManagedBean(new BI(r)),this.pageSizeComp.updateVisibility(),this.eContent.appendChild(this.pageSizeComp.getGui())}else if(s==="rowSummary")this.rowSummaryComp=this.createManagedBean(new qI(e)),this.eContent.appendChild(this.rowSummaryComp.getGui());else if(s==="pageSummary"){const r=typeof o=="object"&&o.type==="pageSummary"?o.suppressPageInput:void 0;this.pageSummaryComp=this.createManagedBean(new _I(e,r)),this.eContent.appendChild(this.pageSummaryComp.getGui())}else if(s==="pageNumbers"){const r=this.beans.registry.createDynamicBean("pageNumbers",!0,e);r&&(this.pageNumbersComp=this.createManagedBean(r),this.eContent.appendChild(this.pageNumbersComp.getGui()))}}}this.updateHasVisiblePanel()}updateHasVisiblePanel(){this.hasVisiblePanel=this.rowSummaryComp!=null||this.pageSummaryComp!=null||this.pageNumbersComp!=null||this.pageSizeComp?.shouldShowPageSizeSelector()===!0}rebuildComponents(e){for(const t of[this.pageSizeComp,this.rowSummaryComp,this.pageSummaryComp,this.pageNumbersComp])t&&II(t.getGui());this.pageSizeComp=this.destroyBean(this.pageSizeComp),this.rowSummaryComp=this.destroyBean(this.rowSummaryComp),this.pageSummaryComp=this.destroyBean(this.pageSummaryComp),this.pageNumbersComp=this.destroyBean(this.pageNumbersComp),this.buildComponents(e),this.onPaginationChanged(),this.announceAriaStatus()}onPaginationChanged(){const e=this.hasVisiblePanel&&this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(e)}onPageSizeRelatedOptionsChange(){this.pageSizeComp?.updateVisibility(),this.updateHasVisiblePanel(),this.onPaginationChanged()}onPaginationEvent(){this.rowSummaryComp?.refresh(),this.pageSummaryComp?.refresh(),this.pageNumbersComp?.refresh(),this.announceAriaStatus()}announceAriaStatus(){!this.gos.get("pagination")||this.gos.get("suppressPaginationPanel")||(this.announceIfChanged(this.rowSummaryComp,"paginationRow"),this.announceIfChanged(this.pageSummaryComp,"paginationPage"),this.announceIfChanged(this.pageNumbersComp,"paginationPageNumbers"))}announceIfChanged(e,t){if(!e)return;const i=e.ariaStatus;i!==this.lastAriaAnnounced[t]&&(this.lastAriaAnnounced[t]=i,this.beans.ariaAnnounce?.announceValue(i,t))}},jI={selector:"AG-PAGINATION",component:KI},QI=100,ZI=class extends y{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.pageSizeFromPanel=this.getPanelPageSize(),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPanels",this.onPanelsChanged.bind(this))}getPaginationSelector(){return jI}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")}getPanelPageSize(){const e=this.gos.get("paginationPanels");if(e)for(let t=0,i=e.length;t<i;++t){const o=e[t];if(typeof o=="object"&&o.type==="pageSize")return o.paginationPageSize}}onPanelsChanged(){const e=this.getPanelPageSize();e!==this.pageSizeFromPanel&&this.setPageSize(e,"panel")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;const{editSvc:i}=this.beans;i?.isEditing()&&(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){if(!this.active)return;let t=e;this.paginateChildRows||(t=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(e)??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){this.goToPage(Math.max(0,this.totalPages-1))}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){const{pageSizeAutoCalculated:e,pageSizeFromInitialState:t,pageSizeFromPanel:i,pageSizeFromGridOptions:o,pageSizeFromPageSizeSelector:s,gos:r}=this;return(r.get("paginationAutoPageSize")?e:void 0)??s??t??i??o??QI}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 i=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"panel":this.pageSizeFromPanel=e,this.applyExplicitPageSize(e);break;case"gridOptions":this.pageSizeFromGridOptions=e,this.applyExplicitPageSize(e);break}i!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}applyExplicitPageSize(e){e!==void 0&&(this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage())}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 i=this.pageSize,o=t-1;this.totalPages=Math.floor(o/i)+1,this.adjustCurrentPageIfInvalid();const s=this.currentPage,r=i*s;let n=i*(s+1)-1;if(n>o&&(n=o),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(r),n===o)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(n+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 t=this.pageSize,i=e-1;this.totalPages=Math.floor(i/t)+1,this.adjustCurrentPageIfInvalid();const o=this.currentPage;this.topDisplayedRowIndex=t*o,this.bottomDisplayedRowIndex=t*(o+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:i=!1,newPageSize:o=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:i,newPageSize:o,keepRenderedRows:t})}},wd={moduleName:"Pagination",version:E,beans:[ZI,TI],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:wI,paginationGetPageSize:SI,paginationGetCurrentPage:bI,paginationGetTotalPages:yI,paginationGetRowCount:RI,paginationGoToNextPage:EI,paginationGoToPreviousPage:xI,paginationGoToFirstPage:FI,paginationGoToLastPage:PI,paginationGoToPage:DI},dependsOn:[yo]};import{KeyCode as hr,RefPlaceholder as Io,_getActiveDomElement as YI,_setAriaDisabled as JI}from"ag-stack";var XI=5,gr=3,ko=5;function Vv(e){const t=[];for(let i=0,o=e.length;i<o;++i){const s=e[i];if(i>0){const r=s-e[i-1];r===2?t.push(s-1):r>2&&t.push("ellipsis")}t.push(s)}return t}function ek(e,t,i){const o=Math.max(t,1),s=Math.min(Math.max(e+1,1),o);if(!i){const c=new Set([1]),u=Math.max(s-Math.floor(gr/2),1);for(let g=0;g<gr;++g){const p=u+g;p<=o&&c.add(p)}const h=Vv([...c].sort((g,p)=>g-p));return h.push("ellipsis"),h}if(t<=1)return[1];if(t<=XI){const c=[];for(let u=1;u<=t;++u)c.push(u);return c}const r=s<=ko-1,n=s>=t-(ko-2);let a,l;r?(a=1,l=ko):n?(a=t-ko+1,l=ko):(a=s-Math.floor(gr/2),l=gr);const d=new Set([1,t]);for(let c=0;c<l;++c)d.add(a+c);return Vv([...d].sort((c,u)=>c-u))}var tk=".ag-paging-page-numbers-panel{align-items:center;display:flex;gap:calc(var(--ag-spacing)*1.5)}.ag-paging-page-numbers{align-items:center;display:flex;gap:calc(var(--ag-spacing)*.5)}.ag-paging-page-number{align-items:center;border-radius:var(--ag-border-radius);cursor:pointer;display:flex;font-variant-numeric:tabular-nums;justify-content:center;min-width:var(--ag-icon-size);padding:var(--ag-spacing)}.ag-paging-page-number:hover{background-color:var(--ag-row-hover-color)}.ag-paging-page-number:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}.ag-paging-page-number-current{background-color:color-mix(in srgb,var(--ag-background-color),var(--ag-foreground-color) 5%);cursor:default;font-weight:600}.ag-paging-page-number-ellipsis{align-items:center;display:flex;font-variant-numeric:tabular-nums;justify-content:center;min-width:var(--ag-icon-size);padding:var(--ag-spacing);pointer-events:none}",Sd="data-page",ik=class extends K{constructor(e){super(),this.eNumbers=Io,this.btFirst=Io,this.btPrevious=Io,this.btNext=Io,this.btLast=Io,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.ariaStatus="",this.idPrefix=e,this.registerCSS(tk)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination}postConstruct(){const e=this.getLocaleTextFunc(),t=(o,s,r)=>({tag:"div",ref:o,cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e(s,r)}});this.setTemplate({tag:"div",cls:"ag-paging-page-numbers-panel",children:[t("btFirst","firstPage","First Page"),t("btPrevious","previousPage","Previous Page"),{tag:"div",ref:"eNumbers",cls:"ag-paging-page-numbers"},t("btNext","nextPage","Next Page"),t("btLast","lastPage","Last Page")]});const i=this.gos.get("enableRtl");this.btFirst.insertAdjacentElement("afterbegin",X(i?"last":"first",this.beans)),this.btPrevious.insertAdjacentElement("afterbegin",X(i?"next":"previous",this.beans)),this.btNext.insertAdjacentElement("afterbegin",X(i?"previous":"next",this.beans)),this.btLast.insertAdjacentElement("afterbegin",X(i?"first":"last",this.beans)),this.initNavButton(this.btFirst,()=>this.onBtFirst()),this.initNavButton(this.btPrevious,()=>this.onBtPrevious()),this.initNavButton(this.btNext,()=>this.onBtNext()),this.initNavButton(this.btLast,()=>this.onBtLast()),this.addManagedListeners(this.eNumbers,{click:o=>this.onPageActivated(o.target),keydown:o=>{(o.key===hr.ENTER||o.key===hr.SPACE)&&(o.preventDefault(),this.onPageActivated(o.target))}}),this.refresh()}initNavButton(e,t){this.activateTabIndex([e]),this.addManagedListeners(e,{click:t,keydown:i=>{(i.key===hr.ENTER||i.key===hr.SPACE)&&(i.preventDefault(),t())}})}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}onPageActivated(e){const t=e?.closest(`[${Sd}]`);if(!t)return;const i=Number(t.getAttribute(Sd));Number.isInteger(i)&&this.pagination.goToPage(i)}refresh(){const e=this.pagination,t=e.getCurrentPage(),i=e.getTotalPages(),o=this.getLocaleTextFunc(),s=ek(t,i,this.rowModel.isLastRowIndexKnown()),{eNumbers:r}=this,n=r.contains(YI(this.beans));r.replaceChildren();const a=o("page","Page");let l;for(let h=0,g=s.length;h<g;++h){const p=s[h];p==="ellipsis"?r.appendChild(this.createEllipsis(h)):p===t+1?(l=this.createCurrentPage(p,a),r.appendChild(l)):r.appendChild(this.createPageButton(p,a))}n&&l?.focus(),this.updateArrows(t,i);const d=o("of","of"),c=this.formatNumber(i>0?t+1:1),u=this.formatNumber(Math.max(i,1));this.ariaStatus=`${a} ${c} ${d} ${u}`}updateArrows(e,t){const i=this.rowModel.isLastRowIndexKnown(),o=i&&t===0,s=e===t-1;this.previousAndFirstButtonsDisabled=e===0||o,this.nextButtonDisabled=s||o,this.lastButtonDisabled=!i||o||s,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){JI(e,t),e.classList.toggle("ag-disabled",t)}createPageButton(e,t){const i=V({tag:"div",cls:"ag-paging-page-number",role:"button",attrs:{[Sd]:String(e-1),"aria-label":`${t} ${e}`}});return i.textContent=this.formatNumber(e),this.activateTabIndex([i]),i}createCurrentPage(e,t){const i=V({tag:"div",cls:"ag-paging-page-number ag-paging-page-number-current",role:"button",attrs:{"aria-current":"page","aria-disabled":"true","aria-label":`${t} ${e}`}});return i.textContent=this.formatNumber(e),this.activateTabIndex([i]),i}createEllipsis(e){const t=V({tag:"span",cls:"ag-paging-page-number-ellipsis",attrs:{id:`${this.idPrefix}-page-ellipsis-${e}`,"aria-hidden":"true"}});return t.textContent="\u2026",t}formatNumber(e){return Cd(e,this.gos,this.getLocaleTextFunc.bind(this))}},Hv={moduleName:"PaginationPageNumbers",version:E,dynamicBeans:{pageNumbers:ik},dependsOn:[wd]},ok=".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{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function sk(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function rk(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function nk(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function ak(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function lk(e,t,i){return e.pinnedRowModel?.forEachPinnedRow(t,i)}var Bv={moduleName:"PinnedRow",version:E,beans:[ou],css:[ok],apiFunctions:{getPinnedTopRowCount:sk,getPinnedBottomRowCount:rk,getPinnedTopRow:nk,getPinnedBottomRow:ak,forEachPinnedRow:lk},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}};import{RefPlaceholder as Ov,_clearElement as Gv,_exists as bd}from"ag-stack";var dk="\u2191",ck="\u2193",uk={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},hk=class extends K{constructor(){super(uk),this.eValue=Ov,this.eDelta=Ov,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const i=Math.abs(t),o=e.formatValue(i),s=bd(o)?o:i,r=t>=0,n=this.eDelta;r?n.textContent=dk+s:n.textContent=ck+s,n.classList.toggle("ag-value-change-delta-up",r),n.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"),Gv(this.eDelta)}refresh(e,t=!1){const{value:i,valueFormatted:o}=e,{eValue:s,lastValue:r,beans:n}=this;if(i===r||(bd(o)?s.textContent=o:bd(i)?s.textContent=i:Gv(s),n.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=i&&typeof i=="object"&&"toNumber"in i?i.toNumber():i,l=r&&typeof r=="object"&&"toNumber"in r?r.toNumber():r;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const d=a-l;this.showDelta(e,d)}return r&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=i,!0}};import{RefPlaceholder as gk,_clearElement as pk,_exists as Nv,_missing as fk}from"ag-stack";var mk=".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}",Ck={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},vk=class extends K{constructor(){super(Ck),this.eCurrent=gk,this.refreshCount=0,this.registerCSS(mk)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:i}=this,o=V({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=o,o.textContent=i.textContent,this.getGui().insertBefore(o,i),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.ePrevious?.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let i=e.value;if(fk(i)&&(i=""),i===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=i;const o=this.eCurrent;return Nv(e.valueFormatted)?o.textContent=e.valueFormatted:Nv(e.value)?o.textContent=i:pk(o),!0}},wk=class extends y{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,i=this.beans.gos.get("cellFlashDuration"),o=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];if(s.delete(e),!e.comp)return;const r=Date.now(),n=r+i,a=r+i+o,l={phase:"flash",flashEndTime:n,fadeEndTime:a};s.set(e,l);const d=`ag-cell-${t}`,c=`${d}-animation`,{comp:u,eGui:{style:h}}=e;u.toggleCss(d,!0),u.toggleCss(c,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&n+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),i)}),this.nextAnimationTime=n)}advanceAnimations(){const e=Date.now();let t=null;for(const i of Object.keys(this.animations)){const o=this.animations[i],s=`ag-cell-${i}`,r=`${s}-animation`;for(const[n,a]of o){if(!n.isAlive()||!n.comp){o.delete(n);continue}const{phase:l,flashEndTime:d,fadeEndTime:c}=a,u=l==="flash"?d:c;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:g,eGui:{style:p}}=n;switch(l){case"flash":g.toggleCss(s,!1),g.toggleCss(r,!0),p.transition=`background-color ${c-d}ms`,p.transitionDelay=`${d-e}ms`,t=Math.min(c,t??1/0),a.phase="fade";break;case"fade":g.toggleCss(s,!1),g.toggleCss(r,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),o.delete(n);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 i=cu(e.cellPosition);t.cells[i]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t?.flashDuration,t?.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function Sk(e,t={}){const{cellFlashSvc:i}=e;i&&e.frameworkOverrides.wrapIncoming(()=>{for(const o of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))i.flashCell(o,t)})}var _v={moduleName:"HighlightChanges",version:E,beans:[wk],userComponents:{agAnimateShowChangeCellRenderer:hk,agAnimateSlideCellRenderer:vk},apiFunctions:{flashCells:Sk}};function bk(e,t,i){if(!t)return;const o=e.ctrlsSvc.getGridBodyCtrl().eGridViewport,s=`aria-${t}`;i===null?o.removeAttribute(s):o.setAttribute(s,i)}function yk(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function Rk(e){e.frameworkOverrides.wrapIncoming(()=>{e.ctrlsSvc.getHeaderRowContainerCtrl()?.refresh()})}function Ek(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function xk(e){e.animationFrameSvc?.flushAllFrames()}function Fk(e){return{rowHeight:Ne(e),headerHeight:Ki(e)}}function Pk(e,t={}){const i=[];for(const r of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const n=r.getCellRenderer();n!=null&&i.push(je(n))}if(t.columns?.length)return i;const o=[],s=Za(t.rowNodes);for(const r of e.rowRenderer.getAllRowCtrls())if(!(s&&!Ya(r.rowNode,s))&&r.isFullWidth())for(const n of r.getModeCellRenderers())n!=null&&o.push(je(n));return[...o,...i]}var zv={moduleName:"RenderApi",version:E,apiFunctions:{setGridAriaProperty:bk,refreshCells:yk,refreshHeader:Rk,isAnimationFrameQueueEmpty:Ek,flushAllAnimationFrames:xk,getSizesForCurrentTheme:Fk,getCellRendererInstances:Pk}};import{_debounce as Dk,_getDocument as Mk,_getElementSize as Tk,_observeResize as Ak}from"ag-stack";var Ik=class extends y{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=Dk(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const{visibleCols:e,rowModel:t,pinnedRowModel:i}=this.beans,o=e.autoHeightCols;let s=!1;const r=n=>{if(ut(this.gos,n))return;const a=this.getRowAutoHeight(n,o);a==null||a===n.rowHeight||(n.setRowHeight(a),s=!0)};i?.forEachPinnedRow?.("top",r),i?.forEachPinnedRow?.("bottom",r),t.forEachDisplayedNode?.(r),s&&t.onRowHeightChanged?.()}getRowAutoHeight(e,t){const{rowSpanSvc:i}=this.beans,o=e.__autoHeights;let s=Je(this.beans,e).height;for(const r of t){let n=o?.[r.colId];const a=i?.getCellSpan(r,e);if(a){if(a.getLastNode()!==e)continue;if(n=a.getLastNodeAutoHeight(),!n)return}if(n==null){if(this.colSpanSkipCell(r,e))continue;return}s=Math.max(n,s)}return s}setRowAutoHeight(e,t,i){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[i.getId()];return}const o=e.__autoHeights[i.getId()];e.__autoHeights[i.getId()]=t,o!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:i,colViewport:o,visibleCols:s}=this.beans;if(!i.colSpanActive)return!1;let r=[];switch(e.getPinned()){case"left":r=s.getLeftColsForRow(t);break;case"right":r=s.getRightColsForRow(t);break;case null:r=o.getColsWithinViewport(t);break}return!r.includes(e)}setupCellAutoHeight(e,t,i){if(ut(this.gos,e.rowNode)||!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const o=t.parentElement,{rowNode:s,column:r}=e,n=this.beans,a=c=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!i.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:g,borderTopWidth:p}=Tk(o),f=u+h+g+p,C=t.offsetHeight+f;if(c<5){const S=!Mk(n)?.contains(t),w=C==0;if(S||w){window.setTimeout(()=>a(c+1),0);return}}this.setRowAutoHeight(s,C,r)},l=()=>a(0);l();const d=Ak(n,t,l);return i.addDestroyFunc(()=>{d(),this.setRowAutoHeight(s,void 0,r)}),!0}setAutoHeightActive(e){this.active=e}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:i}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(i).filter(s=>s.isAutoHeight())),t.length!==0){if(!i.__autoHeights)return!1;for(const o of t){const s=i.__autoHeights[o.colId];if(!s||i.rowHeight<s)return!1}}return!0}},Wv={moduleName:"RowAutoHeight",version:E,beans:[Ik]};import{_debounce as Uv}from"ag-stack";var kk=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.colId];if(e==null)return;let t=0;for(const i of this.spannedNodes)i!==this.lastNode&&(t+=i.rowHeight);return e-t}},Lk=class{constructor(e,t){this.beans=e,this.column=t,this.centerValueNodeMap=null,this.topValueNodeMap=null,this.bottomValueNodeMap=null}buildCache(e){const{gos:t,pinnedRowModel:i,rowModel:o,valueSvc:s,pagination:r}=this.beans,n=this.column,a=n.colDef,l=this.getNodeMap(e),d=new Map,c=t.getCallback("isFullWidthRow"),u=a.equals,h=a.spanRows,g=typeof h=="function";let p=null,f=null,m;const C=(S,w)=>{p=S,f=null,m=w},v=S=>{if(ut(t,S)){C(null,null);return}const w=!S.isExpandable()&&!S.group&&!S.detail&&(c?!c({rowNode:S}):!0);if(S.rowIndex==null||!w){C(null,null);return}if(S.level!==p?.level||S.footer||f&&S.rowIndex-1!==f?.getLastNode().rowIndex){C(S,s.getValueFromData(n,S));return}const b=s.getValueFromData(n,S);if(g){const R=G(t,{valueA:m,nodeA:p,valueB:b,nodeB:S,column:n,colDef:a});if(!h(R)){C(S,b);return}}else if(u?!u(m,b):m!==b){C(S,b);return}if(!f){const R=l?.get(p);R?.firstNode===p?(R.reset(),f=R):f=new kk(n,p),d.set(p,f)}f.addSpannedNode(S),d.set(S,f)};switch(e){case"center":o.forEachDisplayedNode?.(S=>{(!r||r.isRowInPage(S.rowIndex))&&v(S)}),this.centerValueNodeMap=d;break;case"top":i?.forEachPinnedRow("top",v),this.topValueNodeMap=d;break;case"bottom":i?.forEachPinnedRow("bottom",v),this.bottomValueNodeMap=d;break}}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}}},Vk=class extends y{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.active=!1,this.spanningColumns=null,this.debouncePinnedEvent=Uv(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=Uv(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){if(!this.gos.get("enableCellSpan"))return;this.active=!0;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){let t=this.spanningColumns;if(!t)t=new Map,this.spanningColumns=t;else if(t.has(e))return;const i=new Lk(this.beans,e);t.set(e,i),this.buildCache(i)}columnRowSpanChanged(e){if(!this.active)return;const t=this.spanningColumns?.get(e);if(e.colDef.spanRows){if(!t){this.register(e);return}this.buildCache(t)}else t&&this.deregister(e)}refreshCols(){if(this.active){const e=this.beans.colModel.colsList;for(let t=0,i=e.length;t<i;++t){const o=e[t];o.colDef.spanRows&&this.register(o)}}}buildCache(e){e.buildCache("top"),e.buildCache("bottom"),e.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.isAlive()&&this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns?.delete(e)}onRowDataUpdated({node:e}){const t=this.beans.spannedRowRenderer;if(e.rowPinned){this.pinnedTimeout??(this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t?.createCtrls("top"),t?.createCtrls("bottom")},0));return}this.modelTimeout??(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t?.createCtrls("center")},0))}buildModelCaches(){this.clearModelTimeout();const e=this.spanningColumns;if(e)for(const t of e.values())t.buildCache("center");this.debounceModelEvent()}buildPinnedCaches(){this.clearPinnedTimeout();const e=this.spanningColumns;if(e)for(const t of e.values())t.buildCache("top"),t.buildCache("bottom");this.debouncePinnedEvent()}isCellSpanning(e,t){return!!this.spanningColumns?.get(e)?.getCellSpan(t)}getCellSpanByPosition(e){const{column:t,rowIndex:i}=e,o=this.spanningColumns?.get(t);if(!o)return;const{pinnedRowModel:s,rowModel:r}=this.beans;let n;switch(e.rowPinned){case"top":n=s?.getPinnedTopRow(i);break;case"bottom":n=s?.getPinnedBottomRow(i);break;default:n=r.getRow(i)}return n&&o.getCellSpan(n)}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){return this.spanningColumns?.get(e)?.getCellSpan(t)}forEachSpannedColumn(e,t){const i=this.spanningColumns;if(i)for(const o of i.values()){const s=o.getCellSpan(e);s&&t(o.column,s)}}clearModelTimeout(){const e=this.modelTimeout;e!=null&&(this.modelTimeout=null,clearTimeout(e))}clearPinnedTimeout(){const e=this.pinnedTimeout;e!=null&&(this.pinnedTimeout=null,clearTimeout(e))}destroy(){super.destroy(),this.active=!1,this.spanningColumns=null,this.clearPinnedTimeout(),this.clearModelTimeout()}};import{_setAriaRowIndex as Hk,_setAriaRowSpan as Bk}from"ag-stack";var Ok=class extends vi{constructor(e,t,i){super(e.col,e.firstNode,i,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell";const o=()=>{Jp(this),this.setAriaRowSpan()};this.addManagedListeners(i.eventSvc,{paginationChanged:o,recalculateRowBounds:o,pinnedHeightChanged:o})}setComp(e,t,i,o,s,r,n){this.eWrapper=i,super.setComp(e,t,i,o,s,r,n),this.setAriaRowSpan()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowCtrl:t}=this,i=t.getAriaRowIndex();!e||i==null||Hk(e,i)}setAriaRowSpan(){this.eGui&&Bk(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($i(t)){this.focusedCellPosition=void 0;return}const i=this.isCellFocused();i||(this.focusedCellPosition=void 0),e&&i&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},Gk=class extends Vs{getInitialRowClasses(){return["ag-spanned-row",this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"]}getNewCellCtrl(e){const t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new Ok(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(){}},Nk=class extends y{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,i=this.getCtrlsMap(e),o=i.size,s=this.getAllRelevantRowControls(e),r=new Map;let n=!1;for(const l of s)l.isAlive()&&t?.forEachSpannedColumn(l.rowNode,(d,c)=>{if(r.has(c.firstNode))return;const u=i.get(c.firstNode);if(u){r.set(c.firstNode,u),i.delete(c.firstNode);return}n=!0;const h=new Gk(c.firstNode,this.beans,!1,!1,!1);r.set(c.firstNode,h)});this.setCtrlsMap(e,r);const a=r.size===o;if(!(!n&&a)){for(const l of i.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,i=t?.getCellSpanByPosition(e);if(!i)return;const o=this.getCtrlsMap(e.rowPinned).get(i.firstNode);if(o)return o.getAllCellCtrls().find(s=>s.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")}},qv={moduleName:"CellSpan",version:E,beans:[Vk,Nk]},$v=class extends y{constructor(){super(...arguments),this.column=null}destroy(){this.destroyColumn(),super.destroy()}refreshCols(){const e=this.isEnabled(),t=this.column;if(e&&!t){const i=this.createColDef(),o=i.colId;this.gos.validateColDef(i,o,!0);const s=new kt(i,null,o,!1,this.colKind);return this.beans.context.createBean(s),this.column=s,s}return!e&&t?(this.destroyColumn(),null):t}refreshColDef(e){const t=this.column;if(t){const i=this.createColDef();t.setColDef(i,null,e);const o=this.beans;et(o,{state:[Ec(o,i,t.colId)]},e)}}destroyColumn(){const e=this.column;e&&(this.column=null,e.isAlive()&&e.destroy())}},_k=class extends $v{constructor(){super(...arguments),this.beanName="selectionColSvc",this.colKind="selection"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,Bt(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}updateColumns(e){this.refreshColDef(Bt(e.source))}isEnabled(){const{gos:e,beans:t}=this,i=e.get("rowSelection");if(typeof i!="object"||!Ye(e)||i.checkboxLocation==="autoGroupColumn"&&t.autoColSvc?.columns.length)return!1;const o=!!It(i),s=Ai(i);return o||s}createColDef(){const{gos:e}=this,t=e.get("selectionColumnDef"),i=e.get("enableRtl"),{rowSpan:o,spanRows:s,...r}=t??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:i?"right":"left",comparator:zk,editable:!1,suppressFillHandle:!0,suppressAutoSize:!0,pinned:null,...r,colId:qo,chartDataType:"excluded"}}onSelectionOptionsChanged(e,t,i){const o=t&&typeof t!="string"?It(t):void 0,s=e&&typeof e!="string"?It(e):void 0,r=o!==s,n=t&&typeof t!="string"?Ai(t):void 0,a=e&&typeof e!="string"?Ai(e):void 0,l=n!==a,d=Ii(e),c=Ii(t);(r||l||d!==c)&&this.beans.colModel.refreshAll(i)}},zk=(e,t,i,o)=>{const s=i.isSelected(),r=o.isSelected();return s===r?0:s?1:-1},Wk=':where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:where(:not(.ag-disabled)){cursor:pointer}:where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:before{content:"";inset:-8px;position:absolute}';function Uk(e,t){const i=t.nodes.filter(n=>!!n);if(!i.length||!i.every(n=>n.rowPinned&&!Is(n)?(e.log.warn(59),!1):n.id===void 0?(e.log.warn(60),!1):!0))return;const{source:s,newValue:r}=t;e.selectionSvc?.setNodesSelected({nodes:i,source:s??"api",newValue:r})}function qk(e,t,i="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:i,selectAll:t})}function $k(e,t,i="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:i,selectAll:t})}function Kk(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function jk(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function Qk(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function Zk(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function Yk(e){return e.selectionSvc?.getSelectedNodes()??[]}function Jk(e){return e.selectionSvc?.getSelectedRows()??[]}var Kv=(e,t)=>{for(let i=0,o=e.length;i<o;++i){const s=e[i],r=s.childrenAfterGroup;r!==null&&(Kv(r,t),t(s))}},pr=(e,t,i,o)=>{if(i!=null){const r=i.getSortedRows();for(let n=0,a=r.length;n<a;++n){const l=r[n];l.childrenAfterGroup!==null&&!l.destroyed&&o(l)}return}if(e==null)return;const s=e.childrenAfterGroup;s!==null&&(t&&Kv(s,o),o(e))};import{_getActiveDomElement as Xk,_setAriaSelected as eL}from"ag-stack";import{RefPlaceholder as tL,_getAriaCheckboxStateName as iL}from"ag-stack";var oL={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},sL=class extends K{constructor(){super(oL,[bs]),this.eCheckbox=tL}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:i}=this,o=t.isSelected(),s=iL(e,o),[r,n]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(r,n);i.setValue(o,!0),i.setInputAriaLabel(`${a} (${s})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getWrapperElement(),{dblclick:mt,click:o=>{mt(o),!this.eCheckbox.isDisabled()&&this.beans.selectionSvc?.handleSelectionEvent(o,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:o,previousValue:s})=>{const r=typeof o=="object"?Mr(o):void 0,n=typeof s=="object"?Mr(s):void 0;r!==n&&this.onSelectableChanged()}),_o(this.gos)||typeof this.getIsVisible()=="function"){const o=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:o}),this.addManagedListeners(this.rowNode,{dataChanged:o,cellChanged:o}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:i,gos:o}=this,s=t.selectable,r=this.getIsVisible();let n;if(typeof r=="function"){const u=i?.callbackParams;if(!e)n=r({...u,node:t,data:t.data});else{const h=e.createColumnFunctionCallbackParams(t);n=r({...u,...h})}}else n=r??!1;const a=s&&!n||!s&&n,l=s||n,d=o.get("rowSelection"),c=d&&typeof d!="string"?!Mr(d):!!e?.colDef.showDisabledCheckboxes;this.setVisible(l&&(a?c:!0)),this.setDisplayed(l&&(a?c:!0)),l&&this.eCheckbox.setDisabled(a),i?.removeHidden&&this.setDisplayed(l)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?It(t):this.column?.colDef?.checkboxSelection}},rL=class{constructor(e,t){this.rowModel=e,this.pinnedRowModel=t,this.selectAll=!1,this.rootId=null,this.endId=null}reset(){this.rootId=null,this.endId=null}setRoot(e){this.rootId=e.id,this.endId=null}setEndRange(e){this.endId=e.id}getRange(){const e=this.getRoot(),t=this.getEnd();return e==null||t==null?[]:this.getNodesInRange(e,t)??[]}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:i,pinnedRowModel:o}=this;return t??(t=i.getRowNode(e)),o?.isManual()&&(t??(t=o.getPinnedRowById(e,"top")),t??(t=o.getPinnedRowById(e,"bottom"))),t}isRangeStartTheRoot(e){const{rootId:t}=this;return t===null?!1:e.id===t?!0:jr(this.getRowNode(t))?.id===e.id}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const i=this.isRangeStartTheRoot(t[0]),o=t.findIndex(s=>s.id===e.id);if(o>-1){const s=t.slice(0,o),r=t.slice(o+1);return this.setEndRange(e),i?{keep:s,discard:r}:{keep:r,discard:s}}else return{keep:t,discard:[]}}extend(e,t=!1){const i=this.getRoot();if(i==null){const s=this.getRange().slice();return t&&e.depthFirstSearch(r=>!r.group&&s.push(r)),s.push(e),this.setRoot(e),{keep:s,discard:[]}}const o=this.getNodesInRange(i,e);if(!o)return this.setRoot(e),{keep:[e],discard:[]};if(o.find(s=>s.id===this.endId))return this.setEndRange(e),{keep:o,discard:[]};{const s=this.getRange().slice();return this.setEndRange(e),{keep:o,discard:s}}}getNodesInRange(e,t){const{pinnedRowModel:i,rowModel:o}=this;if(!i?.isManual())return o.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&!t.rowPinned){const s=Te(i,"top",e,void 0),r=o.getNodesInRangeForSelection(o.getRow(0),t);return r===null?null:s.concat(r)}if(e.rowPinned==="bottom"&&!t.rowPinned){const s=Te(i,"bottom",void 0,e),r=o.getRowCount(),n=o.getRow(r-1),a=o.getNodesInRangeForSelection(t,n);return a===null?null:a.concat(s)}if(!e.rowPinned&&!t.rowPinned)return o.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&t.rowPinned==="top")return Te(i,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){const s=Te(i,"top",t,void 0),r=Te(i,"bottom",void 0,e),n=o.getRow(0),a=o.getRow(o.getRowCount()-1),l=o.getNodesInRangeForSelection(n,a);return l===null?null:s.concat(l).concat(r)}if(!e.rowPinned&&t.rowPinned==="top"){const s=Te(i,"top",t,void 0),r=o.getNodesInRangeForSelection(o.getRow(0),e);return r===null?null:s.concat(r)}if(e.rowPinned==="top"&&t.rowPinned==="bottom"){const s=Te(i,"top",e,void 0),r=Te(i,"bottom",void 0,t),n=o.getRow(0),a=o.getRow(o.getRowCount()-1),l=o.getNodesInRangeForSelection(n,a);return l===null?null:s.concat(l).concat(r)}if(e.rowPinned==="bottom"&&t.rowPinned==="bottom")return Te(i,"bottom",e,t);if(!e.rowPinned&&t.rowPinned==="bottom"){const s=Te(i,"bottom",void 0,t),r=o.getRow(o.getRowCount()-1),n=o.getNodesInRangeForSelection(e,r);return n===null?null:n.concat(s)}return null}};import{_getActiveDomElement as nL,_getAriaCheckboxStateName as aL,_setAriaRole as lL}from"ag-stack";var dL=class extends y{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(nL(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new ro);this.cbSelectAll=t,t.addCss("ag-header-select-all"),lL(t.getGui(),"presentation"),this.showOrHideSelectAll();const i=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:i,paginationChanged:i,modelUpdated:i}),this.addManagedPropertyListener("rowSelection",({currentValue:o,previousValue:s})=>{const r=n=>typeof n=="string"||!n||n.mode==="singleRow"?void 0:n.selectAll;r(o)!==r(s)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll(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,i=this.cbSelectAll,o=t.getSelectAllState(e);i.setValue(o);const s=t.hasNodesToSelect(e);i.setDisabled(!s),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:i,cbSelectAll:o,cbSelectAllVisible:s}=this,r=o.getValue(),n=aL(t,r),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");i.setAriaDescriptionProperty("selectAll",s?`${a} (${n})`:null),o.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||i.announceAriaDescription()}checkSelectionType(e){return ni(this.gos)?!0:(this.warn(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:i}=this.beans;return ae(t)||ri(t)?!0:(this.warn(129,{feature:e,rowModel:i.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let i="uiSelectAll";t==="currentPage"?i="uiSelectAllCurrentPage":t==="filtered"&&(i="uiSelectAllFiltered");const o={source:i,selectAll:t},s=this.beans.selectionSvc;e?s.selectAllRowNodes(o):s.deselectAllRowNodes(o)}isCheckboxSelection(){const{column:e,gos:t,beans:i}=this,r=typeof t.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return jv(i,e)&&this.checkRightRowModelType(r)&&this.checkSelectionType(r)}getSelectAllMode(){const e=jd(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:i}=this.column.colDef;return t?"currentPage":i?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}};function jv({gos:e,selectionColSvc:t},i){const o=e.get("rowSelection"),s=i.colDef,{headerCheckboxSelection:r}=s;let n=!1;if(typeof o=="object"){const l=Oi(i),d=Or(i);(Ii(o)==="autoGroupColumn"&&d||l&&t?.isEnabled())&&(n=Ai(o))}else typeof r=="function"?n=r(G(e,{column:i,colDef:s})):n=!!r;return n}var Qv=class extends y{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new rL(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const o=_o(e);o!==this.isRowSelectable&&(this.isRowSelectable=o,this.updateSelectable())}),this.isRowSelectable=_o(e);const i=t.rowModel;this.addManagedEventListeners({cellValueChanged:o=>this.updateRowSelectable(o.node),rowNodeDataChanged:o=>{i.refreshingData||this.updateRowSelectable(o.node)}})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new sL}createSelectAllFeature(e){if(jv(this.beans,e))return new dL(e)}isMultiSelect(){return ni(this.gos)}onRowCtrlSelected(e,t){const i=e.getGui();if(!i)return;const o=!!e.rowNode.isSelected();i.rowComp.toggleCss("ag-row-selected",o);const s=i.element;eL(s,o),s.contains(Xk(this.beans))&&t()}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected(),i=this.beans.editSvc?.isEditing({rowNode:e});if(!e.selectable||i)return;const s=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(s,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!Is(e)||!Ye(this.gos)}updateRowSelectable(e,t){const i=e.pinnedSibling,o=e.rowPinned&&i?i.selectable:this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,o,t),o}setRowSelectable(e,t,i){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),i)return;if(ai(this.gos)){const s=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:s??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,i=!1;const o=e.childrenAfterGroup;if(!o?.length)return e.selectable?e.__selected:null;for(let s=0,r=o.length;s<r;s++){const n=o[s];let a=n.isSelected();if(!n.selectable){const l=this.calculateSelectedFromChildren(n);if(l===null)continue;a=l}switch(a){case!0:t=!0;break;case!1:i=!0;break;default:return}}if(!(t&&i))return t?!0:i?!1:e.selectable?e.__selected:null}selectRowNode(e,t,i,o="api"){if(t&&e.destroyed)return!1;const s=!e.selectable&&t,r=e.__selected===t;if(s||r)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const n=e.sibling;n&&n.footer&&n.__localEventService&&n.dispatchRowEvent("rowSelected");const a=e.pinnedSibling;return a?.rowPinned&&a.__localEventService&&a.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...Kr(e,this.gos,"rowSelected"),event:i||null,source:o}),!0}isCellCheckboxSelection(e,t){const i=this.gos.get("rowSelection");if(i&&typeof i!="string"){const o=Oi(e)&&It(i);return e.isColumnFunc(t,o)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,i,o){const{gos:s,selectionCtx:r}=this,n=e.isSelected(),a=ai(s),l=c0(s),d=u0(s),c=this.isMultiSelect(),u=o==="rowClicked";if(u&&!(l||d))return null;if(t&&i&&c){const h=r.getRoot();if(h)if(h.isSelected()){const g=r.isInRange(e)?r.truncate(e):r.extend(e,a);return{deselect:g.discard,select:g.keep,reset:!1}}else{const g=r.extend(e,a);return{select:[],deselect:g.keep,reset:!1}}else return null}else if(t&&c){const h=r.selectAll?this.beans.rowModel.getRow(0):void 0,g=r.getRoot(h),p=r.isInRange(e)?r.truncate(e):r.extend(e,a);return{select:p.keep,deselect:p.discard,reset:r.selectAll||!!(g&&!g.isSelected())}}else if(i){if(u){const h=!n;return h&&!l||!h&&!d?null:(r.setRoot(e),{node:e,newValue:h,clearSelection:!1})}return r.setRoot(e),{node:e,newValue:!n,clearSelection:!c}}else{r.setRoot(e);const h=h0(s),g=Li(s)==="filteredDescendants",p=u&&(!h||!l);if(g&&n===void 0&&ae(s))return{node:e,newValue:!1,checkFilteredNodes:!0,clearSelection:!c||p};if(u){const f=n?!h:l;return f===n&&!p||f&&!l||!f&&!d?null:{node:e,newValue:f,clearSelection:!c||p,keepDescendants:e.group&&a}}return{node:e,newValue:!n,clearSelection:!c||p}}}},cL=class extends Qv{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1,this.selectionBatchDepth=0,this.pendingSelectionChanged=!1,this.pendingSelectionSource=null}postConstruct(){super.postConstruct();const{gos:e}=this;this.csrm=xe(this.beans),this.mode=ki(e),this.groupSelectsDescendants=ai(e),this.groupSelectsFiltered=Li(e)==="filteredDescendants",this.masterSelectsDetail=Qd(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=ai(e),i=ki(e),o=Li(e)==="filteredDescendants";this.masterSelectsDetail=Qd(e)==="detail",(t!==this.groupSelectsDescendants||o!==this.groupSelectsFiltered||i!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=o,this.mode=i)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,i){if(this.isRowSelectionBlocked(t))return 0;const o=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,i);if(o==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in o)return o.reset?this.resetNodes():this.selectRange(o.deselect,!1,i),this.selectRange(o.select,!0,i);{const s=o.checkFilteredNodes?Yv(o.node):o.newValue;return this.setNodesSelected({nodes:[o.node],newValue:s,clearSelection:o.clearSelection,keepDescendants:o.keepDescendants,event:e,source:i})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:i,nodes:o,event:s,source:r,keepDescendants:n=!1}){const a=o.length;if(a===0)return 0;const{gos:l}=this;if(!Ye(l)&&e)return this.warn(132),0;const d=this.isMultiSelect();if(a>1&&!d)return this.warn(130),0;let c=0;for(let u=0;u<a;u++){const g=o[u].primaryRow;if(g.rowPinned&&!Is(g)){this.warn(59);continue}if(g.id===void 0){this.warn(60);continue}if(e&&g.destroyed)continue;this.groupSelectsFiltered&&g.group&&!l.get("treeData")||this.selectRowNode(g,e,s,r)&&(this.detailSelection.delete(g.id),c++),this.groupSelectsDescendants&&g.childrenAfterGroup?.length&&(c+=this.selectChildren(g,e,r,s))}return i||(a===1&&r==="api"&&this.selectionCtx.setRoot(o[0].primaryRow),e&&(t||!d)&&(c+=this.clearOtherNodes(o[0].primaryRow,n,r)),c>0&&(this.updateGroupsFromChildrenSelections(r,void 0,s),this.dispatchSelectionChanged(r))),c}selectRange(e,t,i){let o=0;for(let s=0,r=e.length;s<r;++s){const n=e[s].primaryRow;n.group&&this.groupSelectsDescendants||this.selectRowNode(n,t,void 0,i)&&o++}return o>0&&(this.updateGroupsFromChildrenSelections(i),this.dispatchSelectionChanged(i)),o}selectChildren(e,t,i,o){const s=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return s?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:i,event:o,nodes:s}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];for(const t of this.selectedNodes.values()){const i=t.data;i!=null&&e.push(i)}return e}getSelectionCount(){return this.selectedNodes.size}removeFromSelection(e,t){const i=e.id,o=this.selectedNodes;e.__selected&&o.get(i)===e&&(o.delete(i),this.detailSelection.delete(i),e.__selected=!1,this.pendingSelectionChanged=!0,this.pendingSelectionSource??(this.pendingSelectionSource=t))}updateGroupsFromChildrenSelections(e,t,i){if(!this.groupSelectsDescendants)return!1;const o=this.csrm;if(!o)return!1;const s=o.rootNode;if(!s)return!1;let r=!1;const n=a=>{if(a!==s){const l=this.calculateSelectedFromChildren(a);r=this.selectRowNode(a,l===null?!1:l,i,e)||r}};return pr(s,o.hierarchical,t,n),r}clearOtherNodes(e,t,i){const o=new Map;let s=0;for(const r of this.selectedNodes.values()){const n=r.id==e.id;(!t||!hL(e,r))&&!n&&(s+=this.setNodesSelected({nodes:[r],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:i}),this.groupSelectsDescendants&&r.parent&&o.set(r.parent.id,r.parent))}for(const r of o.values()){const n=this.calculateSelectedFromChildren(r);this.selectRowNode(r,n===null?!1:n,void 0,i)}return s}selectRowNode(e,t,i,o="api"){const s=super.selectRowNode(e,t,i,o);if(s&&!(this.groupSelectsDescendants&&e.group)){const r=this.selectedNodes;e.isSelected()?r.set(e.id,e):r.delete(e.id)}return s}syncInRowNode(e,t){const i=this.selectedNodes,o=t?.id;o!=null&&o!==e.id&&i.get(o)===e&&i.set(o,t);const s=e.id,r=i.has(s);e.__selected=r,r&&i.set(s,e)}createDaemonNode(e){if(!e.id)return;const t=new Ue(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}reset(e){this.selectedNodes.size&&(this.resetNodes(),this.dispatchSelectionChanged(e))}resetNodes(){const e=this.selectedNodes;for(const t of e.values())this.selectRowNode(t,!1);e.clear()}getBestCostNodeSelection(){const e=this.csrm;if(!e)return;const t=e.getTopLevelNodes();if(t===null)return;const i=[];function o(s){for(let r=0,n=s.length;r<n;r++){const a=s[r];a.isSelected()?i.push(a):a.group&&a.childrenAfterGroup&&o(a.childrenAfterGroup)}}return o(t),i}isEmpty(){return this.selectedNodes.size===0}deselectAllRowNodes({source:e,selectAll:t}){const i=this.csrm;let o=!1;const s=r=>{this.selectRowNode(r.primaryRow,!1,void 0,e)&&(o=!0)};if(t==="currentPage"||t==="filtered"){if(!i){this.error(102);return}const r=this.getNodesToSelect(t);for(let n=0,a=r.length;n<a;++n)s(r[n])}else this.selectedNodes.forEach(s),this.selectedNodes.clear();if(this.selectionCtx.selectAll=!1,i&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(e);o||(o=r)}o&&this.dispatchSelectionChanged(e)}getSelectAllState(e){let t=0,i=0;const o=this.getNodesToSelect(e);for(let s=0,r=o.length;s<r;++s){const n=o[s];this.groupSelectsDescendants&&n.group||(n.isSelected()?t++:n.selectable&&i++)}return Zv(t,i)??null}hasNodesToSelect(e){const t=this.getNodesToSelect(e);for(let i=0,o=t.length;i<o;++i)if(t[i].selectable)return!0;return!1}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],i=s=>t.push(s);if(e==="currentPage")return this.forEachNodeOnPage(s=>{if(!s.group){i(s);return}if(!s.footer&&!s.expanded){const r=n=>{i(n);const a=n.childrenAfterFilter;if(a)for(let l=0,d=a.length;l<d;++l)r(a[l])};r(s);return}this.groupSelectsDescendants||i(s)}),t;const o=this.beans.rowModel;return e==="filtered"?(o.forEachNodeAfterFilter(i),t):(o.forEachNode(i),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:i}=this.beans,o=t.getFirstRow(),s=t.getLastRow();for(let r=o;r<=s;r++){const n=i.getRow(r);n&&e(n)}}selectAllRowNodes(e){const{gos:t,selectionCtx:i}=this;if(!Ye(t)){this.warn(132);return}if($d(t)&&!ni(t)){this.warn(130);return}if(!this.canSelectAll())return;const{source:o,selectAll:s}=e;let r=!1;const n=this.getNodesToSelect(s);for(let a=0,l=n.length;a<l;++a)r=this.selectRowNode(n[a].primaryRow,!0,void 0,o)||r;if(i.selectAll=!0,this.csrm&&this.groupSelectsDescendants){const a=this.updateGroupsFromChildrenSelections(o);r||(r=a)}r&&this.dispatchSelectionChanged(o)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,i){if(e||(e=[]),!Array.isArray(e)){this.error(103);return}const o=[],s=this.csrm,r=new Set(e);if(s)for(const n of r){const a=s.getRowNode(n);a&&o.push(a)}else this.beans.rowModel.forEachNode(n=>{r.has(n.id)&&o.push(n)});i&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:o,source:t})}canSelectAll(){return!!this.csrm}recomputeSelectable(e){const t=this.updateRowSelectable(e,!0);return!t&&e.isSelected()&&this.selectRowNode(e,!1,void 0,"selectableChanged")&&(this.detailSelection.delete(e.id),this.dispatchSelectionChanged("selectableChanged")),t}updateSelectable(e,t){const{gos:i,rowModel:o}=this.beans;if(!Ye(i))return;const s=this.csrm,r=!!s&&this.groupSelectsDescendants,n=s?s.rootNode:null,a=t?.adds,l=t?.updates;++this.selectionBatchDepth;try{if(!s)o.forEachNode(d=>this.recomputeSelectable(d));else if(r)pr(n,o.hierarchical,e,d=>{let c=!1;const u=d.childrenAfterGroup;for(let h=0,g=u.length;h<g;++h){const p=u[h],f=!p.group&&(!a||a.has(p)||l.has(p))?this.recomputeSelectable(p):p.selectable;c||(c=f)}this.setRowSelectable(d,c,!0)});else if(e||!a)pr(n,o.hierarchical,e,d=>{d!==n&&this.recomputeSelectable(d);const c=d.childrenAfterGroup;for(let u=0,h=c.length;u<h;++u){const g=c[u];!g.group&&(!a||a.has(g)||l.has(g))&&this.recomputeSelectable(g)}});else{for(const d of a)this.recomputeSelectable(d);for(const d of l)this.recomputeSelectable(d)}!e&&r&&this.updateGroupsFromChildrenSelections?.("selectableChanged")}finally{this.endSelectionBatch()}}updateSelectableAfterGrouping(e,t){++this.selectionBatchDepth;try{this.isRowSelectable&&this.updateSelectable(e,t),this.groupSelectsDescendants&&this.updateGroupsFromChildrenSelections?.("rowGroupChanged",e)&&this.dispatchSelectionChanged("rowGroupChanged")}finally{this.endSelectionBatch()}}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail||!e.expanded)return;const i=e.detailNode?.detailGridInfo?.api;if(!i)return;const o=i.getDisplayedRowCount();if(o===0&&e.isSelected()===void 0)return;const s=uL(i);e.isSelected()!==s&&this.selectRowNode(e,s,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!s&&o>0&&this.detailSelection.set(e.id,new Set(i.getSelectedNodes().map(n=>n.id)))}setDetailSelectionState(e,t,i){if(!this.masterSelectsDetail)return;if(!ni(t)){this.warn(269);return}const o=this.detailSelection.get(e.id),s=()=>{if(!o?.size)return!1;const r=[];for(const n of o){const a=i.getRowNode(n);a&&r.push(a)}return r.length?(i.setNodesSelected({nodes:r,newValue:!0,source:"masterDetail"}),!0):!1};switch(e.isSelected()){case!0:{i.selectAll();break}case!1:{i.deselectAll();break}case void 0:{s();break}default:break}}dispatchSelectionChanged(e){if(this.selectionBatchDepth>0){this.pendingSelectionChanged=!0,this.pendingSelectionSource??(this.pendingSelectionSource=e);return}this.pendingSelectionChanged=!1,this.pendingSelectionSource=null,this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}flushPendingSelectionChanged(){this.selectionBatchDepth===0&&this.pendingSelectionChanged&&this.dispatchSelectionChanged(this.pendingSelectionSource)}endSelectionBatch(){--this.selectionBatchDepth===0&&this.flushPendingSelectionChanged()}};function uL(e){let t=0,i=0;return e.forEachNode(o=>{o.isSelected()?++t:o.selectable&&++i}),Zv(t,i)}function Zv(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function hL(e,t){let i=t.parent;for(;i;){if(i===e)return!0;i=i.parent}return!1}function Yv(e){if(e.isSelected()===!1)return!0;const t=e.childrenAfterFilter;if(t){for(let i=0,o=t.length;i<o;++i)if(Yv(t[i]))return!0}return!1}var Jv={moduleName:"SharedRowSelection",version:E,beans:[_k],css:[Wk],apiFunctions:{setNodesSelected:Uk,selectAll:qk,deselectAll:$k,selectAllFiltered:Kk,deselectAllFiltered:jk,selectAllOnCurrentPage:Qk,deselectAllOnCurrentPage:Zk,getSelectedNodes:Yk,getSelectedRows:Jk}},Xv={moduleName:"RowSelection",version:E,rowModels:["clientSide","infinite","viewport"],beans:[cL],dependsOn:[Jv]};function gL(e,t){tw(e,t),ew(e,t),iw(e,t)}function ew(e,t){const{column:i,comp:o}=t,s=i.colDef,r=s.cellClassRules,n=yd(e,t,s);Ka(e.expressionSvc,r===t.customStyleClassRules?void 0:t.customStyleClassRules,r,n,a=>o.toggleCss(a,!0),a=>o.toggleCss(a,!1)),t.customStyleClassRules=r}function tw(e,t){const i=t.column.colDef,o=i.cellStyle;if(!o)return;let s;typeof o=="function"?s=o(yd(e,t,i)):s=o,s&&t.comp.setUserStyles(s)}function iw(e,t){const{column:i,comp:o}=t,s=i.colDef,r=yd(e,t,s),n=t.customStyleStaticClasses;if(n)for(const l of n)o.toggleCss(l,!1);const a=e.cellStyles.getStaticCellClasses(s,r);t.customStyleStaticClasses=a;for(const l of a)o.toggleCss(l,!0)}function yd(e,t,i){const{value:o,rowNode:s,column:r}=t;return G(e.gos,{value:o,data:s.data,node:s,colDef:i,column:r,rowIndex:s.rowIndex})}var pL=class extends y{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,i,o){Ka(this.beans.expressionSvc,void 0,e.cellClassRules,t,i,o),this.processStaticCellClasses(e,t,i)}getStaticCellClasses(e,t){const{cellClass:i}=e;if(!i)return[];let o;return typeof i=="function"?o=i(t):o=i,typeof o=="string"&&(o=[o]),o||[]}setupCellCustomStyle(e){gL(this.beans,e)}applyCellUserStyles(e){tw(this.beans,e)}applyCellClassesFromColDef(e){iw(this.beans,e)}applyCellClassRules(e){ew(this.beans,e)}processStaticCellClasses(e,t,i){this.getStaticCellClasses(e,t).forEach(s=>{i(s)})}},ow={moduleName:"CellStyle",version:E,beans:[pL]},sw={moduleName:"RowStyle",version:E,beans:[e4]},fL={moduleName:"AllCommunity",version:E,dependsOn:[ia,Wf,Fv,eC,tC,iC,oC,sC,rC,nC,Xm,Sv,bv,yv,Rv,wv,Ev,xv,Lv,yf,wd,Hv,fa,Ff,Pf,zv,Hf,lg,Bv,Xv,gf,ow,Bf,sw,Pv,pf,_v,ul,Mv,Wv,ag,tg,qv,If]},mL=["deprecation","warning","error"],fr={throwOn:[],showOverlayOn:[...mL],suppress:[]},rw=fr.showOverlayOn;function nw(){return rw}function CL(e){Ph({capture:!0,throwOn:e?.throwOn??fr.throwOn,suppress:e?.suppress??fr.suppress}),rw=e?.showOverlayOn??fr.showOverlayOn}function vL(){Ph({capture:!0})}import{_fuzzySuggestions as wL}from"ag-stack";var aw={AdvancedFilter:1,AiToolkit:1,AllEnterprise:1,BatchEdit:1,CalculatedColumns:1,CellSelection:1,Clipboard:1,ColumnHeaderEdit:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,NewFiltersToolPanel:1,PdfExport:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingEdit:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,ShowValuesAs:1,SideBar:1,Sparklines:1,StatusBar:1,Toolbar:1,TreeData:1,ViewportRowModel:1,Formula:1,Notes:1},Rd=["TextFilter","NumberFilter","BigIntFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],SL={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],CsrmHierarchy:["RowGrouping","Pivot","TreeData"],CsrmGroupStages:["RowGrouping","Pivot","TreeData"],ColumnFilter:Rd,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],RowModelSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...Rd,"QuickFilter","ExternalFilter","AdvancedFilter"],GroupCellRenderer:["RowGrouping","Pivot","TreeData","MasterDetail","ServerSideRowModel"],KeyboardNavigation:["AllCommunity"],LoadingCellRenderer:["ServerSideRowModel"],MenuCore:["ColumnMenu","ContextMenu"],MenuItem:["ColumnMenu","ContextMenu","MultiFilter","IntegratedCharts","ColumnsToolPanel"],Overlay:["AllCommunity"],PinnedColumn:["AllCommunity"],SharedAggregation:["RowGrouping","Pivot","TreeData","ServerSideRowModel"],SharedDragAndDrop:["AllCommunity"],SharedMasterDetail:["MasterDetail","ServerSideRowModel"],SharedMenu:[...Rd,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},bL={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function yL(e,t){const i=[];for(const o of Array.isArray(e)?e:[e]){const s=SL[o];if(s)for(const r of s){const n=bL[r];(!n||n===t)&&i.push(r)}else i.push(o)}return i}var RL=(e,t,i)=>{const o=Object.entries(e.reduce((s,{name:r,source:n})=>({...s,[n]:(s[n]||[]).concat(r)}),{})).map(([s,r])=>`import { ${r.join(", ")} } from '${s}';`);return i?`${["import { AgGridProvider, AgGridReact } from 'ag-grid-react';",...o].join(`
`)}
const modules = [ ${t} ];
function App() {
return (
<AgGridProvider modules={modules}>
<AgGridReact /* ... props */ />
</AgGridProvider>
);
}`:`${o.join(`
`)}
ModuleRegistry.registerModules([ ${t} ]);`},EL=(e,t)=>{const i=e.map(r=>({name:Lo(r),source:aw[r]?"ag-grid-enterprise":"ag-grid-community"}));e.some(r=>r==="IntegratedCharts"||r==="Sparklines")&&i.push({name:"AgChartsEnterpriseModule",source:"ag-charts-enterprise"});const s=e.map(r=>Lo(r,!0)).join(", ");return t||i.unshift({name:"ModuleRegistry",source:"ag-grid-community"}),`${RL(i,s,t)}
For more info see: ${Wt}/modules/`};function Lo(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function xL(e,t){const i=t.filter(r=>r==="IntegratedCharts"||r==="Sparklines");let o="";return!globalThis?.agCharts&&i.length>0?o=`Unable to use ${e} as either the \`ag-charts-community\` or \`ag-charts-enterprise\` script needs to be included alongside \`ag-grid-enterprise\`.
`:t.some(r=>aw[r])&&(o=o+`Unable to use ${e} as that requires the \`ag-grid-enterprise\` script to be included.
`),o}function FL(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return}}var PL=(e,t,i,o)=>{const s=t.filter(l=>l==="IntegratedCharts"||l==="Sparklines"),r=s.map(l=>Lo(l)).join(),n=s.length>0?`${r} must be initialised with an AG Charts module. One of \`AgChartsCommunityModule\` / \`AgChartsEnterpriseModule\`.`:"",a=t.length>1?"one of "+t.map(l=>`\`${Lo(l)}\``).join(", "):`\`${Lo(t[0])}\``;return`Unable to use ${e} as ${a} is not registered${i?" for gridId: "+o:""}. ${n}`.trim()},Ed=({reasonOrId:e,moduleName:t,reports:i,gridScoped:o,gridId:s,rowModelType:r,additionalText:n,isUmd:a,usesAgGridProvider:l})=>{const c=(Array.isArray(i)&&i.length?i.map(FL).filter(m=>m!=null):[{reasonOrId:e,moduleName:t,additionalText:n}]).map(m=>({reason:typeof m.reasonOrId=="string"?m.reasonOrId:TL[m.reasonOrId],resolvedModuleNames:yL(m.moduleName,r),additionalText:m.additionalText}));if(a)return c.map(m=>xL(m.reason,m.resolvedModuleNames)).join("");const u=[...new Set(c.flatMap(m=>m.resolvedModuleNames))],g=`${c.map(m=>PL(m.reason,m.resolvedModuleNames,o,s)).join(`
`)}${c.length==1?" ":`
`}Check if you have registered the module${u.length==1?"":"s"}:
`,p=[...new Set(c.map(m=>m.additionalText).filter(Boolean))],f=p.length>0?`
${p.join(`
`)}`:"";return`${g}
${EL(u,l)}`+f},lw=e=>`${e} must be initialised with an AG Charts module. One of \`AgChartsCommunityModule\` / \`AgChartsEnterpriseModule\`.
import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
import { ModuleRegistry } from 'ag-grid-community';
import { ${e} } from 'ag-grid-enterprise';
ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);
`,DL=e=>`Unable to use the Clipboard API (\`navigator.clipboard.${e}()\`). The reason why it could not be used has been logged on the web development console. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property \`suppressClipboardApi=true\` (which will default the grid to using the workaround rather than the API.`,ML={1:()=>"`rowData` must be an array",2:({nodeId:e})=>`Duplicate node id \`${e}\` detected from \`getRowId\` callback, this could cause issues in your grid.`,3:()=>"Calling `gridApi.resetRowHeights()` makes no sense when using Auto Row Height.",4:({id:e})=>`Could not find row \`id=${e}\`, data item was not found for this id`,5:({data:e})=>["Could not find data item as object was not found.",e," Consider using `getRowId` to help the Grid find matching row data"],6:()=>"`groupHideOpenParents` only works when specifying specific columns for `colDef.showRowGroup`",7:()=>"Pivoting is not supported with aligned grids as it may produce different columns in each grid.",8:({key:e})=>`Unknown key for navigation \`${e}\``,9:({variable:e})=>`No value for \`${e?.cssName}\`. This usually means that the grid has been initialised before styles have been loaded. The default value of \`${e?.defaultValue}\` will be used and updated when styles load.`,10:({eventType:e})=>`As of v33, the \`${e}\` event is deprecated. Use the global \`modelUpdated\` event to determine when row children have changed.`,11:()=>"No gridOptions provided to `createGrid`",12:({colKey:e})=>["column ",e," not found"],13:()=>"Could not find `rowIndex`, this means tasks are being executed on a `rowNode` that has been removed from the grid.",14:({groupPrefix:e})=>`Row IDs cannot start with \`${e}\`, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:e})=>["value should be either a string or a function",e],16:({expression:e,params:t,e:i})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",i],17:()=>"you need either `field` or `valueSetter` set on `colDef` for editing to work",18:()=>"`alignedGrids` contains an `undefined` option.",19:()=>"`alignedGrids` - No api found on the linked grid.",20:()=>"You may want to configure via a callback to avoid setup race conditions:\n `alignedGrids: () => [linkedGrid]`",21:()=>"pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.",22:({key:e})=>`${e} is an initial property and cannot be updated.`,23:()=>"The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",24:()=>"row height must be a number if not using standard row model",25:({id:e})=>["The `getRowId` callback must return a string. The ID ",e," is being cast to a string."],26:({fnName:e,preDestroyLink:t})=>`Grid API function \`${e}()\` cannot be called as the grid has been destroyed.
Either clear local references to the grid api, when it is destroyed, or check \`gridApi.isDestroyed()\` to avoid calling methods against a destroyed grid.
To run logic when the grid is about to be destroyed use the \`gridPreDestroyed\` event. See: ${t}`,27:({fnName:e,module:t})=>`API function \`${e}\` not registered to module \`${t}\``,28:()=>"`setRowCount` cannot be used while using row grouping.",29:()=>"tried to call `sizeColumnsToFit()` but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",30:({toIndex:e})=>["tried to insert columns in invalid location, toIndex = ",e,"remember that you should not count the moving columns when calculating the new index"],31:()=>"infinite loop in `resizeColumnSets`",32:()=>"`applyColumnState()` - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.",33:()=>"`stateItem.aggFunc` must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON.",34:({key:e})=>`the column type \`${e}\` is a default column type and cannot be overridden.`,35:()=>"Column type definitions `columnTypes` with a `type` attribute are not supported because a column type cannot refer to another column type. Only column definitions `columnDefs` can use the `type` attribute to refer to a column type.",36:({type:e})=>`\`colDef.type\` \`${e}\` does not correspond to defined \`gridOptions.columnTypes\``,37:()=>"Changing the column pinning status is not allowed with `domLayout='print'`",38:({iconName:e})=>`provided icon \`${e}\` needs to be a string or a function`,39:()=>"Applying column order broke a group where columns should be married together. Applying new order has been discarded.",40:({error:e,method:t})=>`${e}
${DL(t)}`,41:()=>"Browser did not allow `document.execCommand('copy')`. Ensure `api.copySelectedRowsToClipboard()` is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support `document.execCommand('copy')` for clipboard operations",43:({iconName:e})=>`As of v33, icon \`${e}\` is deprecated. Use the icon CSS name instead.`,44:()=>"Data type definition hierarchies (via the `extendsDataType` property) cannot contain circular references.",45:({parentCellDataType:e})=>`The data type definition \`${e}\` does not exist.`,46:()=>"The `baseDataType` property of a data type definition must match that of its parent.",47:({cellDataType:e})=>`Missing data type definition - \`${e}\``,48:({property:e,inferred:t,colId:i})=>{const o=t?" (inferred)":"",s=i?` for column "${i}"`:"";return`Cell data type is \`object\`${o} but no Value \`${e}\` has been provided${s}. Please either provide an object data type definition with a Value \`${e}\`, or set:
- \`colDef.value${e}\`${t&&e==="Parser"?"\n - `colDef.cellDataType = 'object'`":""}`},49:({methodName:e})=>`Framework component is missing the method \`${e}()\``,50:({compName:e})=>`Could not find component \`${e}\`, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"`addRowDropZone` - A container target needs to be provided",56:()=>"`addRowDropZone` - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, `rowNode.isFullWidthCell()` has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`\`setFilterModel()\` - no column found for colId: ${e}`,63:({colId:e})=>`\`setFilterModel()\` - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`\`setFilterModel()\` - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>"filter missing setModel method, which is needed for `setFilterModel`",66:()=>"filter API missing getModel method, which is needed for `getFilterModel`",67:()=>"Filter is missing `isFilterActive()` method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:e})=>`\`getGui\` method from filter returned \`${e}\`; it should be a DOM element.`,70:({newFilter:e})=>`Grid option \`quickFilterText\` only supports string inputs, received: ${typeof e}`,71:()=>"`debounceMs` is ignored when apply button is present",72:({keys:e})=>["ignoring `FilterOptionDef` as it is missing ",e],74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:e})=>['Unexpected type of filter "',e,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing `conditions`",78:()=>"Filter Model contains more conditions than `filterParams.maxNumConditions`. Additional conditions have been ignored.",79:()=>"`filterParams.maxNumConditions` must be greater than or equal to one.",80:()=>"`filterParams.numAlwaysVisibleConditions` must be greater than or equal to one.",81:()=>"`filterParams.numAlwaysVisibleConditions` cannot be greater than `filterParams.maxNumConditions`.",82:({param:e})=>`\`DateFilter\` \`${e}\` is not a number`,83:()=>"`DateFilter` `minValidYear` should be <= `maxValidYear`",84:()=>"`DateFilter` `minValidDate` should be <= `maxValidDate`",85:()=>"`DateFilter` should not have both `minValidDate` and `minValidYear` parameters set at the same time! `minValidYear` will be ignored.",86:()=>"`DateFilter` should not have both `maxValidDate` and `maxValidYear` parameters set at the same time! `maxValidYear` will be ignored.",87:()=>"`DateFilter` parameter `minValidDate` should always be lower than or equal to parameter `maxValidDate`.",88:({index:e})=>`Invalid row index for \`ensureIndexVisible\`: ${e}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing `getRows` method",91:()=>"Filter is missing method `doesFilterPass`",92:()=>"`AnimationFrameService` called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:i,pageSizeOptions:o})=>`\`paginationPageSize=${e}\`${t?"":" (default value)"}, but ${e} is not included in${i?"":" the default"} \`paginationPageSizeSelector=[${o?.join(", ")}]\`.`,95:({paginationPageSizeOption:e,paginationPageSizeSelector:t})=>`Either set \`${t}\` to an array that includes ${e} or to \`false\` to disable the page size selector.`,96:({id:e,data:t})=>["Duplicate ID",e,"found for pinned row with data",t,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:e})=>`cellEditor for column ${e} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading UI when the `loading` grid option is set. Set `loading=false` instead.",101:({propertyName:e,componentName:t,suggestions:i})=>[`Could not find \`${t}\` component. It was configured as "${e}: \`${t}\`" but it wasn't found in the list of registered components.`,i?.length?`
Did you mean: \`[${i.slice(0,3)}]\`?
`:"","If using a custom component check it has been registered correctly."].join(`
`),102:()=>"`selectAll`: `filtered` only works when `gridOptions.rowModelType='clientSide'`",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:e,param:t})=>`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use \`${e}s\` to silence this warning.`,105:({e})=>["chart rendering failed",e],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the \`theme\` grid option, but the file (\`ag-grid.css\`) is also included and will cause styling issues. Remove \`ag-grid.css\` from the page. See the migration guide: ${Wt}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>["chart update failed",e],109:({inputValue:e,allSuggestions:t})=>{const i=wL({inputValue:e,allSuggestions:t,hideIrrelevant:!0,maxSuggestions:4}).values;return[`Could not find \`${e}\` aggregate function. It was configured as "aggFunc: \`${e}\`" but it wasn't found in the list of registered aggregations.`,i.length>0?`
Did you mean: \`[${i.slice(0,3)}]\`?
`:"","If using a custom aggregation function check it has been registered correctly."].join(`
`)},110:()=>"`groupHideOpenParents` only works when specifying specific columns for `colDef.showRowGroup`",111:()=>"Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.",113:()=>"Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values",114:({component:e})=>`Could not find component with name of \`${e}\`. Is it in \`Vue.components\`?`,116:()=>"Invalid selection state. The state must conform to `IServerSideSelectionState`.",117:()=>"`selectAll` must be of boolean type.",118:()=>"Infinite scrolling must be enabled in order to set the row count.",119:()=>"Unable to instantiate filter",120:()=>"`MultiFloatingFilterComp` expects `MultiFilter` as its parent",121:()=>"a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a `colDef.keyCreator` (see AG Grid docs) or b) to `toString()` on the object to return a key",122:()=>"could not find the document, document is empty",123:()=>"Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.",124:()=>"No active charts to update.",125:({chartId:e})=>`Unable to update chart. No active chart found with ID: ${e}.`,126:()=>"unable to restore chart as no chart model is provided",127:({allRange:e})=>`unable to create chart as ${e?"there are no columns in the grid":"no range is selected"}.`,128:({feature:e})=>`${e} is only available if using \`multiRow\` selection mode.`,129:({feature:e,rowModel:t})=>`${e} is only available if using \`clientSide\` or \`serverSide\` \`rowModelType\`, you are using \`${t}\`.`,130:()=>"cannot multi select unless selection mode is `multiRow`",132:()=>"Row selection features are not available unless `rowSelection` is enabled.",133:({iconName:e})=>`icon \`${e}\` function should return back a string or a dom object`,134:({iconName:e})=>`Did not find icon \`${e}\``,135:()=>"Data type of the new value does not match the cell data type of the column",136:()=>"Unable to update chart as the `type` is missing. It must be either `rangeChartUpdate`, `pivotChartUpdate`, or `crossFilterChartUpdate`.",137:({type:e,currentChartType:t})=>`Unable to update chart as a \`${e}\` update type is not permitted on a ${t}.`,138:({chartType:e})=>`invalid chart type supplied: ${e}`,139:({customThemeName:e})=>`a custom chart theme with the name \`${e}\` has been supplied but not added to the \`chartThemes\` list`,140:({name:e})=>`no stock theme exists with the name \`${e}\` and no custom chart theme with that name was supplied to \`customChartThemes\``,141:()=>"cross filtering with row grouping is not supported.",142:()=>"cross filtering is only supported in the client side row model.",143:({panel:e})=>`\`${e}\` is not a valid Chart Tool Panel name`,144:({type:e})=>`Invalid charts data panel group name supplied: \`${e}\``,145:({group:e})=>`As of v32, only one charts customize panel group can be expanded at a time. \`${e}\` will not be expanded.`,146:({comp:e})=>`Unable to instantiate component \`${e}\` as its module hasn't been loaded. Add \`ValidationModule\` to see which module is required.`,147:({group:e})=>`Invalid charts customize panel group name supplied: \`${e}\``,148:({group:e})=>`invalid \`chartGroupsDef\` config \`${e}\``,149:({group:e,chartType:t})=>`invalid \`chartGroupsDef\` config \`${e}.${t}\``,150:()=>"`seriesChartTypes` are required when the `customCombo` chart type is specified.",151:({chartType:e})=>`invalid chartType \`${e}\` supplied in \`seriesChartTypes\`, converting to \`line\` instead.`,152:({colId:e})=>`no \`seriesChartType\` found for colId = \`${e}\`, defaulting to \`line\`.`,153:({chartDataType:e})=>`unexpected \`chartDataType\` value \`${e}\` supplied, instead use \`category\`, \`series\` or \`excluded\``,154:({colId:e})=>`cross filtering requires a \`agSetColumnFilter\` or \`agMultiColumnFilter\` to be defined on the column with id: ${e}`,155:({option:e})=>`\`${e}\` is not a valid Chart Toolbar Option`,156:({panel:e})=>`Invalid panel in \`chartToolPanelsDef.panels\`: \`${e}\``,157:({unrecognisedGroupIds:e})=>["unable to find group(s) for supplied groupIds:",e],158:()=>"can not expand a column item that does not represent a column group header",159:()=>"Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",160:()=>"Export cancelled. Export is not allowed as per your configuration.",161:()=>"The Excel Exporter is currently on Multi Sheet mode. End that operation by calling `api.getMultipleSheetAsExcel()` or `api.exportMultipleSheetsAsExcel()`",162:({id:e,dataType:t})=>`Unrecognized data type for excel export [${e}.dataType=${t}]`,163:({featureName:e})=>`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.
Please turn off ${e} to enable Excel table exports.`,164:()=>"Unable to add data table to Excel sheet: A table already exists.",165:()=>"Unable to add data table to Excel sheet: Missing required parameters.",166:({unrecognisedGroupIds:e})=>["unable to find groups for these supplied groupIds:",e],167:({unrecognisedColIds:e})=>["unable to find columns for these supplied colIds:",e],168:()=>"`detailCellRendererParams.template` should be function or string",169:()=>'Reference to `eDetailGrid` was missing from the details template. Please add `data-ref="eDetailGrid"` to the template.',170:({providedStrategy:e})=>`invalid \`cellRendererParams.refreshStrategy = ${e}\` supplied, defaulting to \`refreshStrategy = 'rows'\`.`,171:()=>"could not find detail grid options for master detail, please set `gridOptions.detailCellRendererParams.detailGridOptions`",172:()=>"could not find `getDetailRowData` for master / detail, please set `gridOptions.detailCellRendererParams.getDetailRowData`",173:({group:e})=>`invalid \`chartGroupsDef\` config \`${e}\``,174:({group:e,chartType:t})=>`invalid \`chartGroupsDef\` config \`${e}.${t}\``,175:({menuTabName:e,itemsToConsider:t})=>[`Trying to render an invalid menu item \`${e}\`. Check that your \`menuTabs\` contains one of `,t],176:({key:e})=>`unknown menu item type ${e}`,177:()=>"valid values for `cellSelection.handle.direction` are `x`, `y` and `xy`. Default to `xy`.",178:({colId:e})=>`column ${e} is not visible`,179:()=>"`totalValueGetter` should be either a function or a string (expression)",180:()=>"`agRichSelectCellEditor` requires `cellEditorParams.values` to be set",181:()=>"`agRichSelectCellEditor` cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",182:()=>'you cannot mix `groupDisplayType = "multipleColumns"` with `treeData`, only one column can be used to display groups when doing tree data',183:()=>"Group Column Filter only works on group columns. Please use a different filter.",184:({parentGroupData:e,childNodeData:t})=>["duplicate group keys for row data, keys should be unique",[e,t]],185:({data:e})=>["`getDataPath()` should not return an empty path",[e]],186:({rowId:e,rowData:t,duplicateRowsData:i})=>["duplicate group keys for row data, keys should be unique",e,t,...i??[]],187:({rowId:e,firstData:t,secondData:i})=>[`Duplicate node id ${e}. Row IDs are provided via the \`getRowId()\` callback. Please modify the \`getRowId()\` callback code to provide unique row id values.`,"first instance",t,"second instance",i],188:e=>`\`getRowId\` callback must be provided for Server Side Row Model ${e?.feature||"selection"} to work correctly.`,189:({startRow:e})=>`invalid value ${e} for startRow, the value should be >= 0`,190:({rowGroupId:e,data:t})=>["null and undefined values are not allowed for server side row model keys",e?`column = ${e}`:"","data is ",t],194:({method:e})=>`calling \`gridApi.${e}()\` is only possible when using \`rowModelType='clientSide'\`.`,195:({justCurrentPage:e})=>`selecting just ${e?"current page":"filtered"} only works when \`gridOptions.rowModelType='clientSide'\``,196:({key:e})=>`Provided ids must be of string type. Invalid id provided: ${e}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:Ed,201:({rowModelType:e})=>`Could not find row model for rowModelType = ${e}`,202:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model. Use `api.getServerSideSelectionState()` instead.",203:()=>"Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove `getRowHeight()` callback or b) remove `maxBlocksInCache` property. Purging has been disabled.",204:()=>"Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove `colDef.autoHeight` or b) remove `maxBlocksInCache` property. Purging has been disabled.",205:({duplicateIdText:e})=>`Unable to display rows as duplicate row ids (${e}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,206:()=>"getRowId callback must be implemented for transactions to work. Transaction was ignored.",207:()=>"The Set Filter Parameter `defaultToNothingSelected` value was ignored because it does not work when `excelMode` is used.",208:()=>"Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.",209:()=>`Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${Wt}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property `treeList=true` for Set Filter params, but you did not provide a `treeListPathGetter` or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:e})=>`unable to lookup Tool Panel as invalid key supplied: ${e}`,215:({key:e,validKeys:t})=>`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${(t??[]).join(",")}`,216:({name:e})=>`Missing component for \`${e}\``,217:({invalidColIds:e})=>["unable to find grid columns for the supplied colDef(s):",e],218:({property:e,defaultOffset:t})=>`${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,219:({property:e})=>`Property ${e} does not exist on the target object.`,220:({lineDash:e})=>`\`${e}\` is not a valid \`lineDash\` option.`,221:()=>"`agAggregationComponent` should only be used with the client and server side row model.",222:()=>"`agFilteredRowCountComponent` should only be used with the client side row model.",223:()=>"`agSelectedRowCountComponent` should only be used with the client and server side row model.",224:()=>"`agTotalAndFilteredRowCountComponent` should only be used with the client side row model.",225:()=>"`agTotalRowCountComponent` should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:e})=>`unrecognised menu item ${e}`,230:()=>"`detailCellRendererParams.template` is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",233:({methodName:e})=>`Framework component is missing the method \`${e}()\``,234:()=>"Group Column Filter does not work with the `colDef` property `field`. This property will be ignored.",235:()=>"Group Column Filter does not work with the `colDef` property `filterValueGetter`. This property will be ignored.",236:()=>"Group Column Filter does not work with the `colDef` property `filterParams`. This property will be ignored.",237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"`setRowCount` can only accept a positive row count.",239:()=>"Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (`ag-grid.css`) is also included and will cause styling issues. Either pass the string `legacy` to the theme grid option to use v32 style themes, or remove `ag-grid.css` from the page to use Theming API.",240:({theme:e})=>`theme grid option must be a Theming API theme object or the string \`legacy\`, received: ${e}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>"Row selection state could not be parsed due to invalid data. Ensure all child state has `toggledNodes` or does not conform with the parent rule. \nPlease rebuild the selection state and reapply it.",248:()=>"`SetFloatingFilter` expects `SetFilter` as its parent",249:()=>"Must supply a Value Formatter in Set Filter params when using a Key Creator",250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:e})=>`Unable to create chart as an invalid chartType = \`${e}\` was supplied.`,252:()=>"cannot get grid to draw rows when it is in the middle of drawing rows. \nYour code probably called a grid API method while the grid was in the render stage. \nTo overcome this, put the API call into a timeout, e.g. instead of `api.redrawRows()`, call `setTimeout(function() { api.redrawRows(); }, 0)`. \nTo see what part of your code that caused the refresh check this stacktrace.",253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e?.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load `ValidationModule` if missing.",257:()=>lw("IntegratedChartsModule"),258:()=>lw("SparklinesModule"),259:({part:e})=>`the argument to \`theme.withPart\` must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:i,gridId:o,rowModelType:s,usesAgGridProvider:r})=>Ed({reasonOrId:`AG Grid \`${e}\` component: \`${t}\``,moduleName:fi[t],gridId:o,gridScoped:i,rowModelType:s,usesAgGridProvider:r}),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 ${Wt}/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.`,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},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.",301:({key:e})=>`Toolbar item \`${e}\` is missing the \`toolbarItem\` property and will not be rendered.`,302:({itemName:e,moduleName:t,gridScoped:i,gridId:o,rowModelType:s})=>Ed({reasonOrId:`Toolbar item \`${e}\``,moduleName:t,gridId:o,gridScoped:i,rowModelType:s,additionalText:"The item will not be rendered."}),303:({key:e})=>`Multiple toolbar items share the explicit key \`${e}\`. Only the first item is rendered.`,304:({dataType:e})=>`Invalid \`calculatedColumns.dataTypes\` entry \`${e}\` - it must be a built-in data type or registered via \`dataTypeDefinitions\`. It has been ignored.`,305:()=>"The file input overlay is shown but no `processFileInput` is configured. The overlay will not work without a `processFileInput`.",306:({version:e,name:t,message:i})=>`As of v${e}, \`${t}\` is deprecated. ${i??""}`,307:({objectName:e,name:t,suggestions:i,hasContext:o})=>{let s=`Invalid \`${e}\` property \`${t}\` did you mean any of these: ${(i??[]).slice(0,8).map(r=>`\`${r}\``).join(", ")}.`;return o&&(s+=`
If you are trying to annotate \`${e}\` with application data, use the \`${e}.context\` property instead.`),s},308:({version:e,apiMethod:t,replacement:i,message:o})=>{const s=i?`Please use \`${i}\` instead. `:"";return`Since ${e} \`api.${t}\` is deprecated. ${s}${o??""}`},309:({name:e,rowModel:t,supportedRowModels:i})=>`\`${e}\` is not supported with the \`${t}\` row model. It is only valid with: ${(i??[]).join(", ")}.`,310:({objectName:e,url:t})=>`One or more \`${e}\` properties are not recognised. For more info see: ${t}`,311:({functionName:e,rowModels:t})=>`\`api.${e}\` can only be called when \`gridOptions.rowModelType\` is ${(t??[]).join(" or ")}.`,312:({chartType:e,renamedChartType:t})=>`The chart type \`${e}\` has been deprecated. Please use \`${t}\` instead.`,313:({paramsType:e,property:t})=>`Unexpected property supplied. \`${e}\` does not contain: \`${t}\`.`,314:({key:e,expectedType:t,actualType:i,value:o})=>`\`${e}\` should be of type \`${t}\` but received \`${i}\` (${String(o)}).`,315:({key:e,failedKey:t,required:i,reason:o})=>`\`${e}\` requires \`${t}\` to be one of \`[${(i??[]).join(", ")}]\`. ${o??""}`,316:({property:e,value:t,expectedType:i})=>`Unable to update chart as invalid params supplied: \`${e}: ${String(t)}\`, expected \`${i}\`.`,317:({property:e,min:t})=>`\`${e}\` should not be lower than ${t}.`,318:({feature:e,conflictsWith:t,advice:i})=>{const o=i?` ${i}`:"";return`${e} is not supported with ${t}.${o}`},319:({feature:e,requirement:t})=>`${e} requires ${t}.`,320:({property:e,allowed:t,value:i})=>{const o=i!==void 0?`, currently it's ${String(i)}`:"";return`\`${e}\` must be one of \`[${(t??[]).join(", ")}]\`${o}.`},321:({property:e,expected:t})=>`\`${e}\` should be ${t}.`,322:({message:e})=>e??"",323:({validNames:e})=>`\`paginationPanels\` expects an array of panel names or config objects: \`[${(e??[]).join(", ")}]\``,324:({property:e,invalidItems:t})=>{const i=(t??[]).map(o=>typeof o=="string"||o==null?Wn(o):JSON.stringify(o)).join(", ");return`\`${e}\` must be an array of type \`(SortDirection | SortDef)[]\`, incorrect items are: \`[${i}]\``},325:({property:e,value:t})=>`\`${e}\` must be an array with at least one element, currently it is \`[${String(t)}]\``,326:({defaultOption:e})=>`ignoring \`defaultOption\` \`${e}\` as it is not one of the filter's \`filterOptions\``,327:({pattern:e})=>`ignoring \`filterParams.allowedCharPattern\` \`${e}\` as it does not compile to a character pattern`,328:({rowModel:e})=>`continuous \`fitCellContents\` auto-sizing is not supported by the '${e}' row model, so it has been ignored`,329:({error:e})=>["`shouldAutoSizeColumns` threw, so the auto-size was skipped:",e],330:({fontFamily:e,registeredFamilies:t})=>`PDF font family "${e}" is not registered. Registered families: ${(t??[]).join(", ")}.`,331:({rowId:e})=>`Row ID \`${e}\` is reserved by AG Grid and should not be returned from \`getRowId\`.`,332:({replacements:e})=>`Legacy theme CSS variables are set on the grid, but the Theming API is in use and ignores them, so they have no effect: ${(e??[]).join(", ")}. Either set the equivalent Theming API variable, or pass the string \`legacy\` to the \`theme\` grid option to keep using v32 style themes. See the migration guide: ${Wt}/theming-migration/`,333:({error:e})=>["`onIssueRaised` threw:",e]};function dw(e,t){const i=ML[e];if(!i)return[`Missing error text for error id ${e}!`];const o=i(t),r=`
See ${Cs(e,t)}`;return Array.isArray(o)?[...o,r]:[o,r]}var TL={1:"Charting Aggregation",2:"`pivotResultFields`",3:"`setTooltip`",4:"the `isAnyOf` / `isNoneOf` filter options in the Advanced Filter"},AL=/\s*(See|Visit) https?:\/\/\S+/g,cw=/\s*For more info see:\s*(https?:\/\/\S+)/,IL=/^\s*import\s/,kL=/^(import |const |let |function |class |ModuleRegistry|<|>|\}|\))/,xd=/https?:\/\/\S+/g,LL=/[.,;:)\]]+$/,VL="`";function HL(e){return`This ${e} may not have originated from this grid`}function BL(e){if(typeof e=="string")return e;if(e==null)return"";let t;try{t=JSON.stringify(e)}catch{t=String(e)}return`\`${t}\``}function OL(e){const{id:t,params:i,defaultMessage:o}=e;return dw(t,i).map(BL).join(" ").trim()||o||""}function GL(e){const t=e.match(cw)?.[1],i=e.replace(AL,"").replace(cw,"").trim();return{..._L(i),docLink:t}}function uw(e){return GL(OL(e))}function NL(e){const t=e.trim();return t===""?!1:kL.test(t)||/[;{(]$/.test(t)||t.includes("=>")}function _L(e){const t=e.split(`
`);let i=-1;for(let a=0,l=t.length;a<l;++a)if(IL.test(t[a])){i=a;break}if(i===-1)return{message:e};let o=i;for(let a=i,l=t.length;a<l&&(t[a].trim()===""||NL(t[a]));++a)o=a;const s=t.slice(0,i).join(`
`).trim(),r=t.slice(i,o+1).join(`
`).trim(),n=t.slice(o+1).join(`
`).trim();return{message:s,code:r,note:n||void 0}}function zL(e,t){const i=t.split(VL);for(let o=0,s=i.length;o<s;++o){const r=i[o];if(r!=="")if(o%2===1){const n=V({tag:"code",cls:"ag-overlay-error-inline-code"});n.textContent=r,e.appendChild(n)}else WL(e,r)}}function WL(e,t){let i=0;xd.lastIndex=0;let o;for(;(o=xd.exec(t))!==null;){o.index>i&&e.appendChild(document.createTextNode(t.slice(i,o.index)));let s=o[0];const r=LL.exec(s)?.[0]??"";r&&(s=s.slice(0,s.length-r.length)),e.appendChild(Fd(s,s)),r&&e.appendChild(document.createTextNode(r)),i=xd.lastIndex}i<t.length&&e.appendChild(document.createTextNode(t.slice(i)))}function hw(e){return e.replace(/^[a-z]/,t=>t.toUpperCase())}function gw(e){const t=V({tag:"div",cls:"ag-overlay-error-message"});return zL(t,e),t}function Fd(e,t){const i=V({tag:"a",cls:"ag-overlay-error-link"});return i.href=e,i.target="_blank",i.rel="noopener noreferrer",i.textContent=t,i}function UL(e,t,i,o,s=!1){const r=V({tag:"div",cls:`ag-overlay-error-item ag-overlay-error-item-${e}`}),{message:n,code:a,note:l,docLink:d}=t;if(s){const u=V({tag:"div",cls:"ag-overlay-error-unattributed"});u.textContent=HL(e),r.appendChild(u)}if(n&&r.appendChild(gw(hw(n))),a){const u=V({tag:"pre",cls:"ag-overlay-error-code"});u.textContent=a,r.appendChild(u)}l&&r.appendChild(gw(l));const c=V({tag:"div",cls:"ag-overlay-error-links"});return c.appendChild(Fd(i,o)),d&&c.appendChild(Fd(d,"Documentation")),r.appendChild(c),r}function qL(e,t={}){return UL(e.severity,uw(e),Cs(e.id,e.params),`AG Grid #${e.id}`,!!t.showsUnattributedOrigin&&e.gridId===void 0)}var mr=["error","warning","deprecation"],$L={error:"Errors",warning:"Warnings",deprecation:"Deprecations"};function KL(e,t,i){const o=V({tag:"div",cls:`ag-overlay-error-section ag-overlay-error-section-${e}`}),s=V({tag:"div",cls:"ag-overlay-error-section-header"});s.textContent=`${$L[e]} (${t.length})`,o.appendChild(s);for(let r=0,n=t.length;r<n;++r)o.appendChild(qL(t[r],i));return o}function pw(e,t={}){const i=[];for(let o=0,s=mr.length;o<s;++o){const r=mr[o],n=e.filter(a=>a.severity===r);n.length!==0&&(i.length>0&&i.push(V({tag:"hr",cls:"ag-overlay-error-divider"})),i.push(KL(r,n,t)))}return i}function jL(e,t,i,o){const{message:s,code:r,note:n,docLink:a}=i,d=[`### [${e[0].toUpperCase()+e.slice(1)}] AG Grid #${t}`];return s&&d.push(hw(s)),r&&d.push("```",r,"```"),n&&d.push(n),a&&d.push(`Documentation: ${a}`),d.push(`More info: ${o}`),d.join(`
`)}function fw(e){return jL(e.severity,e.id,uw(e),Cs(e.id,e.params))}var Pd="Copy",QL="Copied",ZL=1500;function mw(e){return e.textContent=QL,window.setTimeout(()=>{e.textContent=Pd},ZL)}function Cw(e){if(navigator.clipboard?.writeText){navigator.clipboard.writeText(e).catch(()=>vw(e));return}vw(e)}function vw(e){const t=V({tag:"textarea"});t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();try{document.execCommand("copy")}catch{}t.remove()}var YL=["box-sizing: border-box","display: flex","flex-direction: column","width: 100%","height: 100%","min-height: 120px","overflow: auto","background: #fff","color: #181d1f","border: 2px solid color-mix(in srgb, #cc222f 60%, #babfc7)","font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif","font-size: 13px","line-height: 1.5"].join(";"),JL=["display: flex","align-items: center","justify-content: space-between","gap: 12px","padding: 12px 16px","border-bottom: 1px solid #babfc7"].join(";"),XL=["display: flex","flex-direction: column","gap: 16px","padding: 12px 16px"].join(";"),eV=["font-weight: 600","font-size: 14px","color: #cc222f"].join(";"),tV=["flex: none","cursor: pointer","padding: 2px 10px","border: 1px solid #babfc7","border-radius: 4px","background: #f8f8f8","color: inherit","font: inherit","font-size: 12px"].join(";"),ww="ui-monospace, sfmono-regular, menlo, consolas, 'Liberation Mono', monospace",Sw="ag-overlay-error-bootstrap-styles",iV=`
.ag-overlay-error-bootstrap-panel .ag-overlay-error-section {
display: flex;
flex-direction: column;
gap: 16px;
}
.ag-overlay-error-bootstrap-panel .ag-overlay-error-section-header {
margin: 0;
font-weight: 700;
}
.ag-overlay-error-bootstrap-panel .ag-overlay-error-divider {
margin: 0;
border: none;
border-top: 1px solid #babfc7;
}
.ag-overlay-error-bootstrap-panel .ag-overlay-error-item {
display: flex;
flex-direction: column;
gap: 8px;
border-inline-start: solid 3px #babfc7;
padding-inline-start: 8px;
}
.ag-overlay-error-bootstrap-panel .ag-overlay-error-item-error { border-inline-start-color: #cc222f; }
.ag-overlay-error-bootstrap-panel .ag-overlay-error-item-warning { border-inline-start-color: #d98300; }
.ag-overlay-error-bootstrap-panel .ag-overlay-error-item-deprecation { border-inline-start-color: #81878b; }
.ag-overlay-error-bootstrap-panel .ag-overlay-error-message {
margin: 0;
line-height: 1.5;
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.ag-overlay-error-bootstrap-panel .ag-overlay-error-inline-code {
font-family: ${ww};
background: rgba(129, 135, 139, 0.18);
border-radius: 4px;
padding: 0 0.3em;
}
.ag-overlay-error-bootstrap-panel .ag-overlay-error-code {
margin: 0;
font-family: ${ww};
font-size: 0.85em;
background: #f3f4f5;
border: 1px solid #babfc7;
border-radius: 4px;
padding: 8px;
max-height: 50vh;
overflow: auto;
white-space: pre-wrap;
}
.ag-overlay-error-bootstrap-panel .ag-overlay-error-links {
display: flex;
flex-wrap: wrap;
gap: 12px;
}`;function oV(){if(document.getElementById(Sw))return;const e=V({tag:"style"});e.id=Sw,e.textContent=iV,document.head.appendChild(e)}function sV(e){const t=new Set,i=[];for(let o=0,s=e.length;o<s;++o){const r=e[o],n=Rh(r,o);t.has(n)||(t.add(n),i.push(r))}return i}function rV(e,t){const i=e.querySelectorAll(".ag-overlay-error-bootstrap-panel");for(let u=0,h=i.length;u<h;++u)i[u].remove();const o=nw();if(o.length===0)return;const r=sV(t).filter(u=>On(u.severity,o));if(r.length===0)return;oV();const n=V({tag:"div",cls:"ag-overlay-error-bootstrap-panel"});n.style.cssText=YL;const a=V({tag:"div"});a.style.cssText=JL;const l=V({tag:"span"});l.style.cssText=eV,l.textContent="AG Grid failed to initialise",a.appendChild(l);const d=V({tag:"button"});d.type="button",d.textContent=Pd,d.title="Copy diagnostics to the clipboard",d.style.cssText=tV,d.addEventListener("click",()=>{Cw(r.map(fw).join(`
`)),mw(d)}),a.appendChild(d),n.appendChild(a);const c=V({tag:"div"});c.style.cssText=XL,c.append(...pw(r)),n.appendChild(c),e.appendChild(n)}var nV='.ag-overlay-error-panel{--ag-internal-overlay-mono:ui-monospace,sfmono-regular,menlo,consolas,"Liberation Mono",monospace;background:var(--ag-background-color);border:solid calc(var(--ag-border-width)*2) color-mix(in srgb,var(--ag-invalid-color) 60%,var(--ag-border-color));border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);color:var(--ag-text-color);display:flex;flex-direction:column;margin:calc(var(--ag-spacing)*2);max-height:calc(100% - var(--ag-spacing)*4);max-width:640px;overflow:hidden;pointer-events:all;text-align:start}.ag-overlay-error-header{align-items:center;border-bottom:solid var(--ag-border-width) var(--ag-border-color);color:var(--ag-invalid-color);display:flex;flex:none;gap:calc(var(--ag-spacing)*.5);padding:var(--ag-spacing) calc(var(--ag-spacing)*1.5)}.ag-overlay-error-title{flex:1;font-weight:700}.ag-overlay-error-button{align-items:center;background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);color:var(--ag-text-color);cursor:pointer;display:flex;font:inherit;height:calc(var(--ag-spacing)*3.5);justify-content:center;padding:0 calc(var(--ag-spacing)*.75)}.ag-overlay-error-button:hover{background:var(--ag-row-hover-color)}.ag-overlay-error-dismiss{background:transparent;border:none;padding:0;width:calc(var(--ag-spacing)*3.5)}.ag-overlay-error-body{display:flex;flex:1 1 auto;flex-direction:column;gap:calc(var(--ag-spacing)*2);min-height:0;overflow:auto;padding:calc(var(--ag-spacing)*1.5)}.ag-overlay-error-section{display:flex;flex-direction:column;gap:calc(var(--ag-spacing)*2)}.ag-overlay-error-section-header{font-weight:700;margin:0}.ag-overlay-error-divider{border:none;border-top:solid var(--ag-border-width) var(--ag-border-color);margin:0}.ag-overlay-error-item{border-inline-start:solid calc(var(--ag-border-width)*3) var(--ag-border-color);display:flex;flex-direction:column;gap:var(--ag-spacing);padding-inline-start:var(--ag-spacing)}.ag-overlay-error-item-error{border-inline-start-color:var(--ag-invalid-color)}.ag-overlay-error-item-warning{border-inline-start-color:#d98300}.ag-overlay-error-item-deprecation{border-inline-start-color:var(--ag-subtle-text-color)}.ag-overlay-error-code,.ag-overlay-error-message{line-height:1.5;margin:0;overflow-wrap:anywhere;-webkit-user-select:text;-moz-user-select:text;user-select:text;white-space:pre-wrap}.ag-overlay-error-unattributed{align-self:start;background:color-mix(in srgb,var(--ag-border-color) 35%,transparent);border-radius:500px;color:var(--ag-subtle-text-color);font-size:.85em;font-weight:600;padding:calc(var(--ag-spacing)*.25) var(--ag-spacing)}.ag-overlay-error-inline-code{background:color-mix(in srgb,var(--ag-border-color) 35%,transparent);border-radius:var(--ag-border-radius);font-family:var(--ag-internal-overlay-mono);padding:0 .3em}.ag-overlay-error-code{background:var(--ag-header-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);font-family:var(--ag-internal-overlay-mono);font-size:.85em;max-height:50vh;overflow:auto;padding:var(--ag-spacing)}.ag-overlay-error-links{display:flex;flex-wrap:wrap;gap:calc(var(--ag-spacing)*1.5)}';import{RefPlaceholder as Cr}from"ag-stack";var aV={tag:"div",cls:"ag-overlay-error-panel",children:[{tag:"div",cls:"ag-overlay-error-header",children:[{tag:"span",ref:"eTitle",cls:"ag-overlay-error-title"},{tag:"button",ref:"eCopy",cls:"ag-overlay-error-button ag-overlay-error-copy",attrs:{type:"button",title:"Copy diagnostics to the clipboard"},children:Pd},{tag:"button",ref:"eDismiss",cls:"ag-overlay-error-button ag-overlay-error-dismiss",attrs:{type:"button",title:"Dismiss","aria-label":"Dismiss"}}]},{tag:"div",ref:"eBody",cls:"ag-overlay-error-body"}]},lV=class extends wi{constructor(){super(...arguments),this.eTitle=Cr,this.eCopy=Cr,this.eDismiss=Cr,this.eBody=Cr}init(){const{beans:e}=this;this.setTemplate(aV),this.addManagedElementListeners(this.eCopy,{click:()=>this.copyDiagnostics()});const t=X("cancel",e,null);t?this.eDismiss.appendChild(t):this.eDismiss.textContent="\u2715",this.addManagedElementListeners(this.eDismiss,{click:()=>e.errorOverlay?.dismiss()}),this.renderBody();const i=e.errorOverlay?.addUpdateListener(()=>this.renderBody());i&&this.addDestroyFunc(i)}destroy(){this.copyResetTimeout!==void 0&&window.clearTimeout(this.copyResetTimeout),super.destroy()}renderBody(){const e=this.beans.errorOverlay?.getDiagnostics()??[];this.eTitle.textContent=cV(e),this.eBody.replaceChildren(...pw(e,{showsUnattributedOrigin:!0})),this.beans.ariaAnnounce?.announceValue(this.eTitle.textContent??"","overlay")}copyDiagnostics(){const e=this.beans.errorOverlay?.getDiagnostics()??[];if(!e.length)return;const t=e.map(fw).join(`
`);Cw(t),this.copyResetTimeout!==void 0&&window.clearTimeout(this.copyResetTimeout),this.copyResetTimeout=mw(this.eCopy)}},dV={error:"error",warning:"warning",deprecation:"deprecation"};function cV(e){const t={error:0,warning:0,deprecation:0};for(let o=0,s=e.length;o<s;++o)t[e[o].severity]++;const i=[];for(let o=0,s=mr.length;o<s;++o){const r=mr[o],n=t[r];n>0&&i.push(`${n} ${dV[r]}${n>1?"s":""}`)}return i.length?`AG Grid found ${i.join(", ")}`:"AG Grid"}var uV=class extends y{constructor(){super(...arguments),this.beanName="errorOverlay",this.overlaySeverities=[],this.diagnostics=[],this.seenKeys=new Set,this.updateListeners=new Set,this.keySeed=0}wireBeans(e){this.overlays=e.overlays}postConstruct(){const e=nw();e.length!==0&&(this.overlaySeverities=e,this.addDestroyFunc(Dh(this.beans.context.getId(),t=>this.onDiagnostic(t))))}getDiagnostics(){return this.diagnostics}addUpdateListener(e){return this.updateListeners.add(e),()=>{this.updateListeners.delete(e)}}dismiss(){this.overlays?.setDevErrorOverlay(!1)}onDiagnostic(e){if(!On(e.severity,this.overlaySeverities))return;const t=this.getKey(e);if(!this.seenKeys.has(t)){this.seenKeys.add(t),this.diagnostics.push(e),this.overlays?.setDevErrorOverlay(!0);for(const i of this.updateListeners)i()}}getKey(e){return Rh(e,this.keySeed++)}},hV=class extends y{constructor(){super(...arguments),this.beanName="issueEvents",this.dispatching=!1}postConstruct(){this.addDestroyFunc(Dh(this.beans.context.getId(),e=>this.onDiagnostic(e)))}onDiagnostic(e){if(!this.dispatching){this.dispatching=!0;try{this.eventSvc.dispatchEvent({type:"issueRaised",id:e.id,severity:e.severity,message:ly(e),attributedToThisGrid:e.gridId!==void 0})}catch(t){bt(Me(333,{error:t}))}finally{this.dispatching=!1}}}};import{_fuzzySuggestions as bw}from"ag-stack";var gV={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,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,suppressContentVisibilityAuto:!0,enableContentVisibilityAuto:!0,contentVisibilityAutoDelay:!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},Se="clientSide",ue="serverSide",Fi="infinite",pV={onGroupExpandedOrCollapsed:[Se],refreshClientSideRowModel:[Se],isRowDataEmpty:[Se],forEachLeafNode:[Se],forEachNodeAfterFilter:[Se],forEachNodeAfterFilterAndSort:[Se],resetRowHeights:[Se,ue],applyTransaction:[Se],applyTransactionAsync:[Se],flushAsyncTransactions:[Se],getBestCostNodeSelection:[Se],getServerSideSelectionState:[ue],setServerSideSelectionState:[ue],applyServerSideTransaction:[ue],applyServerSideTransactionAsync:[ue],applyServerSideRowData:[ue],retryServerSideLoads:[ue],flushServerSideAsyncTransactions:[ue],refreshServerSide:[ue],getServerSideGroupLevelState:[ue],refreshInfiniteCache:[Fi],purgeInfiniteCache:[Fi],getInfiniteRowCount:[Fi],isLastRowIndexKnown:[Fi,ue],expandAll:[Se,ue],collapseAll:[Se,ue],onRowHeightChanged:[Se,ue],setRowCount:[Fi,ue],getCacheBlockState:[Fi,ue]},fV={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 mV(e,t,i){const o=fV[e];if(o){const{version:r,new:n,old:a,message:l}=o,d=a??e;return(...c)=>(i.log.deprecated(308,{version:r,apiMethod:d,replacement:n,message:l}),t.apply(t,c))}const s=pV[e];return s?(...r)=>{const n=i.rowModel.getType();if(!s.includes(n)){i.log.error(311,{functionName:e,rowModels:s});return}return t.apply(t,r)}:t}var CV={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",pageNumbers:"PaginationPageNumbers",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"},vV={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,pdf:1,document: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,search:1,fx:1,"values-as":1},wV={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"],calculatedColumnAdd:"CalculatedColumns",calculatedColumnEdit:"CalculatedColumns",calculatedColumnRemove:"CalculatedColumns",columnHeaderEdit:"ColumnHeaderEdit",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",showValuesAs:"ShowValuesAs",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",pdfExport:"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",search:"Find",document:"FileInputOverlay",calculatedColumnsHeader:"CalculatedColumns"},SV=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),yw={"--ag-grid-size":"--ag-spacing","--ag-active-color":"--ag-accent-color","--ag-alpine-active-color":"--ag-accent-color","--ag-balham-active-color":"--ag-accent-color","--ag-material-primary-color":"--ag-accent-color","--ag-header-foreground-color":"--ag-header-text-color","--ag-control-panel-background-color":"--ag-chrome-background-color","--ag-cell-horizontal-border":"--ag-column-border","--ag-header-column-separator-color":"--ag-header-column-border"};function bV(e){const t=getComputedStyle(e),i=[];for(const o of Object.keys(yw))t.getPropertyValue(o).trim()&&i.push(`${o} (use ${yw[o]})`);return i}var yV=class extends y{constructor(){super(...arguments),this.beanName="validation",this.propertyNameCache=new Map}wireBeans(e){this.gridOptions=e.gridOptions,Z3(dw)}warnOnInitialPropertyUpdate(e,t){e==="api"&&gV[t]&&this.warn(22,{key:t})}processGridOptions(e){this.processOptions(e,E6())}validateApiFunction(e,t){return mV(e,t,this.beans)}missingUserComponent(e,t,i,o){this.checkUserComponent(e,t,i,o)}checkUserComponent(e,t,i,o){const s=fi[t];if(s){this.gos.assertModuleRegistered(s,`AG Grid \`${e}\` component: \`${t}\``);return}const r=[...Object.keys(i??{}).filter(a=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(a)),...Object.keys(o??{}).filter(a=>!!o[a])],n=bw({inputValue:t,allSuggestions:r,hideIrrelevant:!0,maxSuggestions:4}).values;this.warn(101,{propertyName:e,componentName:t,suggestions:n})}missingDynamicBean(e){const t=CV[e];return t?Me(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:`\`${e}\``}):void 0}checkLegacyThemeVariables(e){if(this.gos.get("theme")==="legacy")return;const t=bV(e);t.length>0&&this.warn(332,{replacements:t})}checkRowEvents(e){RV.has(e)&&this.warn(10,{eventType:e})}validateIcon(e){this.checkIcon(e)}checkIcon(e){if(SV.has(e)&&this.warn(43,{iconName:e}),vV[e])return;const t=wV[e];if(t){Ih({...this.gos.getModuleErrorParams(),reasonOrId:`icon \`${e}\``,moduleName:t,additionalText:"Alternatively, use the CSS icon name directly."});return}this.warn(134,{iconName:e})}isProvidedUserComp(e){return!!fi[e]}validateColDef(e){this.processOptions(e,m6())}processOptions(e,t){const{validations:i,deprecations:o,allProperties:s,allValidNames:r,objectName:n,docsUrl:a}=t,l=this.beans.log,d=Object.keys(e);let c=this.propertyNameCache.get(n);c||(c=new Map,this.propertyNameCache.set(n,c));const u=this.gridOptions.suppressPropertyNamesCheck!==!0;let h=!1;for(const f of d){if(c.has(f))continue;const m=o[f];if(m){const{message:S,version:w}=m;l.deprecated(306,{version:w,name:f,message:S})}const C=i[f],v=this.gridOptions.rowModelType??"clientSide";if(C?.supportedRowModels&&!C.supportedRowModels.includes(v)){const S=e[f];if(S==null||S===!1)continue;l.warn(309,{name:f,rowModel:v,supportedRowModels:C.supportedRowModels}),c.set(f,!1);continue}if(!r.has(f)){if(u){const S=bw({inputValue:f,allSuggestions:s}).values.slice(0,8);l.warn(307,{objectName:n,name:f,suggestions:S,hasContext:r.has("context")})}h=!0,c.set(f,!1);continue}c.set(f,!0)}if(h&&a&&u){const f=this.beans.frameworkOverrides.getDocLink(a);l.warn(310,{objectName:n,url:f})}const g=new Set,p=[];if(d.forEach(f=>{if(c.get(f)===!1)return;const m=e[f];if(m==null||m===!1)return;const C=i[f];if(!C)return;const{dependencies:v,validate:S,expectedType:w}=C;if(w){const b=typeof m;if(b!==w){p.push(N(314,{key:String(f),expectedType:w,actualType:b,value:m}));return}}if(v){const b=this.checkForRequiredDependencies(f,v,e);if(b.length>0){p.push(...b);return}}if(S){const b=S(e,this.gridOptions,this.beans);if(b){typeof b=="string"?g.add(b):p.push(b);return}}}),g.size>0)for(const f of g)Tp(f,l);for(let f=0,m=p.length;f<m;++f)p[f].emit(l)}checkForRequiredDependencies(e,t,i){return Object.entries(t).filter(([r,n])=>{const a=i[r];return!n.required.includes(a)}).map(([r,n])=>{const a=n.required.map(l=>l===null?"null":l===void 0?"undefined":String(l));return N(315,{key:String(e),failedKey:r,required:a,reason:n.reason})})}},RV=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]);function EV(){vL(),X3(rV)}var Dd={moduleName:"Validation",version:E,beans:[yV,uV,hV],userComponents:{agErrorOverlay:lV},css:[nV],onRegister:EV,with:e=>(CL(e),Dd)};function xV(e){zt(Dd.with(e),void 0)}import{createPart as FV}from"ag-stack";function P(e,t={}){const i=Object.keys(t).map(o=>{const s=t[o];return s!=null?`${o}=${s}`:null}).filter(Boolean).join(";");return[e,i].filter(o=>o.length>0).join(":")}var F={grid(e){return P("ag-grid-root",{gridId:e})},headerGroupCell(e){return P("ag-header-group-cell",{colId:e})},headerCell(e){return P("ag-header-cell",{colId:e})},headerCheckbox(e){return P("ag-header-selection-checkbox",{colId:e})},headerFilterButton(e){return P("ag-header-cell-filter-button",{colId:e})},floatingFilter(e){return P("ag-floating-filter",{colId:e})},floatingFilterButton(e){return P("ag-floating-filter-button",{colId:e})},headerCellMenuButton(e){return P("ag-header-cell-menu-button",{colId:e})},headerResizeHandle(e){return P("ag-header-cell-resize",{colId:e})},filterInstancePickerDisplay(e){return P(`ag-${e.source}-picker-display`,vr(e))},numberFilterInstanceInput(e){return P(`ag-${e.source}-number-input`,vr(e))},textFilterInstanceInput(e){return P(`ag-${e.source}-text-input`,vr(e))},dateFilterInstanceInput(e){return P(`ag-${e.source}-date-input`,vr(e))},setFilterInstanceMiniFilterInput(e){return P(`ag-${e.source}-set-filter-mini-filter-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},setFilterInstanceItem(e,t){return P(`ag-${e.source}-set-filter-item`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,itemLabel:t}:{colId:e.colId,itemLabel:t})},setFilterApplyPanelButton(e,t){return P(`ag-${e.source}-set-filter-apply-panel-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},filterConditionRadioButton(e,t){return P(`ag-${e.source}-filter-condition-radio-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},advancedFilterInput(){return P("ag-advanced-filter-input")},advancedFilterButton(e){return P("ag-advanced-filter-button",{label:e})},advancedFilterBuilderButton(){return P("ag-advanced-filter-builder-button")},advancedFilterPanelMaximiseButton(){return P("ag-advanced-filter-builder-panel-maximise")},advancedFilterPanelCloseButton(){return P("ag-advanced-filter-builder-panel-close")},advancedFilterPill(e){return P("ag-advanced-filter-builder-pill",{label:e})},advancedFilterBuilderAddItemButton(){return P("ag-advanced-filter-builder-add-item-button")},rowNode(e){return P("ag-row",{"row-id":e})},cell(e,t){return P("ag-cell",{"row-id":e,colId:t})},autoGroupCell(e){return F.cell(e,Ht)},checkbox(e,t){return P("ag-selection-checkbox",{"row-id":e,colId:t})},selectionColumnCheckbox(e){return F.checkbox(e,qo)},autoGroupColumnCheckbox(e){return F.checkbox(e,Ht)},dragHandle(e,t){return P("ag-drag-handle",{"row-id":e,colId:t})},groupContracted(e,t){return P("ag-group-contracted",{"row-id":e,colId:t})},groupExpanded(e,t){return P("ag-group-expanded",{"row-id":e,colId:t})},autoGroupContracted(e){return F.groupContracted(e,Ht)},autoGroupExpanded(e){return F.groupExpanded(e,Ht)},rowNumber(e){return F.cell(e,Rc)},menu(){return P("ag-menu")},menuOption(e){return P("ag-menu-option",{option:e})},sideBar(){return P("ag-side-bar")},sideBarButton(e){return P("ag-side-button",{label:e})},columnToolPanel(){return P("ag-column-panel")},pivotModeSelect(){return P("ag-pivot-mode-select")},columnPanelSelectHeaderCheckbox(){return P("ag-column-panel-select-header-checkbox")},columnPanelSelectHeaderFilter(){return P("ag-column-panel-select-header-filter")},columnSelectListItemGroupClosedIcon(e){return P("ag-column-select-list-item-group-closed-icon",{label:e})},columnSelectListItemCheckbox(e){return P("ag-column-select-list-item-checkbox",{label:e})},columnSelectListItemDragHandle(e){return P("ag-column-select-list-item-drag-handle",{label:e})},columnDropCellDragHandle(e,t,i){return P("ag-column-drop-cell-drag-handle",{source:e,area:t,label:i})},columnDropCellCancelButton(e,t,i){return P("ag-column-drop-cell-cancel",{source:e,area:t,label:i})},columnDropArea(e,t){return P("ag-column-drop-area",{source:e,name:t})},filterToolPanel(){return P("ag-filter-panel")},filterToolPanelAddFilterButton(){return P("ag-filter-panel-add-filter-button")},filterToolPanelFilterTypeSelector(e){return P("ag-filter-panel-filter-type-selector",{colLabel:e})},filterToolPanelSearchInput(){return P("ag-filter-toolpanel-search-input")},filterToolPanelGroup(e){return P("ag-filter-toolpanel-group",{title:e})},filterToolPanelGroupCollapsedIcon(e){return P("ag-filter-toolpanel-group-collapsed-icon",{title:e})},statusBarTotalAndFilteredRowCount(){return P("ag-status-bar-total-and-filtered-row-count")},statusBarTotalRowCount(){return P("ag-status-bar-total-row-count")},statusBarFilteredRowCount(){return P("ag-status-bar-filtered-row-count")},statusBarSelectedRowCount(){return P("ag-status-bar-selected-row-count")},statusBarAggregations(){return P("ag-status-bar-aggregations")},paginationPanelSizePickerDisplay(e){return P("ag-pagination-page-size-picker-field-display",{value:e})},paginationPanelFirstRowOnPage(e){return P("ag-paging-row-summary-panel-first-row-on-page",{value:e})},paginationPanelLastRowOnPage(e){return P("ag-paging-row-summary-panel-last-row-on-page",{value:e})},paginationPanelRecordCount(e){return P("ag-paging-row-summary-panel-record-count",{value:e})},paginationSummaryPanelButton(e){return P("ag-paging-page-summary-panel-btn",{label:e})},paginationSummaryPanelCurrentPage(e){return P("ag-paging-page-summary-panel-current-page",{value:e})},paginationSummaryPanelTotalPage(e){return P("ag-paging-page-summary-panel-total-page",{value:e})},paginationPageNumber(e){return P("ag-paging-page-number",{value:e})},fillHandle(){return P("ag-fill-handle")},columnChooserCloseButton(){return P("ag-column-chooser-close-button")},columnChooserSearchBarCheckbox(){return P("ag-column-chooser-header-checkbox")},columnChooserSearchBarFilter(){return P("ag-column-chooser-searchbar-filter")},columnChooserListItemGroupClosedIcon(e){return P("ag-column-chooser-list-item-group-closed-icon",{label:e})},columnChooserListItemCheckbox(e){return P("ag-column-chooser-list-item-checkbox",{label:e})},columnChooserListItemDragHandle(e){return P("ag-column-chooser-list-item-drag-handle",{label:e})},overlay(){return P("ag-overlay")}},PV=e=>{const t={},i=Object.keys(F);for(const o of i)t[o]=(...s)=>e(F[o](...s));return t};function DV(e,t){const i={};for(const o of Object.keys(e))t[o]!==null&&(i[t[o]??o]=e[o]);return i}function MV(e){return e.source!=="floating-filter"?{index:0,...e}:e}function vr(e){return DV(MV(e),{colLabel:"label"})}import{_debounce as Md,_getRootNode as Rw}from"ag-stack";var Ew="data-testid";function M(e,t){e?.setAttribute(Ew,t)}function TV(e){Ew=e}var xw={"ag-column-drop-rowgroup":"Row Groups","ag-column-drop-aggregation":"Values","ag-column-drop-pivot":"Column Labels"};function AV(e){const t=Object.keys(xw);for(let i=0,o=t.length;i<o;++i)if(e.classList.contains(t[i]))return xw[t[i]]}var IV=class extends y{constructor(){super(...arguments),this.beanName="testIdSvc"}postConstruct(){const e=Md(this,()=>this.setupAllTestIds(),500),t=Md(this,()=>{this.setupAllTestIds(),e()},0);this.addManagedEventListeners({firstDataRendered:t,displayedRowsChanged:t,displayedColumnsChanged:t,displayedColumnsWidthChanged:t,virtualColumnsChanged:t,columnMenuVisibleChanged:t,contextMenuVisibleChanged:t,advancedFilterBuilderVisibleChanged:t,fieldPickerValueSelected:t,modelUpdated:t,sideBarUpdated:t,pinnedHeightChanged:t,gridReady:t,overlayExclusiveChanged:t,rowGroupOpened:t,paginationChanged:t,scrollVisibilityChanged:t,gridSizeChanged:t,filterOpened:t,filterChanged:t,cellSelectionChanged:t});const i=Rw(this.beans),o=Md(this,()=>this.setupAllTestIds(),100),s=r=>{const n=r.target;n instanceof HTMLElement&&n.classList.contains("ag-virtual-list-viewport")&&(n.closest(".ag-column-panel")||n.closest(".ag-panel"))&&o()};i.addEventListener("scroll",s,{capture:!0}),this.addDestroyFunc(()=>i.removeEventListener("scroll",s,{capture:!0})),this.headerObserver=new MutationObserver(t),this.addDestroyFunc(()=>this.headerObserver?.disconnect())}observeHeader(e){const t=e?.querySelector(".ag-header");!t||t===this.observedHeader||(this.headerObserver?.disconnect(),this.headerObserver?.observe(t,{childList:!0,subtree:!0}),this.observedHeader=t)}setupAllTestIds(){const e=Rw(this.beans),t=Gh(this.beans),i=e.querySelector(`[grid-id="${t}"]`);M(i,F.grid(t)),this.observeHeader(i),e.querySelectorAll(".ag-header-group-cell").forEach(r=>{M(r,F.headerGroupCell(r.getAttribute("col-id")))}),e.querySelectorAll(".ag-header-cell").forEach(r=>{const n=r.getAttribute("col-id"),l=r.classList.contains("ag-floating-filter")?F.floatingFilter(n):F.headerCell(n);M(r,l),M(r.querySelector(".ag-header-cell-filter-button"),F.headerFilterButton(n)),M(r.querySelector(".ag-header-cell-menu-button"),F.headerCellMenuButton(n)),M(r.querySelector(".ag-header-cell-resize"),F.headerResizeHandle(n)),M(r.querySelector(".ag-checkbox input[type=checkbox]"),F.headerCheckbox(n)),M(r.querySelector(".ag-floating-filter-button button"),F.floatingFilterButton(n)),this.setupFilterInstance(r.querySelector(".ag-floating-filter-body"),{source:"floating-filter",colId:n})});const o=e.querySelector(".ag-filter-menu");this.setupFilterInstance(o,{source:"column-filter"}),M(e.querySelector(".ag-advanced-filter input[type=text]"),F.advancedFilterInput()),e.querySelectorAll(".ag-advanced-filter-buttons button").forEach(r=>{M(r,F.advancedFilterButton(r.textContent))}),M(e.querySelector("button.ag-advanced-filter-builder-button"),F.advancedFilterBuilderButton()),e.querySelectorAll('.ag-panel[aria-label="Advanced Filter"] .ag-panel-title-bar-button').forEach((r,n)=>{M(r,n===0?F.advancedFilterPanelMaximiseButton():F.advancedFilterPanelCloseButton())}),e.querySelectorAll('.ag-panel[aria-label="Advanced Filter"] .ag-advanced-filter-builder-pill').forEach(r=>{M(r,F.advancedFilterPill(r.querySelector(".ag-picker-field-display")?.textContent))}),M(e.querySelector('.ag-panel[aria-label="Advanced Filter"] .ag-advanced-filter-builder-item-button'),F.advancedFilterBuilderAddItemButton()),e.querySelectorAll(".ag-row[row-id]").forEach(r=>{const n=r.getAttribute("row-id");M(r,F.rowNode(n)),r.querySelectorAll(".ag-cell").forEach(a=>{const l=a.getAttribute("col-id");M(a,F.cell(n,l)),M(a.querySelector(".ag-selection-checkbox input[type=checkbox]"),F.checkbox(n,l)),M(a.querySelector(".ag-drag-handle"),F.dragHandle(n,l)),M(a.querySelector(".ag-group-contracted"),F.groupContracted(n,l)),M(a.querySelector(".ag-group-expanded"),F.groupExpanded(n,l))})}),e.querySelectorAll(".ag-menu-list").forEach(r=>{M(r,F.menu()),r.querySelectorAll(".ag-menu-option").forEach(n=>{M(n,F.menuOption(n.querySelector(".ag-menu-option-text")?.textContent))})}),e.querySelectorAll(".ag-side-bar").forEach(r=>{M(r,F.sideBar()),r.querySelectorAll(".ag-side-button button").forEach(n=>{M(n,F.sideBarButton(n.querySelector(".ag-side-button-label")?.textContent))}),r.querySelectorAll(".ag-column-panel").forEach(n=>{M(n,F.columnToolPanel()),M(n.querySelector(".ag-pivot-mode-select input[type=checkbox]"),F.pivotModeSelect()),M(n.querySelector(".ag-column-select-header-checkbox input[type=checkbox]"),F.columnPanelSelectHeaderCheckbox()),M(n.querySelector(".ag-column-select-header-filter-wrapper input[type=text]"),F.columnPanelSelectHeaderFilter()),n.querySelectorAll(".ag-column-select-list").forEach(a=>{a.querySelectorAll(".ag-column-select-virtual-list-item").forEach(l=>{const d=l.getAttribute("aria-label");M(l.querySelector(".ag-column-group-closed-icon"),F.columnSelectListItemGroupClosedIcon(d)),M(l.querySelector(".ag-column-select-checkbox input[type=checkbox]"),F.columnSelectListItemCheckbox(d)),M(l.querySelector(".ag-drag-handle"),F.columnSelectListItemDragHandle(d))})}),this.setupColumnDropArea(n,"toolbar")}),r.querySelectorAll(".ag-filter-panel").forEach(n=>{M(n,F.filterToolPanel()),M(n.querySelector("button.ag-filter-add-button"),F.filterToolPanelAddFilterButton()),n.querySelectorAll(".ag-filter-card").forEach(a=>{const l=a.querySelector(".ag-filter-card-title")?.textContent,d=a.querySelector(".ag-filter-type-select");M(d,F.filterToolPanelFilterTypeSelector(l)),a.querySelectorAll(".ag-filter").forEach(c=>this.setupFilterInstance(c,{source:"filter-toolpanel",colLabel:l}))})}),r.querySelectorAll(".ag-filter-toolpanel").forEach(n=>{M(n.querySelector(".ag-filter-toolpanel-search-input input[type=text]"),F.filterToolPanelSearchInput()),n.querySelectorAll(".ag-filter-toolpanel-group").forEach(a=>{const l=a.querySelector(".ag-filter-toolpanel-group-title")?.textContent;M(a,F.filterToolPanelGroup(l)),M(a.querySelector(".ag-filter-toolpanel-group-title-bar-icon .ag-icon-tree-closed"),F.filterToolPanelGroupCollapsedIcon(l));const d=a.querySelector(".ag-filter-toolpanel-instance-filter");d&&this.setupFilterInstance(d,{source:"filter-toolpanel",colLabel:l})})})}),M(e.querySelector(".ag-status-bar .ag-status-panel-total-and-filtered-row-count"),F.statusBarTotalAndFilteredRowCount()),M(e.querySelector(".ag-status-bar .ag-status-panel-total-row-count"),F.statusBarTotalRowCount()),M(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),F.statusBarFilteredRowCount()),M(e.querySelector(".ag-status-bar .ag-status-panel-selected-row-count"),F.statusBarSelectedRowCount()),M(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),F.statusBarAggregations()),e.querySelectorAll(".ag-paging-panel").forEach(r=>{M(r.querySelector(".ag-paging-page-size .ag-picker-field-display"),F.paginationPanelSizePickerDisplay(r.querySelector(".ag-paging-page-size .ag-picker-field-display")?.textContent)),r.querySelectorAll(".ag-paging-row-summary-panel-number").forEach(n=>{switch(n.getAttribute("data-ref")){case"lbFirstRowOnPage":M(n,F.paginationPanelFirstRowOnPage(n.textContent));break;case"lbLastRowOnPage":M(n,F.paginationPanelLastRowOnPage(n.textContent));break;case"lbRecordCount":M(n,F.paginationPanelRecordCount(n.textContent));break}}),r.querySelectorAll(".ag-paging-page-summary-panel .ag-button").forEach(n=>{M(n,F.paginationSummaryPanelButton(n.getAttribute("aria-label")?.toLowerCase()))}),r.querySelectorAll(".ag-paging-page-summary-panel .ag-paging-number").forEach(n=>{switch(n.getAttribute("data-ref")){case"lbCurrentStatic":M(n,F.paginationSummaryPanelCurrentPage(n.textContent));break;case"lbCurrentInput":{const l=n.querySelector("input")?.value??n.textContent;M(n,F.paginationSummaryPanelCurrentPage(l));break}case"lbTotal":M(n,F.paginationSummaryPanelTotalPage(n.textContent));break}}),r.querySelectorAll(".ag-paging-page-number").forEach(n=>{M(n,F.paginationPageNumber(n.textContent))})}),M(e.querySelector(".ag-fill-handle"),F.fillHandle()),e.querySelectorAll('.ag-panel[aria-label="Choose Columns"]').forEach(r=>{M(r.querySelector(".ag-panel-title-bar-button-icon"),F.columnChooserCloseButton()),M(r.querySelector('.ag-column-select-header-checkbox input[type="checkbox"]'),F.columnChooserSearchBarCheckbox()),M(r.querySelector('.ag-column-select-header-filter-wrapper input[type="text"]'),F.columnChooserSearchBarFilter()),r.querySelectorAll(".ag-column-select-list").forEach(n=>{n.querySelectorAll(".ag-column-select-virtual-list-item").forEach(a=>{const l=a.getAttribute("aria-label");M(a.querySelector(".ag-column-group-closed-icon"),F.columnChooserListItemGroupClosedIcon(l)),M(a.querySelector(".ag-column-select-checkbox input[type=checkbox]"),F.columnChooserListItemCheckbox(l)),M(a.querySelector(".ag-drag-handle"),F.columnChooserListItemDragHandle(l))})})}),M(e.querySelector(".ag-overlay-wrapper"),F.overlay());const s=e.querySelector(".ag-column-drop-wrapper");s&&this.setupColumnDropArea(s,"panel")}setupFilterInstance(e,t){if(!e)return;e.querySelectorAll(".ag-filter-select .ag-picker-field-display").forEach(s=>{M(s,F.filterInstancePickerDisplay(t))});const i=t.source==="floating-filter"?".ag-floating-filter-body":".ag-filter-body";e.querySelectorAll(`${i} .ag-input-field:not(.ag-hidden) input[type="number"]`).forEach((s,r,n)=>{const l=n.length>1?{...t,index:r}:t;M(s,F.numberFilterInstanceInput(l))}),e.querySelectorAll(`${i} .ag-input-field:not(.ag-hidden) input[type="text"]`).forEach((s,r,n)=>{const l=n.length>1?{...t,index:r}:t;M(s,F.textFilterInstanceInput(l))}),e.querySelectorAll(`${i} .ag-input-field:not(.ag-hidden) input[type="date"], ${i} .ag-input-field:not(.ag-hidden) input[type="datetime-local"]`).forEach((s,r,n)=>{const l=n.length>1?{...t,index:r}:t;M(s,F.dateFilterInstanceInput(l))});const o=e.querySelector('.ag-mini-filter input[type="text"]');M(o,F.setFilterInstanceMiniFilterInput(t)),e.querySelectorAll(".ag-set-filter-list .ag-set-filter-item").forEach(s=>{const r=s.querySelector(".ag-checkbox-label")?.textContent?.trim(),n=s.querySelector('input[type="checkbox"]');M(n,F.setFilterInstanceItem(t,r))}),e.querySelectorAll(".ag-filter-apply-panel button").forEach(s=>{M(s,F.setFilterApplyPanelButton(t,s.textContent))}),e.querySelectorAll(".ag-filter-condition .ag-radio-button").forEach(s=>{const r=s.querySelector(".ag-radio-button-label")?.textContent;M(s.querySelector("input[type=radio]"),F.filterConditionRadioButton(t,r))})}setupColumnDropArea(e,t){e.querySelectorAll(".ag-column-drop").forEach(i=>{const o=AV(i);M(i,F.columnDropArea(t,o)),i.querySelectorAll(".ag-column-drop-cell").forEach(s=>{const r=s.querySelector(".ag-column-drop-cell-text")?.textContent;M(s.querySelector(".ag-drag-handle"),F.columnDropCellDragHandle(t,o,r)),M(s.querySelector(".ag-column-drop-cell-button .ag-icon-cancel"),F.columnDropCellCancelButton(t,o,r))})})}},kV={moduleName:"Testing",version:E,beans:[IV]};function LV({testIdAttribute:e}={}){e&&TV(e),Ch.registerModules([kV])}var VV=class{setGridId(e){this.gridId=e}wrap(e,t,i,o){const s=this.createWrapper(e,o);for(const r of t??[])this.createMethod(s,r,!0);for(const r of i??[])this.createMethod(s,r,!1);return s}createMethod(e,t,i){e.addMethod(t,this.createMethodProxy(e,t,i))}createMethodProxy(e,t,i){const o=this.gridId;return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(i&&Kn(o,49,{methodName:t}),null)}}};import{AgTabGuardCtrl as HV,AgTabGuardFeature as BV}from"ag-stack";var OV=class extends Qw{constructor(e){super(e,Ni)}},GV=class extends Zw{constructor(e){super(e,Ni)}};import{RefPlaceholder as Fw,_setAriaRole as NV}from"ag-stack";var _V=".ag-content-editable-field{align-items:center;display:flex}.ag-content-editable-field-input{background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);cursor:text;display:block;flex:1 1 auto;line-height:normal;outline:none;overflow:auto;overflow-y:hidden;padding:0 var(--ag-input-padding-start);white-space:nowrap;-ms-overflow-style:none!important;scrollbar-width:none!important}.ag-content-editable-field-input::-webkit-scrollbar{display:none!important}.ag-wrapper.ag-content-editable-field-input{line-height:var(--ag-internal-content-line-height)}.ag-content-editable-field-input:where(:focus,:focus-within){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color)}:where(.ag-content-editable-field.ag-disabled .ag-content-editable-field-input){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}.ag-content-editable-field-input:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}",zV={tag:"div",cls:"ag-content-editable-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-content-editable-field-input",attrs:{contenteditable:"plaintext-only"}}]},Pw=class extends ua{constructor(e){super(e,zV,[],e?.className),this.eLabel=Fw,this.eWrapper=Fw,this.renderValueToElement=e?.renderValueToElement??!0,this.registerCSS(_V)}postConstruct(){super.postConstruct(),this.setupEditable(),this.setupAria(),this.addManagedElementListeners(this.eWrapper,{input:()=>this.syncValueFromDom(),blur:()=>this.syncValueFromDom(!0)}),this.renderValueToElement&&this.value!=null&&this.refreshDisplayedValue(this.value)}setupAria(){const e=this.getAriaElement();NV(e,this.config.ariaRole??"textbox"),e.setAttribute("tabindex",this.gos.get("tabIndex").toString())}setupEditable(){const e=this.config.contentEditable??"plaintext-only";e===!1?this.eWrapper.removeAttribute("contenteditable"):e===!0?this.eWrapper.setAttribute("contenteditable","true"):this.eWrapper.setAttribute("contenteditable",e)}setValue(e,t){const i=super.setValue(e,t);return this.renderValueToElement&&!t&&this.refreshDisplayedValue(e),i}setRenderValueToElement(e){this.renderValueToElement=e}setDisplayedValue(e){this.refreshDisplayedValue(e??"")}getContentElement(){return this.eWrapper}refreshDisplayedValue(e){this.eWrapper.textContent=e??""}syncValueFromDom(e){super.setValue(this.eWrapper.textContent??"",e)}getFocusableElement(){return this.eWrapper}},WV={selector:"AG-CONTENT-EDITABLE-FIELD",component:Pw};import{RefPlaceholder as Dw,_isComponent as UV}from"ag-stack";var qV=".ag-field-set{align-items:center;display:flex}.ag-field-set-wrapper{display:flex}.ag-field-set-wrapper-horizontal{flex-direction:row}.ag-field-set-wrapper-vertical{flex-direction:column}",$V={tag:"div",cls:"ag-field-set",role:"group",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-field-set-wrapper ag-field-set-wrapper-horizontal"}]},Mw=class extends ca{constructor(e){super(e,$V),this.eLabel=Dw,this.eWrapper=Dw,this.registerCSS(qV)}postConstruct(){super.postConstruct(),this.addCss("ag-field-set"),this.getGui().setAttribute("aria-labelledby",this.getLabelId())}addItems(e){for(const t of e)this.addItem(t)}addItem(e){const t=UV(e)?e.getGui():e;this.eWrapper.appendChild(t)}setDirection(e){const t=this.eWrapper;return t.classList.toggle("ag-field-set-wrapper-horizontal",e==="horizontal"),t.classList.toggle("ag-field-set-wrapper-vertical",e==="vertical"),this}},KV={selector:"AG-FIELD-SET",component:Mw},jV='.ag-toggle-button{flex:none;min-width:unset;width:unset}.ag-toggle-button-input-wrapper{background-color:var(--ag-toggle-button-off-background-color);border-radius:calc(var(--ag-toggle-button-height)*.5);flex:none;height:var(--ag-toggle-button-height);max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);position:relative;transition:background-color .1s;:where(.ag-toggle-button-input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-toggle-button-height);margin:0;max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);opacity:0}&.ag-checked{background-color:var(--ag-toggle-button-on-background-color)}&.ag-disabled{opacity:.5}}.ag-toggle-button-input-wrapper:before{background-color:var(--ag-toggle-button-switch-background-color);border-radius:100%;content:"";display:block;height:calc(var(--ag-toggle-button-height) - var(--ag-toggle-button-switch-inset)*2);left:var(--ag-toggle-button-switch-inset);pointer-events:none;position:absolute;top:var(--ag-toggle-button-switch-inset);transition:left .1s;width:calc(var(--ag-toggle-button-height) - var(--ag-toggle-button-switch-inset)*2)}.ag-toggle-button-input-wrapper.ag-checked:before{left:calc(100% - var(--ag-toggle-button-height) + var(--ag-toggle-button-switch-inset))}.ag-toggle-button-input-wrapper:focus-within{box-shadow:var(--ag-focus-shadow)}',Tw=class extends ro{constructor(e){super(e,"ag-toggle-button"),this.registerCSS(jV)}setValue(e,t){return super.setValue(e,t),this.toggleCss("ag-selected",this.getValue()),this}},QV={selector:"AG-TOGGLE-BUTTON",component:Tw};export{Co as ALWAYS_SYNC_GLOBAL_EVENTS,_i as AgAbstractCellEditor,st as AgAbstractInputField,ca as AgAbstractLabel,ro as AgCheckbox,bs as AgCheckboxSelector,kt as AgColumn,di as AgColumnGroup,Pw as AgContentEditableField,WV as AgContentEditableFieldSelector,Mw as AgFieldSet,KV as AgFieldSetSelector,OA as AgFilterButtonSelector,om as AgInputDateField,ml as AgInputDateFieldSelector,js as AgInputNumberField,wl as AgInputNumberFieldSelector,lm as AgInputTextArea,dm as AgInputTextAreaSelector,lt as AgInputTextField,Ro as AgInputTextFieldSelector,fm as AgPickerField,O0 as AgPromise,Hi as AgProvidedColumnGroup,Xl as AgRadioButton,ZA as AgRadioButtonSelector,Zs as AgSelect,mm as AgSelectSelector,Tw as AgToggleButton,QV as AgToggleButtonSelector,yf as AlignedGridsModule,fL as AllCommunityModule,If as AutoGenerateColumnsModule,VV as BaseComponentWrapper,Nf as BaseCreator,_f as BaseGridSerializingSession,Qv as BaseSelectionService,y as BeanStub,yv as BigIntFilterModule,pf as CellApiModule,au as CellRangeType,qv as CellSpanModule,ow as CellStyleModule,oC as CheckboxEditorModule,tg as ClientSideRowModelApiModule,ia as ClientSideRowModelModule,fa as ColumnApiModule,Hf as ColumnAutoSizeModule,Bf as ColumnHoverModule,K as Component,os as ComponentInstanceGuard,Wf as CsvExportModule,nC as CustomEditorModule,wv as CustomFilterModule,_r as DETAIL_ROW_ID_PREFIX,iC as DateEditorModule,Rv as DateFilterModule,ag as DragAndDropModule,Oc as DragSourceType,Pv as EventApiModule,xv as ExternalFilterModule,Nu as FakeHScrollComp,_u as FakeVScrollComp,Mf as FileInputOverlayModule,Yl as FilterButtonComp,BC as FilterComp,HC as FilterWrapperComp,Tc as GRAND_TOTAL_ROW_ID,Ht as GROUP_AUTO_COLUMN_ID,H0 as GROUP_HIERARCHY_COLUMN_ID_PREFIX,Ko as GROUP_TOTAL_ROW_ID_PREFIX,qu as GridBodyCtrl,Cf as GridCoreCreator,ch as GridCtrl,yu as GridHeaderCtrl,Lv as GridStateModule,Bu as HeaderRowContainerCtrl,_v as HighlightChangesModule,Fv as InfiniteRowModelModule,G0 as KeyCode,rC as LargeTextEditorModule,Mv as LocaleModule,Dv as LocaleService,ci as ManagedFocusFeature,Ch as ModuleRegistry,tC as NumberEditorModule,bv as NumberFilterModule,wd as PaginationModule,Hv as PaginationPageNumbersModule,ou as PinnedRowModel,Bv as PinnedRowModule,Gc as PositionableFeature,$c as ProvidedFilter,Ev as QuickFilterModule,Gi as ROOT_NODE_ID,Rc as ROW_NUMBERS_COLUMN_ID,zv as RenderApiModule,Ff as RowApiModule,Wv as RowAutoHeightModule,ih as RowContainerCtrl,lg as RowDragModule,Ue as RowNode,Xv as RowSelectionModule,sw as RowStyleModule,qo as SELECTION_COLUMN_ID,P1 as STRUCTURED_SCHEMA_FEATURES,Pf as ScrollApiModule,sC as SelectEditorModule,su as ServerSideTransactionResultStatus,Hn as TabGuardComp,OV as TabGuardCtrl,GV as TabGuardFeature,eC as TextEditorModule,Sv as TextFilterModule,ul as TooltipModule,Ct as TouchListener,Xm as UndoRedoEditModule,Dd as ValidationModule,gf as ValueCacheModule,mf as VanillaFrameworkOverrides,RC as _ADVANCED_FILTER_ONLY_OPTIONS,Ba as _BOOLEAN_MIXED_GRID_OPTIONS,$v as _BaseSingleColService,so as _ChangedRowNodes,xi as _ColumnFilterModule,Eg as _ColumnGroupModule,Sg as _ColumnMoveModule,_h as _CsrmSsrmSharedApiModule,$E as _DATA_TYPE_DERIVED_COL_DEF_PROPERTIES,sa as _DragModule,dt as _EditCoreModule,NS as _EmptyBean,ur as _FilterCoreModule,pd as _FilterValueModule,a6 as _GET_ALL_EVENTS,Hp as _GET_ALL_GRID_OPTIONS,S6 as _GET_SHALLOW_GRID_OPTIONS,Np as _HeaderComp,dg as _HorizontalResizeModule,sf as _KeyboardNavigationModule,Wl as _PRESET_DATE_FILTER_RANGES,SC as _PRESET_DATE_FILTER_TYPES,La as _PUBLIC_EVENTS,As as _PUBLIC_EVENT_HANDLERS_MAP,yo as _PopupModule,Yo as _ROW_ID_PREFIX_BOTTOM_PINNED,$r as _ROW_ID_PREFIX_ROW_GROUP,Zo as _ROW_ID_PREFIX_TOP_PINNED,bC as _RelativeDateRangeCache,zh as _RowModelSharedApiModule,Ni as _STOP_PROPAGATION_CALLBACKS,ra as _SharedDragAndDropModule,Gf as _SharedExportModule,hC as _SharedMenuModule,Jv as _SharedRowSelectionModule,ta as _SortModule,Wh as _SsrmInfiniteSharedApiModule,ad as _TEXT_COMPARISONS,Tv as _UserColumnService,xp as _addAdditionalCss,zo as _addColumnDefaultAndTypes,pu as _addFocusableContainerListener,G as _addGridCommonParams,Mi as _addRowHeightChangedListener,et as _applyColumnState,Lu as _applyHeaderWrapperHidden,Vu as _applyHeaderWrapperMaxHeight,es as _areCellsEqual,mu as _attemptToRestoreCellFocus,Do as _bindFilterCallback,Fg as _buildColumnTree,No as _canScrollVertically,Wd as _canSkipShowingRowGroup,Dt as _clamp,EC as _classifyFilterOptions,p0 as _combineAttributesAndGridOptions,sh as _consoleError,Bt as _convertColumnEventSourceType,qg as _coreThemeDefaults,cu as _createCellId,V as _createElement,Kr as _createGlobalRowEvent,Kh as _createIcon,X as _createIconNoSpan,Qc as _createRowNodeSibling,Tr as _createUserColumn,N as _createValidationWarning,oo as _csrmFirstLeaf,qh as _csrmReorderAllLeafs,ZC as _defaultLowercaseFormatter,Br as _defaultPivotSort,Fc as _destroyColumnTreeAll,Pc as _destroyColumnTreeUnused,Wo as _dispatchColumnChangedEvent,Xh as _doDeltaSort,Tp as _emitValidationWarning,Me as _errMsg,Vh as _errorForGrid,$n as _errorWithoutAttribution,Ei as _filterCallbackParams,vh as _findEnterpriseCoreModule,fu as _focusGridInnerElement,Nt as _focusNextGridCoreContainer,pr as _forEachChangedGroupDepthFirst,Hd as _formatNumberCommas,rn as _getAbsoluteRowIndex,L0 as _getAvailableSortTypes,Jd as _getCallbackForEvent,Gt as _getCellByPosition,ds as _getCellCtrlForEventTarget,sg as _getCellPositionForEvent,Wr as _getCellRendererDetails,al as _getCellTooltipComponentDefinition,Ii as _getCheckboxLocation,It as _getCheckboxes,xe as _getClientSideRowModel,Ec as _getColumnStateFromColDef,xC as _getCustomOptionDisplayName,ql as _getCustomOptionNumberOfInputs,LC as _getDefaultFloatingFilterType,kC as _getDefaultSimpleFilter,yc as _getDisplaySortForColumn,C1 as _getEditorRendererDetails,ht as _getEnableColumnSelection,d0 as _getFillHandle,Vc as _getFilterDetails,re as _getFilterModel,IC as _getFilterParamsForDataType,on as _getFirstRow,Hc as _getFloatingFilterCompDetails,cn as _getFloatingFiltersHeight,yr as _getGlobalGridOption,Nd as _getGrandTotalPinnedFloat,Fr as _getGrandTotalRow,m0 as _getGridOption,j3 as _getGridRegisteredModules,Ti as _getGroupAggFiltering,Li as _getGroupSelection,ai as _getGroupSelectsDescendants,r0 as _getGroupTotalRowCallback,Ai as _getHeaderCheckbox,vn as _getHeaderClassesFromColDef,wu as _getHeaderRowCount,qf as _getHeaderTooltipComponentDefinition,l1 as _getInnerCellRendererDetails,_o as _getIsRowSelectable,sn as _getLastRow,dl as _getLegacyTooltipFieldValue,qd as _getMaxConcurrentDatasourceRequests,oa as _getNormalisedMousePosition,un as _getPinnedSectionWidths,qi as _getRowAbove,nn as _getRowBelow,eh as _getRowContainerClass,Xi as _getRowContainerOptions,Ju as _getRowCtrlForEventTarget,Ne as _getRowHeightAsNumber,Je as _getRowHeightForNode,At as _getRowIdCallback,Fe as _getRowNode,ki as _getRowSelectionMode,th as _getRowSpanContainerClass,Kc as _getServerSideRowModel,IM as _getShouldDisplayTooltip,ea as _getSortModel,l0 as _getSuppressMultiRanges,tb as _getToolPanelClassesFromColDef,Ns as _getValueUsingDotPath,M1 as _getViewportRowModel,yC as _hasValue,Xd as _interpretAsRightClick,Tt as _isAnimateRows,To as _isBlank,Dp as _isCalculatedColumnsEnabled,_e as _isCellSelectionEnabled,Ws as _isCellTooltipConfigured,ae as _isClientSideRowModel,Yd as _isColumnMenuAnchoringEnabled,Xe as _isColumnsSortingCoupledToGroup,oe as _isDomLayout,Go as _isFiniteNumber,Dr as _isFullWidthGroupRow,Er as _isGetRowHeightFunction,fA as _isGridSuppliedFilterOptions,pA as _isGridSuppliedFilterParam,zd as _isGroupHideColumnsUntilExpanded,_d as _isGroupMultiAutoColumn,xr as _isGroupRowsSticky,Pr as _isGroupUseEntireRow,ve as _isHeaderFocusSuppressed,Ud as _isHiddenSingleChildGroup,ge as _isLegacyMenuEnabled,ni as _isMultiRowSelection,Ho as _isProtoPollutionKey,FC as _isRangeOutOfOrder,uu as _isRowBefore,Od as _isRowNumbers,Ye as _isRowSelection,hu as _isSameRow,ri as _isServerSideRowModel,Zd as _isSetFilterByDefault,_s as _isShowTooltipWhenTruncated,We as _isStopPropagationForAgGrid,ui as _isUseApplyButton,a0 as _isUsingNewCellSelectionAPI,$d as _isUsingNewRowSelectionAPI,hy as _logPreInitWarn,he as _mergeDeep,jo as _mergeFilterParamsWithApplicationProvidedParams,si as _mergedEqual,d6 as _normaliseCalculatedExpression,ze as _normalizeSortType,hn as _partitionByPinned,gy as _preInitErrMsg,Jo as _prevOrNextDisplayedRow,f0 as _processOnChange,Al as _refreshFilterUi,dC as _refreshHandlerAndUi,zt as _registerModule,hc as _resetColumnState,ry as _resetMissingModuleReports,$f as _resolveCellTooltipValue,Kf as _resolveGroupTooltipValue,jf as _resolveHeaderTooltipValue,gt as _resolvePivotColumnForRow,V0 as _resolvePivotSort,Qh as _resolveSortOptions,Xu as _selectAllCells,kl as _setColMenuVisible,Bi as _setColsVisible,Q3 as _setUmd,n0 as _shouldUpdateColVisibilityAfterGroup,CS as _skipFocusableContainerListenerForAgGrid,mt as _stopPropagationForAgGrid,Ji as _suppressCellMouseEvent,vp as _themeAlpineParams,wp as _themeBalhamParams,bp as _themeMaterialParams,mp as _themeQuartzParams,Vd as _toFiniteNumber,ke as _translateForFilter,ar as _trimInputForFilter,je as _unwrapUserComp,Il as _updateFilterModel,bu as _updatePinnedSectionWidths,eg as _updateRowNodeAfterSort,Kn as _warnForGrid,eo as _warnOnce,qn as _warnWithoutAttribution,F as agTestIdFor,Qg as buttonStyleAlpine,Zg as buttonStyleBalham,Kg as buttonStyleBase,jg as buttonStyleQuartz,uo as checkboxStyleDefault,Ox as colorSchemeDark,zx as colorSchemeDarkBlue,Nx as colorSchemeDarkWarm,Ix as colorSchemeLight,Hx as colorSchemeLightCold,Lx as colorSchemeLightWarm,go as colorSchemeVariable,ba as columnDropStyleBordered,ya as columnDropStylePlain,PD as convertColumnGroupState,Sf as convertColumnState,RD as createGrid,FV as createPart,co as createTheme,Ar as dispatchColumnVisibleEvent,xV as enableDevValidations,Nr as forEachColDef,xD as getGridApi,wf as getGridElement,rF as iconOverrides,sp as iconSetAlpine,op as iconSetBalham,rp as iconSetMaterial,Ms as iconSetQuartz,cF as iconSetQuartzBold,dF as iconSetQuartzLight,dp as iconSetQuartzRegular,vF as inputStyleBase,Ts as inputStyleBordered,cp as inputStyleUnderlined,wc as isColumn,Ee as isColumnGroup,Or as isColumnGroupAutoCol,Oi as isColumnSelectionCol,Ur as isCombinedFilterModel,Vi as isProvidedColumnGroup,Re as isRowNumberCol,Gr as isSpecialCol,Zn as onRowHeightChanged,t0 as provideGlobalGridOptions,Yn as resetRowHeights,LV as setupAgTestIds,Sp as styleMaterial,pp as tabStyleAlpine,EF as tabStyleBase,gp as tabStyleMaterial,hp as tabStyleQuartz,fp as tabStyleRolodex,VF as themeAlpine,BF as themeBalham,NF as themeMaterial,Cp as themeQuartz,PV as wrapAgTestIdFor};