@scvzerng/element-ui-ag-grid-vue2 0.0.36 → 0.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ElementPlusAgGrid.es.js +2799 -2713
- package/dist/ElementPlusAgGrid.umd.js +26 -26
- package/dist/types/Grid.vue.d.ts +13 -0
- package/dist/types/use-grid.d.ts +14 -0
- package/package.json +12 -12
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
(function(L,H){typeof exports=="object"&&typeof module<"u"?H(exports,require("lodash-unified"),require("md5"),require("vue"),require("element-ui")):typeof define=="function"&&define.amd?define(["exports","lodash-unified","md5","vue","element-ui"],H):(L=typeof globalThis<"u"?globalThis:L||self,H(L.ElementPlusAgGrid={},L.lodashUnified,L.oe,L.Vue,L.elementUi))})(this,function(L,H,Oe,E,Ad){"use strict";var f0=Object.defineProperty;var C0=(L,H,Oe)=>H in L?f0(L,H,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):L[H]=Oe;var R=(L,H,Oe)=>C0(L,typeof H!="symbol"?H+"":H,Oe);var Rd,Ed;var je=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,o){const i=t?this.allAsyncListeners:this.allSyncListeners;let s=i.get(e);return!s&&o&&(s=new Set,i.set(e,s)),s}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,o=!1){this.getListeners(e,o,!0).add(t)}removeEventListener(e,t,o=!1){const i=this.getListeners(e,o,!1);i&&(i.delete(t),i.size===0&&(o?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const o=e.type;if(t&&"event"in e){const l=e.event;l instanceof Event&&(e.eventPath=l.composedPath())}const{frameworkOverrides:i}=this,s=l=>{const a=i?()=>i.wrapIncoming(l):l;t?this.dispatchAsync(a):a()},n=this.getListeners(o,t,!1);if(((n==null?void 0:n.size)??0)>0){const l=new Set(n);for(const a of l)n!=null&&n.has(a)&&s(()=>a(e))}const r=this.getGlobalListeners(t);if(r.size>0){const l=new Set(r);for(const a of l)s(()=>a(o,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}};function Md(e,t){return t}function vn(e){return(e==null?void 0:e.getLocaleTextFunc())??Md}function qe(e){return e==null||e===""?null:e}function M(e){return e!=null&&e!==""}function K(e){return!M(e)}function Mi(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function bn(e,t){const o=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return o===i}function kd(e,t,o=!1){const i=e==null,s=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),i&&s)return 0;if(i)return-1;if(s)return 1;function n(r,l){return r>l?1:r<l?-1:0}if(typeof e!="string"||!o)return n(e,t);try{return e.localeCompare(t)}catch{return n(e,t)}}var Sn=new Set(["__proto__","constructor","prototype"]);function Ld(e,t){if(e!=null){if(Array.isArray(e)){for(let o=0;o<e.length;o++)t(o.toString(),e[o]);return}for(const o of Object.keys(e).filter(i=>!Sn.has(i)))t(o,e[o])}}function re(e,t,o=!0,i=!1){M(t)&&Ld(t,(s,n)=>{let r=e[s];r!==n&&(i&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[s]=r),yn(n)&&yn(r)&&!Array.isArray(r)?re(r,n,o,i):(o||n!==void 0)&&(e[s]=n))})}function Wt(e,t,o){if(!t||!e)return;if(!o)return e[t];const i=t.split(".");let s=e;for(let n=0;n<i.length;n++){if(s==null)return;s=s[i[n]]}return s}function yn(e){return typeof e=="object"&&e!==null}var ki=class ut{static applyGlobalGridOptions(t){if(!ut.gridOptions)return{...t};let o={};return re(o,ut.gridOptions,!0,!0),ut.mergeStrategy==="deep"?re(o,t,!0,!0):o={...o,...t},ut.gridOptions.context&&(o.context=ut.gridOptions.context),t.context&&(ut.mergeStrategy==="deep"&&o.context&&re(t.context,o.context,!0,!0),o.context=t.context),o}};ki.gridOptions=void 0,ki.mergeStrategy="shallow";var Li=ki;function Gd(e,t="shallow"){Li.gridOptions=e,Li.mergeStrategy=t}var Hd={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1,enableFilterHandlers:!1};function Se(e,t,o){o==null||typeof o=="string"&&o==""?Rn(e,t):ue(e,t,o)}function ue(e,t,o){e.setAttribute(En(t),o.toString())}function Rn(e,t){e.removeAttribute(En(t))}function En(e){return`aria-${e}`}function Be(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Od(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function Bd(e){return e.getAttribute("aria-label")}function zt(e,t){Se(e,"label",t)}function $t(e,t){Se(e,"labelledby",t)}function xn(e,t){Se(e,"live",t)}function Vd(e,t){Se(e,"atomic",t)}function Nd(e,t){Se(e,"relevant",t)}function _d(e,t){Se(e,"invalid",t)}function Dn(e,t){Se(e,"hidden",t)}function Gi(e,t){ue(e,"expanded",t)}function Wd(e,t){ue(e,"setsize",t)}function zd(e,t){ue(e,"posinset",t)}function $d(e,t){ue(e,"multiselectable",t)}function Ud(e,t){ue(e,"rowcount",t)}function xo(e,t){ue(e,"rowindex",t)}function Kd(e,t){ue(e,"rowspan",t)}function jd(e,t){ue(e,"colcount",t)}function Fn(e,t){ue(e,"colindex",t)}function qd(e,t){ue(e,"colspan",t)}function Yd(e,t){ue(e,"sort",t)}function Zd(e){Rn(e,"sort")}function Hi(e,t){Se(e,"selected",t)}function Qd(e,t){Se(e,"controls",t)}function Xd(e,t){Qd(e,t.id),$t(t,e.id)}function Pn(e,t){Se(e,"owns",t)}function Tn(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Oi,Bi,Vi,Ni,_i,Wi,zi;function ht(){return Oi===void 0&&(Oi=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Oi}function In(){return Bi===void 0&&(Bi=/(firefox)/i.test(navigator.userAgent)),Bi}function An(){return Vi===void 0&&(Vi=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Vi}function gt(){return Ni===void 0&&(Ni=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),Ni}function $i(e){if(!e)return null;const t=e.tabIndex,o=e.getAttribute("tabIndex");return t===-1&&(o===null||o===""&&!In())?null:t.toString()}function Jd(){if(zi!==void 0)return zi;if(!document.body)return-1;let e=1e6;const t=In()?6e6:1e9,o=document.createElement("div");for(document.body.appendChild(o);;){const i=e*2;if(o.style.height=i+"px",i>t||o.clientHeight!==i)break;e=i}return document.body.removeChild(o),zi=e,e}function ec(){return Wi==null&&Mn(),Wi}function Mn(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let o=t.offsetWidth-t.clientWidth;o===0&&t.clientWidth===0&&(o=null),t.parentNode&&t.parentNode.removeChild(t),o!=null&&(Wi=o,_i=o===0)}function kn(){return _i==null&&Mn(),_i}var tc="[tabindex], input, select, button, textarea, [href]",Ln="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Ui(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,i=t.call(e,"input, select, button, textarea"),s=t.call(e,Ln),n=Me(e);return i&&!s&&n}function Z(e,t,o={}){const{skipAriaHidden:i}=o;e.classList.toggle("ag-hidden",!t),i||Dn(e,!t)}function oc(e,t,o={}){const{skipAriaHidden:i}=o;e.classList.toggle("ag-invisible",!t),i||Dn(e,!t)}function Gn(e,t){const o="disabled",i=t?n=>n.setAttribute(o,""):n=>n.removeAttribute(o);i(e);const s=e.querySelectorAll("input")??[];for(const n of s)i(n)}function pt(e,t,o){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof o=="number"){if(++i>o)break}else if(e===o)break}return!1}function Ye(e){const{height:t,width:o,borderTopWidth:i,borderRightWidth:s,borderBottomWidth:n,borderLeftWidth:r,paddingTop:l,paddingRight:a,paddingBottom:d,paddingLeft:c,marginTop:u,marginRight:h,marginBottom:g,marginLeft:p,boxSizing:f}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(o||"0"),borderTopWidth:parseFloat(i||"0"),borderRightWidth:parseFloat(s||"0"),borderBottomWidth:parseFloat(n||"0"),borderLeftWidth:parseFloat(r||"0"),paddingTop:parseFloat(l||"0"),paddingRight:parseFloat(a||"0"),paddingBottom:parseFloat(d||"0"),paddingLeft:parseFloat(c||"0"),marginTop:parseFloat(u||"0"),marginRight:parseFloat(h||"0"),marginBottom:parseFloat(g||"0"),marginLeft:parseFloat(p||"0"),boxSizing:f}}function Ki(e){const t=Ye(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function Ut(e){const t=Ye(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function ic(e){const{height:t,marginBottom:o,marginTop:i}=Ye(e);return Math.floor(t+o+i)}function ji(e){const{width:t,marginLeft:o,marginRight:i}=Ye(e);return Math.floor(t+o+i)}function Hn(e){const t=e.getBoundingClientRect(),{borderTopWidth:o,borderLeftWidth:i,borderRightWidth:s,borderBottomWidth:n}=Ye(e);return{top:t.top+(o||0),left:t.left+(i||0),right:t.right+(s||0),bottom:t.bottom+(n||0)}}function Do(e,t){let o=e.scrollLeft;return t&&(o=Math.abs(o)),o}function Fo(e,t,o){o&&(t*=-1),e.scrollLeft=t}function he(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function Ae(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function On(e){return!!e.offsetParent}function Me(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!On(e)||window.getComputedStyle(e).visibility!=="visible")}function qi(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Bn(e,t,o){o&&o.nextSibling===t||(e.firstChild?o?o.nextSibling?e.insertBefore(t,o.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function Vn(e,t){for(let o=0;o<t.length;o++){const i=t[o],s=e.children[o];s!==i&&e.insertBefore(i,s)}}function sc(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Kt(e,t){if(t)for(const o of Object.keys(t)){const i=t[o];if(!o||!o.length||i==null)continue;const s=sc(o),n=i.toString(),r=n.replace(/\s*!important/g,""),l=r.length!=n.length?"important":void 0;e.style.setProperty(s,r,l)}}function Po(e){return()=>{const t=e();return t?Nn(t)||_n(t):!0}}function Nn(e){return e.clientWidth<e.scrollWidth}function _n(e){return e.clientHeight<e.scrollHeight}function To(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Ve(e,t)}function Ve(e,t){t=Zi(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Yi(e,t){t=Zi(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function Zi(e){return typeof e=="number"?`${e}px`:e}function Qi(e){return e instanceof Node||e instanceof HTMLElement}function ce(e,t,o){o==null||o===""?e.removeAttribute(t):e.setAttribute(t,o.toString())}function Ze(e,t,o){const s=tr(e).ResizeObserver,n=s?new s(o):null;return n==null||n.observe(t),()=>n==null?void 0:n.disconnect()}function Ne(e,t){const o=tr(e);o.requestAnimationFrame?o.requestAnimationFrame(t):o.webkitRequestAnimationFrame?o.webkitRequestAnimationFrame(t):o.setTimeout(t,0)}var Wn="data-ref",Xi;function zn(){return Xi??(Xi=document.createTextNode(" ")),Xi.cloneNode()}function X(e){const{attrs:t,children:o,cls:i,ref:s,role:n,tag:r}=e,l=document.createElement(r);if(i&&(l.className=i),s&&l.setAttribute(Wn,s),n&&l.setAttribute("role",n),t)for(const a of Object.keys(t))l.setAttribute(a,t[a]);if(o)if(typeof o=="string")l.textContent=o;else{let a=!0;for(const d of o)d&&(typeof d=="string"?(l.appendChild(document.createTextNode(d)),a=!1):typeof d=="function"?l.appendChild(d()):(a&&(l.appendChild(zn()),a=!1),l.append(X(d)),l.appendChild(zn())))}return l}var $n={};function Ji(e,t){$n[t]||(e(),$n[t]=!0)}function jt(e,t,...o){e.get("debug")&&console.log("AG Grid: "+t,...o)}function qt(e,...t){Ji(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function ft(e,...t){Ji(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var nc={pending:!1,funcs:[]},rc={pending:!1,funcs:[]};function es(e,t="setTimeout",o){const i=t==="raf"?rc:nc;if(i.funcs.push(e),i.pending)return;i.pending=!0;const s=()=>{const n=i.funcs.slice();i.funcs.length=0,i.pending=!1,n.forEach(r=>r())};t==="raf"?Ne(o,s):window.setTimeout(s,0)}function ge(e,t,o){let i;return function(...s){const n=this;window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(n,s)},o)}}function Un(e,t){let o=0;return function(...i){const s=this,n=Date.now();n-o<t||(o=n,e.apply(s,i))}}function lc(e,t,o=100,i){const s=Date.now();let n=null,r=!1;const l=()=>{const a=Date.now()-s>o;(e()||a)&&(t(),r=!0,n!=null&&(window.clearInterval(n),n=null))};l(),r||(n=window.setInterval(l,10))}var Kn="https://www.ag-grid.com",G="34.1.1",jn=2e3,qn=100,Yn="_version_",Io=null,Ct=`${Kn}/javascript-data-grid`;function ac(e){Io=e}function dc(e){Ct=e}function Zn(e,t,o){return(Io==null?void 0:Io.getConsoleMessage(e,t))??[gc(e,t,o)]}function ts(e,t,o,i){e(`error #${t}`,...Zn(t,o,i))}function cc(e){if(!e)return String(e);const t={};for(const o of Object.keys(e))typeof e[o]!="object"&&typeof e[o]!="function"&&(t[o]=e[o]);return JSON.stringify(t)}function uc(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=cc(e)),t}function Ao(e){return e===void 0?"undefined":e===null?"null":e}function os(e,t){return`${e}?${t.toString()}`}function hc(e,t,o){const i=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let s=os(e,t);for(const[n,r]of i){if(n===Yn)continue;const l=s.length-o;if(l<=0)break;const a="...",d=l+a.length,c=r.length-d>qn?r.slice(0,r.length-d)+a:r.slice(0,qn)+a;t.set(n,c),s=os(e,t)}return s}function Qn(e,t){const o=new URLSearchParams;if(o.append(Yn,G),t)for(const n of Object.keys(t))o.append(n,uc(t[n]));const i=`${Ct}/errors/${e}`,s=os(i,o);return s.length<=jn?s:hc(i,o,jn)}var gc=(e,t,o)=>{const i=Qn(e,t);return`${o?o+`
|
|
1
|
+
(function(k,O){typeof exports=="object"&&typeof module<"u"?O(exports,require("lodash-unified"),require("md5"),require("vue"),require("element-ui")):typeof define=="function"&&define.amd?define(["exports","lodash-unified","md5","vue","element-ui"],O):(k=typeof globalThis<"u"?globalThis:k||self,O(k.ElementPlusAgGrid={},k.lodashUnified,k.ae,k.Vue,k.elementUi))})(this,function(k,O,Ve,E,Md){"use strict";var f0=Object.defineProperty;var C0=(k,O,Ve)=>O in k?f0(k,O,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):k[O]=Ve;var R=(k,O,Ve)=>C0(k,typeof O!="symbol"?O+"":O,Ve);var xd,Dd;var Ze=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,o){const i=t?this.allAsyncListeners:this.allSyncListeners;let s=i.get(e);return!s&&o&&(s=new Set,i.set(e,s)),s}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,o=!1){this.getListeners(e,o,!0).add(t)}removeEventListener(e,t,o=!1){const i=this.getListeners(e,o,!1);i&&(i.delete(t),i.size===0&&(o?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const o=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:i}=this,s=a=>{const l=i?()=>i.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},n=this.getListeners(o,t,!1);if(((n==null?void 0:n.size)??0)>0){const a=new Set(n);for(const l of a)n!=null&&n.has(l)&&s(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)s(()=>l(o,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}};function kd(e,t){return t}function bn(e){return(e==null?void 0:e.getLocaleTextFunc())??kd}function Qe(e){return e==null||e===""?null:e}function A(e){return e!=null&&e!==""}function q(e){return!A(e)}function Li(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function yn(e,t){const o=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return o===i}function Ld(e,t,o=!1){const i=e==null,s=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),i&&s)return 0;if(i)return-1;if(s)return 1;function n(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!o)return n(e,t);try{return e.localeCompare(t)}catch{return n(e,t)}}var Rn=new Set(["__proto__","constructor","prototype"]);function Gd(e,t){if(e!=null){if(Array.isArray(e)){for(let o=0;o<e.length;o++)t(o.toString(),e[o]);return}for(const o of Object.keys(e).filter(i=>!Rn.has(i)))t(o,e[o])}}function de(e,t,o=!0,i=!1){A(t)&&Gd(t,(s,n)=>{let r=e[s];r!==n&&(i&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[s]=r),En(n)&&En(r)&&!Array.isArray(r)?de(r,n,o,i):(o||n!==void 0)&&(e[s]=n))})}function $t(e,t,o){if(!t||!e)return;if(!o)return e[t];const i=t.split(".");let s=e;for(let n=0;n<i.length;n++){if(s==null)return;s=s[i[n]]}return s}function En(e){return typeof e=="object"&&e!==null}var Gi=class pt{static applyGlobalGridOptions(t){if(!pt.gridOptions)return{...t};let o={};return de(o,pt.gridOptions,!0,!0),pt.mergeStrategy==="deep"?de(o,t,!0,!0):o={...o,...t},pt.gridOptions.context&&(o.context=pt.gridOptions.context),t.context&&(pt.mergeStrategy==="deep"&&o.context&&de(t.context,o.context,!0,!0),o.context=t.context),o}};Gi.gridOptions=void 0,Gi.mergeStrategy="shallow";var Hi=Gi;function Hd(e,t="shallow"){Hi.gridOptions=e,Hi.mergeStrategy=t}var Od={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1,enableFilterHandlers:!1};function Re(e,t,o){o==null||typeof o=="string"&&o==""?xn(e,t):ge(e,t,o)}function ge(e,t,o){e.setAttribute(Dn(t),o.toString())}function xn(e,t){e.removeAttribute(Dn(t))}function Dn(e){return`aria-${e}`}function Ne(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Bd(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function Vd(e){return e.getAttribute("aria-label")}function Ut(e,t){Re(e,"label",t)}function Kt(e,t){Re(e,"labelledby",t)}function Fn(e,t){Re(e,"live",t)}function Nd(e,t){Re(e,"atomic",t)}function _d(e,t){Re(e,"relevant",t)}function Wd(e,t){Re(e,"invalid",t)}function Pn(e,t){Re(e,"hidden",t)}function Oi(e,t){ge(e,"expanded",t)}function zd(e,t){ge(e,"setsize",t)}function $d(e,t){ge(e,"posinset",t)}function Ud(e,t){ge(e,"multiselectable",t)}function Kd(e,t){ge(e,"rowcount",t)}function Fo(e,t){ge(e,"rowindex",t)}function jd(e,t){ge(e,"rowspan",t)}function qd(e,t){ge(e,"colcount",t)}function Tn(e,t){ge(e,"colindex",t)}function Yd(e,t){ge(e,"colspan",t)}function Zd(e,t){ge(e,"sort",t)}function Qd(e){xn(e,"sort")}function Bi(e,t){Re(e,"selected",t)}function Xd(e,t){Re(e,"controls",t)}function Jd(e,t){Xd(e,t.id),Kt(t,e.id)}function In(e,t){Re(e,"owns",t)}function An(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Vi,Ni,_i,Wi,zi,$i,Ui;function ft(){return Vi===void 0&&(Vi=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Vi}function Mn(){return Ni===void 0&&(Ni=/(firefox)/i.test(navigator.userAgent)),Ni}function kn(){return _i===void 0&&(_i=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),_i}function Ct(){return Wi===void 0&&(Wi=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),Wi}function Ki(e){if(!e)return null;const t=e.tabIndex,o=e.getAttribute("tabIndex");return t===-1&&(o===null||o===""&&!Mn())?null:t.toString()}function ec(){if(Ui!==void 0)return Ui;if(!document.body)return-1;let e=1e6;const t=Mn()?6e6:1e9,o=document.createElement("div");for(document.body.appendChild(o);;){const i=e*2;if(o.style.height=i+"px",i>t||o.clientHeight!==i)break;e=i}return document.body.removeChild(o),Ui=e,e}function tc(){return $i==null&&Ln(),$i}function Ln(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let o=t.offsetWidth-t.clientWidth;o===0&&t.clientWidth===0&&(o=null),t.parentNode&&t.parentNode.removeChild(t),o!=null&&($i=o,zi=o===0)}function Gn(){return zi==null&&Ln(),zi}var oc="[tabindex], input, select, button, textarea, [href]",Hn="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function ji(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,i=t.call(e,"input, select, button, textarea"),s=t.call(e,Hn),n=Le(e);return i&&!s&&n}function X(e,t,o={}){const{skipAriaHidden:i}=o;e.classList.toggle("ag-hidden",!t),i||Pn(e,!t)}function ic(e,t,o={}){const{skipAriaHidden:i}=o;e.classList.toggle("ag-invisible",!t),i||Pn(e,!t)}function On(e,t){const o="disabled",i=t?n=>n.setAttribute(o,""):n=>n.removeAttribute(o);i(e);const s=e.querySelectorAll("input")??[];for(const n of s)i(n)}function mt(e,t,o){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof o=="number"){if(++i>o)break}else if(e===o)break}return!1}function Xe(e){const{height:t,width:o,borderTopWidth:i,borderRightWidth:s,borderBottomWidth:n,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:d,paddingLeft:c,marginTop:u,marginRight:h,marginBottom:g,marginLeft:p,boxSizing:f}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(o||"0"),borderTopWidth:parseFloat(i||"0"),borderRightWidth:parseFloat(s||"0"),borderBottomWidth:parseFloat(n||"0"),borderLeftWidth:parseFloat(r||"0"),paddingTop:parseFloat(a||"0"),paddingRight:parseFloat(l||"0"),paddingBottom:parseFloat(d||"0"),paddingLeft:parseFloat(c||"0"),marginTop:parseFloat(u||"0"),marginRight:parseFloat(h||"0"),marginBottom:parseFloat(g||"0"),marginLeft:parseFloat(p||"0"),boxSizing:f}}function qi(e){const t=Xe(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function jt(e){const t=Xe(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function sc(e){const{height:t,marginBottom:o,marginTop:i}=Xe(e);return Math.floor(t+o+i)}function Yi(e){const{width:t,marginLeft:o,marginRight:i}=Xe(e);return Math.floor(t+o+i)}function Bn(e){const t=e.getBoundingClientRect(),{borderTopWidth:o,borderLeftWidth:i,borderRightWidth:s,borderBottomWidth:n}=Xe(e);return{top:t.top+(o||0),left:t.left+(i||0),right:t.right+(s||0),bottom:t.bottom+(n||0)}}function Po(e,t){let o=e.scrollLeft;return t&&(o=Math.abs(o)),o}function To(e,t,o){o&&(t*=-1),e.scrollLeft=t}function pe(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function ke(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Vn(e){return!!e.offsetParent}function Le(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!Vn(e)||window.getComputedStyle(e).visibility!=="visible")}function Zi(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Nn(e,t,o){o&&o.nextSibling===t||(e.firstChild?o?o.nextSibling?e.insertBefore(t,o.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function _n(e,t){for(let o=0;o<t.length;o++){const i=t[o],s=e.children[o];s!==i&&e.insertBefore(i,s)}}function nc(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function qt(e,t){if(t)for(const o of Object.keys(t)){const i=t[o];if(!o||!o.length||i==null)continue;const s=nc(o),n=i.toString(),r=n.replace(/\s*!important/g,""),a=r.length!=n.length?"important":void 0;e.style.setProperty(s,r,a)}}function Io(e){return()=>{const t=e();return t?Wn(t)||zn(t):!0}}function Wn(e){return e.clientWidth<e.scrollWidth}function zn(e){return e.clientHeight<e.scrollHeight}function Ao(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):_e(e,t)}function _e(e,t){t=Xi(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Qi(e,t){t=Xi(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function Xi(e){return typeof e=="number"?`${e}px`:e}function Ji(e){return e instanceof Node||e instanceof HTMLElement}function he(e,t,o){o==null||o===""?e.removeAttribute(t):e.setAttribute(t,o.toString())}function Je(e,t,o){const s=ir(e).ResizeObserver,n=s?new s(o):null;return n==null||n.observe(t),()=>n==null?void 0:n.disconnect()}function We(e,t){const o=ir(e);o.requestAnimationFrame?o.requestAnimationFrame(t):o.webkitRequestAnimationFrame?o.webkitRequestAnimationFrame(t):o.setTimeout(t,0)}var $n="data-ref",es;function Un(){return es??(es=document.createTextNode(" ")),es.cloneNode()}function ee(e){const{attrs:t,children:o,cls:i,ref:s,role:n,tag:r}=e,a=document.createElement(r);if(i&&(a.className=i),s&&a.setAttribute($n,s),n&&a.setAttribute("role",n),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(o)if(typeof o=="string")a.textContent=o;else{let l=!0;for(const d of o)d&&(typeof d=="string"?(a.appendChild(document.createTextNode(d)),l=!1):typeof d=="function"?a.appendChild(d()):(l&&(a.appendChild(Un()),l=!1),a.append(ee(d)),a.appendChild(Un())))}return a}var Kn={};function ts(e,t){Kn[t]||(e(),Kn[t]=!0)}function Yt(e,t,...o){e.get("debug")&&console.log("AG Grid: "+t,...o)}function Zt(e,...t){ts(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function wt(e,...t){ts(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var rc={pending:!1,funcs:[]},ac={pending:!1,funcs:[]};function os(e,t="setTimeout",o){const i=t==="raf"?ac:rc;if(i.funcs.push(e),i.pending)return;i.pending=!0;const s=()=>{const n=i.funcs.slice();i.funcs.length=0,i.pending=!1,n.forEach(r=>r())};t==="raf"?We(o,s):window.setTimeout(s,0)}function fe(e,t,o){let i;return function(...s){const n=this;window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(n,s)},o)}}function jn(e,t){let o=0;return function(...i){const s=this,n=Date.now();n-o<t||(o=n,e.apply(s,i))}}function lc(e,t,o=100,i){const s=Date.now();let n=null,r=!1;const a=()=>{const l=Date.now()-s>o;(e()||l)&&(t(),r=!0,n!=null&&(window.clearInterval(n),n=null))};a(),r||(n=window.setInterval(a,10))}var qn="https://www.ag-grid.com",L="34.1.1",Yn=2e3,Zn=100,Qn="_version_",Mo=null,vt=`${qn}/javascript-data-grid`;function dc(e){Mo=e}function cc(e){vt=e}function Xn(e,t,o){return(Mo==null?void 0:Mo.getConsoleMessage(e,t))??[pc(e,t,o)]}function is(e,t,o,i){e(`error #${t}`,...Xn(t,o,i))}function uc(e){if(!e)return String(e);const t={};for(const o of Object.keys(e))typeof e[o]!="object"&&typeof e[o]!="function"&&(t[o]=e[o]);return JSON.stringify(t)}function hc(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=uc(e)),t}function ko(e){return e===void 0?"undefined":e===null?"null":e}function ss(e,t){return`${e}?${t.toString()}`}function gc(e,t,o){const i=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let s=ss(e,t);for(const[n,r]of i){if(n===Qn)continue;const a=s.length-o;if(a<=0)break;const l="...",d=a+l.length,c=r.length-d>Zn?r.slice(0,r.length-d)+l:r.slice(0,Zn)+l;t.set(n,c),s=ss(e,t)}return s}function Jn(e,t){const o=new URLSearchParams;if(o.append(Qn,L),t)for(const n of Object.keys(t))o.append(n,hc(t[n]));const i=`${vt}/errors/${e}`,s=ss(i,o);return s.length<=Yn?s:gc(i,o,Yn)}var pc=(e,t,o)=>{const i=Jn(e,t);return`${o?o+`
|
|
2
2
|
`:""}Visit ${i}${o?"":`
|
|
3
|
-
Alternatively register the ValidationModule to see the full message in the console.`}`};function k(...e){ts(qt,e[0],e[1])}function U(...e){ts(ft,e[0],e[1])}function Yt(e,t,o){ts(ft,e,t,o)}function pc(e,t){const o=t[0];return`error #${o} `+Zn(o,t[1],e).join(" ")}function ye(...e){return pc(void 0,e)}function Xn(e,t){return e.get("rowModelType")===t}function oe(e,t){return Xn(e,"clientSide")}function Mo(e,t){return Xn(e,"serverSide")}function ee(e,t){return e.get("domLayout")===t}function Qe(e){return Ho(e)!==void 0}function Jn(e){return typeof e.get("getRowHeight")=="function"}function fc(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function _e(e,t,o=!1,i){const{gos:s,environment:n}=e;if(i==null&&(i=n.getDefaultRowHeight()),Jn(s)){if(o)return{height:i,estimated:!0};const a={node:t,data:t.data},d=s.getCallback("getRowHeight")(a);if(ss(d))return d===0&&k(23),{height:Math.max(1,d),estimated:!1}}if(t.detail&&s.get("masterDetail"))return Cc(s);const r=s.get("rowHeight");return{height:r&&ss(r)?r:i,estimated:!1}}function Cc(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return ss(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function is(e){const{environment:t,gos:o}=e,i=o.get("rowHeight");if(!i||K(i))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(k(24),t.getDefaultRowHeight())}function ss(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function er(e,t,o){const i=t[e.getDomDataKey()];return i?i[o]:void 0}function Xe(e,t,o,i){const s=e.getDomDataKey();let n=t[s];K(n)&&(n={},t[s]=n),n[o]=i}function J(e){const{gos:t,eGridDiv:o}=e;let i=null;const s=t.get("getDocument");return s&&M(s)?i=s():o&&(i=o.ownerDocument),i&&M(i)?i:document}function tr(e){return J(e).defaultView||window}function Zt(e){return e.eGridDiv.getRootNode()}function Y(e){return Zt(e).activeElement}function ns(e){let t=null,o=null;try{t=J(e).fullscreenElement}catch{}finally{t||(t=Zt(e));const i=t.querySelector("body");i?o=i:t instanceof ShadowRoot?o=t:t instanceof Document?o=t==null?void 0:t.documentElement:o=t}return o}function mc(e){const t=ns(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function wc(e){const t=ns(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function vc(e,t,o){const s=e.getBoundingClientRect().height,n=mc(o)-2,r=wc(o)-2;if(!e.offsetParent)return;const a=Hn(e.offsetParent),{clientY:d,clientX:c}=t;let u=d-a.top-s/2,h=c-a.left-10;const g=J(o),p=g.defaultView||window,f=p.pageYOffset||g.documentElement.scrollTop,C=p.pageXOffset||g.documentElement.scrollLeft;n>0&&h+e.clientWidth>n+C&&(h=n+C-e.clientWidth),h<0&&(h=0),r>0&&u+e.clientHeight>r+f&&(u=r+f-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}function or(e){const t=Y(e);return t===null||t===J(e).body}function mt(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function ir(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||ee(e,"print"))}function Re(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function sr(e){return e.get("grandTotalRow")}function nr(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function bc(e,t,o){return!!t.group&&!t.footer&&nr(e,o)}function ko(e){const t=e.getCallback("getRowId");return t===void 0?t:o=>{let i=t(o);return typeof i!="string"&&(Ji(()=>k(25,{id:i}),"getRowIdString"),i=String(i)),i}}function wt(e){return(e==null?void 0:e.checkboxes)??!0}function Lo(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function Go(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function Sc(e){return typeof e.get("rowSelection")!="string"}function Je(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function rs(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function Ho(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==null?void 0:t.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function Qt(e){return Ho(e)==="multiRow"}function Oo(e){const t=e.get("rowSelection");if(typeof t=="string"){const o=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return o&&i?"filteredDescendants":o?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function yc(e,t=!0){const o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function Xt(e){const t=Oo(e);return t==="descendants"||t==="filteredDescendants"}function Bo(e){return e.get("columnMenu")==="legacy"}function Rc(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function Ec(e,t,o){typeof e!="object"&&(e={});const i={...e};return o.forEach(s=>{const n=t[s];typeof n<"u"&&(i[s]=n)}),i}function xc(e,t){if(!e)return;const o={};let i=!1;if(Object.keys(e).forEach(r=>{o[r]=e[r],i=!0}),!i)return;const s={type:"gridOptionsChanged",options:o};t.dispatchEvent(s);const n={type:"componentStateChanged",...o};t.dispatchEvent(n)}function _(e,t){return e.addGridCommonParams(t)}function Dc(e){return e.get("treeData")?e.get("treeDataParentIdField")?"treeSelfRef":e.get("treeDataChildrenField")?"treeNested":"treePath":"group"}var rr="__ag_Grid_Stop_Propagation",Fc=["touchstart","touchend","touchmove","touchcancel","scroll"],Pc=["wheel"],ls={};function vt(e){e[rr]=!0}function ke(e){return e[rr]===!0}var lr=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return o=>{if(typeof ls[o]=="boolean")return ls[o];const i=document.createElement(e[o]||"div");return o="on"+o,ls[o]=o in i}})();function ar(e,t,o){let i=t;for(;i;){const s=er(e,i,o);if(s)return s;i=i.parentElement}return null}function Tc(e,t){return!t||!e?!1:Ac(t).indexOf(e)>=0}function Ic(e){const t=[];let o=e.target;for(;o;)t.push(o),o=o.parentElement;return t}function Ac(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():Ic(t)}function Mc(e,t,o,i){const s=dr(o);let n;s!=null&&(n={passive:s}),e&&e.addEventListener&&e.addEventListener(t,o,i,n)}var dr=e=>{const t=Fc.includes(e),o=Pc.includes(e);if(t)return!0;if(o)return!1},x=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,o){this.localEventService||(this.localEventService=new je),this.localEventService.addEventListener(e,t,o)}removeEventListener(e,t,o){var i;(i=this.localEventService)==null||i.removeEventListener(e,t,o)}dispatchLocalEvent(e){var t;(t=this.localEventService)==null||t.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const o=[];for(const i of Object.keys(t)){const s=t[i];s&&o.push(this._setupListener(e,i,s))}return o}_setupListener(e,t,o){if(this.destroyed)return()=>null;let i;return kc(e)?(e.__addEventListener(t,o),i=()=>(e.__removeEventListener(t,o),null)):(e instanceof HTMLElement?Mc(this.beans.frameworkOverrides,e,t,o):e.addEventListener(t,o),i=()=>(e.removeEventListener(t,o),null)),this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}setupGridOptionListener(e,t){const{gos:o}=this;o.addPropertyEventListener(e,t);const i=()=>(o.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const o=e.join("-")+this.propertyListenerId++,i=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[o])return;this.lastChangeSetIdLookup[o]=s.changeSet.id}const n={type:"gridPropertyChanged",changeSet:s.changeSet,source:s.source};t(n)};e.forEach(s=>this.setupGridOptionListener(s,i))}getLocaleTextFunc(){return vn(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const o=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),o}createBean(e,t,o){return(t||this.stubContext).createBean(e,o)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function kc(e){return e.__addEventListener!==void 0}var Lc=/[&<>"']/g,Gc={"&":"&","<":"<",">":">",'"':""","'":"'"};function bt(e){return(e==null?void 0:e.toString().toString())??null}function Vo(e){var t;return((t=bt(e))==null?void 0:t.replace(Lc,o=>Gc[o]))??null}var Hc={resizable:!0,sortable:!0},Oc=0;function cr(){return Oc++}function et(e){return e instanceof We}var We=class extends x{constructor(e,t,o,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=o,this.primary=i,this.isColumn=!0,this.instanceId=cr(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new je,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Vo(o)}destroy(){var e;super.destroy(),(e=this.beans.rowSpanSvc)==null||e.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:o,colFlex:i}}=this;t==null||t.initCol(this);const s=e.hide;s!==void 0?this.visible=!s:this.visible=!e.initialHide,o==null||o.initCol(this),i==null||i.initCol(this)}setColDef(e,t,o){var s;const i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&((s=this.beans.rowSpanSvc)==null||s.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",o)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.setState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:o}}=this,i=e.get("suppressFieldDotNotation");this.fieldContainsDots=M(t)&&t.indexOf(".")>=0&&!i,this.tooltipFieldContainsDots=M(o)&&o.indexOf(".")>=0&&!i}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){var e;(e=this.beans.tooltipSvc)==null||e.initCol(this)}initRowSpan(){var e;this.colDef.spanRows&&((e=this.beans.rowSpanSvc)==null||e.register(this))}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:o=>{const i=e.recreateColDef(this.colDef);this.setColDef(i,i,o.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const o=e.width,i=e.initialWidth;return o!=null?t=o:i!=null?t=i:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){var t;return((t=this.beans.showRowGroupCols)==null?void 0:t.isRowGroupDisplayed(this,e))??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){var i,s,n;this.frameworkEventListenerService=(s=(i=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:s.call(i,this.frameworkEventListenerService,this.colEventSvc);const o=((n=this.frameworkEventListenerService)==null?void 0:n.wrap(e,t))??t;this.colEventSvc.addEventListener(e,o)}removeEventListener(e,t){var i;const o=((i=this.frameworkEventListenerService)==null?void 0:i.unwrap(e,t))??t;this.colEventSvc.removeEventListener(e,o)}createColumnFunctionCallbackParams(e){return _(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){var t;return((t=this.beans.cellNavigation)==null?void 0:t.isSuppressNavigable(this,e))??!1}isCellEditable(e){var t;return((t=this.beans.editSvc)==null?void 0:t.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){var t;return((t=this.beans.selectionSvc)==null?void 0:t.isCellCheckboxSelection(this,e))??!1}isSuppressPaste(e){var t;return this.isColumnFunc(e,((t=this.colDef)==null?void 0:t.suppressPaste)??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??Hc[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const o=this.createColumnFunctionCallbackParams(e);return t(o)}return!1}createColumnEvent(e,t){return _(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return K(this.sort)}isSorting(){return M(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){var e;return k(261),!!((e=this.beans.colHover)!=null&&e.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 o=e===!0;this.visible!==o&&(this.visible=o,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e&&e.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let o=!0;for(;e;){if(!e.isPadding()){o=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:o}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return _(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(K(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),o=this.colDef.colSpan(t);return Math.max(o,1)}getRowSpan(e){if(K(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),o=this.colDef.rowSpan(t);return Math.max(o,1)}setActualWidth(e,t,o=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),o||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchColEvent(e,t,o){const i=this.createColumnEvent(e,t);o&&re(i,o),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function te(e){return e instanceof No}var No=class extends x{constructor(e,t,o,i){super(),this.colGroupDef=e,this.groupId=t,this.padding=o,this.level=i,this.isColumn=!1,this.expandable=!1,this.instanceId=cr(),this.expandableListenerRemoveCallback=null,this.expanded=!!(e!=null&&e.openByDefault)}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(const t of this.children)et(t)?e(t):te(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){this.children&&this.children.forEach(t=>{et(t)?e.push(t):te(t)&&t.addLeafColumns(e)})}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.__addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.__removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,o=!1;const i=this.findChildrenRemovingPadding();for(let n=0,r=i.length;n<r;n++){const l=i[n];if(!l.isVisible())continue;const a=l.getColumnGroupShow();a==="open"?(e=!0,o=!0):a==="closed"?(t=!0,o=!0):(e=!0,t=!0)}const s=e&&t&&o;this.expandable!==s&&(this.expandable=s,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=o=>{o.forEach(i=>{te(i)&&i.isPadding()?t(i.children):e.push(i)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},Bc={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function ur(e,t,o){const i={},s=e.gos;return Object.assign(i,s.get("defaultColGroupDef")),Object.assign(i,t),s.validateColDef(i,o),i}var Vc=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=Mi(e);let o=0;for(;;){let i=e??t;if(i?o!==0&&(i+="_"+o):i=o,!this.existingKeys[i]){const s=String(i);return e&&o>0&&k(273,{providedId:e,usedId:s}),this.existingKeys[s]=!0,s}o++}}},hr=Object.freeze([]);function $(e){if(e!=null&&e.length)return e[e.length-1]}function Jt(e,t,o){return e==null&&t==null?!0:e!=null&&t!=null&&e.length===t.length&&e.every((i,s)=>o?o(i,t[s]):t[s]===i)}function _o(e,t){if(e)for(const o of e)t(o)}function we(e,t){const o=e.indexOf(t);o>=0&&e.splice(o,1)}function gr(e,t,o){for(let i=0;i<t.length;i++)we(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(o,0,t[i])}var Wo="ag-Grid-AutoColumn",pr="ag-Grid-SelectionColumn",fr="ag-Grid-RowNumbersColumn";function Cr(e){const t=[],o=i=>{for(let s=0;s<i.length;s++){const n=i[s];et(n)?t.push(n):te(n)&&o(n.getChildren())}};return o(e),t}function Le(e){return e.reduce((t,o)=>t+o.getActualWidth(),0)}function zo(e,t,o){const i={};if(!t)return;Ge(null,t,n=>{i[n.getInstanceId()]=n}),o&&Ge(null,o,n=>{i[n.getInstanceId()]=null});const s=Object.values(i).filter(n=>n!=null);e.context.destroyBeans(s)}function mr(e){return e.getId().startsWith(Wo)}function tt(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(pr))??!1}function ot(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(fr))??!1}function Nc(e){return tt(e)||ot(e)}function $o(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function _c(e,t){return Jt(e,t,(o,i)=>o.getColId()===i.getColId())}function Wc(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function St(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function wr(e,t){const o=e===t,i=e.getColDef()===t,s=e.getColId()==t;return o||i||s}var zc=(e,t)=>(o,i)=>{const s={value1:void 0,value2:void 0};let n=!1;return e&&(e[o]!==void 0&&(s.value1=e[o],n=!0),M(i)&&e[i]!==void 0&&(s.value2=e[i],n=!0)),!n&&t&&(t[o]!==void 0&&(s.value1=t[o]),M(i)&&t[i]!==void 0&&(s.value2=t[i])),s};function $c(e,t=null,o,i,s){const n=new Vc,{existingCols:r,existingGroups:l,existingColKeys:a}=Uc(i);n.addExistingKeys(a);const d=vr(e,t,0,o,r,n,l,s),{colGroupSvc:c}=e,u=(c==null?void 0:c.findMaxDepth(d,0))??0,h=c?c.balanceColumnTree(d,0,u,n):d;return Ge(null,h,(p,f)=>{te(p)&&p.setupExpandable(),p.originalParent=f}),{columnTree:h,treeDepth:u}}function Uc(e){const t=[],o=[],i=[];return e&&Ge(null,e,s=>{if(te(s)){const n=s;o.push(n)}else{const n=s;i.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:o,existingColKeys:i}}function vr(e,t,o,i,s,n,r,l){if(!t)return[];const{colGroupSvc:a}=e,d=new Array(t.length);for(let c=0;c<d.length;c++){const u=t[c];a&&Qc(u)?d[c]=a.createProvidedColumnGroup(i,u,o,s,n,r,l):d[c]=Kc(e,i,u,s,n,l)}return d}function Kc(e,t,o,i,s,n){var a;const r=qc(o,i);r&&(i==null||i.splice(r.idx,1));let l=r==null?void 0:r.column;if(l){const d=as(e,o,l.getColId());l.setColDef(d,o,n),jc(e,l,d,n)}else{const d=s.getUniqueKey(o.colId,o.field),c=as(e,o,d);l=new We(c,o,d,t),e.context.createBean(l)}return(a=e.dataTypeSvc)==null||a.addColumnListeners(l),l}function br(e,t,o,i,s,n,r,l){const{sortSvc:a,pinnedCols:d,colFlex:c}=e;o!==void 0&&t.setVisible(!o,l),a&&(a.updateColSort(t,i,l),s!==void 0&&a.setColSortIndex(t,s)),n!==void 0&&(d==null||d.setColPinned(t,n)),r!==void 0&&(c==null||c.setColFlex(t,r))}function jc(e,t,o,i){br(e,t,o.hide,o.sort,o.sortIndex,o.pinned,o.flex,i);const s=t.getFlex();if(!(s!=null&&s>0))if(o.width!=null)t.setActualWidth(o.width,i);else{const n=t.getActualWidth();t.setActualWidth(n,i)}}function qc(e,t){if(t)for(let o=0;o<t.length;o++){const i=t[o].getUserProvidedColDef();if(!i)continue;if(e.colId!=null){if(t[o].getId()===e.colId)return{idx:o,column:t[o]};continue}if(e.field!=null){if(i.field===e.field)return{idx:o,column:t[o]};continue}if(i===e)return{idx:o,column:t[o]}}}function as(e,t,o,i){const{gos:s,dataTypeSvc:n}=e,r={},l=s.get("defaultColDef");re(r,l,!1,!0);const a=Yc(e,r,t,o);a&&Zc(e,a,r);const d=r.cellDataType;re(r,t,!1,!0),d!==void 0&&(r.cellDataType=d);const c=s.get("autoGroupColumnDef"),u=Re(s);return t.rowGroup&&c&&u&&re(r,{sort:c.sort,initialSort:c.initialSort},!1,!0),n&&(n.postProcess(r),n.validateColDef(r)),s.validateColDef(r,o,i),r}function Yc(e,t,o,i){var r;const s=(r=e.dataTypeSvc)==null?void 0:r.updateColDefAndGetColumnType(t,o,i),n=o.type??s??t.type;return t.type=n,n?$o(n):void 0}function Zc(e,t,o){if(!t.length)return;const i=Object.assign({},Bc),s=e.gos.get("columnTypes")||{};for(const n of Object.keys(s)){const r=s[n];n in i?k(34,{key:n}):(r.type&&k(35),i[n]=r)}t.forEach(n=>{const r=i[n.trim()];r?re(o,r,!1,!0):k(36,{t:n})})}function Qc(e){return e.children!==void 0}function Ge(e,t,o){if(t)for(let i=0;i<t.length;i++){const s=t[i];te(s)&&Ge(s,s.getChildren(),o),o(s,e)}}function Sr(e,t){const o=[],i=[],s=[];return e.forEach(r=>{const l=r.getColDef().lockPosition;l==="right"?s.push(r):l==="left"||l===!0?o.push(r):i.push(r)}),t.get("enableRtl")?[...s,...i,...o]:[...o,...i,...s]}function yr(e,t){let o=!0;return Ge(null,t,i=>{if(!te(i))return;const s=i,n=s.getColGroupDef();if(!(n&&n.marryChildren))return;const l=[];s.getLeafColumns().forEach(h=>{const g=e.indexOf(h);l.push(g)});const a=Math.max.apply(Math,l),d=Math.min.apply(Math,l),c=a-d,u=s.getLeafColumns().length-1;c>u&&(o=!1)}),o}function Rr(e,t){if(!e||e.length==0)return;const o=t(e[0]);for(let i=1;i<e.length;i++)if(o!==t(e[i]))return;return o}function Er(e,t,o){if(!t.length)return;const i=t.length===1?t[0]:null,s=Rr(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:i,source:o})}function Xc(e,t,o){if(!t.length)return;const i=t.length===1?t[0]:null,s=Rr(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:i,source:o})}function Jc(e,t,o,i){e.dispatchEvent({type:t,columns:o,column:o&&o.length==1?o[0]:null,source:i})}function yt(e,t,o,i,s=null){t!=null&&t.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:s,finished:o,source:i})}function ve(e,t,o){var S;const{colModel:i,rowGroupColsSvc:s,pivotColsSvc:n,autoColSvc:r,selectionColSvc:l,colAnimation:a,visibleCols:d,pivotResultCols:c,environment:u,valueColsSvc:h,eventSvc:g,gos:p}=e,f=i.getColDefCols()??[],C=l==null?void 0:l.getColumns();if(!(f!=null&&f.length)&&!(C!=null&&C.length))return!1;if(t!=null&&t.state&&!t.state.forEach)return k(32),!1;const m=(D,I,O,F,P)=>{if(!D)return;const T=zc(I,t.defaultState),V=T("flex").value1;if(br(e,D,T("hide").value1,T("sort").value1,T("sortIndex").value1,T("pinned").value1,V,o),V==null){const B=T("width").value1;if(B!=null){const W=D.getColDef().minWidth??u.getDefaultColumnMinWidth();W!=null&&B>=W&&D.setActualWidth(B,o)}}P||!D.isPrimary()||(h==null||h.syncColumnWithState(D,o,T),s==null||s.syncColumnWithState(D,o,T,O),n==null||n.syncColumnWithState(D,o,T,F))},w=(D,I,O)=>{var Fd,Pd;const F=xr(e,o),P=I.slice(),T={},V={},B=[],W=[],z=[];let de=0;const Ie=(s==null?void 0:s.columns.slice())??[],p0=(n==null?void 0:n.columns.slice())??[];D.forEach(ne=>{const Ro=ne.colId;if(Ro.startsWith(Wo)){B.push(ne),z.push(ne);return}if(tt(Ro)){W.push(ne),z.push(ne);return}const _t=O(Ro);_t?(m(_t,ne,T,V,!1),we(P,_t)):(z.push(ne),de+=1)});const xd=ne=>m(ne,null,T,V,!1);P.forEach(xd),s==null||s.sortColumns(Fr.bind(s,T,Ie)),n==null||n.sortColumns(Fr.bind(n,V,p0)),i.refreshCols(!1);const Dd=(ne,Ro,wn=[])=>{Ro.forEach(_t=>{const Td=ne(_t.colId);we(wn,Td),m(Td,_t,null,null,!0)}),wn.forEach(xd)};return Dd(ne=>(r==null?void 0:r.getColumn(ne))??null,B,(Fd=r==null?void 0:r.getColumns())==null?void 0:Fd.slice()),Dd(ne=>(l==null?void 0:l.getColumn(ne))??null,W,(Pd=l==null?void 0:l.getColumns())==null?void 0:Pd.slice()),tu(t,i,p),d.refresh(o),g.dispatchEvent({type:"columnEverythingChanged",source:o}),F(),{unmatchedAndAutoStates:z,unmatchedCount:de}};a==null||a.start();let{unmatchedAndAutoStates:b,unmatchedCount:v}=w(t.state||[],f,D=>i.getColDefCol(D));if(b.length>0||M(t.defaultState)){const D=((S=c==null?void 0:c.getPivotResultCols())==null?void 0:S.list)??[];v=w(b,D,I=>(c==null?void 0:c.getPivotResultCol(I))??null).unmatchedCount}return a==null||a.finish(),v===0}function eu(e,t){var w,b;const{colModel:o,autoColSvc:i,selectionColSvc:s,eventSvc:n,gos:r}=e,l=o.getColDefCols();if(!(l!=null&&l.length))return;const a=o.getColDefColTree(),d=Cr(a),c=[];let u=1e3,h=1e3;const g=v=>{const S=Dr(v);K(S.rowGroupIndex)&&S.rowGroup&&(S.rowGroupIndex=u++),K(S.pivotIndex)&&S.pivot&&(S.pivotIndex=h++),c.push(S)};(w=i==null?void 0:i.getColumns())==null||w.forEach(g),(b=s==null?void 0:s.getColumns())==null||b.forEach(g),d==null||d.forEach(g),ve(e,{state:c},t);const p=(i==null?void 0:i.getColumns())??[],m=[...(s==null?void 0:s.getColumns())??[],...p,...l].map(v=>({colId:v.colId}));ve(e,{state:m,applyOrder:!0},t),n.dispatchEvent(_(r,{type:"columnsReset",source:t}))}function xr(e,t){const{rowGroupColsSvc:o,pivotColsSvc:i,valueColsSvc:s,colModel:n,sortSvc:r,eventSvc:l}=e,a={rowGroupColumns:(o==null?void 0:o.columns.slice())??[],pivotColumns:(i==null?void 0:i.columns.slice())??[],valueColumns:(s==null?void 0:s.columns.slice())??[]},d=Uo(e),c={};return d.forEach(u=>{c[u.colId]=u}),()=>{const u=(D,I,O,F)=>{const P=I.map(F),T=O.map(F);if(Jt(P,T))return;const B=new Set(I);O.forEach(z=>{B.delete(z)||B.add(z)});const W=[...B];l.dispatchEvent({type:D,columns:W,column:W.length===1?W[0]:null,source:t})},h=D=>{const I=[];return n.forAllCols(O=>{const F=c[O.getColId()];F&&D(F,O)&&I.push(O)}),I},g=D=>D.getColId();u("columnRowGroupChanged",a.rowGroupColumns,(o==null?void 0:o.columns)??[],g),u("columnPivotChanged",a.pivotColumns,(i==null?void 0:i.columns)??[],g);const f=h((D,I)=>{const O=D.aggFunc!=null,F=O!=I.isValueActive(),P=O&&D.aggFunc!=I.getAggFunc();return F||P});f.length>0&&Jc(l,"columnValueChanged",f,t),yt(l,h((D,I)=>D.width!=I.getActualWidth()),!0,t),Er(l,h((D,I)=>D.pinned!=I.getPinned()),t),Xc(l,h((D,I)=>D.hide==I.isVisible()),t);const v=h((D,I)=>D.sort!=I.getSort()||D.sortIndex!=I.getSortIndex());v.length>0&&(r==null||r.dispatchSortChangedEvents(t,v));const S=Uo(e);iu(d,S,t,n,l)}}function Uo(e){const{colModel:t,rowGroupColsSvc:o,pivotColsSvc:i}=e,s=t.getColDefCols();if(K(s)||!t.isAlive())return[];const n=o==null?void 0:o.columns,r=i==null?void 0:i.columns,l=[],a=c=>{const u=c.isRowGroupActive()&&n?n.indexOf(c):null,h=c.isPivotActive()&&r?r.indexOf(c):null,g=c.isValueActive()?c.getAggFunc():null,p=c.getSort()!=null?c.getSort():null,f=c.getSortIndex()!=null?c.getSortIndex():null;l.push({colId:c.getColId(),width:c.getActualWidth(),hide:!c.isVisible(),pinned:c.getPinned(),sort:p,sortIndex:f,aggFunc:g,rowGroup:c.isRowGroupActive(),rowGroupIndex:u,pivot:c.isPivotActive(),pivotIndex:h,flex:c.getFlex()??null})};t.forAllCols(c=>a(c));const d=new Map(t.getCols().map((c,u)=>[c.getColId(),u]));return l.sort((c,u)=>{const h=d.has(c.colId)?d.get(c.colId):-1,g=d.has(u.colId)?d.get(u.colId):-1;return h-g}),l}function Dr(e){const t=(p,f)=>p??f??null,o=e.getColDef(),i=t(o.sort,o.initialSort),s=t(o.sortIndex,o.initialSortIndex),n=t(o.hide,o.initialHide),r=t(o.pinned,o.initialPinned),l=t(o.width,o.initialWidth),a=t(o.flex,o.initialFlex);let d=t(o.rowGroupIndex,o.initialRowGroupIndex),c=t(o.rowGroup,o.initialRowGroup);d==null&&(c==null||c==!1)&&(d=null,c=null);let u=t(o.pivotIndex,o.initialPivotIndex),h=t(o.pivot,o.initialPivot);u==null&&(h==null||h==!1)&&(u=null,h=null);const g=t(o.aggFunc,o.initialAggFunc);return{colId:e.getColId(),sort:i,sortIndex:s,hide:n,pinned:r,width:l,flex:a,rowGroup:c,rowGroupIndex:d,pivot:h,pivotIndex:u,aggFunc:g}}function tu(e,t,o){if(!e.applyOrder||!e.state)return;const i=[];e.state.forEach(s=>{s.colId!=null&&i.push(s.colId)}),ou(t.cols,i,t,o)}function ou(e,t,o,i){if(e==null)return;let s=[];const n={};t.forEach(l=>{if(n[l])return;const a=e.map[l];a&&(s.push(a),n[l]=!0)});let r=0;if(e.list.forEach(l=>{const a=l.getColId();if(n[a]!=null)return;a.startsWith(Wo)?s.splice(r++,0,l):s.push(l)}),s=Sr(s,i),!yr(s,o.getColTree())){k(39);return}e.list=s}function iu(e,t,o,i,s){const n={};t.forEach(c=>n[c.colId]=c);const r={};e.forEach(c=>{n[c.colId]&&(r[c.colId]=!0)});const l=e.filter(c=>r[c.colId]),a=t.filter(c=>r[c.colId]),d=[];a.forEach((c,u)=>{const h=l&&l[u];if(h&&h.colId!==c.colId){const g=i.getCol(h.colId);g&&d.push(g)}}),d.length&&s.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,finished:!0,source:o})}var Fr=(e,t,o,i)=>{const s=e[o.getId()],n=e[i.getId()],r=s!=null,l=n!=null;if(r&&l)return s-n;if(r)return-1;if(l)return 1;const a=t.indexOf(o),d=t.indexOf(i),c=a>=0,u=d>=0;return c&&u?a-d:c?-1:1},su=class extends x{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(St(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),St(e.source)))}createColsFromColDefs(e){var m,w,b;const{beans:t}=this,{valueCache:o,colAutosize:i,rowGroupColsSvc:s,pivotColsSvc:n,valueColsSvc:r,visibleCols:l,eventSvc:a}=t,d=this.colDefs?xr(t,e):void 0;o==null||o.expire();const c=(m=this.colDefCols)==null?void 0:m.list,u=(w=this.colDefCols)==null?void 0:w.tree,h=$c(t,this.colDefs,!0,u,e);zo(t,(b=this.colDefCols)==null?void 0:b.tree,h.columnTree);const g=h.columnTree,p=h.treeDepth,f=Cr(g),C={};f.forEach(v=>C[v.getId()]=v),this.colDefCols={tree:g,treeDepth:p,list:f,map:C},s==null||s.extractCols(e,c),n==null||n.extractCols(e,c),r==null||r.extractCols(e,c),this.ready=!0,this.refreshCols(!0),l.refresh(e),a.dispatchEvent({type:"columnEverythingChanged",source:e}),d&&(this.changeEventsDispatching=!0,d(),this.changeEventsDispatching=!1),a.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&(i==null||i.applyAutosizeStrategy())}refreshCols(e){var f;if(!this.colDefCols)return;const t=(f=this.cols)==null?void 0:f.tree;this.saveColOrder();const{autoColSvc:o,selectionColSvc:i,rowNumbersSvc:s,quickFilter:n,pivotResultCols:r,showRowGroupCols:l,rowAutoHeight:a,visibleCols:d,colViewport:c,eventSvc:u}=this.beans,h=this.selectCols(r,this.colDefCols);this.createColumnsForService([o,i,s],h);const g=fc(this.gos,this.showingPivotResult);(!e||g)&&this.restoreColOrder(h),this.positionLockedCols(h),l==null||l.refresh(),n==null||n.refreshCols(),this.setColSpanActive(),a==null||a.setAutoHeightActive(h),d.clear(),c.clear(),!Jt(t,this.cols.tree)&&u.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t){for(const o of e)o&&(o.createColumns(t,i=>{this.lastOrder=i(this.lastOrder),this.lastPivotOrder=i(this.lastPivotOrder)}),o.addColumns(t))}selectCols(e,t){const o=(e==null?void 0:e.getPivotResultCols())??null;this.showingPivotResult=o!=null;const{map:i,list:s,tree:n,treeDepth:r}=o??t;return this.cols={list:s.slice(),map:{...i},tree:n.slice(),treeDepth:r},o&&(o.list.some(a=>{var d;return((d=this.cols)==null?void 0:d.map[a.getColId()])!==void 0})||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{valueColsSvc:e,selectionColSvc:t,gos:o}=this.beans,i=this.isPivotMode()&&!this.showingPivotResult,s=t==null?void 0:t.isSelectionColumnEnabled(),n=o.get("rowNumbers"),r=e==null?void 0:e.columns;return this.cols.list.filter(a=>{const d=mr(a);if(i){const c=r==null?void 0:r.includes(a);return d||c||s&&tt(a)||n&&ot(a)}else return d||a.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,o){ve(this.beans,{state:e.map(i=>({colId:typeof i=="string"?i:i.getColId(),hide:!t}))},o)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const o=t.filter(u=>e.map[u.getId()]!=null);if(o.length===0)return;if(o.length===e.list.length){e.list=o;return}const i=u=>{const h=u.getOriginalParent();return h?h.getChildren().length>1?!0:i(h):!1};if(!o.some(u=>i(u))){const u=new Set(o);for(const h of e.list)u.has(h)||o.push(h);e.list=o;return}const s=new Map;for(let u=0;u<o.length;u++){const h=o[u];s.set(h,u)}const n=e.list.filter(u=>!s.has(u));if(n.length===0){e.list=o;return}const r=(u,h)=>{const g=h?h.getOriginalParent():u.getOriginalParent();if(!g)return null;let p=null,f=null;for(const C of g.getChildren())if(!(C===h||C===u)){if(C instanceof We){const m=s.get(C);if(m==null)continue;(p==null||p<m)&&(p=m,f=C);continue}C.forEachLeafColumn(m=>{const w=s.get(m);w!=null&&(p==null||p<w)&&(p=w,f=m)})}return f??r(u,g)},l=[],a=new Map;for(const u of n){const h=r(u,null);if(h==null){l.push(u);continue}const g=a.get(h);g===void 0?a.set(h,u):Array.isArray(g)?g.push(u):a.set(h,[g,u])}const d=new Array(e.list.length);let c=d.length-1;for(let u=l.length-1;u>=0;u--)d[c--]=l[u];for(let u=o.length-1;u>=0;u--){const h=o[u],g=a.get(h);if(g)if(Array.isArray(g))for(let p=g.length-1;p>=0;p--){const f=g[p];d[c--]=f}else d[c--]=g;d[c--]=h}e.list=d}positionLockedCols(e){e.list=Sr(e.list,this.gos)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=((e=this.cols)==null?void 0:e.list)??null:this.lastOrder=((t=this.cols)==null?void 0:t.list)??null}getColumnDefs(){var e,t;return this.colDefCols?(t=this.beans.colDefFactory)==null?void 0:t.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,((e=this.cols)==null?void 0:e.list)??[]):void 0}setColSpanActive(){var e;this.colSpanActive=!!((e=this.cols)!=null&&e.list.some(t=>t.getColDef().colSpan!=null))}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1);const{visibleCols:o,eventSvc:i}=this.beans;o.refresh(t),i.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){var t;const e=(t=this.beans.pivotColsSvc)==null?void 0:t.columns;return this.pivotMode&&!!(e!=null&&e.length)}recreateColumnDefs(e){var o;if(!this.cols)return;(o=this.beans.autoColSvc)==null||o.updateColumns(e);const t=St(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;zo(this.beans,(e=this.colDefCols)==null?void 0:e.tree),super.destroy()}getColTree(){var e;return((e=this.cols)==null?void 0:e.tree)??[]}getColDefColTree(){var e;return((e=this.colDefCols)==null?void 0:e.tree)??[]}getColDefCols(){var e;return((e=this.colDefCols)==null?void 0:e.list)??null}getCols(){var e;return((e=this.cols)==null?void 0:e.list)??[]}forAllCols(e){var s,n,r,l;const{pivotResultCols:t,autoColSvc:o,selectionColSvc:i}=this.beans;_o((s=this.colDefCols)==null?void 0:s.list,e),_o((n=o==null?void 0:o.columns)==null?void 0:n.list,e),_o((r=i==null?void 0:i.columns)==null?void 0:r.list,e),_o((l=t==null?void 0:t.getPivotResultCols())==null?void 0:l.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){var t;return((t=this.cols)==null?void 0:t.map[e])??null}getColFromCollection(e,t){var s,n;if(t==null)return null;const{map:o,list:i}=t;if(typeof e=="string"&&o[e])return o[e];for(let r=0;r<i.length;r++)if(wr(i[r],e))return i[r];return((s=this.beans.autoColSvc)==null?void 0:s.getColumn(e))??((n=this.beans.selectionColSvc)==null?void 0:n.getColumn(e))??null}},nu=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let o;return typeof t!="number"?o=0:o=t+1,this.existingIds[e]=o,o}};function Ko(e,t,o){return o&&e.addDestroyFunc(()=>t.destroyBean(o)),o??e}var Pr=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){var i;if(!e)return;if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1){s.forEach(n=>this.toggleCss(n,t));return}}this.cssClassStates[e]!==t&&e.length&&((i=this.getGui())==null||i.classList.toggle(e,t),this.cssClassStates[e]=t)}},ru=0,A=null,j=class extends x{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=ru++,this.cssManager=new Pr(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(o=>[o.selector,o])),e&&this.setTemplate(e)}preConstruct(){var t,o,i;this.wireTemplate(this.getGui());const e="component-"+((o=(t=Object.getPrototypeOf(this))==null?void 0:t.constructor)==null?void 0:o.name);(i=this.css)==null||i.forEach(s=>this.beans.environment.addGlobalCSS(s,e))}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(Wn):null}applyElementsToComponent(e,t,o,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===A)this[t]=i??e;else{const n=o&&o[t];if(!this.suppressDataRefValidation&&!n)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${s}`)}}}createChildComponentsFromTags(e,t){const o=[];for(const i of e.childNodes??[])o.push(i);o.forEach(i=>{if(!(i instanceof HTMLElement))return;const s=this.createComponentFromElement(i,n=>{const r=n.getGui();if(r)for(const l of i.attributes??[])r.setAttribute(l.name,l.value)},t);if(s){if(s.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);const n=Array.prototype.slice.call(i.children);s.addItems(n)}this.swapComponentForNode(s,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)})}createComponentFromElement(e,t,o){const i=e.nodeName,s=this.getDataRefAttribute(e),n=i.indexOf("AG-")===0,r=n?this.componentSelectors.get(i):null;let l=null;if(r){const a=o&&s?o[s]:void 0;l=new r.component(a),l.setParentComponent(this),this.createBean(l,null,t)}else if(n)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,s,o,l),l}swapComponentForNode(e,t,o){const i=e.getGui();t.replaceChild(i,o),t.insertBefore(document.createComment(o.nodeName),i),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach(o=>o.setAttribute("tabindex",t.toString()))}setTemplate(e,t,o){let i;typeof e=="string"||e==null?i=qi(e):i=X(e),this.setTemplateFromElement(i,t,o)}setTemplateFromElement(e,t,o,i=!1){if(this.eGui=e,this.suppressDataRefValidation=i,t)for(let s=0;s<t.length;s++){const n=t[s];this.componentSelectors.set(n.selector,n)}this.wireTemplate(e,o)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let o=t;return e==null?null:(o||(o=this.eGui),Qi(e)?{element:e,parent:o}:{element:e.getGui(),parent:o})}prependChild(e,t){const{element:o,parent:i}=this.getContainerAndElement(e,t)||{};!o||!i||i.insertAdjacentElement("afterbegin",o)}appendChild(e,t){const{element:o,parent:i}=this.getContainerAndElement(e,t)||{};!o||!i||i.appendChild(o)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:o}=t;oc(this.eGui,e,{skipAriaHidden:o})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:o}=t;Z(this.eGui,e,{skipAriaHidden:o});const i={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(i)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,o){this.eGui.addEventListener(e,t,o),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}},eo=class Eo{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(o=>this.onDone(o),o=>this.onReject(o))}static all(t){return t.length?new Eo(o=>{let i=t.length;const s=new Array(i);t.forEach((n,r)=>{n.then(l=>{s[r]=l,i--,i===0&&o(s)})})}):Eo.resolve()}static resolve(t=null){return new Eo(o=>o(t))}then(t){return new Eo(o=>{this.status===1?o(t(this.resolution)):this.waiters.push(i=>o(t(i)))})}onDone(t){this.status=1,this.resolution=t,this.waiters.forEach(o=>o(t))}onReject(t){}};function lu(e){return e?e.prototype&&"getGui"in e.prototype:!1}function au(e,t,o,i){const{name:s}=o;let n,r,l,a,d,c;if(t){const u=t,h=u[s+"Selector"],g=h?h(i):null,p=f=>{typeof f=="string"?n=f:f!=null&&f!==!0&&(e.isFrameworkComponent(f)?l=f:r=f)};g?(p(g.component),a=g.params,d=g.popup,c=g.popupPosition):p(u[s])}return{compName:n,jsComp:r,fwComp:l,paramsFromSelector:a,popupFromSelector:d,popupPositionFromSelector:c}}var du=class extends x{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,o,i=!1){return this.getCompDetails(this.gridOptions,e,t,o,i)}getCompDetails(e,t,o,i,s=!1){var b;const{name:n,cellRenderer:r}=t;let{compName:l,jsComp:a,fwComp:d,paramsFromSelector:c,popupFromSelector:u,popupPositionFromSelector:h}=au(this.beans.frameworkOverrides,e,t,i),g,p;const f=v=>{const S=this.registry.getUserComponent(n,v);S&&(a=S.componentFromFramework?void 0:S.component,d=S.componentFromFramework?S.component:void 0,g=S.params,p=S.processParams)};if(l!=null&&f(l),a==null&&d==null&&o!=null&&f(o),a&&r&&!lu(a)&&(a=(b=this.agCompUtils)==null?void 0:b.adaptFunction(t,a)),!a&&!d){const{validation:v}=this.beans;s&&(l!==o||!o)?l?v!=null&&v.isProvidedUserComp(l)||U(50,{compName:l}):o?v||U(260,{...this.gos.getModuleErrorParams(),propName:n,compName:o}):U(216,{name:n}):o&&!v&&U(146,{comp:o});return}const C=this.mergeParams(e,t,i,c,g,p),m=a==null,w=a??d;return{componentFromFramework:m,componentClass:w,params:C,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(w,m,C,t)}}newAgStackInstance(e,t,o,i){var l;const s=!t;let n;s?n=new e:n=this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(n);const r=(l=n.init)==null?void 0:l.call(n,o);return r==null?eo.resolve(n):r.then(()=>n)}mergeParams(e,t,o,i=null,s,n){const r={...o,...s},l=e,a=l&&l[t.name+"Params"];if(typeof a=="function"){const d=a(o);re(r,d)}else typeof a=="object"&&re(r,a);return re(r,i),n?n(r):r}},cu={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},uu={name:"headerComponent",optionalMethods:["refresh"]},hu={name:"innerHeaderComponent"},gu={name:"innerHeaderGroupComponent"},pu={name:"headerGroupComponent"},fu={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Cu={name:"loadingCellRenderer",cellRenderer:!0},mu={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},wu={name:"loadingOverlayComponent",optionalMethods:["refresh"]},vu={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},bu={name:"tooltipComponent"},Su={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},yu={name:"loadingCellRenderer",cellRenderer:!0},Ru={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},Eu={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function xu(e,t){return e.getCompDetailsFromGridOptions(cu,"agDragAndDropImage",t,!0)}function Du(e,t,o){return e.getCompDetails(t,uu,"agColumnHeader",o)}function Fu(e,t,o){return e.getCompDetails(t,hu,void 0,o)}function Pu(e,t){const o=t.columnGroup.getColGroupDef();return e.getCompDetails(o,pu,"agColumnGroupHeader",t)}function Tu(e,t,o){return e.getCompDetails(t,gu,void 0,o)}function Iu(e,t){return e.getCompDetailsFromGridOptions(Su,void 0,t,!0)}function Au(e,t){return e.getCompDetailsFromGridOptions(yu,"agLoadingCellRenderer",t,!0)}function Mu(e,t){return e.getCompDetailsFromGridOptions(Ru,"agGroupRowRenderer",t,!0)}function ku(e,t){return e.getCompDetailsFromGridOptions(Eu,"agDetailCellRenderer",t,!0)}function Tr(e,t,o){return e.getCompDetails(t,fu,void 0,o)}function Ir(e,t,o){return e.getCompDetails(t,Cu,"agSkeletonCellRenderer",o,!0)}function Ar(e,t,o){return e.getCompDetails(t,mu,"agCellEditor",o,!0)}function Lu(e,t){return e.getCompDetailsFromGridOptions(wu,"agLoadingOverlay",t,!0)}function Gu(e,t){return e.getCompDetailsFromGridOptions(vu,"agNoRowsOverlay",t,!0)}function Hu(e,t){return e.getCompDetails(t.colDef,bu,"agTooltipComponent",t,!0)}function ds(e){const t=e;return t!=null&&t.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var Mr=new Set,jo={},Rt={},qo,kr=!1,Lr=!1,Ou=!1;function Bu(e){const[t,o]=e.version.split(".")||[],[i,s]=qo.split(".")||[];return t===i&&o===s}function Vu(e){qo||(qo=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.`;if(e.version?Bu(e)||ft(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${qo}.`)):ft(t(`'${e.moduleName}' is incompatible.`)),e.validate){const o=e.validate();o.isValid||ft(`${o.message}`)}}function Et(e,t,o=!1){o||(kr=!0),Vu(e);const i=e.rowModels??["all"];Mr.add(e);let s;t!==void 0?(Lr=!0,Rt[t]===void 0&&(Rt[t]={}),s=Rt[t]):s=jo,i.forEach(n=>{s[n]===void 0&&(s[n]={}),s[n][e.moduleName]=e}),e.dependsOn&&e.dependsOn.forEach(n=>Et(n,t,o))}function Nu(e){delete Rt[e]}function cs(e,t,o){const i=s=>{var n,r,l;return!!((n=jo[s])!=null&&n[e])||!!((l=(r=Rt[t])==null?void 0:r[s])!=null&&l[e])};return i(o)||i("all")}function us(){return Lr}function _u(e,t){const o=Rt[e]??{};return[...Object.values(jo.all??{}),...Object.values(o.all??{}),...Object.values(jo[t]??{}),...Object.values(o[t]??{})]}function Wu(){return new Set(Mr)}function zu(){return kr}function $u(){return Ou}var Uu=class{static register(e){Et(e,void 0)}static registerModules(e){e.forEach(t=>Et(t,void 0))}},Ku=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,!(!e||!e.beanClasses)&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){var t;for(const o of Object.keys(e.providedBeanInstances))this.beans[o]=e.providedBeanInstances[o];e.beanClasses.forEach(o=>{const i=new o;i.beanName?this.beans[i.beanName]=i:console.error(`Bean ${o.name} is missing beanName`),this.createdBeans.push(i)}),(t=e.derivedBeans)==null||t.forEach(o=>{const{beanName:i,bean:s}=o(this);this.beans[i]=s,this.createdBeans.push(s)}),e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){return this.initBeans([e],t),e}initBeans(e,t){e.forEach(o=>{var i,s;(i=o.preWireBeans)==null||i.call(o,this.beans),(s=o.wireBeans)==null||s.call(o,this.beans)}),e.forEach(o=>{var i;return(i=o.preConstruct)==null?void 0:i.call(o)}),t&&e.forEach(t),e.forEach(o=>{var i;return(i=o.postConstruct)==null?void 0:i.call(o)})}getBeans(){return this.beans}getBean(e){return this.beans[e]}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[]}destroyBean(e){var t;(t=e==null?void 0:e.destroy)==null||t.call(e)}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}};function ju(e){return typeof e=="object"&&!!e.getComp}var qu=class extends Ku{init(e){this.gridId=e.gridId,this.beans.context=this,this.destroyCallback=e.destroyCallback,super.init(e)}destroy(){var e;super.destroy(),Nu(this.gridId),(e=this.destroyCallback)==null||e.call(this)}getGridId(){return this.gridId}},Yu=class extends x{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new Gr,this.rowValidations=new Hr,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;const o=this.getEditRow(e);t?o.delete(t):o.clear(),o.size===0&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits||this.edits.size===0)return;const o=e&&this.edits.get(e);if(o)return o;if(t.checkSiblings){const i=e.pinnedSibling;if(i)return this.getEditRow(i)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(this.edits.size===0)return e.data;const o=this.getEditRow(e),i=e.pinnedSibling,s=t&&i&&this.getEditRow(i);if(!o&&!s)return e.data;const n=Object.assign({},e.data),r=(l,a)=>l.forEach(({pendingValue:d},c)=>{d!==pe&&(a[c.getColId()]=d)});return o&&r(o,n),s&&r(s,n),n}getEdit(e,t){const o=this._getEdit(e);return t&&o?{...o}:o}_getEdit(e){var t;if(!this.suspendEdits&&this.edits.size!==0)return e.rowNode&&e.column&&((t=this.getEditRow(e.rowNode))==null?void 0:t.get(e.column))}getEditMap(e=!0){if(this.suspendEdits||this.edits.size===0)return new Map;if(!e)return this.edits;const t=new Map;return this.edits.forEach((o,i)=>t.set(i,new Map(o))),t}setEditMap(e){this.edits.clear(),e.forEach((t,o)=>{const i=new Map;t.forEach((s,n)=>i.set(n,{...s})),this.edits.set(o,i)})}setEdit(e,t){(this.edits.size===0||!this.edits.has(e.rowNode))&&this.edits.set(e.rowNode,new Map);const o={...this._getEdit(e),...t};return this.getEditRow(e.rowNode).set(e.column,o),o}clearEditValue(e){var i;const{rowNode:t,column:o}=e;if(t)if(o){const s=this._getEdit(e);s&&(s.editorValue=void 0,s.pendingValue=s.sourceValue,s.state="changed")}else(i=this.getEditRow(t))==null||i.forEach(s=>{s.editorValue=void 0,s.pendingValue=s.sourceValue,s.state="changed"})}getState(e){var t;if(!this.suspendEdits)return(t=this.getEdit(e))==null?void 0:t.state}getEditPositions(e){if(this.suspendEdits||(e??this.edits).size===0)return[];const t=[];return(e??this.edits).forEach((o,i)=>{for(const s of o.keys())t.push({rowNode:i,column:s,...o.get(s)})}),t}hasRowEdits(e,t){return this.suspendEdits||this.edits.size===0?!1:!!this.getEditRow(e,t)}hasEdits(e={},t={}){var n;if(this.suspendEdits||this.edits.size===0)return!1;const{rowNode:o,column:i}=e,{withOpenEditor:s}=t;if(o){const r=this.getEditRow(o,t);return r?i?s?((n=this.getEdit(e))==null?void 0:n.state)==="editing":r.has(i)??!1:r.size!==0?s?Array.from(r.values()).some(({state:l})=>l==="editing"):!0:!1:!1}return s?this.getEditPositions().some(({state:r})=>r==="editing"):this.edits.size>0}start(e){const t=this.getEditRow(e.rowNode)??new Map,{rowNode:o,column:i}=e;i&&!t.has(i)&&t.set(i,{editorValue:void 0,pendingValue:pe,sourceValue:this.beans.valueSvc.getValue(i,o,!0,"api"),state:"editing"}),this.edits.set(o,t)}stop(e){this.hasEdits(e)&&(e?this.removeEdits(e):this.clear())}clear(){for(const e of this.edits.values())e.clear();this.edits.clear()}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(e){this.cellValidations=e}setRowValidationModel(e){this.rowValidations=e}destroy(){super.destroy(),this.clear()}},Gr=class{constructor(){this.cellValidations=new Map}getCellValidation(e){var i,s;const{rowNode:t,column:o}=e||{};return(s=(i=this.cellValidations)==null?void 0:i.get(t))==null?void 0:s.get(o)}hasCellValidation(e){return!e||!e.rowNode||!e.column?this.cellValidations.size>0:!!this.getCellValidation(e)}setCellValidation(e,t){const{rowNode:o,column:i}=e;this.cellValidations.has(o)||this.cellValidations.set(o,new Map),this.cellValidations.get(o).set(i,t)}clearCellValidation(e){var i;const{rowNode:t,column:o}=e;(i=this.cellValidations.get(t))==null||i.delete(o)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},Hr=class{constructor(){this.rowValidations=new Map}getRowValidation(e){const{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return!e||!e.rowNode?this.rowValidations.size>0:!!this.getRowValidation(e)}setRowValidation({rowNode:e},t){this.rowValidations.set(e,t)}clearRowValidation({rowNode:e}){this.rowValidations.delete(e)}setRowValidationMap(e){this.rowValidations=e}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}};function Zu(e){const{rowIndex:t,rowPinned:o,column:i}=e;return`${t}.${o??"null"}.${i.getId()}`}function Qu(e,t){const o=e.column===t.column,i=e.rowPinned===t.rowPinned,s=e.rowIndex===t.rowIndex;return o&&i&&s}function Xu(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(M(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function Ju(e){let t=0,o;const{pinnedRowModel:i,rowModel:s,pageBounds:n}=e;return i!=null&&i.getPinnedTopRowCount()?o="top":s.getRowCount()?(o=null,t=n.getFirstRow()):i!=null&&i.getPinnedBottomRowCount()&&(o="bottom"),o===void 0?null:{rowIndex:t,rowPinned:o}}function eh(e){let t,o=null;const{pinnedRowModel:i,pageBounds:s}=e,n=i==null?void 0:i.getPinnedBottomRowCount(),r=i==null?void 0:i.getPinnedTopRowCount();return n?(o="bottom",t=n-1):e.rowModel.getRowCount()?(o=null,t=s.getLastRow()):r&&(o="top",t=r-1),t===void 0?null:{rowIndex:t,rowPinned:o}}function it(e,t){var o,i;switch(t.rowPinned){case"top":return(o=e.pinnedRowModel)==null?void 0:o.getPinnedTopRow(t.rowIndex);case"bottom":return(i=e.pinnedRowModel)==null?void 0:i.getPinnedBottomRow(t.rowIndex);default:return e.rowModel.getRow(t.rowIndex)}}function Yo(e,t){var s;const o=(s=e.spannedRowRenderer)==null?void 0:s.getCellByPosition(t);if(o)return o;const i=e.rowRenderer.getRowByPosition(t);return i?i.getCellCtrl(t.column):null}function th(e,t,o){const{rowModel:i,pinnedRowModel:s}=e;let n;return n??(n=i==null?void 0:i.getRowNode(t)),o?n??(n=s==null?void 0:s.getPinnedRowById(t,o)):(n??(n=s==null?void 0:s.getPinnedRowById(t,"top")),n??(n=s==null?void 0:s.getPinnedRowById(t,"bottom"))),n}function Zo(e,t){const{rowIndex:o,rowPinned:i}=t,{pageBounds:s,pinnedRowModel:n,rowModel:r}=e;if(o===0)return i==="top"?null:i==="bottom"&&r.isRowsToRender()?{rowIndex:s.getLastRow(),rowPinned:null}:n!=null&&n.isRowsToRender("top")?{rowIndex:n.getPinnedTopRowCount()-1,rowPinned:"top"}:null;const l=i?void 0:r.getRow(o);return Br(e,l,!0)??{rowIndex:o-1,rowPinned:i}}function Or(e,t){const{rowIndex:o,rowPinned:i}=t,{pageBounds:s,pinnedRowModel:n,rowModel:r}=e;if(oh(e,t))return i==="bottom"?null:i==="top"&&r.isRowsToRender()?{rowIndex:s.getFirstRow(),rowPinned:null}:n!=null&&n.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;const l=i?void 0:r.getRow(o);return Br(e,l)??{rowIndex:o+1,rowPinned:i}}function Br(e,t,o=!1){const{gos:i,rowRenderer:s}=e;if(!(t!=null&&t.sticky)||!ir(i))return;const n=s.getStickyTopRowCtrls(),r=s.getStickyBottomRowCtrls(),l=!r.some(u=>u.rowNode.rowIndex===t.rowIndex),a=l?n:r,d=(o?-1:1)*(l?-1:1);let c;for(let u=0;u<a.length;u++)if(a[u].rowNode.rowIndex===t.rowIndex){c=a[u+d];break}return c?{rowIndex:c.rowNode.rowIndex,rowPinned:null}:void 0}function oh(e,t){const{rowPinned:o,rowIndex:i}=t,{pinnedRowModel:s,pageBounds:n}=e;return o==="top"?((s==null?void 0:s.getPinnedTopRowCount())??0)-1<=i:o==="bottom"?((s==null?void 0:s.getPinnedBottomRowCount())??0)-1<=i:n.getLastRow()<=i}function hs(e,t={}){var d;const{rowIndex:o,rowId:i,rowCtrl:s,rowPinned:n}=t;if(s)return s;const{rowModel:r,rowRenderer:l}=e;let{rowNode:a}=t;return a||(i?a=th(e,i,n):o!=null&&(a=r.getRow(o))),(d=l.getRowCtrls(a?[a]:[]))==null?void 0:d[0]}function q(e,t={}){var c;const{cellCtrl:o,colId:i,columnId:s,column:n}=t;if(o)return o;const r=e.colModel.getCol(i??s??gs(n)),l=t.rowCtrl??hs(e,t),a=(l==null?void 0:l.getCellCtrl(r))??void 0;if(a)return a;const d=t.rowNode??(l==null?void 0:l.rowNode);if(d)return(c=e.rowRenderer.getCellCtrls([d],[r]))==null?void 0:c[0]}function Vr(e){const{editSvc:t}=e;t!=null&&t.isBatchEditing()?Dt(e):t==null||t.stopEditing(void 0,{source:"api"})}function ih(e,t,o){const{gos:i,popupSvc:s}=t;if(!i.get("stopEditingWhenCellsLoseFocus"))return;const n=r=>{const l=r.relatedTarget;if($i(l)===null){Vr(t);return}let a=o.some(d=>d.contains(l))&&Qr(i,l);a||(a=!!s&&(s.getActivePopups().some(d=>d.contains(l))||s.isElementWithinCustomPopup(l))),a||Vr(t)};o.forEach(r=>e.addManagedElementListeners(r,{focusout:n}))}function gs(e){if(e)return typeof e=="string"?e:e.getColId()}var pe=Symbol("unedited");function Nr(e,t={}){var s;const o=[],i=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns);for(const n of i){const r=(s=n.comp)==null?void 0:s.getCellEditor();r&&o.push({ctrl:n,editor:ds(r)})}return o}var sh=(e,t={})=>Nr(e,t).map(o=>o.editor);function nh(e,t,o,i,s,n){var u;t.length===0&&(o!=null&&o.rowNode)&&(o!=null&&o.column)&&xt(e,o,{key:i,event:s,cellStartedEdit:n});const{valueSvc:r,editSvc:l,editModelSvc:a}=e,{rowNode:d,column:c}=o??{};for(const h of t){const{rowNode:g,column:p}=h,f=q(e,h);if(!f){if(g&&p){const m=r.getValue(p,g,void 0,"api"),v=((o==null?void 0:o.rowNode)===g&&(o==null?void 0:o.column)===p&&i||void 0)??(l==null?void 0:l.getCellDataValue(h,!1))??((u=r.getValueForDisplay(p,g))==null?void 0:u.value)??m??pe;a==null||a.setEdit(h,{pendingValue:v,sourceValue:m,state:"editing"})}continue}const C=n&&d===f.rowNode&&f.column===c;xt(e,{rowNode:d,column:f.column},{key:C?i:null,event:C?s:null,cellStartedEdit:C})}}function ze({pendingValue:e,sourceValue:t}){return e===pe&&(e=t),e!==t}function xt(e,t,o){var C,m,w,b,v,S,D;const{key:i,event:s,cellStartedEdit:n,silent:r}=o??{},l=q(e,t),a=(C=l==null?void 0:l.comp)==null?void 0:C.getCellEditor(),d=Wr(e,t,i,n),c=(m=e.editModelSvc)==null?void 0:m.getEdit(t);let u=(i==null?void 0:i.length)===1?i:d.value;if(u===void 0&&(u=c==null?void 0:c.sourceValue),(w=e.editModelSvc)==null||w.setEdit(t,{editorValue:u,state:"editing"}),a){(b=a.refresh)==null||b.call(a,d);return}const h=t.column.getColDef(),g=Ar(e.userCompFactory,h,d),p=(g==null?void 0:g.popupFromSelector)!=null?g.popupFromSelector:!!h.cellEditorPopup,f=(g==null?void 0:g.popupPositionFromSelector)!=null?g.popupPositionFromSelector:h.cellEditorPopupPosition;zr(g.params,s),l&&(l.editCompDetails=g,(v=l.comp)==null||v.setEditDetails(g,p,f,e.gos.get("reactiveCustomComponents")),(S=l==null?void 0:l.rowCtrl)==null||S.refreshRow({suppressFlash:!0}),r||(D=e.editSvc)==null||D.dispatchCellEvent(t,s,"cellEditingStarted"))}function _r(e){var s;const t={editorValueExists:!1},o=(s=e.getValidationErrors)==null?void 0:s.call(e);return((o==null?void 0:o.length)??0)>0?t:{editorValue:e.getValue(),editorValueExists:!0}}function Wr(e,t,o,i){var C,m,w,b;const{valueSvc:s,gos:n,editSvc:r}=e,l=q(e,t),a=((C=t.rowNode)==null?void 0:C.rowIndex)??void 0,d=r==null?void 0:r.isBatchEditing(),c=e.colModel.getCol(t.column.getId()),{rowNode:u,column:h}=t,g=(m=l.comp)==null?void 0:m.getCellEditor(),p=(r==null?void 0:r.getCellDataValue(t,!1))??(g?(w=_r(g))==null?void 0:w.editorValue:void 0),f=p===pe?(b=s.getValueForDisplay(c,u))==null?void 0:b.value:p;return _(n,{value:f,eventKey:o??null,column:h,colDef:h.getColDef(),rowIndex:a,node:u,data:u.data,cellStartedEdit:i??!1,onKeyDown:l==null?void 0:l.onKeyDown.bind(l),stopEditing:v=>{r.stopEditing(t,{source:d?"ui":"api",suppressNavigateAfterEdit:v}),Xo(e,t)},eGridCell:l==null?void 0:l.eGui,parseValue:v=>s.parseValue(c,u,v,l==null?void 0:l.value),formatValue:l==null?void 0:l.formatValue.bind(l),validate:()=>{r==null||r.validateEdit()}})}function ps(e,t){const{editModelSvc:o}=e;o==null||o.getEditMap().forEach((i,s)=>{i.forEach((n,r)=>{!t&&(n.state==="editing"||n.pendingValue===pe)||!ze(n)&&(n.state!=="editing"||t)&&(o==null||o.removeEdits({rowNode:s,column:r}))})})}function rh(e,t){var d;const o=(d=t.comp)==null?void 0:d.getCellEditor();if(!(o!=null&&o.refresh))return;const{eventKey:i,cellStartedEdit:s}=t.editCompDetails.params,{column:n}=t,r=Wr(e,t,i,s),l=n.getColDef(),a=Ar(e.userCompFactory,l,r);o.refresh(zr(a.params,i))}function zr(e,t){var o;return t instanceof KeyboardEvent&&e.column.getColDef().cellEditor==="agNumberCellEditor"?e.suppressPreventDefault=["-","+",".","e"].includes((t==null?void 0:t.key)??"")||e.suppressPreventDefault:(o=t==null?void 0:t.preventDefault)==null||o.call(t),e}function st(e,t){var o;(o=e.editModelSvc)==null||o.getEditPositions().forEach(i=>{const s=q(e,i);if(!s)return;const n=s.comp.getCellEditor();if(!n)return;const{editorValue:r,editorValueExists:l}=_r(n);Qo(e,i,t,r,void 0,!l)})}function Qo(e,t,o,i,s,n){var g;const{editModelSvc:r,valueSvc:l}=e;if(!r)return;const{rowNode:a,column:d}=t;if(!(a&&d))return;const c=q(e,t),u=!!((g=c==null?void 0:c.comp)!=null&&g.getCellEditor());let h=r.getEdit(t,!0);h!=null&&h.sourceValue||(h=r.setEdit(t,{sourceValue:l.getValue(d,a,void 0,"api"),pendingValue:pe,state:u?"editing":"changed"})),r.setEdit(t,{editorValue:n?h.sourceValue:i,state:u?"editing":"changed"}),o&&lh(e,t)}function lh(e,t){const{editModelSvc:o}=e,i=o==null?void 0:o.getEdit(t,!0);o==null||o.setEdit(t,{pendingValue:i==null?void 0:i.editorValue})}function Dt(e,t,o){var i;t||(t=(i=e.editModelSvc)==null?void 0:i.getEditPositions()),t.forEach(s=>Xo(e,s,o))}function Xo(e,t,o){var h,g;const{editSvc:i,editModelSvc:s}=e,{rowNode:n,column:r}=t,l=q(e,t);if(!l){s!=null&&s.hasEdits(t)&&n&&r&&(s==null||s.setEdit(t,{state:"changed"}));return}const{comp:a}=l;if(a&&!a.getCellEditor())return;const d=(g=(h=a==null?void 0:a.getCellEditor())==null?void 0:h.getValidationErrors)==null?void 0:g.call(h),c=s==null?void 0:s.getCellValidationModel();d!=null&&d.length?c==null||c.setCellValidation(t,{errorMessages:d}):c==null||c.clearCellValidation(t),s!=null&&s.getEdit(t)&&(s==null||s.setEdit(t,{state:"changed"})),a==null||a.setEditDetails(),a==null||a.refreshEditStyles(!1,!1),l==null||l.refreshCell({force:!0,suppressFlash:!0});const u=s==null?void 0:s.getEdit(t);(u==null?void 0:u.state)==="changed"&&!(o!=null&&o.silent)&&(i==null||i.dispatchCellEvent(t,o==null?void 0:o.event,"cellEditingStopped",{valueChanged:ze(u),newValue:u==null?void 0:u.pendingValue,oldValue:u==null?void 0:u.sourceValue}))}function nt(e){var u,h,g,p,f,C,m,w;const t=Nr(e),o=new Gr,{ariaAnnounce:i,localeSvc:s,editModelSvc:n,gos:r}=e,l=r.get("editType")==="fullRow",d=vn(s)("ariaValidationErrorPrefix","Cell Editor Validation");for(const b of t){const{ctrl:v,editor:S}=b,{rowNode:D,column:I}=v,O=((u=S.getValidationErrors)==null?void 0:u.call(S))??[],F=((h=S.getValidationElement)==null?void 0:h.call(S,!1))||!((g=S.isPopup)!=null&&g.call(S))&&v.eGui;if(F){const P=O!=null&&O.length>0,T=P?O.join(". "):"";_d(F,P),P&&i.announceValue(`${d} ${O}`,"editorValidation"),F instanceof HTMLInputElement?F.setCustomValidity(T):F.classList.toggle("invalid",P)}(O==null?void 0:O.length)>0&&o.setCellValidation({rowNode:D,column:I},{errorMessages:O})}st(e,!1),n==null||n.setCellValidationModel(o);const c=new Set;for(const{ctrl:b}of t)c.add(b.rowCtrl);if(l){const b=ah(e);n==null||n.setRowValidationModel(b)}for(const b of c.values()){(p=b.rowEditStyleFeature)==null||p.applyRowStyles();for(const v of b.getAllCellCtrls())(f=v.tooltipFeature)==null||f.refreshTooltip(!0),(C=v.editorTooltipFeature)==null||C.refreshTooltip(!0),(w=(m=v.editStyleFeature)==null?void 0:m.applyCellStyles)==null||w.call(m)}}var ah=e=>{var s;const t=new Hr,o=e.gos.get("getFullRowEditValidationErrors"),i=(s=e.editModelSvc)==null?void 0:s.getEditMap();if(!i)return t;for(const n of i.keys()){const r=i.get(n);if(!r)continue;const l=[],{rowIndex:a,rowPinned:d}=n;for(const u of r.keys()){const h=r.get(u);if(!h)continue;const{editorValue:g,pendingValue:p,sourceValue:f}=h,C=g??(p===pe?void 0:p)??f;l.push({column:u,colId:u.getColId(),rowIndex:a,rowPinned:d,oldValue:f,newValue:C})}const c=(o==null?void 0:o({editorsState:l}))??[];c.length>0&&t.setRowValidation({rowNode:n},{errorMessages:c})}return t};function dh(e){var i;nt(e);const t=(i=e.editModelSvc)==null?void 0:i.getCellValidationModel().getCellValidationMap();if(!t)return null;const o=[];return t.forEach((s,n)=>{s.forEach(({errorMessages:r},l)=>{o.push({column:l,rowIndex:n.rowIndex,rowPinned:n.rowPinned,messages:r??null})})}),o}var ch="ag-column-first",uh="ag-column-last";function $r(e,t,o,i){return K(e)?[]:gh(e.headerClass,e,t,o,i)}function Ur(e,t,o){e.toggleCss(ch,o.isColAtEdge(t,"first")),e.toggleCss(uh,o.isColAtEdge(t,"last"))}function hh(e,t,o,i){return _(t,{colDef:e,column:o,columnGroup:i})}function gh(e,t,o,i,s){if(K(e))return[];let n;if(typeof e=="function"){const r=hh(t,o,i,s);n=e(r)}else n=e;return typeof n=="string"?[n]:Array.isArray(n)?[...n]:[]}function ph(e){return!!(e.rowPinned&&e.pinnedSibling)}var y={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",SPACE:" ",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete",F2:"F2",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",PAGE_HOME:"Home",PAGE_END:"End",A:"KeyA",C:"KeyC",D:"KeyD",V:"KeyV",X:"KeyX",Y:"KeyY",Z:"KeyZ"},fs=!1,Jo=0;function fh(e){Jo>0||(e.addEventListener("keydown",ei),e.addEventListener("mousedown",ei))}function Ch(e){Jo>0||(e.removeEventListener("keydown",ei),e.removeEventListener("mousedown",ei))}function ei(e){const t=fs,o=e.type==="keydown";o&&(e.ctrlKey||e.metaKey||e.altKey)||t!==o&&(fs=o)}function mh(e){const t=J(e);return fh(t),Jo++,()=>{Jo--,Ch(t)}}function wh(){return fs}function Ft(e,t,o=!1){const i=tc;let s=Ln;t&&(s+=", "+t),o&&(s+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(a=>Me(a)),r=Array.prototype.slice.apply(e.querySelectorAll(s));return r.length?((a,d)=>a.filter(c=>d.indexOf(c)===-1))(n,r):n}function ti(e,t=!1,o=!1,i=!1){const s=Ft(e,i?".ag-tab-guard":null,o),n=t?$(s):s[0];return n?(n.focus({preventScroll:!0}),!0):!1}function oi(e,t,o,i){const s=Ft(t,null),n=Y(e);let r;r=s.indexOf(n);const l=r+(i?-1:1);return l<0||l>=s.length?null:s[l]}function vh(e,t=5){let o=0;for(;e&&$i(e)===null&&++o<=t;)e=e.parentElement;return $i(e)===null?null:e}function rt(e){var t;return e.gos.get("suppressHeaderFocus")||!!((t=e.overlays)!=null&&t.isExclusive())}function ii(e){var t;return e.gos.get("suppressCellFocus")||!!((t=e.overlays)!=null&&t.isExclusive())}function to(e,t,o=!1){const i=e.ctrlsSvc.get("gridCtrl");return!o&&i.focusNextInnerContainer(t)?!0:((o||!t&&!i.isDetailGrid())&&i.forceFocusOutOfContainer(t),!1)}function bh(e,t,o,{rowNode:i,column:s},n){return _(e.gos,{type:o,node:i,data:i.data,value:n,column:s,colDef:s.getColDef(),rowPinned:i.rowPinned,event:t,rowIndex:i.rowIndex})}function Sh(e,t=!1){return e===y.DELETE?!0:!t&&e===y.BACKSPACE?An():!1}var yh=class extends x{constructor(e,t,o,i){super(),this.cellCtrl=e,this.rowNode=o,this.rowCtrl=i,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){const t=e.key;switch(t){case y.ENTER:this.onEnterKeyDown(e);break;case y.F2:this.onF2KeyDown(e);break;case y.ESCAPE:this.onEscapeKeyDown(e);break;case y.TAB:this.onTabKeyDown(e);break;case y.BACKSPACE:case y.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case y.DOWN:case y.UP:case y.RIGHT:case y.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){var s,n;const{cellCtrl:o,beans:i}=this;if(!((s=i.editSvc)!=null&&s.isEditing(o,{withOpenEditor:!0}))){if(e.shiftKey&&o.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const r=o.getFocusedCellPosition();(n=i.navigation)==null||n.navigateToNextCell(e,t,r,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:o}=this.beans;if(!t)return;const i=t.extendLatestRangeInDirection(e);i&&(e.key===y.LEFT||e.key===y.RIGHT?o==null||o.ensureColumnVisible(i.column):o==null||o.ensureRowVisible(i.rowIndex))}onTabKeyDown(e){var t;(t=this.beans.navigation)==null||t.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){var d;const{cellCtrl:o,beans:i,rowNode:s}=this,{gos:n,rangeSvc:r,eventSvc:l,editSvc:a}=i;if(l.dispatchEvent({type:"keyShortcutChangedCellStart"}),Sh(e,n.get("enableCellEditingOnBackspace"))&&!(a!=null&&a.isEditing(o,{withOpenEditor:!0}))){if(r&&Je(n))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(o.isCellEditable()){const{column:c}=o,u=this.beans.valueSvc.getDeleteValue(c,s);s.setDataValue(c,u,"cellClear")}}else a!=null&&a.isEditing(o,{withOpenEditor:!0})||(d=i.editSvc)==null||d.startEditing(o,{startedEdit:!0,event:t});l.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(e){var d;const{cellCtrl:t,beans:o}=this,{editSvc:i,navigation:s}=o,n=i==null?void 0:i.isEditing(t),r=t.rowNode,l=i==null?void 0:i.isRowEditing(r),a=c=>{(i==null?void 0:i.startEditing(c,{startedEdit:!0,event:e}))&&e.preventDefault()};if(n||l){if(this.isCtrlEnter(e)){i==null||i.applyBulkEdit(t,((d=o==null?void 0:o.rangeSvc)==null?void 0:d.getCellRanges())||[]);return}if(nt(o),(i==null?void 0:i.checkNavWithValidation(void 0,e))==="block-stop")return;i!=null&&i.isEditing(t,{withOpenEditor:!0})?i==null||i.stopEditing(t,{event:e}):l&&!t.isCellEditable()?i==null||i.stopEditing({rowNode:r},{event:e}):a(t)}else if(o.gos.get("enterNavigatesVertically")){const c=e.shiftKey?y.UP:y.DOWN;s==null||s.navigateToNextCell(null,c,t.cellPosition,!1)}else{if(i!=null&&i.hasValidationErrors())return;i!=null&&i.hasValidationErrors(t)&&i.revertSingleCellEdit(t,!0),a(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&e.key===y.ENTER}onF2KeyDown(e){const{cellCtrl:t,beans:{editSvc:o}}=this;o!=null&&o.isEditing()&&(nt(this.beans),(o==null?void 0:o.checkNavWithValidation(void 0,e))==="block-stop")||o==null||o.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){const{cellCtrl:t,beans:{editSvc:o}}=this;(o==null?void 0:o.checkNavWithValidation(t,e))==="block-stop"&&o.revertSingleCellEdit(t),o==null||o.stopEditing(t,{event:e,cancel:!0})}processCharacter(e){var r;const o=e.target!==this.eGui,{beans:{editSvc:i},cellCtrl:s}=this;if(o||i!=null&&i.isEditing(s,{withOpenEditor:!0}))return;if(e.key===y.SPACE)this.onSpaceKeyDown(e);else if(i!=null&&i.isCellEditable(s,"ui")){if(i!=null&&i.hasValidationErrors()&&!(i!=null&&i.hasValidationErrors(s)))return;i==null||i.startEditing(s,{startedEdit:!0,event:e,source:"api"});const l=s.editCompDetails;!((r=l==null?void 0:l.params)!=null&&r.suppressPreventDefault)&&e.preventDefault()}}onSpaceKeyDown(e){var s;const{gos:t,editSvc:o}=this.beans,{rowNode:i}=this.cellCtrl;!(o!=null&&o.isEditing(this.cellCtrl,{withOpenEditor:!0}))&&Qe(t)&&((s=this.beans.selectionSvc)==null||s.handleSelectionEvent(e,i,"spaceKey")),e.preventDefault()}};function Kr(e,t,o){if(o===0)return!1;const i=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(i,s)<=o}function jr({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var Rh=class extends x{constructor(e,t,o){super(),this.cellCtrl=e,this.column=o,this.beans=t}onMouseEvent(e,t){if(!ke(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){var h;if((h=this.beans.touchSvc)!=null&&h.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:o,editSvc:i,editModelSvc:s,frameworkOverrides:n}=this.beans,r=e.ctrlKey||e.metaKey,{cellCtrl:l}=this,{column:a,cellPosition:d}=l;o&&r&&o.getCellRangeCount(d)>1&&o.intersectLastRange(!0);const c=l.createEvent(e,"cellClicked");t.dispatchEvent(c);const u=a.getColDef();if(u.onCellClicked&&window.setTimeout(()=>{n.wrapOutgoing(()=>{u.onCellClicked(c)})},0),(s==null?void 0:s.getState(l))!=="editing"){const g=i==null?void 0:i.isEditing(),p=(s==null?void 0:s.getCellValidationModel().getCellValidationMap().size)??0,f=(s==null?void 0:s.getRowValidationModel().getRowValidationMap().size)??0;if(g&&(p>0||f>0))return;i!=null&&i.shouldStartEditing(l,e)?i==null||i.startEditing(l,{event:e}):i!=null&&i.shouldStopEditing(l,e)&&(i==null||i.stopEditing(l))}}onCellDoubleClicked(e){var c;const{column:t,beans:o,cellCtrl:i}=this,{eventSvc:s,frameworkOverrides:n,editSvc:r,editModelSvc:l}=o,a=t.getColDef(),d=i.createEvent(e,"cellDoubleClicked");if(s.dispatchEvent(d),typeof a.onCellDoubleClicked=="function"&&window.setTimeout(()=>{n.wrapOutgoing(()=>{a.onCellDoubleClicked(d)})},0),r!=null&&r.shouldStartEditing(this.cellCtrl,e)&&((c=this.beans.editModelSvc)==null?void 0:c.getState(this.cellCtrl))!=="editing"){const u=r==null?void 0:r.isEditing(),h=(l==null?void 0:l.getCellValidationModel().getCellValidationMap().size)??0,g=(l==null?void 0:l.getRowValidationModel().getRowValidationMap().size)??0;if(u&&(h>0||g>0))return;r==null||r.startEditing(i,{event:e})}}onMouseDown(e){const{ctrlKey:t,metaKey:o,shiftKey:i}=e,s=e.target,{cellCtrl:n,beans:r}=this,{eventSvc:l,rangeSvc:a,rowNumbersSvc:d,focusSvc:c,gos:u,editSvc:h}=r;if(this.isRightClickInExistingRange(e))return;const g=a&&!a.isEmpty(),p=this.containsWidget(s),{cellPosition:f,column:C}=n,m=ot(C);if(d&&m&&!d.handleMouseDownOnCell(f,e)){a&&e.preventDefault(),e.stopImmediatePropagation();return}if(!i||!g){const w=h==null?void 0:h.isEditing(n),v=u.get("enableCellTextSelection")&&e.defaultPrevented,S=(ht()||v)&&!w&&!Ui(s)&&!p;n.focusCell(S,e)}if(i&&g&&!c.isCellFocused(f)){e.preventDefault();const w=c.getFocusedCell();if(w){const{column:b,rowIndex:v,rowPinned:S}=w;h!=null&&h.isEditing(w)&&(h==null||h.stopEditing(w)),c.setFocusedCell({column:b,rowIndex:v,rowPinned:S,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}if(!p){if(a){m&&e.preventDefault();const w=jr(this.beans,e)&&m;if(i)a.extendLatestRangeToCell(f);else if(!w){const b=t||o;a.setRangeToCell(f,b)}}l.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseDown"))}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const o=t.isCellInAnyRange(this.cellCtrl.cellPosition),i=jr(this.beans,e);if(o&&i)return!0}return!1}containsWidget(e){return pt(e,"ag-selection-checkbox",3)||pt(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),o==null||o.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),o==null||o.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.eGui,o=t.contains(e.target),i=t.contains(e.relatedTarget);return o&&i}},Eh=class extends x{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.column,this.rowNode=e.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}init(){this.eSetLeft=this.cellCtrl.getRootElement(),this.eContent=this.cellCtrl.eGui;const e=this.cellCtrl.getCellSpan();if(e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e){const t=this.refreshSpanHeight.bind(this,e);t(),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:t,recalculateRowBounds:t,pinnedHeightChanged:t})}}refreshSpanHeight(e){const t=e.getCellHeight();t!=null&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();Jt(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eContent)return;const e=this.getCellWidth();this.eContent.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){const{column:e,rowNode:t}=this,o=e.getColSpan(t),i=[];if(o===1)i.push(e);else{let s=e;const n=e.getPinned();for(let r=0;s&&r<o&&(i.push(s),s=this.beans.visibleCols.getColAfter(s),!(!s||K(s)||n!==s.getPinned()));r++);}return i}onLeftChanged(){if(!this.eSetLeft)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eSetLeft.style.left=e+"px"}getCellLeft(){let e;return this.beans.gos.get("enableRtl")&&this.colsSpanning?e=$(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||this.column.getPinned()==="left")return e;const{visibleCols:t}=this.beans,o=t.getColsLeftWidth();if(this.column.getPinned()==="right"){const i=t.bodyWidth;return o+i+(e||0)}return o+(e||0)}_legacyApplyRowSpan(e){if(this.rowSpan===1&&!e)return;const o=is(this.beans)*this.rowSpan;this.eContent.style.height=`${o}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},xh="ag-cell",Dh="ag-cell-auto-height",Fh="ag-cell-normal-height",Ph="ag-cell-focus",Th="ag-cell-first-right-pinned",Ih="ag-cell-last-left-pinned",Ah="ag-cell-not-inline-editing",Mh="ag-cell-wrap-text",si="cellCtrl";function qr(e,t){return ar(e,t,si)}var kh=0,Pt=class extends x{constructor(e,t,o,i){super(),this.column=e,this.rowNode=t,this.rowCtrl=i,this.rangeFeature=void 0,this.rowResizeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.editStyleFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.hasEdit=!1,this.tooltipFeature=void 0,this.editorTooltipFeature=void 0,this.beans=o,this.gos=o.gos,this.editSvc=o.editSvc,this.hasEdit=!!o.editSvc;const{colId:s}=e;this.instanceId=s+"-"+kh++,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){var i,s;const{beans:e}=this;this.positionFeature=new Eh(this,e),this.customStyleFeature=(i=e.cellStyles)==null?void 0:i.createCellCustomStyleFeature(this,e),this.editStyleFeature=(s=e.editSvc)==null?void 0:s.createCellStyleFeature(this,e),this.mouseListener=new Rh(this,e,this.column),this.keyboardListener=new yh(this,e,this.rowNode,this.rowCtrl),this.enableTooltipFeature();const{rangeSvc:t}=e;t&&Je(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(e,this)),ot(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(e,this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.editorTooltipFeature=e.destroyBean(this.editorTooltipFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.editStyleFeature=e.destroyBean(this.editStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.rowResizeFeature=e.destroyBean(this.rowResizeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){var o;this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}enableEditorTooltipFeature(e){var t;this.editorTooltipFeature&&this.disableEditorTooltipFeature(),this.editorTooltipFeature=(t=this.beans.tooltipSvc)==null?void 0:t.setupCellEditorTooltip(this,e),nt(this.beans)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(e,t,o,i,s,n,r){var l,a,d,c,u,h,g,p;this.comp=e,this.eGui=t,this.printLayout=s,r??(r=this),this.addDomData(r),this.addFeatures(),r.addDestroyFunc(()=>this.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(i,r),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),(l=this.positionFeature)==null||l.init(),(a=this.customStyleFeature)==null||a.setComp(e),(d=this.editStyleFeature)==null||d.setComp(e),(c=this.tooltipFeature)==null||c.refreshTooltip(),(u=this.keyboardListener)==null||u.init(),(h=this.rangeFeature)==null||h.setComp(e),(g=this.rowResizeFeature)==null||g.refreshRowResizer(),n&&this.isCellEditable()?(p=this.editSvc)==null||p.startEditing(this,{startedEdit:!0,source:"api"}):this.showValue(!1,!0),this.onCompAttachedFuncs.length&&(this.onCompAttachedFuncs.forEach(f=>f()),this.onCompAttachedFuncs=[])}setupAutoHeight(e,t){var o;this.isAutoHeight=((o=this.beans.rowAutoHeight)==null?void 0:o.setupCellAutoHeight(this,e,t))??!1}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}getDeferLoadingCellRenderer(){var a,d;const{beans:e,column:t}=this,{userCompFactory:o,ctrlsSvc:i,eventSvc:s}=e,n=t.getColDef(),r=this.createCellRendererParams();r.deferRender=!0;const l=Ir(o,n,r);if((d=(a=i.getGridBodyCtrl())==null?void 0:a.scrollFeature)!=null&&d.isScrolling()){let c;const u=new eo(h=>{c=h});return this.addManagedListeners(s,{bodyScrollEnd:()=>c()}),{loadingComp:l,onReady:u}}return{loadingComp:l,onReady:eo.resolve()}}showValue(e,t){var u,h,g;const{beans:o,column:i,rowNode:s,rangeFeature:n}=this,{userCompFactory:r}=o;let l=this.getValueToDisplay(),a;const d=s.stub&&((u=s.groupData)==null?void 0:u[i.getId()])==null,c=i.getColDef();if(d||this.isCellRenderer()){const p=this.createCellRendererParams();!d||ot(i)?a=Tr(r,c,p):a=Ir(r,c,p)}if(!a&&!d&&((h=o.findSvc)!=null&&h.isMatch(s,i))){const p=this.createCellRendererParams();a=Tr(r,{...i.getColDef(),cellRenderer:"agFindCellRenderer"},p)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(s,{checkSiblings:!0})){const p=this.editSvc.prepDetailsDuringBatch(this,{compDetails:a,valueToDisplay:l});p&&(p.compDetails?a=p.compDetails:p.valueToDisplay&&(l=p.valueToDisplay))}this.comp.setRenderDetails(a,l,e),!t&&n&&Ne(o,()=>n==null?void 0:n.refreshHandle()),(g=this.rowResizeFeature)==null||g.refreshRowResizer()}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e),!0),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}isIncludeControl(e,t=!1){return(this.rowNode.rowPinned==null||t&&ph(this.rowNode))&&!!e}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:o}=this.beans.gridOptions,i=Go(t),s=tt(this.column);return o==="custom"&&i!=="selectionColumn"&&s?!1:e.checkboxSelection||s&&typeof t=="object"&&wt(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),o=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),i=this.includeDndSource!=this.isIncludeControl(e.dndSource),s=this.isAutoHeight!=this.column.isAutoHeight();return t||o||i||s}onPopupEditorClosed(){const{editSvc:e}=this.beans;e!=null&&e.isEditing(this,{withOpenEditor:!0})&&(e==null||e.stopEditing(this,{source:e!=null&&e.isBatchEditing()?"ui":"api"}))}stopEditing(e=!1){const{editSvc:t}=this.beans;return(t==null?void 0:t.stopEditing(this,{cancel:e,source:t!=null&&t.isBatchEditing()?"ui":"api"}))??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:o,rowNode:i,comp:s,eGui:n,beans:{valueSvc:r,gos:l,editSvc:a}}=this;return _(l,{value:e,valueFormatted:t,getValue:()=>r.getValueForDisplay(o,i).value,setValue:c=>(a==null?void 0:a.setDataValue({rowNode:i,column:o},c))||r.setValue(i,o,c),formatValue:this.formatValue.bind(this),data:i.data,node:i,pinned:o.getPinned(),colDef:o.getColDef(),column:o,refreshCell:this.refreshCell.bind(this),eGridCell:n,eParentOfValue:s.getParentOfValue(),registerRowDragger:(c,u,h,g)=>this.registerRowDragger(c,u,g),setTooltip:(c,u)=>{var h;l.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(c,u),(h=this.tooltipFeature)==null||h.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){var t;this.refreshShouldDestroy()?(t=this.rowCtrl)==null||t.recreateCell(this):this.refreshCell(e)}refreshCell({force:e,suppressFlash:t,newData:o}={}){var d,c,u,h,g,p,f,C;if(this.suppressRefreshCell)return;const i=this.column.getColDef(),s=i.field==null&&i.valueGetter==null&&i.showRowGroup==null,n=e||s||o,r=!!this.comp,l=this.updateAndFormatValue(r),a=n||l;if(r){if(a){this.showValue(!!o,!1);const m=(d=this.beans.filterManager)==null?void 0:d.isSuppressFlashingCellsBecauseFiltering();!t&&!m&&i.enableCellChangeFlash&&((c=this.beans.cellFlashSvc)==null||c.flashCell(this)),(h=(u=this.editStyleFeature)==null?void 0:u.applyCellStyles)==null||h.call(u),(g=this.customStyleFeature)==null||g.applyUserStyles(),(p=this.customStyleFeature)==null||p.applyClassesFromColDef()}(f=this.tooltipFeature)==null||f.refreshTooltip(),(C=this.customStyleFeature)==null||C.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){const t=this.value,o=this.valueFormatted,{value:i,valueFormatted:s}=this.beans.valueSvc.getValueForDisplay(this.column,this.rowNode,!0);return this.value=i,this.valueFormatted=s,e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=o:!0}valuesAreEqual(e,t){const o=this.column.getColDef();return o.equals?o.equals(e,t):e===t}addDomData(e){const t=this.eGui;Xe(this.beans.gos,t,si,this),e.addDestroyFunc(()=>Xe(this.beans.gos,t,si,null))}createEvent(e,t){const{rowNode:o,column:i,value:s,beans:n}=this;return bh(n,e,t,{rowNode:o,column:i},s)}processCharacter(e){var t;(t=this.keyboardListener)==null||t.processCharacter(e)}onKeyDown(e){var t;(t=this.keyboardListener)==null||t.onKeyDown(e)}onMouseEvent(e,t){var o;(o=this.mouseListener)==null||o.onMouseEvent(e,t)}getColSpanningList(){var e;return((e=this.positionFeature)==null?void 0:e.getColSpanningList())??[]}onLeftChanged(){var e;this.comp&&((e=this.positionFeature)==null||e.onLeftChanged())}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:o}=this;Ur(e,t,o.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);Fn(this.eGui,e)}onWidthChanged(){var e;return(e=this.positionFeature)==null?void 0:e.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){var e;this.comp&&((e=this.rangeFeature)==null||e.updateRangeBordersIfRangeCount())}onCellSelectionChanged(){var e;this.comp&&((e=this.rangeFeature)==null||e.onCellSelectionChanged())}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1,t){var i;const o=(i=this.editSvc)==null?void 0:i.allowedFocusTargetOnValidation(this);o&&o!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){const{beans:{editSvc:t,focusSvc:o},comp:i}=this;if(!i||t!=null&&t.isEditing(this)||!this.isCellFocused()||!o.shouldTakeFocus())return;const s=()=>{if(!this.isAlive())return;const n=i.getFocusableElement();this.isCellFocused()&&n.focus({preventScroll:!0})};if(e){setTimeout(s,0);return}s()}onRowIndexChanged(){var e,t;this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),(e=this.rangeFeature)==null||e.onCellSelectionChanged(),(t=this.rowResizeFeature)==null||t.refreshRowResizer()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&(ot(this.column)&&(e=!0),ce(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.toggleCss(Th,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.toggleCss(Ih,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){var s;const{beans:t}=this;if(ii(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}const o=this.isCellFocused(),i=((s=t.editSvc)==null?void 0:s.isEditing(this))??!1;if(this.comp.toggleCss(Ph,o),o&&e&&e.forceBrowserFocus){let n=this.comp.getFocusableElement();if(i){const r=Ft(n,null,!0);r.length&&(n=r[0])}n.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}o&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:qe(t),column:this.column}}applyStaticCssClasses(){const{comp:e}=this;e.toggleCss(xh,!0),e.toggleCss(Ah,!0);const t=this.column.isAutoHeight()==!0;e.toggleCss(Dh,t),e.toggleCss(Fh,!t)}onColumnHover(){var e;(e=this.beans.colHover)==null||e.onCellColumnHover(this.column,this.comp)}onColDefChanged(){var e,t;this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),(e=this.editSvc)!=null&&e.isEditing(this)?(t=this.editSvc)==null||t.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.toggleCss(Mh,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),o=this.createEvent(e,"cellContextMenu"),{beans:i}=this;i.eventSvc.dispatchEvent(o),t.onCellContextMenu&&window.setTimeout(()=>{i.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(o)})},0)}getCellRenderer(){var e;return((e=this.comp)==null?void 0:e.getCellRenderer())??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){var e;return((e=this.eGui)==null?void 0:e.contains(Y(this.beans)))??!1}createSelectionCheckbox(){var t;const e=(t=this.beans.selectionSvc)==null?void 0:t.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,o){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const i=this.createRowDragComp(e,t,o);i&&(this.customRowDragComp=i,this.addDestroyFunc(()=>{this.beans.context.destroyBean(i),this.customRowDragComp=null}))}createRowDragComp(e,t,o){var s;const i=(s=this.beans.rowDragSvc)==null?void 0:s.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,o);if(i)return this.beans.context.createBean(i),i}cellEditorAttached(){this.onEditorAttachedFuncs.forEach(e=>e()),this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){}getRootElement(){return this.eGui}},Yr="__ag_grid_instance";function Zr(e,t){t[Yr]=e.gridInstanceId}function oo(e,t){return Qr(e,t.target)}function Qr(e,t){let o=t;for(;o;){const i=o[Yr];if(M(i))return i===e.gridInstanceId;o=o.parentElement}return!1}function Lh(e,t){var o;return((o=qr(e,t.target))==null?void 0:o.getFocusedCellPosition())??null}var Gh=class extends x{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dropTargets=[]}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.dragSvc=e.dragSvc,this.environment=e.environment,this.userCompFactory=e.userCompFactory}addDragSource(e,t=!1){const o={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:o,dragSource:e}),this.dragSvc.addDragSource(o)}getDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;return!e||!e.comp?null:e.comp}removeDragSource(e){const{dragSourceAndParamsList:t,dragSvc:o}=this,i=t.find(s=>s.dragSource===e);i&&(o.removeDragSource(i.params),we(t,i))}destroy(){const{dragSourceAndParamsList:e,dragSvc:t,dropTargets:o}=this;e.forEach(i=>t.removeDragSource(i.params)),e.length=0,o.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){var o;this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=e.getDragItem(),(o=e.onDragStarted)==null||o.call(e),this.createDragAndDropImageComponent()}onDragStop(e){var o,i;(i=(o=this.dragSource)==null?void 0:o.onDragStopped)==null||i.call(o);const{lastDropTarget:t}=this;if(t!=null&&t.onDragStop){const s=this.createDropTargetEvent(t,e,null,null,!1);t.onDragStop(s)}this.clearDragAndDropProperties()}onDragCancel(){var o;const{dragSource:e,lastDropTarget:t}=this;(o=e==null?void 0:e.onDragCancelled)==null||o.call(e),t!=null&&t.onDragCancel&&t.onDragCancel(this.createDropTargetEvent(t,this.eventLastTime,null,null,!1)),this.clearDragAndDropProperties()}clearDragAndDropProperties(){this.eventLastTime=null,this.dragging=!1,this.lastDropTarget=void 0,this.dragItem=null,this.dragSource=null,this.removeDragAndDropImageComponent()}onDragging(e,t=!1){var c,u;const o=this.getHorizontalDirection(e),i=this.getVerticalDirection(e);this.eventLastTime=e,this.positionDragAndDropImageComp(e);const s=this.dropTargets.filter(h=>this.isMouseOnDropTarget(e,h)),n=this.findCurrentDropTarget(e,s),{lastDropTarget:r,dragSource:l,dragAndDropImageComp:a,dragItem:d}=this;if(n!==r){if(this.leaveLastTargetIfExists(e,o,i,t),r!==null&&n===null&&((c=l==null?void 0:l.onGridExit)==null||c.call(l,d)),r===null&&n!==null&&((u=l==null?void 0:l.onGridEnter)==null||u.call(l,d)),this.enterDragTargetIfExists(n,e,o,i,t),n&&a){const{comp:h,promise:g}=a;h?h.setIcon(n.getIconName?n.getIconName():null,!1):g.then(p=>{p&&p.setIcon(n.getIconName?n.getIconName():null,!1)})}this.lastDropTarget=n}else if(n&&n.onDragging){const h=this.createDropTargetEvent(n,e,o,i,t);n.onDragging(h)}}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,o=[[e.getContainer()]];return t?o.concat(t):o}isMouseOnDropTarget(e,t){const o=this.getAllContainersFromDropTarget(t);let i=!1;const s=(l,a)=>{for(const d of a){const{width:c,height:u,left:h,right:g,top:p,bottom:f}=d.getBoundingClientRect();if(c===0||u===0)return!1;const C=l.clientX>=h&&l.clientX<g,m=l.clientY>=p&&l.clientY<f;if(!C||!m)return!1}return!0};for(const l of o)if(s(e,l)){i=!0;break}const{eElement:n,type:r}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(n)?!1:i&&t.isInterestedIn(r,n)}findCurrentDropTarget(e,t){const o=t.length;if(o===0)return null;if(o===1)return t[0];const s=Zt(this.beans).elementsFromPoint(e.clientX,e.clientY);for(const n of s)for(const r of t)if(this.getAllContainersFromDropTarget(r).flatMap(a=>a).indexOf(n)!==-1)return r;return null}enterDragTargetIfExists(e,t,o,i,s){if(e&&e.onDragEnter){const n=this.createDropTargetEvent(e,t,o,i,s);e.onDragEnter(n)}}leaveLastTargetIfExists(e,t,o,i){const{lastDropTarget:s}=this;if(!s)return;if(s.onDragLeave){const r=this.createDropTargetEvent(s,e,t,o,i);s.onDragLeave(r)}const n=this.getDragAndDropImageComponent();n&&n.setIcon(null,!1)}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.filter(o=>o.external).find(o=>o.getContainer()===e.getContainer())||null}isDropZoneWithinThisGrid(e){const o=this.ctrlsSvc.getGridBodyCtrl().eGridBody,{dropZoneTarget:i}=e;return o.contains(i)}getHorizontalDirection(e){var i;const t=(i=this.eventLastTime)==null?void 0:i.clientX,o=e.clientX;return t===o?null:t>o?"left":"right"}getVerticalDirection(e){var i;const t=(i=this.eventLastTime)==null?void 0:i.clientY,o=e.clientY;return t===o?null:t>o?"up":"down"}createDropTargetEvent(e,t,o,i,s){const n=e.getContainer(),r=n.getBoundingClientRect(),{dragItem:l,dragSource:a,gos:d}=this,c=t.clientX-r.left,u=t.clientY-r.top;return _(d,{event:t,x:c,y:u,vDirection:i,hDirection:o,dragSource:a,fromNudge:s,dragItem:l,dropZoneTarget:n})}positionDragAndDropImageComp(e){const t=this.getDragAndDropImageComponent();t&&vc(t.getGui(),e,this.beans)}removeDragAndDropImageComponent(){var t;const{dragAndDropImageComp:e}=this;if(e){const{comp:o}=e;if(o){const i=o.getGui();(t=this.dragAndDropImageParent)==null||t.removeChild(i),this.destroyBean(o)}}this.dragAndDropImageComp=null}createDragAndDropImageComponent(){const{dragSource:e,gos:t,userCompFactory:o}=this;if(!e)return;const i=xu(o,_(t,{dragSource:e}));if(!i)return;const s=i.newAgStackInstance();this.dragAndDropImageComp={promise:s},s.then(n=>{!n||!this.isAlive()||(this.processDragAndDropImageComponent(n),this.dragAndDropImageComp.comp=n)})}processDragAndDropImageComponent(e){const{dragSource:t,environment:o}=this;if(!t)return;const i=e.getGui();i.style.setProperty("position","absolute"),i.style.setProperty("z-index","9999"),Zr(this.gos,i),o.applyThemeClasses(i),e.setIcon(null,!1);let{dragItemName:s}=t;typeof s=="function"&&(s=s()),e.setLabel(s||""),i.style.top="20px",i.style.left="20px";const n=ns(this.beans);this.dragAndDropImageParent=n,n?n.appendChild(i):k(54)}registerGridDropTarget(e,t){const o={getContainer:e,isInterestedIn:i=>i===1||i===0,getIconName:()=>"notAllowed"};this.addDropTarget(o),t.addDestroyFunc(()=>this.removeDropTarget(o))}},Hh=class extends x{constructor(){super(...arguments),this.beanName="dragSvc",this.dragEndFunctions=[],this.dragSources=[]}destroy(){const{dragSources:e}=this;e.forEach(this.removeListener.bind(this)),e.length=0,super.destroy()}removeListener(e){const t=e.dragSource.eElement,o=e.mouseDownListener;if(t.removeEventListener("mousedown",o),e.touchEnabled){const i=e.touchStartListener;t.removeEventListener("touchstart",i,{passive:!0})}}removeDragSource(e){const{dragSources:t}=this,o=t.find(i=>i.dragSource===e);o&&(this.removeListener(o),we(t,o))}addDragSource(e){const t=this.onMouseDown.bind(this,e),{eElement:o,includeTouch:i,stopPropagationForTouch:s}=e;o.addEventListener("mousedown",t);let n=null;const r=this.gos.get("suppressTouch");i&&!r&&(n=l=>{Ui(l.target)||(s&&l.stopPropagation(),this.onTouchStart(e,l))},o.addEventListener("touchstart",n,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:n,touchEnabled:!!i})}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;const o=t.touches[0];this.touchLastTime=o,this.touchStart=o;const i=a=>this.onTouchMove(a,e.eElement),s=a=>this.onTouchUp(a,e.eElement),n=a=>{a.cancelable&&a.preventDefault()},r=t.target,l=[{target:Zt(this.beans),type:"touchmove",listener:n,options:{passive:!1}},{target:r,type:"touchmove",listener:i,options:{passive:!0}},{target:r,type:"touchend",listener:s,options:{passive:!0}},{target:r,type:"touchcancel",listener:s,options:{passive:!0}}];this.addTemporaryEvents(l),e.dragStartPixels===0&&this.onCommonMove(o,this.touchStart,e.eElement)}onMouseDown(e,t){const o=t;if(e.skipMouseEvent&&e.skipMouseEvent(t)||o._alreadyProcessedByDragService||(o._alreadyProcessedByDragService=!0,t.button!==0))return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;const i=d=>this.onMouseMove(d,e.eElement),s=d=>this.onMouseUp(d,e.eElement),n=d=>d.preventDefault(),r=d=>{d.key===y.ESCAPE&&this.cancelDrag(e.eElement)},l=Zt(this.beans),a=[{target:l,type:"mousemove",listener:i},{target:l,type:"mouseup",listener:s},{target:l,type:"contextmenu",listener:n},{target:l,type:"keydown",listener:r}];this.addTemporaryEvents(a),e.dragStartPixels===0&&this.onMouseMove(t,e.eElement)}addTemporaryEvents(e){e.forEach(t=>{const{target:o,type:i,listener:s,options:n}=t;o.addEventListener(i,s,n)}),this.dragEndFunctions.push(()=>{e.forEach(t=>{const{target:o,type:i,listener:s,options:n}=t;o.removeEventListener(i,s,n)})})}isEventNearStartEvent(e,t){const{dragStartPixels:o}=this.currentDragParams,i=M(o)?o:4;return Kr(e,t,i)}getFirstActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}onCommonMove(e,t,o){var i;if(!this.dragging){if(this.isEventNearStartEvent(e,t))return;if(this.dragging=!0,this.eventSvc.dispatchEvent({type:"dragStarted",target:o}),this.currentDragParams.onDragStart(t),!this.currentDragParams){this.dragging=!1;return}this.currentDragParams.onDragging(t)}(i=this.currentDragParams)==null||i.onDragging(e)}onTouchMove(e,t){const o=this.getFirstActiveTouch(e.touches);o&&this.onCommonMove(o,this.touchStart,t)}onMouseMove(e,t){var o;ht()&&((o=J(this.beans).getSelection())==null||o.removeAllRanges()),this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)}shouldPreventMouseEvent(e){const{gos:t}=this,o=t.get("enableCellTextSelection"),i=e.type==="mousemove",s=n=>{const r=n.target,l=r==null?void 0:r.tagName.toLocaleLowerCase();return!!(l!=null&&l.match("^a$|textarea|input|select|button"))};return o&&i&&e.cancelable&&oo(t,e)&&!s(e)}onTouchUp(e,t){let o=this.getFirstActiveTouch(e.changedTouches);o||(o=this.touchLastTime),this.onUpCommon(o,t)}onMouseUp(e,t){this.onUpCommon(e,t)}onUpCommon(e,t){this.dragging&&(this.dragging=!1,this.currentDragParams.onDragStop(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t})),this.resetDragProperties()}cancelDrag(e){var t,o;this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),(o=(t=this.currentDragParams)==null?void 0:t.onDragCancel)==null||o.call(t),this.resetDragProperties()}resetDragProperties(){this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null;const{dragEndFunctions:e}=this;e.forEach(t=>t()),e.length=0}};function Xr(e,t){return e+"_"+t}function Q(e){return e instanceof io}var io=class extends x{constructor(e,t,o,i){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=o,this.pinned=i,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return Xr(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{Q(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=$(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){var t;let e=0;return(t=this.displayedChildren)==null||t.forEach(o=>{e+=o.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){var e;return!!((e=this.getColGroupDef())!=null&&e.autoHeaderHeight)}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{et(t)?e.push(t):Q(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{et(t)?e.push(t):Q(t)&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return!this.isPadding()||!e||!e.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}this.children.forEach(o=>{var n;if(Q(o)&&!((n=o.displayedChildren)!=null&&n.length))return;switch(o.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(o);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(o);break;default:this.displayedChildren.push(o);break}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},Cs="row-group-",ms="t-",ws="b-",Oh=0,so=class{constructor(e){this.master=!1,this.detail=void 0,this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=Oh++,this.alreadyRendered=!1,this.hovered=!1,this.__selected=!1,this.beans=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){var l,a,d;const{valueCache:o,eventSvc:i}=this.beans,s=this.data;this.data=e,o==null||o.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,s,t);if((l=this.__localEventService)==null||l.dispatchEvent(n),this.sibling){this.sibling.data=e;const c=this.sibling.createDataChangedEvent(e,s,t);(a=this.sibling.__localEventService)==null||a.dispatchEvent(c)}i.dispatchEvent({type:"rowNodeDataChanged",node:this});const r=this.pinnedSibling;r&&(r.data=e,(d=r.__localEventService)==null||d.dispatchEvent(r.createDataChangedEvent(e,s,t)),i.dispatchEvent({type:"rowNodeDataChanged",node:r}))}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(e,t,o){return{type:"dataChanged",node:this,oldData:t,newData:e,update:o}}getRowIndexString(){return this.rowIndex==null?(U(13),null):this.rowPinned==="top"?ms+this.rowIndex:this.rowPinned==="bottom"?ws+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){var r,l;const{selectionSvc:o}=this.beans,i=(r=o==null?void 0:o.createDaemonNode)==null?void 0:r.call(o,this),s=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),o&&(o.updateRowSelectable(this),o.syncInRowNode(this,i));const n=this.createDataChangedEvent(e,s,!1);(l=this.__localEventService)==null||l.dispatchEvent(n)}setId(e){var o;const t=ko(this.beans.gos);if(t)if(this.data){const i=((o=this.parent)==null?void 0:o.getRoute())??[];this.id=t({data:this.data,parentKeys:i.length>0?i:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(Cs)&&U(14,{groupPrefix:Cs})}else this.id=void 0;else this.id=e}setRowTop(e){this.oldRowTop=this.rowTop,this.rowTop!==e&&(this.rowTop=e,this.dispatchRowEvent("topChanged"),this.setDisplayed(e!==null))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,o){var i;(i=this.beans.expansionSvc)==null||i.setExpanded(this,e,t,o)}setDataValue(e,t,o){const{colModel:i,valueSvc:s,gos:n,editSvc:r}=this.beans,l=typeof e!="string"?e:i.getCol(e)??i.getColDefCol(e);if(!l)return!1;const a=s.getValueForDisplay(l,this,void 0,void 0,"api").value;if(n.get("readOnlyEdit")){const{beans:{eventSvc:u},data:h,rowIndex:g,rowPinned:p}=this;return u.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:g,rowPinned:p,column:l,colDef:l.colDef,data:h,node:this,oldValue:a,newValue:t,value:t,source:o}),!1}if(r){const u=r.setDataValue({rowNode:this,column:l},t,o);if(u!=null)return u}const d=s.setValue(this,l,t,o);this.dispatchCellChangedEvent(l,t,a);const c=this.pinnedSibling;return c&&d&&c.dispatchCellChangedEvent(l,t,a),d}updateHasChildren(){let e=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,o){var s;const i={type:"cellChanged",node:this,column:e,newValue:t,oldValue:o};(s=this.__localEventService)==null||s.dispatchEvent(i)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){var e;return((e=this.beans.expansionSvc)==null?void 0:e.isExpandable(this))??!1}isSelected(){return this.footer?this.sibling.isSelected():this.rowPinned&&this.pinnedSibling?this.pinnedSibling.isSelected():this.__selected}depthFirstSearch(e){var t;(t=this.childrenAfterGroup)==null||t.forEach(o=>o.depthFirstSearch(e)),e(this)}dispatchRowEvent(e){var t;(t=this.__localEventService)==null||t.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,o="api"){var i;(i=this.beans.selectionSvc)==null||i.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:o})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){this.__localEventService||(this.__localEventService=new je),this.__localEventService.addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){var i,s,n,r;(i=this.beans.validation)==null||i.checkRowEvents(e),this.__localEventService||(this.__localEventService=new je),this.frameworkEventListenerService=(n=(s=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:n.call(s,this.frameworkEventListenerService,this.__localEventService);const o=((r=this.frameworkEventListenerService)==null?void 0:r.wrap(e,t))??t;this.__localEventService.addEventListener(e,o)}removeEventListener(e,t){var i;const o=((i=this.frameworkEventListenerService)==null?void 0:i.unwrap(e,t))??t;this.removeLocalListener(e,o)}removeLocalListener(e,t){var o,i;(o=this.__localEventService)==null||o.removeEventListener(e,t),(i=this.__localEventService)!=null&&i.noRegisteredListenersExist()&&(this.__localEventService=null)}isFullWidthCell(){if(k(61),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;const e=[];let t=this;for(;t&&t.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setFirstChild(e){this.firstChild!==e&&(this.firstChild=e,this.dispatchRowEvent("firstChildChanged"))}setDisplayed(e){this.displayed!==e&&(this.displayed=e,this.dispatchRowEvent("displayedChanged"))}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}getFirstChild(){var e;return this.childStore?this.childStore.getFirstNode():((e=this.childrenAfterSort)==null?void 0:e[0])??null}};function Bh(e,t,o){return _(t,{type:o,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var Vh=new Set(["__localEventService","__objectId","sticky","__autoHeights","__checkAutoHeightsDebounced","childStore"]);function Nh(e,t){const o=new so(t);return Object.keys(e).forEach(i=>{Vh.has(i)||(o[i]=e[i])}),o.oldRowTop=null,o}var _h={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"};new Set(Object.values(_h));var vs="T",Wh=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${vs}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function Jr(e,t){return e.toString().padStart(t,"0")}function $e(e,t=!0,o="-"){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>Jr(s,2)).join(o);return t&&(i+=vs+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>Jr(s,2)).join(":")),i}function ni(e,t=!1){return!!no(e,t)}function zh(e){return ni(e,!0)}function no(e,t=!1){if(!e||!Wh.test(e))return null;const[o,i]=e.split(vs);if(!o)return null;const s=o.split("-").map(h=>parseInt(h,10));if(s.filter(h=>!isNaN(h)).length!==3)return null;const[n,r,l]=s,a=new Date(n,r-1,l);if(a.getFullYear()!==n||a.getMonth()!==r-1||a.getDate()!==l||!i&&t)return null;if(!i||i==="00:00:00")return a;const[d,c,u]=i.split(":").map(h=>parseInt(h,10));if(d>=0&&d<24)a.setHours(d);else if(t)return null;if(c>=0&&c<60)a.setMinutes(c);else if(t)return null;if(u>=0&&u<60)a.setSeconds(u);else if(t)return null;return a}var $h="ag-focus-managed",ri=class extends x{constructor(e,t={}){super(),this.eFocusable=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:o=>{if(o.defaultPrevented)return;const i=oi(this.beans,this.eFocusable,!1,o.shiftKey);i&&(i.focus(),o.preventDefault())},...t}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:o}}=this;e.classList.add($h),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),o&&this.addManagedElementListeners(e,{focusout:o})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:t=>{if(t.defaultPrevented||ke(t))return;const{callbacks:o}=this;if(o.shouldStopEventPropagation(t)){vt(t);return}t.key===y.TAB?o.onTabKeyDown(t):o.handleKeyDown&&o.handleKeyDown(t)}})}},be={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},bs=class extends x{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"},o=t.autoHeight?be.AUTO_HEIGHT:t.print?be.PRINT:be.NORMAL;this.view.updateLayoutClasses(o,t)}},Ue="Viewport",el="fakeVScrollComp",Ss=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],tl=100,ys=150,Uh=class extends x{constructor(e){super(),this.clearRetryListenerFncs=[],this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isScrollActive=!1,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=ge(this,()=>this.lastScrollSource[1]=null,ys),this.resetLastVScrollDebounced=ge(this,()=>this.lastScrollSource[0]=null,ys)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),this.clearRetryListenerFncs=[],window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),gridSizeChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,o=>{this.centerRowsCtrl=o.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,Ue)});for(const e of Ss){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.ctrlsSvc.get("fakeVScrollComp"),t=this.gos.get("debounceVerticalScrollbar"),o=t?ge(this,this.onVScroll.bind(this,Ue),tl):this.onVScroll.bind(this,Ue),i=t?ge(this,this.onVScroll.bind(this,el),tl):this.onVScroll.bind(this,el);this.addManagedElementListeners(this.eBodyViewport,{scroll:o}),this.registerScrollPartner(e,i)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...Ss,Ue]){if(this.lastScrollSource[1]===t)continue;const o=this.getViewportForSource(t);Fo(o,e,this.enableRtl)}}getViewportForSource(e){return e===Ue?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.eViewport,{scrollLeft:o}=t;if(this.shouldBlockScrollUpdate(1,o,!0))return;const i=Do(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(i),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(e===Ue?t=this.eBodyViewport.scrollTop:t=this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0))return;const{animationFrameSvc:o}=this;o==null||o.setScrollTop(t),this.nextScrollTop=t,e===Ue?this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,o!=null&&o.active?o.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.ctrlsSvc.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}isScrolling(){return this.isScrollActive}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"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"})},ys)}shouldBlockScrollUpdate(e,t,o=!1){return o&&!gt()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=Ki(this.eBodyViewport),{scrollHeight:o}=this.eBodyViewport;return e<0||e+t>o}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:o}=this.centerRowsCtrl.eViewport;if(this.enableRtl){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>o}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){const e=this.scrollLeft;let t=!1;for(const o of Ss)if(this.getViewportForSource(o).scrollLeft!==e){t=!0;break}t&&this.onHScroll(Ue)}scrollGridIfNeeded(e=!1){const t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){const i=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:i:e=Math.min(Math.max(e,0),i)),Fo(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){const{lastOffsetHeight:o,lastScrollTop:i}=this;return{top:i,bottom:i+o}}this.isVerticalPositionInvalidated=!1;const{scrollTop:e,offsetHeight:t}=this.eBodyViewport;return this.lastScrollTop=e,this.lastOffsetHeight=t,{top:e,bottom:e+t}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.isHorizontalPositionInvalidated&&(this.lastIsHorizontalScrollShowing=this.centerRowsCtrl.isHorizontalScrollShowing(),this.isHorizontalPositionInvalidated=!1),this.lastIsHorizontalScrollShowing}scrollHorizontally(e){const t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){const{rowModel:o}=this.beans,i=o.getRowCount();let s=-1;for(let n=0;n<i;n++){const r=o.getRow(n);if(typeof e=="function"){if(r&&e(r)){s=n;break}}else if(e===r||e===r.data){s=n;break}}s>=0&&this.ensureIndexVisible(s,t)}ensureIndexVisible(e,t,o=0){if(ee(this.gos,"print"))return;const{rowModel:i}=this.beans,s=i.getRowCount();if(typeof e!="number"||e<0||e>=s){k(88,{index:e});return}this.clearRetryListeners();const{frameworkOverrides:n,pageBounds:r,rowContainerHeight:l,rowRenderer:a}=this.beans;n.wrapIncoming(()=>{var p,f;const d=this.ctrlsSvc.getGridBodyCtrl(),c=i.getRow(e);let u,h,g=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:C,stickyBottomHeight:m}=d,w=c.rowTop,b=c.rowHeight,v=r.getPixelOffset(),S=c.rowTop-v,D=S+c.rowHeight,I=this.getVScrollPosition(),O=l.divStretchOffset,F=I.top+O,P=I.bottom+O,T=P-F,V=l.getScrollPositionForPixel(S),B=l.getScrollPositionForPixel(D-T),W=Math.min((V+B)/2,S),z=F+C>S,de=P-m<D;let Ie=null;t==="top"?Ie=V-C:t==="bottom"?Ie=B+m:t==="middle"?Ie=W:z?Ie=V-C:de&&(B-V>T?Ie=V-C:Ie=B+m),Ie!==null&&(this.setVerticalScrollPosition(Ie),a.redraw({afterScroll:!0})),u=w!==c.rowTop||b!==c.rowHeight,h=C!==d.stickyTopHeight||m!==d.stickyBottomHeight,g++}while((u||h)&&g<10);if((p=this.animationFrameSvc)==null||p.flushAllFrames(),o<10&&(c!=null&&c.stub||!((f=this.beans.rowAutoHeight)!=null&&f.areRowsMeasured()))){const C=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{const m=this.getVScrollPosition().top;C!==m&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=i.getRowCount())&&this.ensureIndexVisible(e,t,o+1)}})}})}clearRetryListeners(){this.clearRetryListenerFncs.forEach(e=>e()),this.clearRetryListenerFncs=[]}ensureColumnVisible(e,t="auto"){const{colModel:o,frameworkOverrides:i}=this.beans,s=o.getCol(e);if(!s||s.isPinned()||!this.visibleCols.isColDisplayed(s))return;const n=this.getPositionedHorizontalScroll(s,t);i.wrapIncoming(()=>{var r;n!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),(r=this.animationFrameSvc)==null||r.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:o,columnAfterEnd:i}=this.isColumnOutsideViewport(e),s=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),n=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl;let l=(r?o:i)||s,a=r?i:o;t!=="auto"&&(l=t==="start",a=t==="end");const d=t==="middle";if(l||a||d){const{colLeft:c,colMiddle:u,colRight:h}=this.getColumnBounds(e);return d?u-n/2:l?r?h:c:r?c-n:h-n}return null}isColumnOutsideViewport(e){const{start:t,end:o}=this.getViewportBounds(),{colLeft:i,colRight:s}=this.getColumnBounds(e),n=this.enableRtl,r=n?t>s:o<s,l=n?o<i:t>i;return{columnBeforeStart:r,columnAfterEnd:l}}getColumnBounds(e){const t=this.enableRtl,o=this.visibleCols.bodyWidth,i=e.getActualWidth(),s=e.getLeft(),n=t?-1:1,r=t?o-s:s,l=r+i*n,a=r+i/2*n;return{colLeft:r,colMiddle:a,colRight:l}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),o=t,i=e+t;return{start:o,end:i,width:e}}},Rs=class extends x{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=ee(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:o}=this.beans,i=t.bodyWidth,s=t.getColsLeftWidth(),n=t.getDisplayedColumnsRightWidth();let r;e?r=i+s+n:(r=i,this.addSpacer&&(this.gos.get("enableRtl")?s:n)===0&&o.verticalScrollShowing&&(r+=o.getScrollbarWidth())),this.callback(r)}},Kh=class extends x{constructor(e){super(),this.centerContainerCtrl=e}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const{beans:e,centerContainerCtrl:t,gridBodyCtrl:o}=this,i=()=>{Ne(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(i),o.registerBodyViewportResizeListener(i)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e==null||e.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const o=this.centerContainerCtrl.getCenterWidth();o!==this.centerWidth&&(this.centerWidth=o,t==null||t.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl.eBodyViewport,t=Ki(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){const e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.beans.colViewport.setScrollPosition(e,t)}};function Es(e,t,o,i,s,n){if(o==null&&t==null)return;const r={},l={},a=(d,c)=>{d.split(" ").forEach(u=>{u.trim()!=""&&c(u)})};if(o){const d=Object.keys(o);for(let c=0;c<d.length;c++){const u=d[c],h=o[u];let g;typeof h=="string"?g=e?e.evaluate(h,i):!0:typeof h=="function"&&(g=h(i)),a(u,p=>{g?r[p]=!0:l[p]=!0})}}t&&n&&Object.keys(t).forEach(d=>a(d,c=>{r[c]||(l[c]=!0)})),n&&Object.keys(l).forEach(n),Object.keys(r).forEach(s)}function ol(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var jh=class extends x{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const o=this.gos,i=r=>{typeof r=="string"?e.push(r):Array.isArray(r)&&r.forEach(l=>e.push(l))},s=o.get("rowClass");s&&i(s);const n=o.getCallback("getRowClass");if(n){const r={data:t.data,node:t,rowIndex:t.rowIndex},l=n(r);i(l)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,o=>{e.push(o)},()=>{})}processRowClassRules(e,t,o){const{gos:i,expressionSvc:s}=this.beans,n=_(i,{data:e.data,node:e,rowIndex:e.rowIndex});Es(s,void 0,i.get("rowClassRules"),n,t,o)}processStylesFromGridOptions(e){const t=this.gos,o=t.get("rowStyle"),i=t.getCallback("getRowStyle");let s;if(i){const n={data:e.data,node:e,rowIndex:e.rowIndex};s=i(n)}if(s||o)return Object.assign({},o,s)}},qh=0,li="renderedRow",ai=class extends x{constructor(e,t,o,i,s){var n,r;super(),this.rowNode=e,this.useAnimationFrameForCreate=i,this.printLayout=s,this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=((n=t.pagination)==null?void 0:n.getCurrentPage())??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+qh++,this.rowId=Vo(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=ol(this.rowNode),this.setRowType(),this.setAnimateFlags(o),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=(r=t.editSvc)==null?void 0:r.createRowStyleFeature(this,t),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=Vo(e)}updateGui(e,t){e==="left"?this.leftGui=t:e==="right"?this.rightGui=t:e==="fullWidth"?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,o,i){var u,h;const{context:s,focusSvc:n}=this.beans;i=Ko(this,s,i);const r={rowComp:e,element:t,containerType:o,compBean:i};this.allRowGuis.push(r),this.updateGui(o,r),this.initialiseRowComp(r);const l=this.rowNode,a=this.rowType==="FullWidthLoading"||l.stub,d=!l.data&&this.beans.rowModel.getType()==="infinite";!a&&!d&&!l.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent();const c=(u=this.fullWidthGui)==null?void 0:u.element;c&&!((h=this.beans.editSvc)!=null&&h.isEditing(this))&&n.isRowFocused(l.rowIndex,l.rowPinned)&&n.shouldTakeFocus()&&setTimeout(()=>c.focus({preventScroll:!0}),0)}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";this.allRowGuis.forEach(o=>o.element.style.display=t)}initialiseRowComp(e){const t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),Qe(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const o=e.rowComp;this.getInitialRowClasses(e.containerType).forEach(s=>o.toggleCss(s,!0)),this.executeSlideAndFadeAnimations(e),this.rowNode.group&&Gi(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(o),this.setRowCompRowBusinessKey(o),Xe(t,e.element,li,this),e.compBean.addDestroyFunc(()=>Xe(t,e.element,li,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.toggleCss("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=Vo(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(es(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(es(()=>{e.rowComp.toggleCss("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){var i;const t=(i=this.beans.rowDragSvc)==null?void 0:i.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const o=this.createBean(t,this.beans.context);this.rowDragComps.push(o),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(s=>s!==o),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),this.destroyBean(o,this.beans.context)})}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),o=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(o)}getFullWidthCellRenderers(){var e,t;return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(o=>{var i;return(i=o==null?void 0:o.rowComp)==null?void 0:i.getFullWidthCellRenderer()}):[(t=(e=this.fullWidthGui)==null?void 0:e.rowComp)==null?void 0:t.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;const t={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(t)}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:o,beans:{visibleCols:i}}=this,s=!!e||!i.isPinningLeft(),n=!!t,r=!!o||!i.isPinningRight();return s&&n&&r}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){const e=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow")&&!this.gos.get("groupHideOpenParents"),t=this.isNodeFullWidthCell(),o=this.gos.get("masterDetail")&&this.rowNode.detail,i=this.beans.colModel.isPivotMode(),s=bc(this.gos,this.rowNode,i);e?this.rowType="FullWidthLoading":o?this.rowType="FullWidthDetail":t?this.rowType="FullWidth":s?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:o}=this.beans;if(!(o!=null&&o.active)||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(o.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){var o;if(!((o=this.beans.rowSpanSvc)!=null&&o.isCellSpanning(e,this.rowNode)))return new Pt(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){var t;return!((t=this.beans.rowSpanSvc)!=null&&t.isCellSpanning(e.column,this.rowNode))}createCellCtrls(e,t,o=null){const i={list:[],map:{}},s=(d,c,u)=>{u!=null?i.list.splice(u,0,c):i.list.push(c),i.map[d]=c},n=[];for(const d of t){const c=d.getInstanceId();let u=e.map[c];u&&!this.isCorrectCtrlForSpan(u)&&(u.destroy(),u=void 0),u||(u=this.getNewCellCtrl(d)),u&&s(c,u)}for(const d of e.list){const c=d.column.getInstanceId();if(i.map[c]!=null)continue;!this.isCellEligibleToBeRemoved(d,o)?n.push([c,d]):d.destroy()}if(n.length)for(const[d,c]of n){const u=i.list.findIndex(g=>g.column.getLeft()>c.column.getLeft()),h=u===-1?void 0:Math.max(u-1,0);s(d,c,h)}const{focusSvc:r,visibleCols:l}=this.beans,a=r.getFocusedCell();if(a&&a.column.getPinned()==o){const d=a.column.getInstanceId();if(!i.map[d]&&l.allCols.includes(a.column)){const u=this.createFocusedCellCtrl();if(u){const h=i.list.findIndex(p=>p.column.getLeft()>u.column.getLeft()),g=h===-1?void 0:Math.max(h-1,0);s(d,u,g)}}}return i}createFocusedCellCtrl(){const{focusSvc:e,rowSpanSvc:t}=this.beans,o=e.getFocusedCell();if(!o)return;const i=t==null?void 0:t.getCellSpan(o.column,this.rowNode);if(i){if(i.firstNode!==this.rowNode||!i.doesSpanContain(o))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(o.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){this.allRowGuis.forEach(t=>{const o=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(o,e)})}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){const e=this.beans.colViewport,t=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const o=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,o);const i=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,i,"left");const s=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,s,"right")}}isCellEligibleToBeRemoved(e,t){const{column:s}=e;if(s.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;const{visibleCols:n,editSvc:r}=this.beans,l=r==null?void 0:r.isEditing(e),a=e.isCellFocused();return l||a?!(n.allCols.indexOf(s)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||ee(this.gos,"print")}listenOnDomOrder(e){const t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;const t=M(this.rowNode.oldRowTop),{visibleCols:o}=this.beans,i=o.isPinningLeft(),s=o.isPinningRight();if(t){const{slideInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=i,n.right=s}else{const{fadeInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=i,n.right=s}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const e=(r,l)=>r?r.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(r.element,l).params):!0,t=e(this.fullWidthGui,null),o=e(this.centerGui,null),i=e(this.leftGui,"left"),s=e(this.rightGui,"right");return t&&o&&i&&s}addListeners(){const{beans:e,gos:t,rowNode:o}=this,{expansionSvc:i,eventSvc:s,context:n,rowSpanSvc:r}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...(i==null?void 0:i.getRowExpandedListeners(this))??{}}),o.detail&&this.addManagedListeners(o.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(o,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this),rowPinned:this.onRowPinned.bind(this)}),this.addManagedListeners(s,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),r&&this.addManagedListeners(r,{spannedCellsUpdated:({pinned:l})=>{l&&!o.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,n),this.tooltipFeature=this.destroyBean(this.tooltipFeature,n),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,n)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow")){this.allRowGuis.forEach(a=>{this.addRowDraggerToRow(a)});return}this.rowDragComps=this.destroyBeans(this.rowDragComps,n)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>this.getAllCellCtrls().forEach(e=>e.onRowIndexChanged()),cellChanged:e=>this.getAllCellCtrls().forEach(t=>t.onCellChanged(e))})}onRowPinned(){for(const e of this.allRowGuis)e.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){this.refreshRow({suppressFlash:!e.update,newData:!e.update})}refreshRow(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}this.getAllCellCtrls().forEach(o=>o.refreshCell(e)),this.allRowGuis.forEach(o=>{this.setRowCompRowId(o.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(o.rowComp)}),this.onRowSelected(),this.postProcessCss()}postProcessCss(){var e;this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),(e=this.rowEditStyleFeature)==null||e.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.beans.rowDropHighlightSvc,t=(e==null?void 0:e.row)===this.rowNode?e.position:"none",o=t==="above",i=t==="inside",s=t==="below",r=this.gos.get("treeData")&&(s||o),l=this.rowNode.uiLevel.toString();this.allRowGuis.forEach(a=>{const d=a.rowComp;d.toggleCss("ag-row-highlight-above",o),d.toggleCss("ag-row-highlight-inside",i),d.toggleCss("ag-row-highlight-below",s),d.toggleCss("ag-row-highlight-indent",r),r?a.element.style.setProperty("--ag-row-highlight-level",l):a.element.style.removeProperty("--ag-row-highlight-level")})}postProcessRowDragging(){const e=this.rowNode.dragging;this.allRowGuis.forEach(t=>t.rowComp.toggleCss("ag-row-dragging",e))}onDisplayedColumnsChanged(){var e;this.updateColumnLists(!0),(e=this.beans.rowAutoHeight)==null||e.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:qe(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.findFullWidthInfoForEvent(e);if(!t)return;const{rowGui:o,column:i}=t;if(!(o.element===e.target))return;const r=this.rowNode,{focusSvc:l,navigation:a}=this.beans,d=l.getFocusedCell(),c={rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:(d==null?void 0:d.column)??i};a==null||a.navigateToNextCell(e,e.key,c,!0),e.preventDefault()}onTabKeyDown(e){var l;if(e.defaultPrevented||ke(e))return;const t=this.allRowGuis.find(a=>a.element.contains(e.target)),o=t?t.element:null,i=o===e.target,s=Y(this.beans);let n=!1;o&&s&&(n=o.contains(s)&&s.classList.contains("ag-cell"));let r=null;!i&&!n&&(r=oi(this.beans,o,!1,e.shiftKey)),(this.isFullWidth()&&i||!r)&&((l=this.beans.navigation)==null||l.onTabKeyDown(this,e))}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){var t;const e=(t=this.allRowGuis.find(o=>Me(o.element)))==null?void 0:t.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:-1;this.allRowGuis.forEach(o=>{ce(o.element,"tabindex",t)})}onFullWidthRowFocused(e){var s,n,r;const t=this.rowNode,o=e?this.isFullWidth()&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned:!1;let i;if(this.fullWidthGui)i=this.fullWidthGui.element;else{const l=this.beans.colModel.getCol(e==null?void 0:e.column),a=l==null?void 0:l.pinned;a?i=a==="right"?(s=this.rightGui)==null?void 0:s.element:(n=this.leftGui)==null?void 0:n.element:i=(r=this.centerGui)==null?void 0:r.element}i&&(i.classList.toggle("ag-full-width-focus",o),o&&(e!=null&&e.forceBrowserFocus)&&i.focus({preventScroll:!0}))}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){const o={list:[],map:{}};return e.list.forEach(i=>{i!==t&&(o.list.push(i),o.map[i.column.getInstanceId()]=i)}),o}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){const{rowNode:o}=this;return _(this.gos,{type:e,node:o,data:o.data,rowIndex:o.rowIndex,rowPinned:o.rowPinned,event:t})}createRowEventWithSource(e,t){const o=this.createRowEvent(e,t);return o.source=this,o}onRowDblClick(e){ke(e)||this.beans.eventSvc.dispatchEvent(this.createRowEventWithSource("rowDoubleClicked",e))}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),o=this.getColumnForFullWidth(t);if(!(!t||!o))return{rowGui:t,column:o}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){const{visibleCols:t}=this.beans;switch(e==null?void 0:e.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=pt(e.target,"ag-row-drag",3),!this.isFullWidth())return;const t=this.rowNode,{rangeSvc:o,focusSvc:i}=this.beans;o==null||o.removeAllCellRanges();const s=this.findFullWidthInfoForEvent(e);if(!s)return;const{rowGui:n,column:r}=s,l=n.element,a=e.target;let d=e.defaultPrevented||ht();l&&l.contains(a)&&Ui(a)&&(d=!1),i.setFocusedCell({rowIndex:t.rowIndex,column:r,rowPinned:t.rowPinned,forceBrowserFocus:d})}onRowClick(e){if(ke(e)||this.lastMouseDownOnDragger)return;const{eventSvc:o,selectionSvc:i}=this.beans;o.dispatchEvent(this.createRowEventWithSource("rowClicked",e)),i==null||i.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){var t;this.rowType==="FullWidthDetail"&&((t=this.beans.masterDetailSvc)==null||t.setupDetailRowAutoHeight(this,e))}createFullWidthCompDetails(e,t){const{gos:o,rowNode:i}=this,s=_(o,{fullWidth:!0,data:i.data,node:i,value:i.key,valueFormatted:i.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(r,l,a,d)=>this.addFullWidthRowDragging(r,l,a,d),setTooltip:(r,l)=>{o.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(r,l)}}),n=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return ku(n,s);case"FullWidthGroup":{const{value:r,valueFormatted:l}=this.beans.valueSvc.getValueForDisplay(void 0,this.rowNode,!0);return s.value=r,s.valueFormatted=l,Mu(n,s)}case"FullWidthLoading":return Au(n,s);default:return Iu(n,s)}}setupFullWidthRowTooltip(e,t){var o;this.fullWidthGui&&(this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.setupFullWidthRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,o="",i){const{rowDragSvc:s,context:n}=this.beans;if(!s||!this.isFullWidth())return;const r=s.createRowDragComp(()=>o,this.rowNode,void 0,e,t,i);this.createBean(r,n),this.addDestroyFunc(()=>{this.destroyBean(r,n)})}onUiLevelChanged(){const e=ol(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,o="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(i=>{i.rowComp.toggleCss(t,!0),i.rowComp.toggleCss(o,!1)})}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach(o=>o.rowComp.toggleCss("ag-row-first",e))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach(o=>o.rowComp.toggleCss("ag-row-last",t)))}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){var t;const e=[];(t=this.beans.rowStyleSvc)==null||t.processClassesFromGridOptions(e,this.rowNode),e.length&&e.forEach(o=>{this.allRowGuis.forEach(i=>i.rowComp.toggleCss(o,!0))})}postProcessRowClassRules(){var e;(e=this.beans.rowStyleSvc)==null||e.processRowClassRules(this.rowNode,t=>{this.allRowGuis.forEach(o=>o.rowComp.toggleCss(t,!0))},t=>{this.allRowGuis.forEach(o=>o.rowComp.toggleCss(t,!1))})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,o=>o.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){var l,a;const t=this.getPinnedForContainer(e),o=this.isFullWidth(),{rowNode:i,beans:s}=this,n=[];n.push("ag-row"),n.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&n.push("ag-opacity-zero"),n.push(i.rowIndex%2===0?"ag-row-even":"ag-row-odd"),i.isRowPinned()&&(n.push("ag-row-pinned"),(l=s.pinnedRowModel)!=null&&l.isManual()&&n.push("ag-row-pinned-manual")),!i.isRowPinned()&&i.pinnedSibling&&n.push("ag-row-pinned-source"),i.isSelected()&&n.push("ag-row-selected"),i.footer&&n.push("ag-row-footer"),n.push("ag-row-level-"+this.rowLevel),i.stub&&n.push("ag-row-loading"),o&&n.push("ag-full-width-row"),(a=s.expansionSvc)==null||a.addExpandedCss(n,i),i.dragging&&n.push("ag-row-dragging");const{rowStyleSvc:r}=s;return r&&(r.processClassesFromGridOptions(n,i),r.preProcessRowClassRules(n,i)),n.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&n.push("ag-row-first"),this.isLastRowOnPage()&&n.push("ag-row-last"),o&&(t==="left"&&n.push("ag-cell-last-left-pinned"),t==="right"&&n.push("ag-cell-first-right-pinned")),n}processStylesFromGridOptions(){var e;return((e=this.beans.rowStyleSvc)==null?void 0:e.processStylesFromGridOptions(this.rowNode))??this.emptyStyle}onRowSelected(e){var t;(t=this.beans.selectionSvc)==null||t.onRowCtrlSelected(this,o=>{(o===this.centerGui||o===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){var e;(e=this.beans.selectionSvc)==null||e.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:o}=e,{rowNode:i,beans:s,gos:n}=this;o.addManagedListeners(t,{pointerenter:r=>{r.pointerType==="mouse"&&i.dispatchRowEvent("mouseEnter")},pointerleave:r=>{r.pointerType==="mouse"&&i.dispatchRowEvent("mouseLeave")}}),o.addManagedListeners(i,{mouseEnter:()=>{var r;!((r=s.dragSvc)!=null&&r.dragging)&&!n.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),i.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){const t=e?[e]:this.allRowGuis.map(o=>o.element);for(const o of t)o.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),o=this.applyPaginationOffset(t.top,!0)-100,i=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(o,e),i)}forEachGui(e,t){e?t(e):this.allRowGuis.forEach(t)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;const t=this.rowNode.rowHeight,o=this.beans.environment.getDefaultRowHeight(),s=Jn(this.gos)?_e(this.beans,this.rowNode).height:void 0,n=s?`${Math.min(o,s)-2}px`:void 0;this.forEachGui(e,r=>{r.element.style.height=`${t}px`,n&&r.element.style.setProperty("--ag-line-height",n)})}destroyFirstPass(e=!1){var i;this.active=!1;const{rowNode:t}=this;if(!e&&mt(this.gos)&&!t.sticky)if(t.rowTop!=null){const n=this.roundRowTopToBounds(t.rowTop);this.setRowTop(n)}else this.allRowGuis.forEach(n=>n.rowComp.toggleCss("ag-opacity-zero",!0));(i=this.fullWidthGui)!=null&&i.element.contains(Y(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);const o=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(o),this.beans.eventSvc.dispatchEvent(o),super.destroy()}destroySecondPass(){this.allRowGuis.length=0;const e=t=>(t.list.forEach(o=>o.destroy()),{list:[],map:{}});this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.toggleCss("ag-row-focus",this.rowFocused),t.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e}=this.beans,t=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses())}onPaginationChanged(){var t;const e=((t=this.beans.pagination)==null?void 0:t.getCurrentPage())??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const o=this.beans.pageBounds.getPixelOffset();return e+o*(t?1:-1)}setRowTop(e){if(!this.printLayout&&M(e)){const t=this.applyPaginationOffset(e),s=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(s)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";const t=this.rowNode;let o;if(t.sticky)o=t.stickyRowTop;else{const i=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,s=this.applyPaginationOffset(i);o=t.isRowPinned()?s:this.beans.rowContainerHeight.getRealPixelPosition(s)}return o+"px"}setRowTopStyle(e){this.allRowGuis.forEach(t=>this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`))}getCellCtrl(e,t=!1){let o=null;return this.getAllCellCtrls().forEach(i=>{i.column==e&&(o=i)}),o!=null||t||this.getAllCellCtrls().forEach(i=>{(i==null?void 0:i.getColSpanningList().indexOf(e))>=0&&(o=i)}),o}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){var n,r;const t=this.rowNode.getRowIndexString();if(t===null)return;const o=(((n=this.beans.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:n.getRowCount())??0)+(((r=this.beans.filterManager)==null?void 0:r.getHeaderRowCount())??0),i=this.rowNode.rowIndex%2===0,s=o+this.rowNode.rowIndex+1;this.forEachGui(e,l=>{l.rowComp.setRowIndex(t),l.rowComp.toggleCss("ag-row-even",i),l.rowComp.toggleCss("ag-row-odd",!i),xo(l.element,s)})}};function il(e){var o;return e.altKey||e.ctrlKey||e.metaKey?!1:((o=e.key)==null?void 0:o.length)===1}function xs(e,t,o,i,s){const n=i?i.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const r=_(e,{event:t,editing:s,column:i,node:o,data:o.data,colDef:i.getColDef()});return!!(n&&n(r))}function Yh(e){const{pinnedRowModel:t,rowModel:o}=e,[i,s]=[(t==null?void 0:t.isEmpty("top"))??!0,(t==null?void 0:t.isEmpty("bottom"))??!0],n=i?null:"top";let r,l;s?(r=null,l=o.getRowCount()-1):(r="bottom",l=(t==null?void 0:t.getPinnedBottomRowCount())??-1);const{visibleCols:a,rangeSvc:d}=e,c=a.allCols;!d||!(c!=null&&c.length)||d.setCellRange({rowStartIndex:0,rowStartPinned:n,rowEndIndex:l,rowEndPinned:r})}var Zh=65,Qh=67,Xh=86,Jh=68,eg=90,tg=89;function og(e){const{keyCode:t}=e;let o;switch(t){case Zh:o=y.A;break;case Qh:o=y.C;break;case Xh:o=y.V;break;case Jh:o=y.D;break;case eg:o=y.Z;break;case tg:o=y.Y;break;default:o=e.code}return o}var ig=class extends x{constructor(e){super(),this.element=e}postConstruct(){var e;this.addKeyboardListeners(),this.addMouseListeners(),(e=this.beans.touchSvc)==null||e.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",lr("touchstart")?"touchstart":"mousedown"].forEach(o=>{const i=this.processMouseEvent.bind(this,o);this.addManagedElementListeners(this.element,{[o]:i})})}processMouseEvent(e,t){var s;if(!oo(this.gos,t)||ke(t))return;const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(o!=null&&o.column&&o.dispatchCellContextMenuEvent(t),(s=this.beans.contextMenuSvc)==null||s.handleContextMenuMouseEvent(t,void 0,i,o)):(o&&o.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:qr(t,e),rowCtrl:ar(t,e,li)}}processKeyboardEvent(e,t){const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(o?this.processCellKeyboardEvent(o,e,t):i!=null&&i.isFullWidth()&&this.processFullWidthRowKeyboardEvent(i,e,t))}processCellKeyboardEvent(e,t,o){var n,r;const i=((n=this.editSvc)==null?void 0:n.isEditing(e,{withOpenEditor:!0}))??!1;!xs(this.gos,o,e.rowNode,e.column,i)&&t==="keydown"&&(!i&&((r=this.beans.navigation)!=null&&r.handlePageScrollingKey(o))||e.onKeyDown(o),this.doGridOperations(o,i),il(o)&&e.processCharacter(o)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(o,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,o){const{rowNode:i}=e,{focusSvc:s,navigation:n}=this.beans,r=s.getFocusedCell(),l=r==null?void 0:r.column;if(!xs(this.gos,o,i,l,!1)){const d=o.key;if(t==="keydown")switch(d){case y.PAGE_HOME:case y.PAGE_END:case y.PAGE_UP:case y.PAGE_DOWN:n==null||n.handlePageScrollingKey(o,!0);break;case y.LEFT:case y.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case y.UP:case y.DOWN:e.onKeyboardNavigate(o);break;case y.TAB:e.onTabKeyDown(o);break}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",o))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!oo(this.gos,e))return;const o=og(e),{clipboardSvc:i,undoRedo:s}=this.beans;if(o===y.A)return this.onCtrlAndA(e);if(o===y.C)return this.onCtrlAndC(i,e);if(o===y.D)return this.onCtrlAndD(i,e);if(o===y.V)return this.onCtrlAndV(i,e);if(o===y.X)return this.onCtrlAndX(i,e);if(o===y.Y)return this.onCtrlAndY(s);if(o===y.Z)return this.onCtrlAndZ(s,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:o,selectionSvc:i},gos:s}=this;o&&Je(s)&&t.isRowsToRender()?Yh(this.beans):i&&(i==null||i.selectAllRowNodes({source:"keyboardSelectAll",selectAll:yc(s)})),e.preventDefault()}onCtrlAndC(e,t){var i;if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:o}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.isEditing(o,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){var i;if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:o}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.isEditing(o,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){var i;const{cellCtrl:o}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.isEditing(o,{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==null||e.redo("ui")}},sl=class extends x{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){const t=e.uiContainerHeight,o=t!=null?`${t}px`:"";this.eContainer.style.height=o,this.eViewport&&(this.eViewport.style.height=o)}},di=e=>e.topRowCtrls,ci=e=>e.getStickyTopRowCtrls(),ui=e=>e.getStickyBottomRowCtrls(),hi=e=>e.bottomRowCtrls,gi=e=>e.allRowCtrls,Ds=e=>e.getCtrls("top"),Fs=e=>e.getCtrls("center"),Ps=e=>e.getCtrls("bottom"),sg={center:{type:"center",name:"center-cols",getRowCtrls:gi,getSpannedRowCtrls:Fs},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:gi,getSpannedRowCtrls:Fs},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:gi,getSpannedRowCtrls:Fs},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:gi},topCenter:{type:"center",name:"floating-top",getRowCtrls:di,getSpannedRowCtrls:Ds},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:di,getSpannedRowCtrls:Ds},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:di,getSpannedRowCtrls:Ds},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:di},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:ci},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:ci},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:ci},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:ci},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:ui},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:ui},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:ui},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:ui},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:hi,getSpannedRowCtrls:Ps},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:hi,getSpannedRowCtrls:Ps},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:hi,getSpannedRowCtrls:Ps},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:hi}};function nl(e){return`ag-${ro(e).name}-viewport`}function pi(e){const t=ro(e);return t.container??`ag-${t.name}-container`}function ng(e){return`ag-${ro(e).name}-spanned-cells-container`}function ro(e){return sg[e]}var rg=["topCenter","topLeft","topRight"],lg=["bottomCenter","bottomLeft","bottomRight"],ag=["center","left","right"],dg=["center","left","right","fullWidth"],cg=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],ug=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],hg=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],rl=["stickyTopCenter","stickyTopLeft","stickyTopRight"],ll=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],gg=[...rl,"stickyTopFullWidth",...ll,"stickyBottomFullWidth"],pg=[...rg,...lg,...ag,...rl,...ll],fg=class extends x{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=ro(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new Kh(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,o,i){this.comp=e,this.eContainer=t,this.eSpannedContainer=o,this.eViewport=i,this.createManagedBean(new ig(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:s,rangeSvc:n}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(ug,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s==null?void 0:s.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(hg,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s==null?void 0:s.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(dg,()=>this.createManagedBean(new sl(this.eContainer,this.name==="center"?i:void 0))),n&&this.forContainers(pg,()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer))),this.forContainers(cg,()=>this.createManagedBean(new Rs(l=>this.comp.setContainerWidth(`${l}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){const{spannedRowRenderer:e,gos:t}=this.beans,o=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:o,displayedColumnsWidthChanged:o,displayedRowsChanged:i=>this.onDisplayedRowsChanged(i.afterScroll)}),o(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const i=this.options.getSpannedRowCtrls(e);i&&this.comp.setSpannedRowCtrls(i,!1)}})}listenOnDomOrder(){if(gg.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const o=this.gos.get("ensureDomOrder"),i=ee(this.gos,"print");this.comp.setDomOrder(o||i)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=o=>{e.dragging&&o.cancelable&&o.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),o=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,o,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return Ut(this.eViewport)}getCenterViewportScrollLeft(){return Do(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=Ze(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return On(this.eViewport)}getViewportScrollLeft(){return Do(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||Nn(this.eViewport)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){Fo(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}const o=ee(this.gos,"print"),s=this.gos.get("embedFullWidthRows")||o,n=t.filter(r=>{const l=r.isFullWidth();return this.options.fullWidth?!s&&l:s||!l});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},al="ag-force-vertical-scroll",Cg="ag-selectable",mg="ag-column-moving",wg=class extends x{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,o,i,s,n,r){var l,a;this.comp=e,this.eGridBody=t,this.eBodyViewport=o,this.eTop=i,this.eBottom=s,this.eStickyTop=n,this.eStickyBottom=r,this.eCenterColsViewport=o.querySelector(`.${nl("center")}`),this.eFullWidthContainer=o.querySelector(`.${pi("fullWidth")}`),this.eStickyTopFullWidthContainer=n.querySelector(`.${pi("stickyTopFullWidth")}`),this.eStickyBottomFullWidthContainer=r.querySelector(`.${pi("stickyBottomFullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",d=>this.setCellTextSelection(d.currentValue)),this.createManagedBean(new bs(this.comp)),this.scrollFeature=this.createManagedBean(new Uh(o)),(l=this.beans.rowDragSvc)==null||l.setupRowDrag(o,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([i,o,s,n,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),(a=this.filterManager)==null||a.setupAdvFilterHeaderComp(i),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this),o=this.toggleRowResizeStyles.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,pinnedRowsChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t,rowResizeStarted:o,rowResizeEnded:o}),this.addManagedPropertyListener("treeData",t)}toggleRowResizeStyles(e){const t=e.type==="rowResizeStarted";this.eBodyViewport.classList.toggle("ag-prevent-animation",t)}onGridColumnsChanged(){const e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();const o=t&&e.getScrollbarWidth()||0,i=kn()?16:0,s=`calc(100% + ${o+i}px)`;Ne(this.beans,()=>this.comp.setBodyViewportWidth(s)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t}=this;let o=this.gos.get("treeData");if(!o){const i=t.isPivotMode();o=(e?e.columns.length:0)>=(i?2:1)}this.comp.setGridRootRole(o?"treegrid":"grid")}addFocusListeners(e){e.forEach(t=>{this.addManagedElementListeners(t,{focusin:o=>{const{target:i}=o,s=pt(i,"ag-root",t);t.classList.toggle("ag-has-focus",!s)},focusout:o=>{const{target:i,relatedTarget:s}=o,n=t.contains(s),r=pt(s,"ag-root",t);pt(i,"ag-root",t)||(!n||r)&&t.classList.remove("ag-has-focus")}})})}setColumnMovingCss(e){this.comp.setColumnMovingCss(mg,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(Cg,e)}updateScrollingClasses(){const{eGridBody:{classList:e},scrollVisibleSvc:t}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){var e;(e=this.beans.editSvc)==null||e.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){var s,n;const e=(((s=this.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:s.getRowCount())??0)+(((n=this.filterManager)==null?void 0:n.getHeaderRowCount())??0),{rowModel:t}=this.beans,o=t.isLastRowIndexKnown()?t.getRowCount():-1,i=o===-1?-1:e+o;this.comp.setRowCount(i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const e=this.gos.get("alwaysShowVerticalScroll"),t=e?al:null,o=ee(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||o&&_n(this.eBodyViewport)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let o=t.sizesMeasured;const i=()=>{const s=o&&mt(this.gos)&&!e.stretching,n=s?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(n,s)};i(),this.addManagedEventListeners({heightScaleChanged:i}),this.addManagedPropertyListener("animateRows",i),this.addManagedEventListeners({gridStylesChanged:()=>{!o&&t.sizesMeasured&&(o=!0,i())}})}addBodyViewportListener(){const{eBodyViewport:e,eStickyTop:t,eStickyBottom:o,eTop:i,eBottom:s,beans:{popupSvc:n,touchSvc:r}}=this,l=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:l}),r==null||r.mockBodyContextMenu(this,l),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,n)});const a=this.onStickyWheel.bind(this);for(const c of[t,o,i,s])this.addManagedElementListeners(c,{wheel:a});const d=this.onHorizontalWheel.bind(this);for(const c of["left","right","topLeft","topRight","bottomLeft","bottomRight"])this.addManagedElementListeners(this.ctrlsSvc.get(c).eContainer,{wheel:d});this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:o,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(o))&&oo(this.gos,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onHorizontalWheel(e){const{deltaX:t,deltaY:o,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(o))&&this.scrollGridBodyToMatchEvent(e)}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:o}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||o})}onBodyViewportContextMenu(e,t,o){var s;if(!e&&!o)return;this.gos.get("preventDefaultOnContextMenu")&&(e||o).preventDefault();const{target:i}=e||t;(i===this.eBodyViewport||i===this.ctrlsSvc.get("center").eViewport)&&((s=this.beans.contextMenuSvc)==null||s.showContextMenu({mouseEvent:e,touchEvent:o,value:null,anchorToElement:this.eGridBody,source:"ui"}))}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e!=null&&e.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){const{pinnedRowModel:e,beans:{environment:t}}=this,o=e==null?void 0:e.getPinnedTopTotalHeight(),i=e==null?void 0:e.getPinnedBottomTotalHeight(),s=t.getPinnedRowBorderWidth(),n=t.getRowBorderWidth(),r=s-n,l=o?r+o:0,a=i?r+i:0;this.comp.setTopHeight(l),this.comp.setBottomHeight(a),this.comp.setTopInvisible(l<=0),this.comp.setBottomInvisible(a<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){var s,n;const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(((s=this.filterManager)==null?void 0:s.getHeaderHeight())??0),o=((n=this.pinnedRowModel)==null?void 0:n.getPinnedTopTotalHeight())??0;let i=0;t>0&&(i+=t),o>0&&(i+=o),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:o}=this,i=(e==null?void 0:e.getPinnedBottomTotalHeight())??0,n=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,r=i+n;o.setStickyBottomBottom(`${r}px`)}},dl=class extends j{constructor(e,t){super(),this.direction=t,this.eViewport=A,this.eContainer=A,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",An()||gt())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=kn(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.toggleCss("ag-scrollbar-active",!0),o=()=>this.toggleCss("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:o,touchend:o})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),Ne(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;lc(()=>Me(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},vg={tag:"div",cls:"ag-body-horizontal-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eLeftSpacer",cls:"ag-horizontal-left-spacer"},{tag:"div",ref:"eViewport",cls:"ag-body-horizontal-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-horizontal-scroll-container"}]},{tag:"div",ref:"eRightSpacer",cls:"ag-horizontal-right-spacer"}]},bg=class extends dl{constructor(){super(vg,"horizontal"),this.eLeftSpacer=A,this.eRightSpacer=A,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.createManagedBean(new Rs(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){var t;if(!this.invisibleScrollbar)return;const e=((t=this.beans.pinnedRowModel)==null?void 0:t.getPinnedBottomTotalHeight())??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleSvc.verticalScrollShowing;let t=this.visibleCols.getDisplayedColumnsRightWidth();const o=!this.enableRtl&&e,i=this.scrollVisibleSvc.getScrollbarWidth();o&&(t+=i),Ve(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=i);let s=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(s+=i),Ve(this.eLeftSpacer,s),this.eLeftSpacer.classList.toggle("ag-scroller-corner",s<=i)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,o=this.gos.get("suppressHorizontalScroll"),i=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,n=o?0:i===0&&t?16:i,r=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),Yi(this.getGui(),n),Yi(this.eViewport,n),Yi(this.eContainer,n),n||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(r,100):r()}getScrollPosition(){return Do(this.eViewport,this.enableRtl)}setScrollPosition(e){Me(this.eViewport)||this.attemptSettingScrollPosition(e),Fo(this.eViewport,e,this.enableRtl)}},Sg={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:bg},yg={tag:"div",cls:"ag-body-vertical-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eViewport",cls:"ag-body-vertical-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-vertical-scroll-container"}]}]},Rg=class extends dl{constructor(){super(yg,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new sl(this.eContainer));const{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){const{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,o=this.invisibleScrollbar,i=t&&e.getScrollbarWidth()||0,s=i===0&&o?16:i;this.toggleCss("ag-scrollbar-invisible",o),Ve(this.getGui(),s),Ve(this.eViewport,s),Ve(this.eContainer,s),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const o=e.getGridBodyCtrl().eBodyViewport,i=this.getScrollPosition(),s=o.scrollTop;i!=s&&this.setScrollPosition(s,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!Me(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},Eg={selector:"AG-FAKE-VERTICAL-SCROLL",component:Rg};function Ee(e){var t;return((t=e.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:t.getRowCount())??0}function Ts(e){const t=[],o=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const i of o){if(!i)continue;const s=i.getGroupRowCount()||0;for(let n=0;n<s;n++){const r=i.getGroupRowCtrlAtIndex(n),l=t[n];if(r){const a=xg(e,r);(l==null||a>l)&&(t[n]=a)}}}return t}function xg(e,t){let i=e.colModel.isPivotMode()?Fg(e):ul(e);const s=t.getHeaderCellCtrls();for(const n of s){const{column:r}=n,l=r.getAutoHeaderHeight();l!=null&&l>i&&r.isAutoHeaderHeight()&&(i=l)}return i}function Is(e){let o=e.colModel.isPivotMode()?Dg(e):lo(e);return e.colModel.forAllCols(i=>{const s=i.getAutoHeaderHeight();s!=null&&s>o&&i.isAutoHeaderHeight()&&(o=s)}),o}function lo(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function cl(e){return e.gos.get("floatingFiltersHeight")??lo(e)}function ul(e){return e.gos.get("groupHeaderHeight")??lo(e)}function Dg(e){return e.gos.get("pivotHeaderHeight")??lo(e)}function Fg(e){return e.gos.get("pivotGroupHeaderHeight")??ul(e)}var Pg=class extends x{setComp(e,t,o){this.comp=e,this.eGui=t;const{beans:i}=this,{headerNavigation:s,touchSvc:n,ctrlsSvc:r}=i;s&&this.createManagedBean(new ri(o,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,i),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,i)}),this.onPivotModeChanged(i),this.setupHeaderHeight();const l=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:l}),n==null||n.mockHeaderContextMenu(this,l),r.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({headerRowsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>Ne(this.beans,()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){var n;const{beans:e}=this;let t=0;const o=Ts(e).reduce((r,l)=>r+l,0),i=Is(e);if((n=e.filterManager)!=null&&n.hasFloatingFilters()&&(t+=cl(e)),t+=o,t+=i,this.headerHeight===t)return;this.headerHeight=t;const s=`${t+1}px`;this.comp.setHeightAndMinHeight(s),this.eventSvc.dispatchEvent({type:"headerHeightChanged"})}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const o=e.visibleCols.allCols.some(i=>i.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",o)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),o=e.shiftKey,i=o!==t?"LEFT":"RIGHT",{beans:s}=this,{headerNavigation:n,focusSvc:r}=s;(n.navigateHorizontally(i,!0,e)||!o&&r.focusOverlay(!1)||to(s,o,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:o}=this.beans;switch(e.key){case y.LEFT:t="LEFT";case y.RIGHT:{M(t)||(t="RIGHT"),o.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case y.UP:t="UP";case y.DOWN:{M(t)||(t="DOWN"),o.navigateVertically(t,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:o,beans:i}=this;!t&&o.contains(Y(i))||o.contains(t)||(i.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,o){var r;const{menuSvc:i,ctrlsSvc:s}=this.beans;if(!e&&!o||!(i!=null&&i.isHeaderContextMenuEnabled()))return;const{target:n}=e??t;(n===this.eGui||n===((r=s.getHeaderRowContainerCtrl())==null?void 0:r.eViewport))&&i.showHeaderContextMenu(void 0,e,o)}},As=class extends j{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},Tg={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"}]},Ig=class extends As{constructor(e){super(Tg,e),this.eResize=A,this.eHeaderCompWrapper=A,this.headerCompVersion=0}postConstruct(){const e=this.getGui(),t=(s,n)=>{n!=null&&n!=""?e.setAttribute(s,n):e.removeAttribute(s)},o=()=>{const s=this.ctrl.getSelectAllGui();s&&(this.eResize.insertAdjacentElement("afterend",s),this.addDestroyFunc(()=>s.remove()))};t("col-id",this.ctrl.column.getColId());const i={setWidth:s=>e.style.width=s,toggleCss:(s,n)=>this.toggleCss(s,n),setUserStyles:s=>Kt(e,s),setAriaSort:s=>s?Yd(e,s):Zd(e),setUserCompDetails:s=>this.setUserCompDetails(s),getUserCompInstance:()=>this.headerComp,refreshSelectAllGui:o,removeSelectAllGui:()=>{var s;return(s=this.ctrl.getSelectAllGui())==null?void 0:s.remove()}};this.ctrl.setComp(i,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0),o()}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;const t=this.headerCompVersion;e.newAgStackInstance().then(o=>this.afterCompCreated(t,o))}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())}},Ag={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"}]},Mg=class extends As{constructor(e){super(Ag,e),this.eResize=A,this.eHeaderCompWrapper=A}postConstruct(){const e=this.getGui(),t=(i,s)=>s!=null?e.setAttribute(i,s):e.removeAttribute(i);e.setAttribute("col-id",this.ctrl.column.getUniqueId());const o={toggleCss:(i,s)=>this.toggleCss(i,s),setUserStyles:i=>Kt(e,i),setHeaderWrapperHidden:i=>{i?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:i=>{i!=null?this.eHeaderCompWrapper.style.setProperty("max-height",`${i}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",i!=null)},setResizableDisplayed:i=>Z(this.eResize,i),setWidth:i=>e.style.width=i,setAriaExpanded:i=>t("aria-expanded",i),setUserCompDetails:i=>this.setUserCompDetails(i),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(o,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 o=this.getGui(),i=e.getGui();this.eHeaderCompWrapper.appendChild(i),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(o)}},kg={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"}}]}]},Lg=class extends As{constructor(e){super(kg,e),this.eFloatingFilterBody=A,this.eButtonWrapper=A,this.eButtonShowMainFilter=A}postConstruct(){const e=this.getGui(),t={toggleCss:(o,i)=>this.toggleCss(o,i),setUserStyles:o=>Kt(e,o),addOrRemoveBodyCssClass:(o,i)=>this.eFloatingFilterBody.classList.toggle(o,i),setButtonWrapperDisplayed:o=>Z(this.eButtonWrapper,o),setCompDetails:o=>this.setCompDetails(o),getFloatingFilterComp:()=>this.compPromise,setWidth:o=>e.style.width=o,setMenuIcon:o=>this.eButtonShowMainFilter.appendChild(o)};this.ctrl.setComp(t,e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(t=>this.afterCompCreated(t))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(e){if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()}}},Gg=class extends j{constructor(e){super({tag:"div",cls:e.headerRowClass,role:"row"}),this.ctrl=e,this.headerComps={}}postConstruct(){xo(this.getGui(),this.ctrl.getAriaRowIndex());const e={setHeight:t=>this.getGui().style.height=t,setTop:t=>this.getGui().style.top=t,setHeaderCtrls:(t,o)=>this.setHeaderCtrls(t,o),setWidth:t=>this.getGui().style.width=t,setRowIndex:t=>xo(this.getGui(),t)};this.ctrl.setComp(e,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;const o=this.headerComps;if(this.headerComps={},e.forEach(i=>{const s=i.instanceId;let n=o[s];delete o[s],n==null&&(n=this.createHeaderComp(i),this.getGui().appendChild(n.getGui())),this.headerComps[s]=n}),Object.values(o).forEach(i=>{this.getGui().removeChild(i.getGui()),this.destroyBean(i)}),t){const i=Object.values(this.headerComps);i.sort((n,r)=>{const l=n.getCtrl().column.getLeft(),a=r.getCtrl().column.getLeft();return l-a});const s=i.map(n=>n.getGui());Vn(this.getGui(),s)}}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new Mg(e);break;case"filter":t=new Lg(e);break;default:t=new Ig(e);break}return this.createBean(t),t.setParentComponent(this),t}},hl=class extends x{constructor(e,t,o,i){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=i,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=o}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){const{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?$(t):this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const{gos:e,colAnimation:t}=this.beans,o=e.get("suppressColumnMoveAnimation"),i=M(this.columnOrGroup.getOldLeft());(t==null?void 0:t.isActive())&&i&&!o?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),o=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=o,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===o&&this.setLeft(o)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){const{gos:o,visibleCols:i}=this.beans;if(!ee(o,"print")||e.getPinned()==="left")return t;const n=i.getColsLeftWidth();if(e.getPinned()==="right"){const r=i.bodyWidth;return n+r+t}return n+t}setLeft(e){if(M(e)&&(this.eCell.style.left=`${e}px`),Q(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&qd(this.ariaEl,t.length)}}},Hg=0,gl="headerCtrl",pl=class extends x{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.instanceId=e.getUniqueId()+"-"+Hg++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}shouldStopEventPropagation(e){const{headerRowIndex:t,column:o}=this.beans.focusSvc.focusedHeader,i=o.getDefinition(),s=i&&i.suppressHeaderKeyboardEvent;if(!M(s))return!1;const n=_(this.gos,{colDef:i,column:o,headerRowIndex:t,event:e});return!!s(n)}getWrapperHasFocus(){return Y(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 o;if(typeof t=="function"){const i=this.getHeaderClassParams();o=t(i)}else o=t;o&&this.comp.setUserStyles(o)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:o,compBean:i}=e,{beans:s}=this,n=u=>{if(!this.isAlive()||!i.isAlive())return;const{paddingTop:h,paddingBottom:g,borderBottomWidth:p,borderTopWidth:f}=Ye(this.eGui),C=h+g+p+f,w=t.offsetHeight+C;if(u<5){const b=J(s),v=!b||!b.contains(t),S=w==0;if(v||S){es(()=>n(u+1),"raf",s);return}}this.setColHeaderHeight(this.column,w)};let r=!1,l;const a=()=>{const u=this.column.isAutoHeaderHeight();u&&!r&&d(),!u&&r&&c()},d=()=>{r=!0,n(0),this.comp.toggleCss("ag-header-cell-auto-height",!0),l=Ze(this.beans,t,()=>n(0))},c=()=>{r=!1,l&&l(),this.comp.toggleCss("ag-header-cell-auto-height",!1),l=void 0};a(),i.addDestroyFunc(()=>c()),i.addManagedListeners(this.column,{widthChanged:()=>r&&n(0)}),i.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>n(0))}}),o&&o(a)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:o,eGui:i}=this;!e||!t||!i||(Ur(e,t,o.visibleCols),Fn(i,o.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=rt(this.beans);this.eGui&&ce(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){var n;const t=Y(this.beans),o=e.key===y.LEFT||e.key===y.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey||((this.isResizing||o)&&(e.preventDefault(),e.stopImmediatePropagation()),!o))return;const s=e.key===y.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const r=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(r,e.shiftKey),(n=this.resizeFeature)==null||n.toggleColumnResizing(!0)}else this.moveHeader(s)}moveHeader(e){var t;(t=this.beans.colMoves)==null||t.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:o}=this.beans;return o?o.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:o}=this;let i=e.key===y.LEFT!==t.get("enableRtl");const s=o.getPinned(),n=t.get("enableRtl");return s&&n!==(s==="right")&&(i=!i),(i?-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(()=>{var e;(e=this.resizeFeature)==null||e.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case y.PAGE_DOWN:case y.PAGE_UP:case y.PAGE_HOME:case y.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=gl,{eGui:o,gos:i}=this;Xe(i,o,t,this),e.addDestroyFunc(()=>Xe(i,o,t,null))}focus(e){const{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus(),!0):!1}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){var e;this.dragSource&&((e=this.beans.dragAndDrop)==null||e.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,o){const i=e??t,{menuSvc:s,gos:n}=this.beans;n.get("preventDefaultOnContextMenu")&&i.preventDefault(),s!=null&&s.isHeaderContextMenuEnabled(o)&&s.showHeaderContextMenu(o,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",o)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:o}=this;e.isColumn?o.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):o.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}},Og=class extends pl{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}setComp(e,t,o,i,s){this.comp=e;const{rowCtrl:n,column:r,beans:l}=this,{colResize:a,context:d,colHover:c,rangeSvc:u}=l,h=Ko(this,d,s);this.setGui(t,h),this.updateState(),this.setupWidth(h),this.setupMovingCss(h),this.setupMenuClass(h),this.setupSortableClass(h),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:i,checkMeasuringCallback:p=>this.setRefreshFunction("measuring",p),compBean:h}),this.addColumnHoverListener(h),this.setupFilterClass(h),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(h),this.setupSelectAll(h),this.setupUserComp(),this.refreshAria(),a?this.resizeFeature=h.createManagedBean(a.createResizeFeature(n.pinned,r,o,e,this)):Z(o,!1),c==null||c.createHoverFeature(h,[r],t),u==null||u.createRangeHighlightFeature(h,r,e),h.createManagedBean(new hl(r,t,l)),h.createManagedBean(new ri(t,{shouldStopEventPropagation:p=>this.shouldStopEventPropagation(p),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(h),h.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),h.addManagedListeners(r,{colDefChanged:()=>this.refresh()}),h.addManagedListeners(r,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const g=()=>this.checkDisplayName();h.addManagedEventListeners({columnValueChanged:g,columnRowGroupChanged:g,columnPivotChanged:g,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),h.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){var o;(o=this.beans.colResize)==null||o.resizeHeader(this.column,e,t)}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.colDef;return _(t.gos,{colDef:o,column:e,floatingFilter:!1})}setupUserComp(){const e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return Du(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:o,gos:i}=this.beans;return _(i,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!(e!=null&&e.isHeaderFilterButtonEnabled(this.column)),enableFilterIcon:!!o&&(!this.openFilterEnabled||Bo(this.gos)),showColumnMenu:(n,r)=>{e==null||e.showColumnMenu({column:this.column,buttonElement:n,positionBy:"button",onClosedCallback:r})},showColumnMenuAfterMouseClick:(n,r)=>{e==null||e.showColumnMenu({column:this.column,mouseEvent:n,positionBy:"mouse",onClosedCallback:r})},showFilter:n=>{e==null||e.showFilterMenu({column:this.column,buttonElement:n,containerType:"columnFilter",positionBy:"button"})},progressSort:n=>{t==null||t.progressSort(this.column,!!n,"uiColumnSorted")},setSort:(n,r)=>{t==null||t.setSortForColumn(this.column,n,!!r,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(n,r)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}})}setupSelectAll(e){var o;const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),(o=this.selectAllFeature)==null||o.setComp(this),e.addManagedPropertyListener("rowSelection",()=>{var s;const i=t.createSelectAllFeature(this.column);i&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(i),(s=this.selectAllFeature)==null||s.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!i&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}getSelectAllGui(){var e;return(e=this.selectAllFeature)==null?void 0:e.getCheckboxGui()}handleKeyDown(e){var t;super.handleKeyDown(e),e.key===y.SPACE&&((t=this.selectAllFeature)==null||t.onSpaceKeyDown(e)),e.key===y.ENTER&&this.onEnterKeyDown(e),e.key===y.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){var t;e.ctrlKey||e.metaKey?this.showMenuOnKeyPress(e,!0):this.sortable&&((t=this.beans.sortSvc)==null||t.progressSort(this.column,e.shiftKey,"uiColumnSorted"))}showMenuOnKeyPress(e,t){const o=this.comp.getUserCompInstance();fl(o)&&o.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),wh()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){var o;this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),o=$r(t,this.gos,this.column,null),i=this.userHeaderClasses;this.userHeaderClasses=new Set(o),o.forEach(s=>{i.has(s)?i.delete(s):this.comp.toggleCss(s,!0)}),i.forEach(s=>this.comp.toggleCss(s,!1))};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){var t;this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=((t=this.beans.colMoves)==null?void 0:t.setDragSourceForHeader(e,this.column,this.displayName))??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!(e!=null&&e.isColumnMenuInHeaderEnabled(this.column)),this.openFilterEnabled=!!(e!=null&&e.isFilterMenuInHeaderEnabled(this.column)),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),Object.values(this.refreshFunctions).forEach(e=>e())}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const t=()=>{const o=this.column.getActualWidth();this.comp.setWidth(`${o}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{var o;(o=this.comp)==null||o.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 o=this.column.isFilterActive();this.comp.toggleCss("ag-header-cell-filtered",o),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,o=e===1;this.comp.toggleCss("ag-header-highlight-before",t),this.comp.toggleCss("ag-header-highlight-after",o)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){var h;const{eGui:e,column:t,comp:o,beans:i}=this,s=Ts(this.beans),n=s.reduce((g,p)=>g+=p,0)===0;if(o.toggleCss("ag-header-parent-hidden",n),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),o.toggleCss("ag-header-span-height",!1),o.toggleCss("ag-header-span-total",!1);return}const{numberOfParents:r,isSpanningTotal:l}=this.column.getColumnGroupPaddingInfo();o.toggleCss("ag-header-span-height",r>0);const a=Is(i);if(r===0){o.toggleCss("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${a}px`);return}o.toggleCss("ag-header-span-total",l);const d=(((h=this.column.getFirstRealParent())==null?void 0:h.getLevel())??-1)+1,c=s.length-d;let u=0;for(let g=0;g<c;g++)u+=s[s.length-1-g];e.style.setProperty("top",`${-u}px`),e.style.setProperty("height",`${a+u}px`)}refreshAriaSort(){var e;if(this.sortable){const t=this.getLocaleTextFunc(),o=((e=this.beans.sortSvc)==null?void 0:e.getDisplaySortForColumn(this.column))||null;this.comp.setAriaSort(Od(o)),this.setAriaDescriptionProperty("sort",t("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!Bo(this.gos)){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){const e=this.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(e,t){t!=null?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){var t;if(!this.eGui.contains(Y(this.beans)))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((o,i)=>o==="filter"?-1:i.charCodeAt(0)-o.charCodeAt(0)).map(o=>this.ariaDescriptionProperties.get(o)).join(". ");(t=this.beans.ariaAnnounce)==null||t.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){var t;(t=this.beans.colHover)==null||t.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=s=>this.handleMouseOverChange(s.type==="mouseenter"),o=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},i=s=>this.handleContextMenuMouseEvent(s,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:o,contextmenu:i})}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 fl(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function fl(e){return typeof(e==null?void 0:e.getAnchorElementForMenu)=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var Bg=0,Ms=class extends x{constructor(e,t,o){super(),this.rowIndex=e,this.pinned=t,this.type=o,this.instanceId=Bg++,this.comp=null,this.allCtrls=[];let i="ag-header-row-column";o==="group"?i="ag-header-row-group":o==="filter"&&(i="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${i}`}setRowIndex(e){var t;this.rowIndex=e,(t=this.comp)==null||t.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=ee(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.allCtrls.every(e=>e.eGui!=null):!1}setComp(e,t,o=!0){this.comp=e,t=Ko(this,this.beans.context,t),o&&(this.setRowIndex(this.rowIndex),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this),o=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:o,virtualColumnsChanged:i=>this.onVirtualColumnsChanged(i.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",o),e.addManagedPropertyListener("ensureDomOrder",i=>this.isEnsureDomOrder=i.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=ee(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleCols:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){if(!this.comp)return;const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let e=0;const t=Ts(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 o=Is(this.beans);if(this.type==="column")return{topOffset:e,rowHeight:o};e+=o;const i=cl(this.beans);return{topOffset:e,rowHeight:i}}onVirtualColumnsChanged(e=!1){if(!this.comp)return;const t=this.getUpdatedHeaderCtrls(),o=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,o,e)}getUpdatedHeaderCtrls(){const e=this.ctrlsById;this.ctrlsById=new Map;const t=this.getColumnsInViewport();for(const i of t)this.recycleAndCreateHeaderCtrls(i,this.ctrlsById,e);const o=i=>{const{focusSvc:s,visibleCols:n}=this.beans;return s.isHeaderWrapperFocused(i)?n.isVisible(i.column):!1};if(e)for(const[i,s]of e)o(s)?this.ctrlsById.set(i,s):this.destroyBean(s);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,o){if(e.isEmptyGroup())return;const i=e.getUniqueId();let s;if(o&&(s=o.get(i),o.delete(i)),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 Og(e,this));break}t.set(i,s)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];const e=[];return["left",null,"right"].forEach(t=>{e.push(...this.getComponentsToRender(t))}),e}getComponentsToRender(e=this.pinned){return this.type==="group"?this.beans.colViewport.getHeadersToRender(e,this.rowIndex):this.beans.colViewport.getColumnHeadersToRender(e)}focusHeader(e,t){const o=this.allCtrls.find(s=>s.column==e);return o?o.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},Vg=class extends x{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;const{pinnedCols:o,ctrlsSvc:i,colModel:s,colMoves:n}=this.beans;this.setupCenterWidth(),o==null||o.setupHeaderPinnedWidth(this),this.setupDragAndDrop(n,this.eViewport);const r=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:r,advancedFilterEnabledChanged:r});const l=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;i.register(l,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:o,visibleCols:i}=this.beans;let s=0;const n=t.getFocusHeaderToUseAfterRefresh(),r=()=>{const u=i.headerGroupRowCount;s=u;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 Ms(g,this.pinned,"group"));this.groupsRowCtrls.push(p)}}},l=()=>{const u=s++;if(this.hidden){this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl);return}this.columnsRowCtrl==null||!e?(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new Ms(u,this.pinned,"column"))):this.columnsRowCtrl.rowIndex!==u&&this.columnsRowCtrl.setRowIndex(u)},a=()=>{this.includeFloatingFilter=!!(o!=null&&o.hasFloatingFilters())&&!this.hidden;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 Ms(h,this.pinned,"filter"))},d=this.getAllCtrls();r(),l(),a();const c=this.getAllCtrls();this.comp.setCtrls(c),this.restoreFocusOnHeader(t,n),d.length!==c.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){const t=o=>o==null?void 0:o.getHeaderCellCtrls().find(i=>i.column===e);if(et(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let o=0;o<this.groupsRowCtrls.length;o++){const i=t(this.groupsRowCtrls[o]);if(i)return i}}getHtmlElementForColumnHeader(e){var t;return((t=this.getHeaderCtrlForColumn(e))==null?void 0:t.eGui)??null}getRowType(e){var t;return(t=this.getAllCtrls()[e])==null?void 0:t.type}focusHeader(e,t,o){const s=this.getAllCtrls()[e];return s?s.focusHeader(t,o):!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 o=e==null?void 0:e.createBodyDropTarget(this.pinned,t);o&&this.createManagedBean(o)}restoreFocusOnHeader(e,t){if(!t)return;const{column:o}=t;o.getPinned()==this.pinned&&e.focusHeaderPosition({headerPosition:t})}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new Rs(e=>this.comp.setCenterWidth(`${e}px`),!0))}},ks=class extends j{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},fi=class extends ks{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.errorMessages=null}},Cl=class extends j{constructor(){super()}},Ng={tag:"span",cls:"ag-overlay-loading-center",attrs:{"aria-live":"polite","aria-atomic":"true"}},_g=class extends Cl{init(){var t;const e=qe((t=this.gos.get("overlayLoadingTemplate"))==null?void 0:t.trim());if(this.setTemplate(e??Ng),!e){const o=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=o("loadingOoo","Loading...")})}}},Wg={tag:"span",cls:"ag-overlay-no-rows-center"},zg=class extends Cl{init(){var t;const e=qe((t=this.gos.get("overlayNoRowsTemplate"))==null?void 0:t.trim());if(this.setTemplate(e??Wg),!e){const o=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=o("noRowsToShow","No Rows To Show")})}}};function $g(e,t,o){const i=Tt(e,t,o);if(i){const{className:n}=i;if(typeof n=="string"&&n.indexOf("ag-icon")>-1||typeof n=="object"&&n["ag-icon"])return i}const s=X({tag:"span"});return s.appendChild(i),s}function Tt(e,t,o){var n;let i=null;e==="smallDown"?k(262):e==="smallLeft"?k(263):e==="smallRight"&&k(264);const s=o&&o.getColDef().icons;if(s&&(i=s[e]),t.gos&&!i){const r=t.gos.get("icons");r&&(i=r[e])}if(i){let r;if(typeof i=="function")r=i();else if(typeof i=="string")r=i;else{k(38,{iconName:e});return}if(typeof r=="string")return qi(r);if(Qi(r))return r;k(133,{iconName:e});return}else{const r=t.registry.getIcon(e);return r||(n=t.validation)==null||n.validateIcon(e),X({tag:"span",cls:`ag-icon ag-icon-${r??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var Ug=".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}",Kg={tag:"div",children:[{tag:"div",ref:"eGhost",cls:"ag-dnd-ghost ag-unselectable",children:[{tag:"span",ref:"eIcon",cls:"ag-dnd-ghost-icon ag-shake-left-to-right"},{tag:"div",ref:"eLabel",cls:"ag-dnd-ghost-label"}]}]},jg=class extends j{constructor(){super(),this.dragSource=null,this.eIcon=A,this.eLabel=A,this.eGhost=A,this.registerCSS(Ug)}postConstruct(){const e=t=>$g(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(Kg),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eIcon:o,dragSource:i,dropIconMap:s,gos:n}=this;he(o);let r=null;e||(e=i!=null&&i.getDefaultIconName?i.getDefaultIconName():"notAllowed"),r=s[e],o.classList.toggle("ag-shake-left-to-right",t),!(r===s.hide&&n.get("suppressDragLeaveHidesColumns"))&&r&&o.appendChild(r)}setLabel(e){this.eLabel.textContent=e}},qg=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",Yg=class extends j{constructor(e,t,o){super(t,o),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(qg)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:o,labelAlignment:i,disabled:s}=this.config;s!=null&&this.setDisabled(s),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),o!=null&&this.setLabelWidth(o),this.setLabelAlignment(i||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;he(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(Z(t,!1),Be(t,"presentation")):(Z(t,!0),Be(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 o=this.getGui().classList;return o.toggle("ag-label-align-left",e==="left"),o.toggle("ag-label-align-right",e==="right"),o.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:(To(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return Gn(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},ml=class extends Yg{constructor(e,t,o,i){super(e,t,o),this.className=i}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:o}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),o!=null&&this.onValueChange(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(),o=this.getLabel();o==null||o==""||Bd(e)!==null?$t(e,""):$t(e,t??"")}setAriaLabel(e){return zt(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 Ve(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function Zg(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 Ls=class extends ml{constructor(e,t,o="text",i="input"){super(e,(e==null?void 0:e.template)??Zg(i),[],t),this.inputType=o,this.displayFieldTag=i,this.eLabel=A,this.eWrapper=A,this.eInput=A}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:o,className:i}=this;e.classList.add(`${i}-label`),t.classList.add(`${i}-input-wrapper`),o.classList.add(`${i}-input`),this.addCss("ag-input-field"),o.id=o.id||`ag-${this.getCompId()}-input`;const{inputName:s,inputWidth:n}=this.config;s!=null&&this.setInputName(s),n!=null&&this.setInputWidth(n),this.addInputListeners(),this.activateTabIndex([o])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,ce(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return To(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 ce(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return zt(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Gn(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)ce(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";ce(this.eInput,"autocomplete",t)}return this}},wl=class extends Ls{constructor(e,t="ag-checkbox",o="checkbox"){super(e,t,o),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const o=this.eInput;o.checked=e,o.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,o){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:o});const i=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:i.id,name:i.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),o=this.selected=e.target.checked;this.refreshSelectedClass(o),this.dispatchChange(o,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},Gs={selector:"AG-CHECKBOX",component:wl},Qg=".ag-checkbox-cell{height:100%}",Xg={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},Jg=class extends j{constructor(){super(Xg,[Gs]),this.eCheckbox=A,this.registerCSS(Qg)}init(e){this.refresh(e);const{eCheckbox:t,beans:o}=this,i=t.getInputElement();i.setAttribute("tabindex","-1"),xn(i,"polite"),this.addManagedListeners(i,{click:s=>{if(vt(s),t.isDisabled())return;const n=t.getValue();this.onCheckboxChanged(n)},dblclick:s=>{vt(s)}}),this.addManagedElementListeners(e.eGridCell,{keydown:s=>{if(s.key===y.SPACE&&!t.isDisabled()){e.eGridCell===Y(o)&&t.toggle();const n=t.getValue();this.onCheckboxChanged(n),s.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,o=!0;const{value:i,column:s,node:n}=e;if(n.group&&s)if(typeof i=="boolean")t=i;else{const u=s.getColId();u.startsWith(Wo)?t=i==null||i===""?void 0:i==="true":n.aggData&&n.aggData[u]!==void 0?t=i??void 0:o=!1}else t=i??void 0;const{eCheckbox:r}=this;if(!o){r.setDisplayed(!1);return}r.setValue(t);const l=e.disabled??!(s!=null&&s.isCellEditable(n));r.setDisabled(l);const a=this.getLocaleTextFunc(),d=Tn(a,t),c=l?d:`${a("ariaToggleCellValue","Press SPACE to toggle cell value")} (${d})`;r.setInputAriaLabel(c)}onCheckboxChanged(e){var r,l,a,d;const{params:t}=this,{column:o,node:i,value:s}=t;(l=(r=this.beans)==null?void 0:r.editSvc)==null||l.setEditingCells([{column:o,colId:o.getColId(),rowIndex:i.rowIndex,rowPinned:i.rowPinned,state:"changed",oldValue:s,newValue:s}],{update:!0});const n=i.setDataValue(o,e,"renderer");(d=this.beans.editSvc)==null||d.stopEditing({rowNode:i,column:o},{source:(a=this.beans.editSvc)!=null&&a.isBatchEditing()?"ui":"api"}),n||this.updateCheckbox(t)}},vl=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:o,order:i}=this;t.has(e)||(t.add(e),o.add(e),i.push(e),this.sort())}delete(e){this.all.delete(e),this.visible.delete(e),this.queued.delete(e.id),we(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:o,queued:i}=this;e.clear(),i.clear(),t.clear(),o.length=0}sort(){const{sortSvc:e,rowNodeSorter:t,gos:o}=this.beans,i=(e==null?void 0:e.getSortOptions())??[],s=op(this.order);if(this.order.sort((r,l)=>{var a,d;return(((a=r.pinnedSibling)==null?void 0:a.rowIndex)??0)-(((d=l.pinnedSibling)==null?void 0:d.rowIndex)??0)}),this.order=(t==null?void 0:t.doFullSort(this.order,i))??this.order,!s)return;const n=sr(o);n==="bottom"||n==="pinnedBottom"?this.order.push(s):this.order.unshift(s)}hide(e){const{all:t,visible:o}=this;t.forEach(i=>e(i)?o.delete(i):o.add(i)),this.order=Array.from(o),this.sort()}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function bl(e){var o;if(e.level===-1)return!0;const t=e.parent;return(o=t==null?void 0:t.childrenAfterSort)!=null&&o.some(i=>i==e)?bl(t):!1}function Hs(e,t){const{gos:o,rowModel:i,filterManager:s}=e;return Mo(o)?!i.getRowNode(t.id):s!=null&&s.isAnyFilterPresent()?!bl(t):o.get("pivotMode")?!t.group:!1}function ep(e){return!!e.footer&&e.level===-1}function tp(e){return!!e.pinnedSibling&&ep(e.pinnedSibling)}function op(e){var o;const t=e.findIndex(tp);if(t>-1)return(o=e.splice(t,1))==null?void 0:o[0]}var Sl=class extends x{postConstruct(){const{gos:e,beans:t}=this;this.top=new vl(t,"top"),this.bottom=new vl(t,"bottom");const o=s=>Hs(t,s.pinnedSibling),i=()=>{const s=e.get("isRowPinned");s&&e.get("enableRowPinning")&&t.rowModel.forEachNode(n=>this.pinRow(n,s(n)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:s})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow(),this.forContainers(n=>n.hide(o)),this.refreshRowPositions(),s||this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(sp),this.refreshRowPositions()},rowNodeDataChanged:({node:s})=>{const n=e.get("isRowPinnable");((n==null?void 0:n(s))??!0)||this.pinRow(s,null)},firstDataRendered:i}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(s=>s.hide(o)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:s})=>{this._grandTotalPinned=s==="pinnedBottom"?"bottom":s==="pinnedTop"?"top":null}),this.addManagedPropertyListener("isRowPinned",i)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{const o=[];t.forEach(i=>o.push(i)),o.forEach(i=>this.pinRow(i,null)),t.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,o){var r;if(e.footer&&e.level>-1)return;if(e.footer&&e.level===-1){this._grandTotalPinned=t,rp(this.beans);return}const i=e.rowPinned??((r=e.pinnedSibling)==null?void 0:r.rowPinned);if(i!=null&&t!=null&&t!=i){const l=e.rowPinned?e:e.pinnedSibling,a=e.rowPinned?e.pinnedSibling:e;this.pinRow(l,null,o),this.pinRow(a,t,o);return}const n=o&&np(this.beans,e,o);if(n){n.forEach(l=>this.pinRow(l,t));return}if(t==null){const l=e.rowPinned?e:e.pinnedSibling,a=this.findPinnedRowNode(l);if(!a)return;a.delete(l);const d=l.pinnedSibling;Os(l),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(d)}else{const l=yl(this.beans,e,t),a=this.getContainer(t);a.add(l),Hs(this.beans,e)&&a.hide(d=>Hs(this.beans,d.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 o=i=>{if(i.rowHeightEstimated){const s=_e(this.beans,i);i.setRowTop(t),i.setRowHeight(s.height),t+=s.height,e=!0}};return this.bottom.forEach(o),t=0,this.top.forEach(o),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return Rl(this.top)}getPinnedBottomTotalHeight(){return Rl(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 o=[];return this.forEachPinnedRow(t,i=>o.push(i.pinnedSibling.id)),o};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,o)=>{for(const i of e[o]){const s=this.beans.rowModel.getRowNode(i);s?this.pinRow(s,o):t.queue(i)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{const o=new Set;e.forEachQueued(i=>{const s=this.beans.rowModel.getRowNode(i);s&&o.add(s)});for(const i of o)e.unqueue(i.id),this.pinRow(i,t)})}pinGrandTotalRow(){var l;const{gos:e,beans:t,_grandTotalPinned:o}=this,i=t.rowModel;if(!oe(e))return;const s=(l=i.rootNode)==null?void 0:l.sibling;if(!s)return;const n=s.pinnedSibling,r=n&&this.findPinnedRowNode(n);if(o){if(r&&r.floating!==o&&(r.delete(n),Os(n)),!r||r.floating!==o){const a=yl(t,s,o);this.getContainer(o).add(a)}}else{if(!r)return;r.delete(n),Os(n)}}onGridStylesChanges(e){e.rowHeightChanged&&this.forContainers(t=>t.forEach(o=>o.setRowHeight(o.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=>ip(this.beans,o);return e==null?this.forContainers(t):t(this.getContainer(e))}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e==null||e.dispatchRowEvent("rowPinned")}};function ip(e,t){let o=0;t.forEach((i,s)=>{i.setRowTop(o),(i.rowHeightEstimated||i.rowHeight==null)&&i.setRowHeight(_e(e,i).height),i.setRowIndex(s),o+=i.rowHeight})}function yl(e,t,o){if(t.pinnedSibling)return t.pinnedSibling;const i=Nh(t,e);i.setRowTop(null),i.setRowIndex(null),i.rowPinned=o;const s=o==="top"?ms:ws;return i.id=`${s}${o}-${t.id}`,i.pinnedSibling=t,t.pinnedSibling=i,i}function Os(e){if(!e.pinnedSibling)return;e.rowPinned=null,e.setRowTop(null),e.setRowIndex(null);const t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function sp(e){const t=new Set;e.forEach(o=>{o.group&&t.add(o)}),t.forEach(o=>e.delete(o))}function np(e,t,o){var n;const{rowSpanSvc:i}=e,s=(o&&(i==null?void 0:i.isCellSpanning(o,t)))??!1;if(o&&s)return(n=i==null?void 0:i.getCellSpan(o,t))==null?void 0:n.spannedNodes}function Rl(e){const t=e.size();if(t===0)return 0;const o=e.getByIndex(t-1);return o===void 0?0:o.rowTop+o.rowHeight}function rp({gos:e,rowModel:t}){oe(e)&&t.refreshModel({step:"map"})}var El=class extends x{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){const e=this.gos;this.setPinnedRowData(e.get("pinnedTopRowData"),"top"),this.setPinnedRowData(e.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",t=>this.setPinnedRowData(t.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",t=>this.setPinnedRowData(t.currentValue,"bottom")),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this)})}reset(){}isEmpty(e){return this.getCache(e).order.length===0}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}onGridStylesChanges(e){if(e.rowHeightChanged){const t=o=>{o.setRowHeight(o.rowHeight,!0)};co(this.pinnedBottomRows,t),co(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0;const o=i=>{if(i.rowHeightEstimated){const s=_e(this.beans,i);i.setRowTop(t),i.setRowHeight(s.height),t+=s.height,e=!0}};return co(this.pinnedBottomRows,o),t=0,co(this.pinnedTopRows,o),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){const o=this.getCache(t);if(e===void 0){o.order.length=0,o.cache={};return}const i=ko(this.gos),s=t==="top"?ms:ws,n=new Set(o.order),r=[],l=new Set;let a=0,d=-1;for(const c of e){const u=(i==null?void 0:i({data:c,level:0,rowPinned:t}))??s+this.nextId++;if(l.has(u)){k(96,{id:u,data:c});continue}d++,l.add(u),r.push(u);const h=ao(o,u);if(h!==void 0)h.data!==c&&h.updateData(c),a+=this.setRowTopAndRowIndex(h,a,d),n.delete(u);else{const g=new so(this.beans);g.id=u,g.data=c,g.rowPinned=t,a+=this.setRowTopAndRowIndex(g,a,d),o.cache[u]=g,o.order.push(u)}}n.forEach(c=>{var u;(u=ao(o,c))==null||u.clearRowTopAndRowIndex(),delete o.cache[c]}),o.order=r}setRowTopAndRowIndex(e,t,o){return e.setRowTop(t),e.setRowHeight(_e(this.beans,e).height),e.setRowIndex(o),e.rowHeight}getPinnedTopTotalHeight(){return xl(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return xl(this.pinnedBottomRows)}getPinnedTopRowCount(){return Vs(this.pinnedTopRows)}getPinnedBottomRowCount(){return Vs(this.pinnedBottomRows)}getPinnedTopRow(e){return Bs(this.pinnedTopRows,e)}getPinnedBottomRow(e){return Bs(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return ao(this.getCache(t),e)}forEachPinnedRow(e,t){return co(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function xl(e){const t=Vs(e);if(t===0)return 0;const o=Bs(e,t-1);return o===void 0?0:o.rowTop+o.rowHeight}function ao(e,t){return e.cache[t]}function Bs(e,t){return ao(e,e.order[t])}function co(e,t){e.order.forEach((o,i)=>{const s=ao(e,o);s&&t(s,i)})}function Vs(e){return e.order.length}var lp=class extends x{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,t=()=>{const o=e.get("enableRowPinning"),i=sr(e),n=!!o||(i==="pinnedBottom"||i==="pinnedTop"),r=n?this.inner instanceof El:this.inner instanceof Sl;this.inner&&r&&this.destroyBean(this.inner),(r||!this.inner)&&(this.inner=this.createManagedBean(n?new Sl:new El))};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,o){return this.inner.pinRow(e,t,o)}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()}},Ns=class extends Ls{constructor(e,t="ag-text-field",o="text"){super(e,t,o)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const o=this.eInput;return o.value!==e&&(o.value=M(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=o=>{il(o)&&o.key&&!e.test(o.key)&&o.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:o=>{var s;const i=(s=o.clipboardData)==null?void 0:s.getData("text");i&&i.split("").some(n=>!e.test(n))&&o.preventDefault()}})}},ap={selector:"AG-INPUT-TEXT-FIELD",component:Ns},dp=class extends Ls{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const o=super.setValue(e,t);return this.eInput.value=e,o}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},cp={selector:"AG-INPUT-TEXT-AREA",component:dp},up=class extends Ns{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const n=parseFloat(e.value),r=isNaN(n)?"":this.normalizeValue(n.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:o,max:i,step:s}=this.config;typeof t=="number"&&this.setPrecision(t),typeof o=="number"&&this.setMin(o),typeof i=="number"&&this.setMax(i),typeof s=="number"&&this.setStep(s)}onWheel(e){Y(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const o=this.precision;if(o==null)return e;if(t){const s=parseFloat(e).toFixed(o);return parseFloat(s).toString()}const i=String(e).split(".");if(i.length>1){if(i[1].length<=o)return e;if(o>0)return`${i[0]}.${i[1].slice(0,o)}`}return i[0]}setMin(e){return this.min===e?this:(this.min=e,ce(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,ce(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,ce(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(o=>super.setValue(o,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,o){if(M(o)){let i=this.isScientificNotation(o);if(i&&this.eInput.validity.valid)return e(o);if(!i){o=this.adjustPrecision(o);const s=this.normalizeValue(o);i=o!=s}if(i)return t(o)}return e(o)}getValue(){const e=this.eInput;if(!e.validity.valid)return;const t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},hp={selector:"AG-INPUT-NUMBER-FIELD",component:up},gp=class extends Ns{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=ht();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){Y(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?$e(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,ce(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?$e(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,ce(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,ce(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return no(this.getValue())??void 0}setDate(e,t){this.setValue($e(e??null,this.includeTime),t)}},Dl={selector:"AG-INPUT-DATE-FIELD",component:gp},pp=class extends j{constructor(e="default",t=!1){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.unFocusable=t,this.activeClass="ag-active-item",this.options=[],this.itemEls=[]}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()}),!this.unFocusable&&this.addManagedElementListeners(e,{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(e){const t=e.key;switch(t){case y.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{const o=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(o)}break;case y.DOWN:case y.UP:e.preventDefault(),this.navigate(t);break;case y.PAGE_DOWN:case y.PAGE_UP:case y.PAGE_HOME:case y.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}navigate(e){const t=e===y.DOWN;let o;const{itemEls:i,highlightedEl:s}=this;if(!s)o=i[t?0:i.length-1];else{let r=i.indexOf(s)+(t?1:-1);r=Math.min(Math.max(r,0),i.length-1),o=i[r]}this.highlightItem(o)}navigateToPage(e){const{itemEls:t,highlightedEl:o}=this;if(!o||t.length===0)return;const i=t.indexOf(o),s=this.options.length-1,n=t[0].clientHeight,r=Math.floor(this.getGui().clientHeight/n);let l=-1;e===y.PAGE_HOME?l=0:e===y.PAGE_END?l=s:e===y.PAGE_DOWN?l=Math.min(i+r,s):e===y.PAGE_UP&&(l=Math.max(i-r,0)),l!==-1&&this.highlightItem(t[l])}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){const{value:t,text:o}=e,i=o??t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach(e=>{Ae(e)}),this.itemEls=[],this.refreshAriaRole()}refreshAriaRole(){const e=this.getGui();Be(e,this.options.length===0?"presentation":"listbox")}updateIndices(){const e=this.getGui().querySelectorAll(".ag-list-item");this.refreshAriaRole(),e.forEach((t,o)=>{zd(t,o+1),Wd(t,e.length)})}renderOption(e,t){const o=X({tag:"div",cls:`ag-list-item ag-${this.cssIdentifier}-list-item`,attrs:{role:"option"}}),i=X({tag:"span",children:t});o.appendChild(i),this.unFocusable||(o.tabIndex=-1),this.itemEls.push(o),this.addManagedListeners(o,{mouseover:()=>this.highlightItem(o),mousedown:s=>{s.preventDefault(),s.stopPropagation(),this.setValue(e)}}),this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getTooltipValue:()=>t,getGui:()=>o,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>i.scrollWidth>i.clientWidth})),this.getGui().appendChild(o)}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const o=this.options.findIndex(i=>i.value===e);if(o!==-1){const i=this.options[o];this.value=i.value,this.displayValue=i.text,this.highlightItem(this.itemEls[o]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.itemEls[e])}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}highlightItem(e){if(!Me(e))return;this.clearHighlighted(),this.highlightedEl=e,e.classList.add(this.activeClass),Hi(e,!0);const t=this.getGui(),{scrollTop:o,clientHeight:i}=t,{offsetTop:s,offsetHeight:n}=e;(s+n>o+i||s<o)&&e.scrollIntoView({block:"nearest"}),this.unFocusable||e.focus()}clearHighlighted(){const e=this.highlightedEl;!e||!Me(e)||(e.classList.remove(this.activeClass),Hi(e,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},fp=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.ag-picker-has-focus),&:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:disabled{opacity:.5}}",Cp={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"}}]}]},mp=class extends ml{constructor(e){if(super(e,(e==null?void 0:e.template)||Cp,(e==null?void 0:e.agComponents)||[],e==null?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=A,this.eWrapper=A,this.eDisplayField=A,this.eIcon=A,this.registerCSS(fp),this.ariaRole=e==null?void 0:e.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:o,variableWidth:i,minPickerWidth:s,maxPickerWidth:n}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,o!=null&&this.setPickerMaxHeight(o),s!=null&&this.setPickerMinWidth(s),n!=null&&this.setPickerMaxWidth(n)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:o,inputWidth:i}=this.config;if(o){const s=Tt(o,this.beans);s&&this.eIcon.appendChild(s)}i!=null&&this.setInputWidth(i)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),Gi(e,!1),this.ariaRole&&Be(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&(e==null?void 0: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 y.UP:case y.DOWN:case y.ENTER:case y.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case y.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:o,pickerAriaLabelValue:i,modalPicker:s=!0},maxPickerHeight:n,minPickerWidth:r,maxPickerWidth:l,variableWidth:a,beans:d,eWrapper:c}=this,u={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const f=or(d);this.beforeHidePicker(),f&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(o,i),anchorToElement:c};e.style.position="absolute";const h=d.popupSvc,g=h.addPopup(u);a?(r&&(e.style.minWidth=r),e.style.width=Zi(ji(c)),l&&(e.style.maxWidth=l)):To(e,l??ji(c));const p=n??`${Ki(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:o,gos:i},eWrapper:s,pickerComponent:n}=this,r=i.get("enableRtl")?"right":"left";o.positionPopupByComponent({type:t,eventSource:s,ePopup:n.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();Gi(t,e);const o=this.eWrapper.classList;o.toggle("ag-picker-expanded",e),o.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){var t;(t=this.pickerComponent)!=null&&t.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 To(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},wp=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}",vp=class extends mp{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(wp)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Po(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:o}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),o&&t==null&&(this.eDisplayField.textContent=o),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new pp("select",!0));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),o=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",o),Xd(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i==null||i.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}onKeyDown(e){var o;const{key:t}=e;switch(t===y.TAB&&this.hidePicker(),t){case y.ENTER:case y.UP:case y.DOWN:case y.PAGE_UP:case y.PAGE_DOWN:case y.PAGE_HOME:case y.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(o=this.listComponent)==null||o.handleKeyDown(e):super.onKeyDown(e);break;case y.ESCAPE:super.onKeyDown(e);break;case y.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){var e;return(e=this.listComponent)==null||e.clearOptions(),this.setValue(void 0,!0),this}setValue(e,t,o){const{listComponent:i,config:{placeholder:s},eDisplayField:n,tooltipFeature:r}=this;if(this.value===e||!i)return this;if(o||i.setValue(e,!0),i.getValue()===this.getValue())return this;let a=i.getDisplayValue();return a==null&&s&&(a=s),n.textContent=a,r==null||r.setTooltipAndRefresh(a??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},bp={selector:"AG-SELECT",component:vp},_s={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},Sp=class extends x{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:t,eTopGuard:o,eBottomGuard:i,focusTrapActive:s,forceFocusOutWhenTabGuardsAreEmpty:n,isFocusableContainer:r,focusInnerElement:l,onFocusIn:a,onFocusOut:d,shouldStopEventPropagation:c,onTabKeyDown:u,handleKeyDown:h,isEmpty:g,eFocusableElement:p}=e;this.comp=t,this.eTopGuard=o,this.eBottomGuard=i,this.providedFocusInnerElement=l,this.eFocusableElement=p,this.focusTrapActive=!!s,this.forceFocusOutWhenTabGuardsAreEmpty=!!n,this.isFocusableContainer=!!r,this.providedFocusIn=a,this.providedFocusOut=d,this.providedShouldStopEventPropagation=c,this.providedOnTabKeyDown=u,this.providedHandleKeyDown=h,this.providedIsEmpty=g}postConstruct(){this.createManagedBean(new ri(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach(e=>this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)}))}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():Ft(this.eFocusableElement,".ag-tab-guard").length===0)){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;const t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){var a;const t=J(this.beans),o=Ft(t.body,null,!0),i=o.indexOf(e?this.eTopGuard:this.eBottomGuard);if(i===-1)return;let s,n;e?(s=0,n=i):(s=i+1,n=o.length);const r=o.slice(s,n),l=this.gos.get("tabIndex");r.sort((d,c)=>{const u=parseInt(d.getAttribute("tabindex")||"0"),h=parseInt(c.getAttribute("tabindex")||"0");return h===l?1:u===l?-1:u===0?1:h===0?-1:u-h}),(a=r[e?r.length-1:0])==null||a.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const o=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),o&&(o.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=Ft(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length?(t[e?t.length-1:0].focus({preventScroll:!0}),!0):!1}getNextFocusableElement(e){return oi(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},yp=class extends x{constructor(e){super(),this.comp=e}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:o,eFocusableElement:i}=this,s=[t,o],n={setTabIndex:C=>{s.forEach(m=>C!=null?m.setAttribute("tabindex",C):m.removeAttribute("tabindex"))}};this.addTabGuards(t,o);const{focusTrapActive:r=!1,onFocusIn:l,onFocusOut:a,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f}=e;this.tabGuardCtrl=this.createManagedBean(new Sp({comp:n,focusTrapActive:r,eTopGuard:t,eBottomGuard:o,eFocusableElement:i,onFocusIn:l,onFocusOut:a,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=J(this.beans).createElement("div"),o=e==="top"?_s.TAB_GUARD_TOP:_s.TAB_GUARD_BOTTOM;return t.classList.add(_s.TAB_GUARD,o),Be(t,"presentation"),t}addTabGuards(e,t){const o=this.eFocusableElement;o.insertAdjacentElement("afterbegin",e),o.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];he(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,o){Qi(t)||(t=t.getGui());const{eBottomGuard:i}=this;i?i.insertAdjacentElement("beforebegin",t):e(t,o)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;Ae(e),Ae(t),super.destroy()}},Rp=class extends j{initialiseTabGuard(e){this.tabGuardFeature=this.createManagedBean(new yp(this)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},lt=class{constructor(e,t=!1){this.DOUBLE_TAP_MILLIS=500,this.destroyFuncs=[],this.touching=!1,this.localEventService=new je,this.preventMouseClick=t;const o=this.onTouchStart.bind(this),i=this.onTouchMove.bind(this),s=this.onTouchEnd.bind(this);e.addEventListener("touchstart",o,{passive:!0}),e.addEventListener("touchmove",i,{passive:!0}),e.addEventListener("touchend",s,{passive:!1}),this.destroyFuncs.push(()=>{e.removeEventListener("touchstart",o,{passive:!0}),e.removeEventListener("touchmove",i,{passive:!0}),e.removeEventListener("touchend",s,{passive:!1})})}getActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}onTouchStart(e){if(this.touching)return;this.touchStart=e.touches[0],this.touching=!0,this.moved=!1;const t=this.touchStart;window.setTimeout(()=>{const o=this.touchStart===t;if(this.touching&&o&&!this.moved){this.moved=!0;const i={type:"longTap",touchStart:this.touchStart,touchEvent:e};this.localEventService.dispatchEvent(i)}},500)}onTouchMove(e){if(!this.touching)return;const t=this.getActiveTouch(e.touches);if(!t)return;!Kr(t,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(e){if(this.touching){if(!this.moved){const t={type:"tap",touchStart:this.touchStart};this.localEventService.dispatchEvent(t),this.checkForDoubleTap()}this.preventMouseClick&&e.cancelable&&e.preventDefault(),this.touching=!1}}checkForDoubleTap(){const e=Date.now();if(this.lastTapTime&&this.lastTapTime>0)if(e-this.lastTapTime>this.DOUBLE_TAP_MILLIS){const o={type:"doubleTap",touchStart:this.touchStart};this.localEventService.dispatchEvent(o),this.lastTapTime=null}else this.lastTapTime=e;else this.lastTapTime=e}destroy(){this.destroyFuncs.forEach(e=>e())}},Fl=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${Kn}/${this.frameworkName}-data-grid`,dc(this.baseDocLink)}setInterval(e,t){return new eo(o=>{o(window.setInterval(e,t))})}addEventListener(e,t,o,i){let s={};if(typeof i=="object"?s=i:typeof i=="boolean"&&(s={capture:i}),s.passive==null){const n=dr(t);n!=null&&(s.passive=n)}e.addEventListener(t,o,s)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return`${this.baseDocLink}${e?`/${e}`:""}`}};function Ep(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var xp=["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","rowSpanSvc","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","funcColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],Pl=Object.fromEntries(xp.map((e,t)=>[e,t]));function Dp(e,t){const o=(e.beanName?Pl[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,i=(t.beanName?Pl[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return o-i}function Fp(e,t){return(e==null?void 0:e.beanName)==="gridDestroySvc"?-1:(t==null?void 0:t.beanName)==="gridDestroySvc"?1:0}var Pp={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},Tp={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},Ip={tag:"div",cls:"ag-header-viewport",role:"presentation",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"rowgroup"}]},Ws=class extends j{constructor(e){super(),this.eCenterContainer=A,this.headerRowComps={},this.rowCompsList=[],this.pinned=e}postConstruct(){this.selectAndSetTemplate();const e={setDisplayed:o=>this.setDisplayed(o),setCtrls:o=>this.setCtrls(o),setCenterWidth:o=>this.eCenterContainer.style.width=o,setViewportScrollLeft:o=>this.getGui().scrollLeft=o,setPinnedContainerWidth:o=>{const i=this.getGui();i.style.width=o,i.style.maxWidth=o,i.style.minWidth=o}};this.createManagedBean(new Vg(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){const e=this.pinned=="left",t=this.pinned=="right",o=e?Pp:t?Tp:Ip;this.setTemplate(o),this.eRowContainer=this.eCenterContainer!==A?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())}setCtrls(e){const t=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let o;const i=s=>{const n=s.getGui();n.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(n),o&&Bn(this.eRowContainer,n,o),o=n};e.forEach(s=>{const n=s.instanceId,r=t[n];delete t[n];const l=r||this.createBean(new Gg(s));this.headerRowComps[n]=l,this.rowCompsList.push(l),i(l)}),Object.values(t).forEach(s=>this.destroyRowComp(s))}},Ap={tag:"div",cls:"ag-header",role:"presentation"},Mp=class extends j{constructor(){super(Ap)}postConstruct(){const e={toggleCss:(i,s)=>this.toggleCss(i,s),setHeightAndMinHeight:i=>{this.getGui().style.height=i,this.getGui().style.minHeight=i}};this.createManagedBean(new Pg).setComp(e,this.getGui(),this.getFocusableElement());const o=i=>{this.createManagedBean(i),this.appendChild(i)};o(new Ws("left")),o(new Ws(null)),o(new Ws("right"))}},kp={selector:"AG-HEADER-ROOT",component:Mp},Lp=class extends j{constructor(e,t,o,i,s){super(),this.cellCtrl=t,this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.gos=e.gos,this.column=t.column,this.rowNode=t.rowNode,this.eRow=i;const n=X({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.column.colIdSanitised}});this.eCell=n;let r;t.isCellSpanning()?(r=X({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),r.appendChild(n),this.setTemplateFromElement(r)):this.setTemplateFromElement(n),this.cellCssManager=new Pr(()=>n),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);const l={toggleCss:(a,d)=>this.cellCssManager.toggleCss(a,d),setUserStyles:a=>Kt(n,a),getFocusableElement:()=>n,setIncludeSelection:a=>this.includeSelection=a,setIncludeRowDrag:a=>this.includeRowDrag=a,setIncludeDndSource:a=>this.includeDndSource=a,setRenderDetails:(a,d,c)=>this.setRenderDetails(a,d,c),setEditDetails:(a,d,c)=>this.setEditDetails(a,d,c),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue(),refreshEditStyles:(a,d)=>this.refreshEditStyles(a,d)};t.setComp(l,n,r,this.eCellWrapper,o,s,void 0)}getParentOfValue(){return this.eCellValue??this.eCellWrapper??this.eCell}setRenderDetails(e,t,o){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;const s=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(o||s)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t))}setEditDetails(e,t,o){e?this.createCellEditorInstance(e,t,o):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,o=t||this.forceWrapper,i=o&&this.eCellWrapper==null;i&&(this.eCellWrapper=X({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));const s=!o&&this.eCellWrapper!=null;s&&(Ae(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssManager.toggleCss("ag-cell-value",!o);const n=!e&&o,r=n&&this.eCellValue==null;r&&(this.eCellValue=X({tag:"span",cls:"ag-cell-value",role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue));const l=!n&&this.eCellValue!=null;l&&(Ae(this.eCellValue),this.eCellValue=void 0);const a=i||s||r||l;return a&&this.removeControls(),!e&&t&&this.addControls(),a}addControls(){const{cellCtrl:e,eCellWrapper:t,eCellValue:o,includeRowDrag:i,includeDndSource:s,includeSelection:n}=this,r=l=>{l&&t.insertBefore(l.getGui(),o)};i&&this.rowDraggingComp==null&&(this.rowDraggingComp=e.createRowDragComp(),r(this.rowDraggingComp)),s&&this.dndSourceComp==null&&(this.dndSourceComp=e.createDndSource(),r(this.dndSourceComp)),n&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=e.createSelectionCheckbox(),r(this.checkboxSelectionComp))}createCellEditorInstance(e,t,o){const i=this.editorVersion,s=e.newAgStackInstance(),{params:n}=e;s.then(l=>this.afterCellEditorCreated(i,l,n,t,o)),K(this.cellEditor)&&n.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();he(t);const o=bt(e);o!=null&&(t.textContent=o)}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),Ae(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){var o,i;const{context:e}=this.beans;(((o=this.cellEditorPopupWrapper)==null?void 0:o.getGui().contains(Y(this.beans)))||this.cellCtrl.hasBrowserFocus())&&this.eCell.focus({preventScroll:!0}),(i=this.hideEditorPopup)==null||i.call(this),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),Ae(this.cellEditorGui),this.cellCtrl.disableEditorTooltipFeature(),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){var o;if(((o=this.cellRenderer)==null?void 0:o.refresh)==null||this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return t===!0||t===void 0}createCellRendererInstance(e){var n;const t=this.rendererVersion,o=r=>l=>{if(this.rendererVersion!==t||!this.isAlive())return;const d=r.newAgStackInstance(),c=this.afterCellRendererCreated.bind(this,t,r.componentClass);d==null||d.then(c)},{animationFrameSvc:i}=this.beans;let s;if(i!=null&&i.active&&this.firstRender?s=(r,l=!1)=>{i.createTask(o(r),this.rowNode.rowIndex,"p2",r.componentFromFramework,l)}:s=r=>o(r)(),(n=e.params)!=null&&n.deferRender&&!this.cellCtrl.rowNode.group){const{loadingComp:r,onReady:l}=this.cellCtrl.getDeferLoadingCellRenderer();r&&(s(r),l.then(()=>s(e,!0)))}else s(e)}afterCellRendererCreated(e,t,o){if(!this.isAlive()||e!==this.rendererVersion){this.beans.context.destroyBean(o);return}this.cellRenderer=o,this.cellRendererClass=t;const s=o.getGui();if(this.cellRendererGui=s,s!=null){const n=this.getParentOfValue();he(n),n.appendChild(s)}}afterCellEditorCreated(e,t,o,i,s){var d;const n=e!==this.editorVersion,{context:r}=this.beans;if(n){r.destroyBean(t);return}if(t.isCancelBeforeStart&&t.isCancelBeforeStart()){r.destroyBean(t),this.cellCtrl.stopEditing(!0);return}if(!t.getGui){k(97,{colId:this.column.getId()}),r.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();const a=i||t.isPopup!==void 0&&t.isPopup();a?this.addPopupCellEditor(o,s):this.addInCellEditor(),this.refreshEditStyles(!0,a),(d=t.afterGuiAttached)==null||d.call(t),this.cellCtrl.enableEditorTooltipFeature(t),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){const{cellCssManager:o}=this;o.toggleCss("ag-cell-inline-editing",e&&!t),o.toggleCss("ag-cell-popup-editing",e&&!!t),o.toggleCss("ag-cell-not-inline-editing",!e||!!t)}addInCellEditor(){const{eCell:e}=this;e.contains(Y(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),he(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){var v;const{gos:o,context:i,popupSvc:s,editSvc:n}=this.beans;o.get("editType")==="fullRow"&&k(98);const r=this.cellEditorPopupWrapper=i.createBean(n.createPopupEditorWrapper(e)),{cellEditor:l,cellEditorGui:a,eCell:d,rowNode:c,column:u,cellCtrl:h}=this,g=r.getGui();a&&g.appendChild(a);const p=o.get("stopEditingWhenCellsLoseFocus"),f=t??((v=l.getPopupPosition)==null?void 0:v.call(l))??"over",C=o.get("enableRtl"),m={ePopup:g,column:u,rowNode:c,type:"popupCellEditor",eventSource:d,position:f,alignSide:C?"right":"left",keepWithinBounds:!0},w=s.positionPopupByComponent.bind(s,m),b=s.addPopup({modal:p,eChild:g,closeOnEsc:!0,closedCallback:()=>{h.onPopupEditorClosed()},anchorToElement:d,positionCallback:w,ariaOwns:d});b&&(this.hideEditorPopup=b.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}destroy(){this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},Gp=class extends j{constructor(e,t,o){super(),this.cellComps=new Map,this.beans=t,this.rowCtrl=e;const i=X({tag:"div",role:"row",attrs:{"comp-id":`${this.getCompId()}`}});this.setInitialStyle(i,o),this.setTemplateFromElement(i);const s=i.style;this.domOrder=this.rowCtrl.getDomOrder();const n={setDomOrder:r=>this.domOrder=r,setCellCtrls:r=>this.setCellCtrls(r),showFullWidth:r=>this.showFullWidth(r),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,toggleCss:(r,l)=>this.toggleCss(r,l),setUserStyles:r=>Kt(i,r),setTop:r=>s.top=r,setTransform:r=>s.transform=r,setRowIndex:r=>i.setAttribute("row-index",r),setRowId:r=>i.setAttribute("row-id",r),setRowBusinessKey:r=>i.setAttribute("row-business-key",r),refreshFullWidth:r=>{var l,a;return((a=(l=this.fullWidthCellRenderer)==null?void 0:l.refresh)==null?void 0:a.call(l,r()))??!1}};e.setComp(n,this.getGui(),o,void 0),this.addDestroyFunc(()=>{e.unsetComp(o)})}setInitialStyle(e,t){const o=this.rowCtrl.getInitialTransform(t);if(o)e.style.setProperty("transform",o);else{const i=this.rowCtrl.getInitialRowTop(t);i&&e.style.setProperty("top",i)}}showFullWidth(e){const t=i=>{if(this.isAlive()){const s=i.getGui();this.getGui().appendChild(s),this.rowCtrl.setupDetailRowAutoHeight(s),this.setFullWidthRowComp(i)}else this.beans.context.destroyBean(i)};e.newAgStackInstance().then(t)}setCellCtrls(e){const t=new Map(this.cellComps);for(const o of e){const i=o.instanceId;this.cellComps.has(i)?t.delete(i):this.newCellComp(o)}this.destroyCells(t),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;const t=[];for(const o of e){const i=this.cellComps.get(o.instanceId);i&&t.push(i.getGui())}Vn(this.getGui(),t)}newCellComp(e){var i;const t=((i=this.beans.editSvc)==null?void 0:i.isEditing(e,{withOpenEditor:!0}))??!1,o=new Lp(this.beans,e,this.rowCtrl.printLayout,this.getGui(),t);this.cellComps.set(e.instanceId,o),this.getGui().appendChild(o.getGui())}destroy(){super.destroy(),this.destroyCells(this.cellComps)}setFullWidthRowComp(e){this.fullWidthCellRenderer=e,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer)})}destroyCells(e){for(const t of e.values()){if(!t)return;const o=t.cellCtrl.instanceId;if(this.cellComps.get(o)!==t)return;t.detach(),t.destroy(),this.cellComps.delete(o)}}};function Hp(e,t,o){const i=!!o.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls,s={tag:"div",ref:"eContainer",cls:pi(e),role:"rowgroup"};if(t.type==="center"||i){const n={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${ng(e)}`,role:"rowgroup"};return{tag:"div",ref:"eViewport",cls:`ag-viewport ${nl(e)}`,role:"presentation",children:[s,i?n:null]}}return s}var Op=class extends j{constructor(e){super(),this.eViewport=A,this.eContainer=A,this.eSpannedContainer=A,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=e==null?void 0:e.name,this.options=ro(this.name)}postConstruct(){this.setTemplate(Hp(this.name,this.options,this.beans));const e={setHorizontalScroll:o=>this.eViewport.scrollLeft=o,setViewportHeight:o=>this.eViewport.style.height=o,setRowCtrls:({rowCtrls:o})=>this.setRowCtrls(o),setSpannedRowCtrls:o=>this.setRowCtrls(o,!0),setDomOrder:o=>{this.domOrder=o},setContainerWidth:o=>{this.eContainer.style.width=o,this.eSpannedContainer&&(this.eSpannedContainer.style.width=o)},setOffsetTop:o=>{const i=`translateY(${o})`;this.eContainer.style.transform=i,this.eSpannedContainer&&(this.eSpannedContainer.style.transform=i)}};this.createManagedBean(new fg(this.name)).setComp(e,this.eContainer,this.eSpannedContainer,this.eViewport)}destroy(){this.setRowCtrls([]),this.setRowCtrls([],!0),super.destroy(),this.lastPlacedElement=null}setRowCtrls(e,t){const{beans:o,options:i}=this,s=t?this.eSpannedContainer:this.eContainer,n=t?{...this.rowCompsWithSpan}:{...this.rowCompsNoSpan},r={};t?this.rowCompsWithSpan=r:this.rowCompsNoSpan=r,this.lastPlacedElement=null;const l=[];for(const a of e){const d=a.instanceId,c=n[d];let u;if(c)u=c,delete n[d];else{if(!a.rowNode.displayed)continue;u=new Gp(a,o,i.type)}r[d]=u,l.push([u,!c])}this.removeOldRows(Object.values(n),s),this.addRowNodes(l,s)}addRowNodes(e,t){const{domOrder:o}=this;for(const[i,s]of e){const n=i.getGui();o?this.ensureDomOrder(n,t):s&&t.appendChild(n)}}removeOldRows(e,t){for(const o of e)t.removeChild(o.getGui()),o.destroy()}ensureDomOrder(e,t){Bn(t,e,this.lastPlacedElement),this.lastPlacedElement=e}},Bp={selector:"AG-ROW-CONTAINER",component:Op};function uo(e,t){return t.map(o=>{const i=`e${o[0].toUpperCase()+o.substring(1)}RowContainer`;return e[i]={name:o},{tag:"ag-row-container",ref:i,attrs:{name:o}}})}function Vp(e){const t={},o={tag:"div",ref:"eGridRoot",cls:"ag-root ag-unselectable",children:[{tag:"ag-header-root"},{tag:"div",ref:"eTop",cls:"ag-floating-top",role:"presentation",children:uo(t,["topLeft","topCenter","topRight","topFullWidth"])},{tag:"div",ref:"eBody",cls:"ag-body",role:"presentation",children:[{tag:"div",ref:"eBodyViewport",cls:"ag-body-viewport",role:"presentation",children:uo(t,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:uo(t,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:uo(t,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:uo(t,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},e?{tag:"ag-overlay-wrapper"}:null]};return{paramsMap:t,elementParams:o}}var Np=class extends j{constructor(){super(...arguments),this.eGridRoot=A,this.eBodyViewport=A,this.eStickyTop=A,this.eStickyBottom=A,this.eTop=A,this.eBottom=A,this.eBody=A}postConstruct(){const{overlays:e,rangeSvc:t}=this.beans,o=e==null?void 0:e.getOverlayWrapperSelector(),{paramsMap:i,elementParams:s}=Vp(!!o);this.setTemplate(s,[...o?[o]:[],Sg,Eg,kp,Bp],i);const n=(l,a)=>{const d=`${l}px`;a.style.minHeight=d,a.style.height=d},r={setRowAnimationCssOnBodyViewport:(l,a)=>this.setRowAnimationCssOnBodyViewport(l,a),setColumnCount:l=>jd(this.getGui(),l),setRowCount:l=>Ud(this.getGui(),l),setTopHeight:l=>n(l,this.eTop),setBottomHeight:l=>n(l,this.eBottom),setTopInvisible:l=>this.eTop.classList.toggle("ag-invisible",l),setBottomInvisible:l=>this.eBottom.classList.toggle("ag-invisible",l),setStickyTopHeight:l=>this.eStickyTop.style.height=l,setStickyTopTop:l=>this.eStickyTop.style.top=l,setStickyTopWidth:l=>this.eStickyTop.style.width=l,setStickyBottomHeight:l=>{this.eStickyBottom.style.height=l,this.eStickyBottom.classList.toggle("ag-invisible",l==="0px")},setStickyBottomBottom:l=>this.eStickyBottom.style.bottom=l,setStickyBottomWidth:l=>this.eStickyBottom.style.width=l,setColumnMovingCss:(l,a)=>this.toggleCss(l,a),updateLayoutClasses:(l,a)=>{const d=[this.eBodyViewport.classList,this.eBody.classList];for(const c of d)c.toggle(be.AUTO_HEIGHT,a.autoHeight),c.toggle(be.NORMAL,a.normal),c.toggle(be.PRINT,a.print);this.toggleCss(be.AUTO_HEIGHT,a.autoHeight),this.toggleCss(be.NORMAL,a.normal),this.toggleCss(be.PRINT,a.print)},setAlwaysVerticalScrollClass:(l,a)=>this.eBodyViewport.classList.toggle(al,a),registerBodyViewportResizeListener:l=>{const a=Ze(this.beans,this.eBodyViewport,l);this.addDestroyFunc(()=>a())},setPinnedTopBottomOverflowY:l=>this.eTop.style.overflowY=this.eBottom.style.overflowY=l,setCellSelectableCss:(l,a)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(d=>d.classList.toggle(l,a))},setBodyViewportWidth:l=>this.eBodyViewport.style.width=l,setGridRootRole:l=>Be(this.eGridRoot,l)};this.ctrl=this.createManagedBean(new wg),this.ctrl.setComp(r,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(t&&Je(this.gos)||Qt(this.gos))&&$d(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){const o=this.eBodyViewport.classList;o.toggle("ag-row-animation",t),o.toggle("ag-row-no-animation",!t)}},_p={selector:"AG-GRID-BODY",component:Np},Wp=class extends x{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,o){this.view=e,this.eGridHostDiv=t,this.eGui=o,this.eGui.setAttribute("grid-id",this.beans.context.getGridId());const{dragAndDrop:i,ctrlsSvc:s}=this.beans;i==null||i.registerGridDropTarget(()=>this.eGui,this),Zr(this.gos,t),this.createManagedBean(new bs(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const n=Ze(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),s.register("gridCtrl",this)}isDetailGrid(){var t;const e=vh(this.getGui());return((t=e==null?void 0:e.getAttribute("row-id"))==null?void 0:t.startsWith("detail"))||!1}getOptionalSelectors(){var t,o,i,s,n;const e=this.beans;return{paginationSelector:(t=e.pagination)==null?void 0:t.getPaginationSelector(),gridHeaderDropZonesSelector:(o=e.registry)==null?void 0:o.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:(i=e.sideBar)==null?void 0:i.getSelector(),statusBarSelector:(s=e.registry)==null?void 0:s.getSelector("AG-STATUS-BAR"),watermarkSelector:(n=e.licenseManager)==null?void 0:n.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){const{view:t}=this;if(e===!1)t.setCursor(null);else{const o=e===1?"ew-resize":"ns-resize";t.setCursor(o)}}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:o,nextIndex:i}=this.getNextFocusableIndex(t,e);if(i<0||i>=t.length)return!1;if(i===0){if(o>0){const{visibleCols:s,focusSvc:n}=this.beans,r=s.allCols,l=$(r);if(n.focusGridView({column:l,backwards:!0}))return!0}return!1}return this.focusContainer(t[i],e)}focusInnerElement(e){const t=this.gos.getCallback("focusGridInnerElement");if(t&&t({fromBottom:!!e}))return!0;const o=this.getFocusableContainers(),{focusSvc:i,visibleCols:s}=this.beans,n=s.allCols;if(e){if(o.length>1)return this.focusContainer($(o),e);const r=$(n);if(i.focusGridView({column:r,backwards:e}))return!0}if(this.gos.get("headerHeight")===0||rt(this.beans)){if(i.focusGridView({column:n[0],backwards:e}))return!0;for(let r=1;r<o.length;r++)if(ti(o[r].getGui(),e))return!0;return!1}return i.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){var n;const t=this.view.getFocusableContainers(),{nextIndex:o,indexWithFocus:i}=this.getNextFocusableIndex(t,e);if(i===-1||o<0||o>=t.length)return;const s=t[o];(n=s.setAllowFocus)==null||n.call(s,!0),setTimeout(()=>{var r;(r=s.setAllowFocus)==null||r.call(s,!1)})}isFocusable(){var t,o;const e=this.beans;return!ii(e)||!rt(e)||!!((o=(t=e.sideBar)==null?void 0:t.comp)!=null&&o.isDisplayed())}getNextFocusableIndex(e,t){const o=Y(this.beans),i=e.findIndex(n=>n.getGui().contains(o)),s=i+(t?-1:1);return{indexWithFocus:i,nextIndex:s}}focusContainer(e,t){var i,s;(i=e.setAllowFocus)==null||i.call(e,!0);const o=ti(e.getGui(),t,!1,!0);return(s=e.setAllowFocus)==null||s.call(e,!1),o}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},zp=class extends Rp{constructor(e){super(),this.gridBody=A,this.sideBar=A,this.pagination=A,this.rootWrapperBody=A,this.eGridDiv=e}postConstruct(){const e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:n=>this.addCss(n),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:n=>{this.getGui().style.userSelect=n??"",this.getGui().style.webkitUserSelect=n??""},setCursor:n=>{this.getGui().style.cursor=n??""}},t=this.createManagedBean(new Wp),o=t.getOptionalSelectors(),i=this.createTemplate(o),s=[_p,...Object.values(o).filter(n=>!!n)];this.setTemplate(i,s),t.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>t.focusInnerElement(n),forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:()=>!t.isFocusable()})}insertGridIntoDom(){const e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{this.eGridDiv.removeChild(e),jt(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){const o=this.rootWrapperBody.classList,{AUTO_HEIGHT:i,NORMAL:s,PRINT:n}=be,{autoHeight:r,normal:l,print:a}=t;o.toggle(i,r),o.toggle(s,l),o.toggle(n,a),this.toggleCss(i,r),this.toggleCss(s,l),this.toggleCss(n,a)}createTemplate(e){const t=e.gridHeaderDropZonesSelector?{tag:"ag-grid-header-drop-zones"}:null,o=e.sideBarSelector?{tag:"ag-side-bar",ref:"sideBar"}:null,i=e.statusBarSelector?{tag:"ag-status-bar"}:null,s=e.watermarkSelector?{tag:"ag-watermark"}:null,n=e.paginationSelector?{tag:"ag-pagination",ref:"pagination"}:null;return{tag:"div",cls:"ag-root-wrapper",role:"presentation",children:[t,{tag:"div",ref:"rootWrapperBody",cls:"ag-root-wrapper-body",role:"presentation",children:[{tag:"ag-grid-body",ref:"gridBody"},o]},i,n,s]}}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){var t;if(!e&&((t=this.pagination)!=null&&t.isDisplayed())){this.pagination.forceFocusOutOfContainer(e);return}super.forceFocusOutOfContainer(e)}getFocusableContainers(){const e=[this.gridBody];return[this.sideBar,this.pagination].forEach(t=>{t&&e.push(t)}),e.filter(t=>Me(t.getGui()))}},N=(e,t)=>{for(const o of Object.keys(t))t[o]=e;return t},Tl={dispatchEvent:"CommunityCore",...N("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...N("GridState",{getState:0,setState:0}),...N("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...N("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...N("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...N("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...N("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...N("ValueCache",{expireValueCache:0}),...N("CellApi",{getCellValue:0}),...N("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...N("Sort",{onSortChanged:0}),...N("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...N("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...N("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...N("HighlightChanges",{flashCells:0}),...N("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...N("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}),...N("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...N("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...N("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...N("ColumnResize",{setColumnWidths:0}),...N("ColumnHover",{isColumnHovered:0}),...N("EditCore",{getCellEditorInstances:0,getEditingCells:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...N("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...N("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...N("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...N("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...N("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...N("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...N("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...N("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,onRowHeightChanged:0}),...N("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...N("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,resetRowHeights:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0}),...N("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...N("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...N("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...N("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...N("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...N("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...N("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...N("ContextMenu",{showContextMenu:0}),...N("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...N("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...N("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...N("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...N("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}),...N("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0}),...N("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...N("StatusBar",{getStatusPanel:0})},zs={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},$p=(e,t)=>e.eventSvc.dispatchEvent(t),Il=class{};Reflect.defineProperty(Il,"name",{value:"GridApi"});var Up=class extends x{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new Il,this.fns={...zs,dispatchEvent:$p},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(Tl))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){var s;const{fns:o,beans:i}=this;o!==zs&&(o[e]=((s=i==null?void 0:i.validation)==null?void 0:s.validateApiFunction(e,t))??t)}makeApi(e){return{[e]:(...t)=>{const{beans:o,fns:{[e]:i}}=this;return i?i(o,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:o,preDestroyLink:i}=this;if(!t)k(26,{fnName:e,preDestroyLink:i});else{const s=Tl[e];o.assertModuleRegistered(s,`api.${e}`)&&k(27,{fnName:e,module:s})}}destroy(){super.destroy(),this.fns=zs,this.beans=null}};function Kp(e){return e.context.getGridId()}function jp(e){e.gridDestroySvc.destroy()}function qp(e){return e.gridDestroySvc.destroyCalled}function Yp(e,t){return e.gos.get(t)}function Zp(e,t,o){Al(e,{[t]:o})}function Al(e,t){e.gos.updateGridOptions({options:t})}function Qp(e,t){const o=t.replace(/Module$/,"");return e.gos.isModuleRegistered(o)}var Xp={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},Jp=class extends j{constructor(e,t,o){super(Xp),this.rowNode=e,this.column=t,this.eCell=o}postConstruct(){this.getGui().appendChild(Tt("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:o,eCell:i,gos:s}=this,n=o.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(i,0,0),n){const l=_(s,{rowNode:t,dragEvent:e});n(l)}else try{const l=JSON.stringify(t.data);r.setData("application/json",l),r.setData("text/plain",l)}catch{}}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}},ef=class extends x{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:o}=this.beans;return o.addDragSource(t),()=>o.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const o=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(o)}setResizeIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(1),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}},Ci=class{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}depthFirstSearchChangedPath(e,t){const{rowNode:o,children:i}=e;if(i)for(let s=0;s<i.length;++s)this.depthFirstSearchChangedPath(i[s],t);t(o)}depthFirstSearchEverything(e,t,o){const i=e.childrenAfterGroup;if(i)for(let s=0,n=i.length;s<n;++s){const r=i[s];r.childrenAfterGroup?this.depthFirstSearchEverything(r,t,o):o&&t(r)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,o=!1){this.active&&!o?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,o=0;for(;!this.mapToItems[t.id];){const i={rowNode:t,children:null};this.mapToItems[t.id]=i,o++,t=t.parent}return o}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let o=e;for(;o;)this.nodeIdsToColumns[o.id]||(this.nodeIdsToColumns[o.id]={}),t.forEach(i=>this.nodeIdsToColumns[o.id][i.getId()]=!0),o=o.parent}linkPathItems(e,t){let o=e;for(let i=0;i<t;i++){const s=this.mapToItems[o.id],n=this.mapToItems[o.parent.id];n.children||(n.children=[]),n.children.push(s),o=o.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;const o=this.createPathItems(e);this.linkPathItems(e,o),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const o=this.nodeIdsToColumns[e.id];return t.filter(s=>o[s.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const o=this.nodeIdsToColumns[e.id];return t.filter(s=>!o[s.getId()])}},Ml={moduleName:"Drag",version:G,beans:[Hh]},tf={moduleName:"DragAndDrop",version:G,dynamicBeans:{dndSourceComp:Jp},icons:{rowDrag:"grip"}},of={moduleName:"SharedDragAndDrop",version:G,beans:[Gh],dependsOn:[Ml],userComponents:{agDragAndDropImage:jg},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},sf={moduleName:"HorizontalResize",version:G,beans:[ef],dependsOn:[Ml]},nf=":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}",rf=class extends x{constructor(){super(...arguments),this.beanName="colAnimation",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){if(this.active)return;const{gos:e}=this;e.get("suppressColumnMoveAnimation")||e.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush(()=>this.activeNext=!1,()=>this.active=!1)}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)})}flush(e,t){const{executeNextFuncs:o,executeLaterFuncs:i}=this;if(o.length===0&&i.length===0){e(),t();return}const s=n=>{for(;n.length;){const r=n.pop();r&&r()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),s(o)},0),window.setTimeout(()=>{t(),s(i)},200)})}};function lf(e,t,o){var i;(i=e.colMoves)==null||i.moveColumnByIndex(t,o,"api")}function af(e,t,o){var i;(i=e.colMoves)==null||i.moveColumns(t,o,"api")}var df=class extends x{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;t&&t.forEach(o=>{o.isPrimary()&&(o.isAnyFunctionActive()||(o.isAllowValue()?this.columnsToAggregate.push(o):o.isAllowRowGroup()?this.columnsToGroup.push(o):o.isAllowPivot()&&this.columnsToPivot.push(o)))})}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){const{valueColsSvc:t,rowGroupColsSvc:o,pivotColsSvc:i}=this.beans;this.columnsToAggregate.length>0&&(t==null||t.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop")),this.columnsToGroup.length>0&&(o==null||o.addColumns(this.columnsToGroup,"toolPanelDragAndDrop")),this.columnsToPivot.length>0&&(i==null||i.addColumns(this.columnsToPivot,"toolPanelDragAndDrop"))}onDragCancel(){this.clearColumnsList()}};function cf(e,t){!t||t.length<=1||t.filter(i=>e.indexOf(i)<0).length>0||t.sort((i,s)=>{const n=e.indexOf(i),r=e.indexOf(s);return n-r})}function uf(e){const t=[...e];return e.forEach(o=>{var n;let i=null,s=o.getParent();for(;s!=null&&s.getDisplayedLeafColumns().length===1;)i=s,s=s.getParent();i!=null&&(!!((n=i.getColGroupDef())!=null&&n.marryChildren)?i.getProvidedColumnGroup().getLeafColumns():i.getLeafColumns()).forEach(a=>{t.includes(a)||t.push(a)})}),t}function hf(e,t,o,i){const s=i.allCols;let n=null,r=null;for(let l=0;l<e.length;l++){const a=e[l],d=o.getProposedColumnOrder(t,a);if(!o.doesOrderPassRules(d))continue;const c=d.filter(h=>s.includes(h));if(r===null)r=c;else if(!Jt(c,r))break;const u=pf(d);(n===null||u<n.fragCount)&&(n={move:a,fragCount:u})}return n}function kl(e){const{isFromHeader:t,fromLeft:o,xPosition:i,fromEnter:s,fakeEvent:n,pinned:r,gos:l,colModel:a,colMoves:d,visibleCols:c}=e;let{allMovingColumns:u}=e;t&&(u=uf(u));const h=u.slice();cf(a.getCols(),h);const g=Cf({movingCols:h,draggingRight:o,xPosition:i,pinned:r,gos:l,colModel:a,visibleCols:c}),p=gf(h,a);if(g.length===0)return;const f=g[0];if(p!==null&&(t||!s)&&!n&&(!o&&f>=p||o&&f<=p))return;const m=hf(g,h,d,c);if(!m)return;const w=m.move;if(!(w>a.getCols().length-h.length))return{columns:h,toIndex:w}}function Ll(e){const{columns:t,toIndex:o}=kl(e)||{},{finished:i,colMoves:s}=e;return!t||o==null?null:(s.moveColumns(t,o,"uiColumnMoved",i),i?null:{columns:t,toIndex:o})}function gf(e,t){const o=t.getCols(),i=e.map(a=>o.indexOf(a)).sort((a,d)=>a-d),s=i[0];return $(i)-s!==i.length-1?null:s}function pf(e){function t(i){const s=[];let n=i.getOriginalParent();for(;n!=null;)s.push(n),n=n.getOriginalParent();return s}let o=0;for(let i=0;i<e.length-1;i++){let s=t(e[i]),n=t(e[i+1]);[s,n]=s.length>n.length?[s,n]:[n,s],s.forEach(r=>{n.indexOf(r)===-1&&o++})}return o}function ff(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function Cf(e){const{movingCols:t,draggingRight:o,xPosition:i,pinned:s,gos:n,colModel:r,visibleCols:l}=e;if(n.get("suppressMovableColumns")||t.some(b=>b.getColDef().suppressMovable))return[];const d=ff(l,s),c=r.getCols(),u=d.filter(b=>t.includes(b)),h=d.filter(b=>!t.includes(b)),g=c.filter(b=>!t.includes(b));let p=0,f=i;if(o){let b=0;u.forEach(v=>b+=v.getActualWidth()),f-=b}if(f>0){for(let b=0;b<h.length;b++){const v=h[b];if(f-=v.getActualWidth(),f<0)break;p++}o&&p++}let C;if(p>0){const b=h[p-1];C=g.indexOf(b)+1}else C=g.indexOf(h[0]),C===-1&&(C=0);const m=[C],w=(b,v)=>b-v;if(o){let b=C+1;const v=c.length-1;for(;b<=v;)m.push(b),b++;m.sort(w)}else{let b=C;const v=c.length-1;let S=c[b];for(;b<=v&&d.indexOf(S)<0;)b++,m.push(b),S=c[b];b=C-1;const D=0;for(;b>=D;)m.push(b),b--;m.sort(w).reverse()}return m}function $s(e){var d;const{pinned:t,fromKeyboard:o,gos:i,ctrlsSvc:s,useHeaderRow:n,skipScrollPadding:r}=e;let l=(d=s.getHeaderRowContainerCtrl(t))==null?void 0:d.eViewport,{x:a}=e;return l?(o&&(a-=l.getBoundingClientRect().left),i.get("enableRtl")&&(n&&(l=l.querySelector(".ag-header-row")),a=l.clientWidth-a),t==null&&!r&&(a+=s.get("center").getCenterViewportScrollLeft()),a):0}function Us(e,t){for(const o of e)o.moving=t,o.dispatchColEvent("movingChanged","uiColumnMoved")}var Gl=7,Ks=100,mi=Ks/2,mf=5,wf=100,vf=class extends x{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!M(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,{dragItem:o}=t||{},i=(o==null?void 0:o.columns)??[];for(const s of i){const n=s.getPinned();if(s.getColDef().lockPinned){if(n==e)return"move";continue}const r=o==null?void 0:o.containerType;if(r===e||!e)return"move";if(e&&(!n||r!==e))return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,o=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(o,!0,"uiColumnDragged");else{const s=t.visibleState,n=(o||[]).filter(r=>s[r.getId()]&&!r.isVisible());this.setColumnsVisible(n,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(o,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,o=!1,i=!1){const{gos:s,ctrlsSvc:n}=this.beans,r=s.get("suppressMoveWhenColumnDragging");if(i&&!r){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!i&&K(e.hDirection))return;const l=$s({x:e.x,pinned:this.pinned,gos:s,ctrlsSvc:n});t||this.checkCenterForScrolling(l),r?this.handleColumnDragWhileSuppressingMovement(e,t,o,l,i):this.handleColumnDragWhileAllowingMovement(e,t,o,l,i)}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,o){if(!(e!=null&&e.length))return;const i=e.filter(s=>!s.getColDef().lockVisible);i.length&&this.beans.colModel.setColsVisible(i,t,o)}finishColumnMoving(){this.clearHighlighted();const e=this.lastMovedInfo;if(!e)return;const{columns:t,toIndex:o}=e;this.beans.colMoves.moveColumns(t,o,"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,o,i,s){const n=this.getAllMovingColumns(e,!0);if(s){const r=this.isAttemptingToPin(n);r&&this.attemptToPinColumns(n,void 0,!0);const{fromLeft:l,xPosition:a}=this.getNormalisedXPositionInfo(n,r)||{};if(l==null||a==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:n,xPosition:a,fromEnter:t,fakeEvent:o,fromLeft:l})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(n,i)}}handleColumnDragWhileAllowingMovement(e,t,o,i,s){const n=this.getAllMovingColumns(e),r=this.normaliseDirection(e.hDirection)==="right",l=e.dragSource.type===1,a=this.getMoveColumnParams({allMovingColumns:n,isFromHeader:l,xPosition:i,fromLeft:r,fromEnter:t,fakeEvent:o}),d=Ll({...a,finished:s});d&&(this.lastMovedInfo=d)}getAllMovingColumns(e,t=!1){const o=e.dragSource.getDragItem();let i=null;t?(i=o.columnsInSplit,i||(i=o.columns)):i=o.columns;const s=n=>n.getColDef().lockPinned?n.getPinned()==this.pinned:!0;return i?i.filter(s):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:o,xPosition:i,fromLeft:s,fromEnter:n,fakeEvent:r}=e,{gos:l,colModel:a,colMoves:d,visibleCols:c}=this.beans;return{allMovingColumns:t,isFromHeader:o,fromLeft:s,xPosition:i,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:l,colModel:a,colMoves:d,visibleCols:c}}highlightHoveredColumn(e,t){var c;const{gos:o,colModel:i}=this.beans,s=o.get("enableRtl"),n=i.getCols().filter(u=>u.isVisible()&&u.getPinned()===this.pinned);let r=null,l=null,a=null;for(const u of n){if(l=u.getActualWidth(),r=this.getNormalisedColumnLeft(u,0,s),r!=null){const h=r+l;if(r<=t&&h>=t){a=u;break}}r=null,l=null}if(a)e.indexOf(a)!==-1&&(a=null);else{for(let u=n.length-1;u>=0;u--){const h=n[u],g=n[u].getParent();if(!g){a=h;break}const p=g==null?void 0:g.getDisplayedLeafColumns();if(p.length){a=$(p);break}}if(!a)return;r=this.getNormalisedColumnLeft(a,0,s),l=a.getActualWidth()}if(((c=this.lastHighlightedColumn)==null?void 0:c.column)!==a&&this.clearHighlighted(),a==null||r==null||l==null)return;let d;t-r<l/2!==s?d=0:d=1,Hl(a,d),this.lastHighlightedColumn={column:a,position:d}}getNormalisedXPositionInfo(e,t){const{gos:o,visibleCols:i}=this.beans,s=o.get("enableRtl"),{firstMovingCol:n,column:r,position:l}=this.getColumnMoveAndTargetInfo(e,t,s);if(!n||!r||l==null)return;const a=i.allCols,d=a.indexOf(n),c=a.indexOf(r),u=l===0!==s,h=d<c||d===c&&!u;let g=0;if(u?h&&(g-=1):h||(g+=1),c+g===d)return;const p=a[c+g];if(!p)return;const f=this.getNormalisedColumnLeft(p,20,s);return{fromLeft:h,xPosition:f}}getColumnMoveAndTargetInfo(e,t,o){const i=this.lastHighlightedColumn||{},{firstMovingCol:s,lastMovingCol:n}=bf(e);if(!s||!n||i.column||!t)return{firstMovingCol:s,...i};const l=this.getPinDirection()==="left";return{firstMovingCol:s,position:l?1:0,column:l!==o?s:n}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case"left":return"right";case"right":return"left"}return e}getNormalisedColumnLeft(e,t,o){const{gos:i,ctrlsSvc:s}=this.beans,n=e.getLeft();if(n==null)return null;const r=e.getActualWidth();return $s({x:o?n+r-t:n+t,pinned:e.getPinned(),useHeaderRow:o,skipScrollPadding:!0,gos:i,ctrlsSvc:s})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,o=this.failedMoveAttempts>Gl;return t&&o||e.some(i=>i.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:o,fromEnter:i,fakeEvent:s,fromLeft:n}=e,r=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:o,fromLeft:n,fromEnter:i,fakeEvent:s}),{columns:l,toIndex:a}=kl(r)||{};l&&a!=null&&(this.lastMovedInfo={columns:l,toIndex:a}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(Hl(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),o=t.getCenterViewportScrollLeft(),i=o+t.getCenterWidth();let s,n;this.gos.get("enableRtl")?(s=e<o+mi,n=e>i-mi):(n=e<o+mi,s=e>i-mi),this.needToMoveRight=s,this.needToMoveLeft=n,n||s?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){var e;this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),wf),(e=this.beans.dragAndDrop.getDragAndDropImageComponent())==null||e.setIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){var e;this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,(e=this.beans.dragAndDrop.getDragAndDropImageComponent())==null||e.setIcon(this.getIconName(),!1))}moveInterval(){var i,s;let e;this.intervalCount++,e=10+this.intervalCount*mf,e>Ks&&(e=Ks);let t=null;const o=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=o.scrollHorizontally(-e):this.needToMoveRight&&(t=o.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{pinnedCols:n,dragAndDrop:r,gos:l}=this.beans;if(this.failedMoveAttempts<=Gl+1||!n)return;if((i=r.getDragAndDropImageComponent())==null||i.setIcon("pinned",!1),!l.get("suppressMoveWhenColumnDragging")){const a=(s=this.lastDraggingEvent)==null?void 0:s.dragItem.columns;this.attemptToPinColumns(a,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,o=!1){const i=(e||[]).filter(r=>!r.getColDef().lockPinned);if(!i.length)return 0;o&&(t=this.getPinDirection());const{pinnedCols:s,dragAndDrop:n}=this.beans;return s==null||s.setColsPinned(i,t,"uiColumnDragged"),o&&n.nudge(),i.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function Hl(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function bf(e){const t=e.length;let o,i;for(let s=0;s<t;s++){if(!o){const n=e[s];n.getLeft()!=null&&(o=n)}if(!i){const n=e[t-1-s];n.getLeft()!=null&&(i=n)}if(o&&i)break}return{firstMovingCol:o,lastMovingCol:i}}var Sf=class extends x{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans,o=this.pinned;e.whenReady(this,i=>{let s;const n=i.gridBodyCtrl.eBodyViewport;switch(o){case"left":s=[[n,i.left.eContainer],[i.bottomLeft.eContainer],[i.topLeft.eContainer]];break;case"right":s=[[n,i.right.eContainer],[i.bottomRight.eContainer],[i.topRight.eContainer]];break;default:s=[[n,i.center.eViewport],[i.bottomCenter.eViewport],[i.topCenter.eViewport]];break}this.eSecondaryContainers=s}),this.moveColumnFeature=this.createManagedBean(new vf(o)),this.bodyDropPivotTarget=this.createManagedBean(new df(o)),t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&e.dragSource.type===0}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}onDragCancel(){this.currentDropListener.onDragCancel()}},yf=class extends x{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,o){const i=this.beans.colModel.getCols();if(!i)return;const s=i[e];this.moveColumns([s],t,o)}moveColumns(e,t,o,i=!0){const{colModel:s,colAnimation:n,visibleCols:r,eventSvc:l}=this.beans,a=s.getCols();if(!a)return;if(t>a.length-e.length){k(30,{toIndex:t});return}n==null||n.start();const d=s.getColsForKeys(e);this.doesMovePassRules(d,t)&&(gr(s.getCols(),d,t),r.refresh(o),l.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,toIndex:t,finished:i,source:o})),n==null||n.finish()}doesMovePassRules(e,t){const o=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(o)}doesOrderPassRules(e){const{colModel:t,gos:o}=this.beans;return!(!yr(e,t.getColTree())||!(s=>{const n=d=>d?d==="left"||d===!0?-1:1:0,r=o.get("enableRtl");let l=r?1:-1,a=!0;return s.forEach(d=>{const c=n(d.getColDef().lockPosition);r?c>l&&(a=!1):c<l&&(a=!1),l=c}),a})(e))}getProposedColumnOrder(e,t){const i=this.beans.colModel.getCols().slice();return gr(i,e,t),i}createBodyDropTarget(e,t){return new Sf(e,t)}moveHeader(e,t,o,i,s){const{ctrlsSvc:n,gos:r,colModel:l,visibleCols:a,focusSvc:d}=this.beans,c=t.getBoundingClientRect(),u=c.left,h=Q(o),g=h?c.width:o.getActualWidth(),p=e==="left"!==r.get("enableRtl"),f=$s({x:p?u-20:u+g+20,pinned:i,fromKeyboard:!0,gos:r,ctrlsSvc:n}),C=d.focusedHeader;Ll({allMovingColumns:h?o.getLeafColumns():[o],isFromHeader:!0,fromLeft:e==="right",xPosition:f,pinned:i,fromEnter:!1,fakeEvent:!1,gos:r,colModel:l,colMoves:this,visibleCols:a,finished:!0});let m;if(h){const w=o.getDisplayedLeafColumns();m=p?w[0]:$(w)}else m=o;if(n.getScrollFeature().ensureColumnVisible(m,"auto"),(!s.isAlive()||r.get("ensureDomOrder"))&&C){let w;if(h){const b=o.getGroupId(),v=o.getLeafColumns();if(!v.length)return;const S=v[0].getParent();if(!S)return;w=Rf(S,b)}else w=o;w&&d.focusHeaderPosition({headerPosition:{...C,column:w}})}}setDragSourceForHeader(e,t,o){const{gos:i,colModel:s,dragAndDrop:n,visibleCols:r}=this.beans;let l=!i.get("suppressDragLeaveHidesColumns");const a=Q(t),d=a?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>l?"hide":"notAllowed",getDragItem:a?()=>xf(t,r.allCols):()=>Ef(t),dragItemName:o,onDragStarted:()=>{l=!i.get("suppressDragLeaveHidesColumns"),Us(d,!0)},onDragStopped:()=>Us(d,!1),onDragCancelled:()=>Us(d,!1),onGridEnter:h=>{if(l){const{columns:g=[],visibleState:p}=h??{},f=a?m=>!p||p[m.getColId()]:()=>!0,C=g.filter(m=>!m.getColDef().lockVisible&&f(m));s.setColsVisible(C,!0,"uiColumnMoved")}},onGridExit:h=>{var g;if(l){const p=((g=h==null?void 0:h.columns)==null?void 0:g.filter(f=>!f.getColDef().lockVisible))||[];s.setColsVisible(p,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}};function Rf(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function Ef(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function xf(e,t){var l;const o=e.getProvidedColumnGroup().getLeafColumns(),i={};o.forEach(a=>i[a.getId()]=a.isVisible());const s=[];t.forEach(a=>{o.indexOf(a)>=0&&(s.push(a),we(o,a))}),o.forEach(a=>s.push(a));const n=[],r=e.getLeafColumns();for(const a of s)r.indexOf(a)!==-1&&n.push(a);return{columns:s,columnsInSplit:n,visibleState:i,containerType:(l=n[0])==null?void 0:l.pinned}}var Df={moduleName:"ColumnMove",version:G,beans:[yf,rf],apiFunctions:{moveColumnByIndex:lf,moveColumns:af},dependsOn:[of],css:[nf]},Ff=class extends x{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const o=this.getHeaderCellForColumn(e);if(!o)return-1;const i=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||i.push(o),this.getPreferredWidthForElements(i)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){const o=document.createElement("form");o.style.position="fixed";const i=this.centerRowContainerCtrl.eContainer;e.forEach(n=>this.cloneItemIntoDummy(n,o)),i.appendChild(o);const s=o.offsetWidth;return i.removeChild(o),t=t??this.gos.get("autoSizePadding"),s+t}getHeaderCellForColumn(e){let t=null;return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().forEach(o=>{const i=o.getHtmlElementForColumnHeader(e);i!=null&&(t=i)}),t}cloneItemIntoDummy(e,t){const o=e.cloneNode(!0);o.style.width="",o.style.position="static",o.style.left="";const i=document.createElement("div"),s=i.classList;["ag-header-cell","ag-header-group-cell"].some(l=>o.classList.contains(l))?(s.add("ag-header","ag-header-row"),i.style.position="static"):s.add("ag-row");let r=e.parentElement;for(;r;){if(["ag-header-row","ag-row"].some(a=>r.classList.contains(a))){for(let a=0;a<r.classList.length;a++){const d=r.classList[a];d!="ag-row-position-absolute"&&s.add(d)}break}r=r.parentElement}i.appendChild(o),t.appendChild(i)}},Ol={moduleName:"AutoWidth",version:G,beans:[Ff]};function Pf(e,t,o=!0,i="api"){var s;(s=e.colResize)==null||s.setColumnWidths(t,!1,o,i)}var Tf=class extends x{constructor(e,t,o,i){super(),this.comp=e,this.eResize=t,this.pinned=o,this.columnGroup=i}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:o}=this.beans,i=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(i),!t.get("suppressAutoSize")&&o&&this.addDestroyFunc(o.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:o,resizeRatios:i,groupAfterColumns:s,groupAfterStartWidth:n,groupAfterRatios:r}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=o,this.resizeRatios=i,this.resizeTakeFromCols=s,this.resizeTakeFromStartWidth=n,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(e,t,o="uiColumnResized"){const i=this.normaliseDragChange(t),s=this.resizeStartWidth+i;this.resizeColumnsFromLocalValues(s,o,e)}getInitialValues(e){var a;const t=d=>d.reduce((c,u)=>c+u.getActualWidth(),0),o=(d,c)=>d.map(u=>u.getActualWidth()/c),i=this.getColumnsToResize(),s=t(i),n=o(i,s),r={columnsToResize:i,resizeStartWidth:s,resizeRatios:n};let l=null;if(e&&(l=((a=this.beans.colGroupSvc)==null?void 0:a.getGroupAtDirection(this.columnGroup,"After"))??null),l){const d=l.getDisplayedLeafColumns(),c=r.groupAfterColumns=d.filter(h=>h.isResizable()),u=r.groupAfterStartWidth=t(c);r.groupAfterRatios=o(c,u)}else r.groupAfterColumns=void 0,r.groupAfterStartWidth=void 0,r.groupAfterRatios=void 0;return r}resizeLeafColumnsToFit(e){const t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),o=this.getInitialValues();t>o.resizeStartWidth&&this.resizeColumns(o,t,e,!0)}resizeColumnsFromLocalValues(e,t,o=!0){if(!this.resizeCols||!this.resizeRatios)return;const i={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(i,e,t,o)}resizeColumns(e,t,o,i=!0){var u;const{columnsToResize:s,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:l,groupAfterStartWidth:a,groupAfterRatios:d}=e,c=[];if(c.push({columns:s,ratios:r,width:t}),l){const h=t-n;c.push({columns:l,ratios:d,width:a-h})}(u=this.beans.colResize)==null||u.resizeColumnSets({resizeSets:c,finished:i,source:o}),i&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},If=class extends x{constructor(e,t,o,i,s){super(),this.pinned=e,this.column=t,this.eResize=o,this.comp=i,this.ctrl=s}postConstruct(){const e=[];let t,o;const i=()=>{if(Z(this.eResize,t),!t)return;const{horizontalResizeSvc:r,colAutosize:l}=this.beans,a=r.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(a),o&&l&&e.push(l.addColumnAutosize(this.eResize,this.column))},s=()=>{e.forEach(r=>r()),e.length=0},n=()=>{const r=this.column.isResizable(),l=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(r!==t||l!==o)&&(t=r,o=l,s(),i())};n(),this.addDestroyFunc(s),this.ctrl.setRefreshFunction("resize",n)}onResizing(e,t){const{column:o,lastResizeAmount:i,resizeStartWidth:s,beans:n}=this,r=this.normaliseResizeAmount(t),l=s+r,a=[{key:o,newWidth:l}],{pinnedCols:d,ctrlsSvc:c,colResize:u}=n;if(this.column.getPinned()){const h=(d==null?void 0:d.leftWidth)??0,g=(d==null?void 0:d.rightWidth)??0,p=Ut(c.getGridBodyCtrl().eBodyViewport)-50;if(h+g+(r-i)>p)return}this.lastResizeAmount=r,u==null||u.setColumnWidths(a,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 o=this.pinned!=="left",i=this.pinned==="right";return this.gos.get("enableRtl")?o&&(t*=-1):i&&(t*=-1),t}},Af=class extends x{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,o,i){const s=[],{colModel:n,gos:r,visibleCols:l}=this.beans;e.forEach(a=>{const d=n.getColDefCol(a.key)||n.getCol(a.key);if(!d)return;if(s.push({width:a.newWidth,ratios:[1],columns:[d]}),r.get("colResizeDefault")==="shift"&&(t=!t),t){const u=l.getColAfter(d);if(!u)return;const h=d.getActualWidth()-a.newWidth,g=u.getActualWidth()+h;s.push({width:g,ratios:[1],columns:[u]})}}),s.length!==0&&this.resizeColumnSets({resizeSets:s,finished:o,source:i})}resizeColumnSets(e){const{resizeSets:t,finished:o,source:i}=e;if(!(!t||t.every(c=>Mf(c)))){if(o){const c=t&&t.length>0?t[0].columns:null;yt(this.eventSvc,c,o,i)}return}const n=[],r=[];t.forEach(c=>{const{width:u,columns:h,ratios:g}=c,p={},f={};h.forEach(w=>r.push(w));let C=!0,m=0;for(;C;){if(m++,m>1e3){U(31);break}C=!1;const w=[];let b=0,v=u;h.forEach((D,I)=>{if(f[D.getId()])v-=p[D.getId()];else{w.push(D);const F=g[I];b+=F}});const S=1/b;w.forEach((D,I)=>{const O=I===w.length-1;let F;O?F=v:(F=Math.round(g[I]*u*S),v-=F);const P=D.getMinWidth(),T=D.getMaxWidth();F<P?(F=P,f[D.getId()]=!0,C=!0):T>0&&F>T&&(F=T,f[D.getId()]=!0,C=!0),p[D.getId()]=F})}h.forEach(w=>{const b=p[w.getId()];w.getActualWidth()!==b&&(w.setActualWidth(b,i),n.push(w))})});const l=n.length>0;let a=[];if(l){const{colFlex:c,visibleCols:u,colViewport:h}=this.beans;a=(c==null?void 0:c.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0}))??[],u.setLeftValues(i),u.updateBodyWidths(),h.checkViewportColumns()}const d=r.concat(a);(l||o)&&yt(this.eventSvc,d,o,i,a)}resizeHeader(e,t,o){if(!e.isResizable())return;const i=e.getActualWidth(),s=e.getMinWidth(),n=e.getMaxWidth(),r=Math.min(Math.max(i+t,s),n);this.setColumnWidths([{key:e,newWidth:r}],o,!0,"uiColumnResized")}createResizeFeature(e,t,o,i,s){return new If(e,t,o,i,s)}createGroupResizeFeature(e,t,o,i){return new Tf(e,t,o,i)}};function Mf(e){const{columns:t,width:o}=e;let i=0,s=0,n=!0;t.forEach(a=>{const d=a.getMinWidth();i+=d||0;const c=a.getMaxWidth();c>0?s+=c:n=!1});const r=o>=i,l=!n||o<=s;return r&&l}var kf={moduleName:"ColumnResize",version:G,beans:[Af],apiFunctions:{setColumnWidths:Pf},dependsOn:[sf,Ol]},Lf=class extends x{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})})}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach(e=>e()),this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.toggleCss("ag-hidden",e===0)}},Gf=class extends pl{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}setComp(e,t,o,i,s){const{column:n,beans:r}=this,{context:l,colNames:a,colHover:d,rangeSvc:c,colResize:u}=r;this.comp=e,s=Ko(this,l,s),this.setGui(t,s),this.displayName=a.getDisplayNameForColumnGroup(n,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(s),this.setupExpandable(s),this.setupTooltip(),this.setupAutoHeight({wrapperElement:i,compBean:s}),this.setupUserComp(),this.addHeaderMouseListeners(s),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const h=this.rowCtrl.pinned,g=n.getProvidedColumnGroup().getLeafColumns();d==null||d.createHoverFeature(s,g,t),c==null||c.createRangeHighlightFeature(s,n,e),s.createManagedBean(new hl(n,t,r)),s.createManagedBean(new Lf(e,n)),u?this.resizeFeature=s.createManagedBean(u.createGroupResizeFeature(e,o,h,n)):e.setResizableDisplayed(!1),s.createManagedBean(new ri(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(s,g),s.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(s),s.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.getDefinition();return _(t.gos,{colDef:o,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,o=e.get("groupHeaderHeight");o!=null?o===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(o):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const o of t)e.addManagedListeners(o,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,o)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),o=t[0]===e,i=$(t)===e;if(!o&&!i)return;const s=e.getHighlighted(),n=!!this.rowCtrl.getHeaderCellCtrls().find(a=>a.column.isMoving());let r=!1,l=!1;if(n){const a=this.beans.gos.get("enableRtl"),d=s===1,c=s===0;o&&(a?l=d:r=c),i&&(a?r=c:l=d)}this.comp.toggleCss("ag-header-highlight-before",r),this.comp.toggleCss("ag-header-highlight-after",l)}resizeHeader(e,t){const{resizeFeature:o}=this;if(!o)return;const i=o.getInitialValues(t);o.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){var t;(t=this.resizeFeature)==null||t.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:o,enterpriseMenuFactory:i}=this.beans,s=this.column,n=s.getProvidedColumnGroup(),r=_(o,{displayName:this.displayName,columnGroup:s,setExpanded:a=>{e.setColumnGroupOpened(n,a,"gridInitializing")},setTooltip:(a,d)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(a,d)},showColumnMenu:(a,d)=>i==null?void 0:i.showMenuAfterButtonClick(n,a,"columnMenu",d),showColumnMenuAfterMouseClick:(a,d)=>i==null?void 0:i.showMenuAfterMouseEvent(n,a,"columnMenu",d),eGridHeader:this.eGui}),l=Pu(t,r);l&&this.comp.setUserCompDetails(l)}addHeaderMouseListeners(e){const t=s=>this.handleMouseOverChange(s.type==="mouseenter"),o=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column.getProvidedColumnGroup()),i=s=>this.handleContextMenuMouseEvent(s,void 0,this.column.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:o,contextmenu:i})}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){var o;this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const o=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:o,expandableChanged:o})}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){const{column:e}=this,t=e.getColGroupDef(),o=$r(t,this.gos,null,e);e.isPadding()?(o.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(s=>s.isSpanHeaderHeight())&&o.push("ag-header-span-height")):(o.push("ag-header-group-cell-with-group"),t!=null&&t.wrapHeaderText&&o.push("ag-header-cell-wrap-text")),o.forEach(i=>this.comp.toggleCss(i,!0))}setupMovingCss(e){const{column:t}=this,i=t.getProvidedColumnGroup().getLeafColumns(),s=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());i.forEach(n=>{e.addManagedListeners(n,{movingChanged:s})}),s()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||this.focusThis()}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();if(!(!this.expandable||!t)&&e.key===y.ENTER){const o=this.column,i=!o.isExpanded();this.beans.colGroupSvc.setColumnGroupOpened(o.getProvidedColumnGroup(),i,"uiColumnExpanded")}}setDragSource(e){var t;!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=((t=this.beans.colMoves)==null?void 0:t.setDragSourceForHeader(e,this.column,this.displayName))??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some(e=>e.getColDef().suppressMovable||e.getColDef().lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function Hf(e,t,o){var i;(i=e.colGroupSvc)==null||i.setColumnGroupOpened(t,o,"api")}function Of(e,t,o){var i;return((i=e.colGroupSvc)==null?void 0:i.getColumnGroup(t,o))??null}function Bf(e,t){var o;return((o=e.colGroupSvc)==null?void 0:o.getProvidedColGroup(t))??null}function Vf(e,t,o){return e.colNames.getDisplayNameForColumnGroup(t,o)||""}function Nf(e){var t;return((t=e.colGroupSvc)==null?void 0:t.getColumnGroupState())??[]}function _f(e,t){var o;(o=e.colGroupSvc)==null||o.setColumnGroupState(t,"api")}function Wf(e){var t;(t=e.colGroupSvc)==null||t.resetColumnGroupState("api")}function zf(e){return e.visibleCols.treeLeft}function $f(e){return e.visibleCols.treeCenter}function Uf(e){return e.visibleCols.treeRight}function Kf(e){return e.visibleCols.getAllTrees()}function jf(e,t){for(let o=0;o<t.length;o++){const i=e.indexOf(t[o]);i>=0&&(e[i]=e[e.length-1],e.pop())}}var qf=class extends x{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.headerGroupRowCount=0,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colFlex:o,colModel:i,colGroupSvc:s,colViewport:n,selectionColSvc:r}=this.beans;t||this.buildTrees(i,s),s==null||s.updateOpenClosedVisibility(),this.leftCols=js(this.treeLeft),this.centerCols=js(this.treeCenter),this.rightCols=js(this.treeRight),r==null||r.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(i),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(l=>l.isAutoHeight()),o==null||o.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(i,this.leftCols,this.rightCols,e),n.checkViewportColumns(!1),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}getHeaderRowCount(){if(!this.gos.get("hidePaddedHeaderRows"))return this.beans.colModel.cols.treeDepth;let e=0;for(const t of this.allCols){let o=t.getParent();for(;o;){if(!o.isPadding()){const i=o.getProvidedColumnGroup().getLevel()+1;i>e&&(e=i);break}o=o.getParent()}}return e}updateBodyWidths(){const e=Le(this.centerCols),t=Le(this.leftCols),o=Le(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==o)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=o,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,o,i){let s,n;this.gos.get("enableRtl")?(s=t?t[0]:null,n=o?$(o):null):(s=t?$(t):null,n=o?o[0]:null),e.getCols().forEach(r=>{r.setLastLeftPinned(r===s,i),r.setFirstRightPinned(r===n,i)})}buildTrees(e,t){const o=e.getColsToShow(),i=o.filter(a=>a.getPinned()=="left"),s=o.filter(a=>a.getPinned()=="right"),n=o.filter(a=>a.getPinned()!="left"&&a.getPinned()!="right"),r=new nu,l=a=>t?t.createColumnGroups(a):a.columns;this.treeLeft=l({columns:i,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=l({columns:s,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=l({columns:n,idCreator:r,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){const t=e.getCols(),o=[],i=[],s=[];for(const n of t){const r=n.getPinned();r?r===!0||r==="left"?o.push(n):s.push(n):i.push(n)}this.ariaOrderColumns=o.concat(i).concat(s)}getAriaColIndex(e){let t;return Q(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(t=>{Q(t)&&t.checkLeft()})})}setLeftValuesOfCols(e){const{colModel:t}=this.beans;if(!t.getColDefCols())return;const i=t.getCols().slice(0),s=this.gos.get("enableRtl");[this.leftCols,this.rightCols,this.centerCols].forEach(n=>{if(s){let r=Le(n);n.forEach(l=>{r-=l.getActualWidth(),l.setLeft(r,e)})}else{let r=0;n.forEach(l=>{l.setLeft(r,e),r+=l.getActualWidth()})}jf(i,n)}),i.forEach(n=>{n.setLeft(null,e)})}joinCols(){this.gos.get("enableRtl")?this.allCols=this.rightCols.concat(this.centerCols).concat(this.leftCols):this.allCols=this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}isColDisplayed(e){return this.allCols.indexOf(e)>=0}getLeftColsForRow(e){const{leftCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){const{rightCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,o,i){const s=[];let n=null;for(let r=0;r<t.length;r++){const l=t[r],a=t.length-r,d=Math.min(l.getColSpan(e),a),c=[l];if(d>1){const h=d-1;for(let g=1;g<=h;g++)c.push(t[r+g]);r+=h}let u;o?(u=!1,c.forEach(h=>{o(h)&&(u=!0)})):u=!0,u&&(s.length===0&&n&&(i&&i(l))&&s.push(n),s.push(l)),n=l}return s}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){const t=this.allCols,o=t.indexOf(e);return o>0?t[o-1]:null}isPinningLeft(){return this.leftCols.length>0}isPinningRight(){return this.rightCols.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};at(this.treeCenter,!1,e),at(this.treeLeft,!1,e),at(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["leftCols","centerCols","rightCols"];e&&t.reverse();for(let o=0;o<t.length;o++){const i=this[t[o]];if(i.length)return e?$(i):i[0]}return null}getColAfter(e){const t=this.allCols,o=t.indexOf(e);return o<t.length-1?t[o+1]:null}getColsLeftWidth(){return Le(this.leftCols)}getDisplayedColumnsRightWidth(){return Le(this.rightCols)}isColAtEdge(e,t){const o=this.allCols;if(!o.length)return!1;const i=t==="first";let s;if(Q(e)){const n=e.getDisplayedLeafColumns();if(!n.length)return!1;s=i?n[0]:$(n)}else s=e;return(i?o[0]:$(o))===s}};function at(e,t,o){if(e)for(let i=0;i<e.length;i++){const s=e[i];if(Q(s)){const n=t?s.getDisplayedChildren():s.getChildren();at(n,t,o)}o(s)}}function js(e){const t=[];return at(e,!0,o=>{et(o)&&t.push(o)}),t}var Yf=class extends x{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return Ge(null,t,o=>{te(o)&&e.push({groupId:o.getGroupId(),open:o.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const o=[];Ge(null,t,i=>{if(te(i)){const s=i.getColGroupDef(),n={groupId:i.getGroupId(),open:s?s.openByDefault:void 0};o.push(n)}}),this.setColumnGroupState(o,e)}setColumnGroupState(e,t){const{colModel:o,colAnimation:i,visibleCols:s,eventSvc:n}=this.beans;if(!o.getColTree().length)return;i==null||i.start();const l=[];e.forEach(a=>{const d=a.groupId,c=a.open,u=this.getProvidedColGroup(d);u&&u.isExpanded()!==c&&(u.setExpanded(c),l.push(u))}),s.refresh(t,!0),l.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:l.length===1?l[0]:void 0,columnGroups:l}),i==null||i.finish()}setColumnGroupOpened(e,t,o){let i;te(e)?i=e.getId():i=e||"",this.setColumnGroupState([{groupId:i,open:t}],o)}getProvidedColGroup(e){let t=null;return Ge(null,this.beans.colModel.getColTree(),o=>{te(o)&&o.getId()===e&&(t=o)}),t}getGroupAtDirection(e,t){const o=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),i=e.getDisplayedLeafColumns(),s=t==="After"?$(i):i[0],n=`getCol${t}`;for(;;){const r=this.beans.visibleCols[n](s);if(!r)return null;const l=this.getColGroupAtLevel(r,o);if(l!==e)return l}}getColGroupAtLevel(e,t){let o=e.getParent(),i,s;for(;i=o.getProvidedColumnGroup().getLevel(),s=o.getPaddingLevel(),!(i+s<=t);)o=o.getParent();return o}updateOpenClosedVisibility(){const e=this.beans.visibleCols.getAllTrees();at(e,!1,t=>{Q(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(Q(e))return e;const o=this.beans.visibleCols.getAllTrees(),i=typeof t=="number";let s=null;return at(o,!1,n=>{if(Q(n)){const r=n;let l;i?l=e===r.getGroupId()&&t===r.getPartId():l=e===r.getGroupId(),l&&(s=r)}}),s}createColumnGroups(e){const{columns:t,idCreator:o,pinned:i,oldDisplayedGroups:s,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(s),l=[];let a=t;for(;a.length;){const d=a;a=[];let c=0;const u=h=>{const g=c;c=h;const p=d[g],C=(Q(p)?p.getProvidedColumnGroup():p).getOriginalParent();if(C==null){for(let w=g;w<h;w++)l.push(d[w]);return}const m=this.createColumnGroup(C,o,r,i,n);for(let w=g;w<h;w++)m.addChild(d[w]);a.push(m)};for(let h=1;h<d.length;h++){const g=d[h],f=(Q(g)?g.getProvidedColumnGroup():g).getOriginalParent(),C=d[c],w=(Q(C)?C.getProvidedColumnGroup():C).getOriginalParent();f!==w&&u(h)}c<d.length&&u(d.length)}return n||this.setupParentsIntoCols(l,null),l}createProvidedColumnGroup(e,t,o,i,s,n,r){const l=s.getUniqueKey(t.groupId||null,null),a=ur(this.beans,t,l),d=new No(a,l,!1,o);this.createBean(d);const c=this.findExistingGroup(t,n);c&&n.splice(c.idx,1);const u=c==null?void 0:c.group;u&&d.setExpanded(u.isExpanded());const h=vr(this.beans,a.children,o+1,e,i,s,n,r);return d.setChildren(h),d}balanceColumnTree(e,t,o,i){const s=[];for(let n=0;n<e.length;n++){const r=e[n];if(te(r)){const l=r,a=this.balanceColumnTree(l.getChildren(),t+1,o,i);l.setChildren(a),s.push(l)}else{let l,a;for(let d=t;d<o;d++){const c=i.getUniqueKey(null,null),u=ur(this.beans,null,c),h=new No(u,c,!0,d);this.createBean(h),a&&a.setChildren([h]),a=h,l||(l=a)}if(l&&a)if(s.push(l),e.some(c=>te(c))){a.setChildren([r]);continue}else{a.setChildren(e);break}s.push(r)}}return s}findDepth(e){let t=0,o=e;for(;o&&o[0]&&te(o[0]);)t++,o=o[0].getChildren();return t}findMaxDepth(e,t){let o=t;for(let i=0;i<e.length;i++){const s=e[i];if(te(s)){const n=s,r=this.findMaxDepth(n.getChildren(),t+1);o<r&&(o=r)}}return o}balanceTreeForAutoCols(e,t){const o=[];return e.forEach(i=>{let s=i;for(let n=t-1;n>=0;n--){const r=new No(null,`FAKE_PATH_${i.getId()}}_${n}`,!0,n);this.createBean(r),r.setChildren([s]),s.originalParent=r,s=r}t===0&&(i.originalParent=null),o.push(s)}),o}findExistingGroup(e,t){if(e.groupId!=null)for(let i=0;i<t.length;i++){const s=t[i];if(s.getColGroupDef()&&s.getId()===e.groupId)return{idx:i,group:s}}}createColumnGroup(e,t,o,i,s){const n=e.getGroupId(),r=t.getInstanceIdForKey(n),l=Xr(n,r);let a=o[l];return a&&a.getProvidedColumnGroup()!==e&&(a=null),M(a)?a.reset():(a=new io(e,n,r,i),s||this.createBean(a)),a}mapOldGroupsById(e){const t={},o=i=>{i.forEach(s=>{if(Q(s)){const n=s;t[s.getUniqueId()]=n,o(n.getChildren())}})};return e&&o(e),t}setupParentsIntoCols(e,t){e.forEach(o=>{if(o.parent!==t&&(this.beans.colViewport.colsWithinViewportHash=""),o.parent=t,Q(o)){const i=o;this.setupParentsIntoCols(i.getChildren(),i)}})}},Zf={moduleName:"ColumnGroup",version:G,dynamicBeans:{headerGroupCellCtrl:Gf},beans:[Yf],apiFunctions:{getAllDisplayedColumnGroups:Kf,getCenterDisplayedColumnGroups:$f,getColumnGroup:Of,getColumnGroupState:Nf,getDisplayNameForColumnGroup:Vf,getLeftDisplayedColumnGroups:zf,getProvidedColumnGroup:Bf,getRightDisplayedColumnGroups:Uf,resetColumnGroupState:Wf,setColumnGroupOpened:Hf,setColumnGroupState:_f}},Qf={tag:"div",cls:"ag-skeleton-container"},Xf=class extends j{constructor(){super(Qf)}init(e){const t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>$t(e.eParentOfValue)),$t(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");zt(this.getGui(),t)}setupLoading(e){const t=X({tag:"div",cls:"ag-skeleton-effect"}),o=e.node.rowIndex;if(o!=null){const n=75+25*(o%2===0?Math.sin(o):Math.cos(o));t.style.width=`${n}%`}this.getGui().appendChild(t);const i=this.getLocaleTextFunc(),s=e.deferRender?i("ariaDeferSkeletonCellLoading","Cell is loading"):i("ariaSkeletonCellLoading","Row data is loading");zt(this.getGui(),s)}refresh(e){return!1}},Jf={moduleName:"CheckboxCellRenderer",version:G,userComponents:{agCheckboxCellRenderer:Jg}},eC={moduleName:"SkeletonCellRenderer",version:G,userComponents:{agSkeletonCellRenderer:Xf}};function tC(e,t){const o=e.colModel.getColDefCol(t);return o?o.getColDef():null}function oC(e){return e.colModel.getColumnDefs()}function iC(e,t,o){return e.colNames.getDisplayNameForColumn(t,o)||""}function sC(e,t){return e.colModel.getColDefCol(t)}function nC(e){return e.colModel.getColDefCols()}function rC(e,t){return ve(e,t,"api")}function lC(e){return Uo(e)}function aC(e){eu(e,"api")}function dC(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function cC(e){return e.visibleCols.isPinningLeft()}function uC(e){return e.visibleCols.isPinningRight()}function hC(e,t){return e.visibleCols.getColAfter(t)}function gC(e,t){return e.visibleCols.getColBefore(t)}function pC(e,t,o){e.colModel.setColsVisible(t,o,"api")}function fC(e,t,o){var i;(i=e.pinnedCols)==null||i.setColsPinned(t,o,"api")}function CC(e){return e.colModel.getCols()}function mC(e){return e.visibleCols.leftCols}function wC(e){return e.visibleCols.centerCols}function vC(e){return e.visibleCols.rightCols}function bC(e){return e.visibleCols.allCols}function SC(e){return e.colViewport.getViewportColumns()}function qs(e,t){if(!e)return;const o=e,i={};return Object.keys(o).forEach(s=>{if(t&&t.indexOf(s)>=0||Sn.has(s))return;const n=o[s];typeof n=="object"&&n!==null&&n.constructor===Object?i[s]=qs(n):i[s]=n}),i}var yC=class extends x{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,o,i){var l,a;const s=e.slice();t?s.sort((d,c)=>o.indexOf(d)-o.indexOf(c)):o&&s.sort((d,c)=>i.indexOf(d)-i.indexOf(c));const n=(l=this.rowGroupColsSvc)==null?void 0:l.columns,r=(a=this.pivotColsSvc)==null?void 0:a.columns;return this.buildColumnDefs(s,n,r)}buildColumnDefs(e,t=[],o=[]){const i=[],s={};return e.forEach(n=>{const r=this.createDefFromColumn(n,t,o);let l=!0,a=r,d=n.getOriginalParent(),c=null;for(;d;){let u=null;if(d.isPadding()){d=d.getOriginalParent();continue}const h=s[d.getGroupId()];if(h){h.children.push(a),l=!1;break}if(u=this.createDefFromGroup(d),u&&(u.children=[a],s[u.groupId]=u,a=u,d=d.getOriginalParent()),d!=null&&c===d){l=!1;break}c=d}l&&i.push(a)}),i}createDefFromGroup(e){const t=qs(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,o){const i=qs(e.getColDef());return i.colId=e.getColId(),i.width=e.getActualWidth(),i.rowGroup=e.isRowGroupActive(),i.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,i.pivot=e.isPivotActive(),i.pivotIndex=e.isPivotActive()?o.indexOf(e):null,i.aggFunc=e.isValueActive()?e.getAggFunc():null,i.hide=e.isVisible()?void 0:!0,i.pinned=e.isPinned()?e.getPinned():null,i.sort=e.getSort()?e.getSort():null,i.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,i}},RC=class extends x{constructor(){super(...arguments),this.beanName="colFlex"}refreshFlexedColumns(e={}){const t=e.source??"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);const o=this.flexViewportWidth;if(!o)return[];const{visibleCols:i}=this.beans,s=i.centerCols;let n=-1;if(e.resizingCols){const p=new Set(e.resizingCols);for(let f=s.length-1;f>=0;f--)if(p.has(s[f])){n=f;break}}let r=!1;const l=s.map((p,f)=>{const C=p.getFlex(),m=C!=null&&C>0&&f>n;return r||(r=m),{col:p,isFlex:m,flex:Math.max(0,C??0),initialSize:p.getActualWidth(),min:p.getMinWidth(),max:p.getMaxWidth(),targetSize:0}});if(!r)return[];let a=l.length,d=l.reduce((p,f)=>p+f.flex,0),c=o;const u=(p,f)=>{p.frozenSize=f,p.col.setActualWidth(f,t),c-=f,d-=p.flex,a-=1},h=p=>p.frozenSize!=null;for(const p of l)p.isFlex||u(p,p.initialSize);for(;a>0;){const p=Math.round(d<1?c*d:c);let f,C=0,m=0;for(const v of l){if(h(v))continue;f=v,m+=p*(v.flex/d);const S=m-C,D=Math.round(S);v.targetSize=D,C+=D}f&&(f.targetSize+=p-C);let w=0;for(const v of l){if(h(v))continue;const S=v.targetSize,D=Math.min(Math.max(S,v.min),v.max);w+=D-S,v.violationType=D===S?void 0:D<S?"max":"min",v.targetSize=D}const b=w===0?"all":w>0?"min":"max";for(const v of l)h(v)||(b==="all"||v.violationType===b)&&u(v,v.targetSize)}e.skipSetLeft||i.setLeftValues(t),e.updateBodyWidths&&i.updateBodyWidths();const g=l.filter(p=>p.isFlex&&!p.violationType).map(p=>p.col);if(e.fireResizedEvent){const p=l.filter(C=>C.initialSize!==C.frozenSize).map(C=>C.col),f=l.filter(C=>C.flex).map(C=>C.col);yt(this.eventSvc,p,!0,t,f)}return g}initCol(e){const{flex:t,initialFlex:o}=e.colDef;t!==void 0?e.flex=t:o!==void 0&&(e.flex=o)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}},EC=["dateTimeString","dateString","text","number","boolean","date"],xC=class extends x{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number(){return{cellEditor:"agNumberCellEditor"}},boolean(){return{cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:e=>!!e.colDef.editable&&e.event.key===y.SPACE}},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:o}){return{cellEditorParams:{useFormatter:!0},comparator:(i,s)=>{const n=t.getColDefCol(o),r=n==null?void 0:n.getColDef();if(!n||!r)return 0;const l=i==null?"":e({column:n,node:null,value:i}),a=s==null?"":e({column:n,node:null,value:s});return l===a?0:l>a?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={},o={},i=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:Nl(u,this.gos)};t[c]=h,o[c]=i(h)}const s=this.gos.get("dataTypeDefinitions")??{},n={};for(const c of Object.keys(s)){const u=s[c],h=this.processDataTypeDefinition(u,s,[c],e);h&&(t[c]=h,u.dataTypeMatcher&&(n[c]=u.dataTypeMatcher),o[c]=i(h))}const{valueParser:r,valueFormatter:l}=e.object,{valueParser:a,valueFormatter:d}=t.object;this.hasObjectValueParser=a!==r,this.hasObjectValueFormatter=d!==l,this.formatValueFuncs=o,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(n,e)}sortKeysInMatchers(e,t){const o={...e};for(const i of EC)delete o[i],o[i]=e[i]??t[i].dataTypeMatcher;return o}processDataTypeDefinition(e,t,o,i){let s;const n=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let r=i[n];const l=t[n];if(r&&l&&(r=l),!Vl(e,r,n))return;s=Bl(r,e)}else{if(o.includes(n)){k(44);return}const r=t[n];if(!Vl(e,r,n))return;const l=this.processDataTypeDefinition(r,t,[...o,n],i);if(!l)return;s=Bl(l,e)}return{...s,groupSafeValueFormatter:Nl(s,this.gos)}}updateColDefAndGetColumnType(e,t,o){let{cellDataType:i}=t;const{field:s}=t;if(i===void 0&&(i=e.cellDataType),(i==null||i===!0)&&(i=this.canInferCellDataType(e,t)?this.inferCellDataType(s,o):!1),!i){e.cellDataType=!1;return}const n=this.dataTypeDefinitions[i];if(!n){k(47,{cellDataType:i});return}return e.cellDataType=i,n.groupSafeValueFormatter&&(e.valueFormatter=n.groupSafeValueFormatter),n.valueParser&&(e.valueParser=n.valueParser),n.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,i,n,o),n.columnTypes}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const o=i=>{t.add(i.key)};e.__addEventListener("columnStateUpdated",o),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",o))}canInferCellDataType(e,t){const{gos:o}=this;if(!oe(o))return!1;const i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(Ys(t,i))return!1;const s=t.type===null?e.type:t.type;if(s){const n=o.get("columnTypes")??{};if($o(s).some(l=>{const a=n[l.trim()];return a&&Ys(a,i)}))return!1}return!Ys(e,i)}inferCellDataType(e,t){if(!e)return;let o;const i=this.getInitialData();if(i){const n=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");o=Wt(i,e,n)}else this.initWaitForRowData(t);return o==null?void 0:Object.keys(this.dataTypeMatchers).find(n=>this.dataTypeMatchers[n](o))??"object"}getInitialData(){var t;const e=this.gos.get("rowData");if(e!=null&&e.length)return e[0];if(this.initialData)return this.initialData;{const o=(t=this.beans.rowModel.rootNode)==null?void 0:t.allLeafChildren;if(o!=null&&o.length)return o[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:o,eventSvc:i}=this.beans;t&&o&&(o.shouldQueueResizeOperations=!0);const[s]=this.addManagedEventListeners({rowDataUpdateStarted:n=>{const{firstRowData:r}=n;r&&(s==null||s(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&(o==null||o.processResizeOperations()),i.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const o=[];this.destroyColumnStateUpdateListeners();const i={},s={};for(const n of Object.keys(this.columnStateUpdatesPendingInference)){const r=this.columnStateUpdatesPendingInference[n],l=this.colModel.getCol(n);if(!l)return;const a=l.getColDef();if(!this.resetColDefIntoCol(l,"cellDataTypeInferred"))return;const d=l.getColDef();if(t&&d.type&&d.type!==a.type){const c=FC(l,r);c.rowGroup&&c.rowGroupIndex==null&&(i[n]=c),c.pivot&&c.pivotIndex==null&&(s[n]=c),o.push(c)}}t&&o.push(...this.generateColumnStateForRowGroupAndPivotIndexes(i,s)),o.length&&ve(this.beans,{state:o},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const o={},{rowGroupColsSvc:i,pivotColsSvc:s}=this.beans;return i==null||i.restoreColumnOrder(o,e),s==null||s.restoreColumnOrder(o,t),Object.values(o)}resetColDefIntoCol(e,t){const o=e.getUserProvidedColDef();if(!o)return!1;const i=as(this.beans,o,e.getColId());return e.setColDef(i,o,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.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){var t;return(t=this.getDataTypeDefinition(e))==null?void 0:t.baseDataType}checkType(e,t){var i;if(t==null)return!0;const o=(i=this.getDataTypeDefinition(e))==null?void 0:i.dataTypeMatcher;return o?o(t):!0}validateColDef(e){const t=o=>k(48,{property:o});if(e.cellDataType==="object"){const{object:o}=this.dataTypeDefinitions;e.valueFormatter===o.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&t("Formatter"),e.editable&&e.valueParser===o.valueParser&&!this.hasObjectValueParser&&t("Parser")}}postProcess(e){var r;const t=e.cellDataType;if(!t||typeof t!="string")return;const{dataTypeDefinitions:o,beans:i,formatValueFuncs:s}=this,n=o[t];(r=i.colFilter)==null||r.setColDefPropsForDataType(e,n,s[t])}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,o,i){const s=this.formatValueFuncs[t],n=this.columnDefinitionPropsPerDataType[o.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:o,colId:i,formatValue:s});Object.assign(e,n)}getDateObjectTypeDef(e){const t=this.getLocaleTextFunc(),o=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:i=>no(i.newValue&&String(i.newValue)),valueFormatter:i=>i.value==null?"":!(i.value instanceof Date)||isNaN(i.value.getTime())?t("invalidDate","Invalid Date"):$e(i.value,o)??"",dataTypeMatcher:i=>i instanceof Date}}getDateStringTypeDef(e){const t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:o=>no(o)??void 0,dateFormatter:o=>$e(o??null,t)??void 0,valueParser:o=>ni(String(o.newValue))?o.newValue:null,valueFormatter:o=>ni(String(o.value))?String(o.value):"",dataTypeMatcher:o=>typeof o=="string"&&ni(o)}}getDefaultDataTypes(){const e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>{var o,i;return((i=(o=t.newValue)==null?void 0:o.trim)==null?void 0:i.call(o))===""?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"},text:{baseDataType:"text",valueParser:t=>t.newValue===""?null:Mi(t.newValue),dataTypeMatcher:t=>typeof t=="string"},boolean:{baseDataType:"boolean",valueParser:t=>{var o,i;return t.newValue==null?t.newValue:((i=(o=t.newValue)==null?void 0:o.trim)==null?void 0:i.call(o))===""?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"&&zh(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>Mi(t.value)??""}}}destroyColumnStateUpdateListeners(){this.columnStateUpdateListenerDestroyFuncs.forEach(e=>e()),this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function Bl(e,t){const o={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(o.columnTypes=[...$o(e.columnTypes),...$o(t.columnTypes)]),o}function Vl(e,t,o){return t?t.baseDataType!==e.baseDataType?(k(46),!1):!0:(k(45,{parentCellDataType:o}),!1)}function Nl(e,t){if(e.valueFormatter)return o=>{var i,s;if((i=o.node)!=null&&i.group){const n=(o.colDef.pivotValueColumn??o.column).getAggFunc();if(n){if(n==="first"||n==="last")return e.valueFormatter(o);if(e.baseDataType==="number"&&n!=="count"){if(typeof o.value=="number")return e.valueFormatter(o);if(typeof o.value=="object"){if(!o.value)return;if("toNumber"in o.value)return e.valueFormatter({...o,value:o.value.toNumber()});if("value"in o.value)return e.valueFormatter({...o,value:o.value.value})}}return}}else if(t.get("groupHideOpenParents")&&o.column.isRowGroupActive()&&typeof o.value=="string"&&!((s=e.dataTypeMatcher)!=null&&s.call(e,o.value)))return;return e.valueFormatter(o)}}function DC(e,t,o,i){if(!t[o])return!1;const s=e[o];return s===null?(t[o]=!1,!1):i===void 0?!!s:s===i}function Ys(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([o,i])=>DC(e,t,o,i))}function FC(e,t){const o=Dr(e);return t.forEach(i=>{delete o[i],i==="rowGroup"?delete o.rowGroupIndex:i==="pivot"&&delete o.pivotIndex}),o}var PC={moduleName:"DataType",version:G,beans:[xC],dependsOn:[Jf]},TC={moduleName:"ColumnFlex",version:G,beans:[RC]},_l={moduleName:"ColumnApi",version:G,beans:[yC],apiFunctions:{getColumnDef:tC,getDisplayNameForColumn:iC,getColumn:sC,getColumns:nC,applyColumnState:rC,getColumnState:lC,resetColumnState:aC,isPinning:dC,isPinningLeft:cC,isPinningRight:uC,getDisplayedColAfter:hC,getDisplayedColBefore:gC,setColumnsVisible:pC,setColumnsPinned:fC,getAllGridColumns:CC,getDisplayedLeftColumns:mC,getDisplayedCenterColumns:wC,getDisplayedRightColumns:vC,getAllDisplayedColumns:bC,getAllDisplayedVirtualColumns:SC,getColumnDefs:oC}};function IC(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,o=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(o,"$1 $2$3").replace(/\./g," ").split(" ").map(s=>s.substring(0,1).toUpperCase()+(s.length>1?s.substring(1,s.length):"")).join(" ")}var AC=class extends x{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,o=!1){if(!e)return null;const i=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:s}=this.beans;return o&&s?s.getHeaderName(e,i):i}getDisplayNameForProvidedColumnGroup(e,t,o){const i=t==null?void 0:t.getColGroupDef();return i?this.getHeaderName(i,null,e,t,o):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,o,i,s){var r;const n=e.headerValueGetter;if(n){const l=_(this.gos,{colDef:e,column:t,columnGroup:o,providedColumnGroup:i,location:s});return typeof n=="function"?n(l):typeof n=="string"?((r=this.beans.expressionSvc)==null?void 0:r.evaluate(n,l))??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return IC(e.field)}return""}},MC=class extends x{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[]}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}setScrollPosition(e,t,o=!1){const{visibleCols:i}=this,s=i.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!s)){if(this.scrollWidth=e,this.scrollPosition=t,i.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const r=i.bodyWidth;this.viewportLeft=r-t-e,this.viewportRight=r-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(o)}}getColumnHeadersToRender(e){switch(e){case"left":return this.columnsToRenderLeft;case"right":return this.columnsToRenderRight;default:return this.columnsToRenderCenter}}getHeadersToRender(e,t){let o;switch(e){case"left":o=this.rowsOfHeadersToRenderLeft[t];break;case"right":o=this.rowsOfHeadersToRenderRight[t];break;default:o=this.rowsOfHeadersToRenderCenter[t];break}return o??[]}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.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||kC(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,o=t+e.getActualWidth(),i=this.viewportLeft-200,s=this.viewportRight+200,n=t<i&&o<i,r=t>s&&o>s;return!n&&!r}getViewportColumns(){const{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;const t=n=>{const r=n.getLeft();return M(r)&&r>this.viewportLeft},o=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:i}=this,s=i.centerCols;return i.getColsForRow(e,s,o,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 o=i=>{const s=new Set,n={};for(const r of i){let l=r.getParent();const a=r.isSpanHeaderHeight();for(;l&&!s.has(l);){if(a&&l.isPadding()){l=l.getParent();continue}const c=l.getProvidedColumnGroup().getLevel();n[c]??(n[c]=[]),n[c].push(l),s.add(l),l=l.getParent()}}return n};this.rowsOfHeadersToRenderLeft=o(e),this.rowsOfHeadersToRenderRight=o(t),this.rowsOfHeadersToRenderCenter=o(this.headerColsWithinViewport)}extractViewport(){const e=i=>`${i.getId()}-${i.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),o=this.colsWithinViewportHash!==t;return o&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),o}};function kC(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var LC=class extends x{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class o{refresh(){return!1}getGui(){return this.eGui}init(s){const n=t(s),r=typeof n;if(r==="string"||r==="number"||r==="boolean"){this.eGui=qi("<span>"+n+"</span>");return}if(n==null){this.eGui=X({tag:"span"});return}this.eGui=n}}return o}},GC={moduleName:"CellRendererFunction",version:G,beans:[LC]},HC=class extends x{constructor(){super(...arguments),this.beanName="registry",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:o,dynamicBeans:i,selectors:s}=e;if(o){const n=(r,l,a,d)=>{this.agGridDefaults[r]=l,(a||d)&&(this.agGridDefaultOverrides[r]={params:a,processParams:d})};for(const r of Object.keys(o)){let l=o[r];if(ju(l)&&(l=l.getComp(this.beans)),typeof l=="object"){const{classImp:a,params:d,processParams:c}=l;n(r,a,d,c)}else n(r,l)}}if(i){this.dynamicBeans??(this.dynamicBeans={});for(const n of Object.keys(i))this.dynamicBeans[n]=i[n]}if(s==null||s.forEach(n=>{this.selectors[n.selector]=n}),t)for(const n of Object.keys(t))this.icons[n]=t[n]}getUserComponent(e,t){var l;const o=(a,d,c,u)=>({componentFromFramework:d,component:a,params:c,processParams:u}),{frameworkOverrides:i}=this.beans,s=i.frameworkComponent(t,this.gos.get("components"));if(s!=null)return o(s,!0);const n=this.jsComps[t];if(n){const a=i.isFrameworkComponent(n);return o(n,a)}const r=this.agGridDefaults[t];if(r){const a=this.agGridDefaultOverrides[t];return o(r,!1,a==null?void 0:a.params,a==null?void 0:a.processParams)}return(l=this.beans.validation)==null||l.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}createDynamicBean(e,t,...o){var s;if(!this.dynamicBeans)throw new Error(ye(279,{name:e}));const i=this.dynamicBeans[e];if(i==null){if(t)throw new Error(((s=this.beans.validation)==null?void 0:s.missingDynamicBean(e))??ye(256));return}return new i(...o)}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}},OC=23,BC=class extends x{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){var e,t;this.addEventListener("ready",()=>{this.updateReady(),this.ready&&(this.readyCallbacks.forEach(o=>o(this.params)),this.readyCallbacks.length=0)},((t=(e=this.beans.frameworkOverrides).runWhenReadyAsync)==null?void 0:t.call(e))??!1)}updateReady(){const e=Object.values(this.params);this.ready=e.length===OC&&e.every(t=>(t==null?void 0:t.isAlive())??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{const o=this.readyCallbacks.indexOf(t);o>=0&&this.readyCallbacks.splice(o,1)})}register(e,t){this.params[e]=t,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:"ready"}),t.addDestroyFunc(()=>{this.updateReady()})}get(e){return this.params[e]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){const{leftHeader:e,centerHeader:t,rightHeader:o}=this.params;return[e,o,t]}getHeaderRowContainerCtrl(e){const t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},VC=':where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}&:where(button){color:inherit}}:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-tab-guard{display:block;height:0;position:absolute;width:0}:where(.ag-virtual-list-viewport) .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-virtual-list-viewport{overflow:auto;width:100%}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-virtual-list-container{overflow:hidden}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-scrolling,.ag-scrollbar-active){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value,.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-top:not(.ag-invisible)){border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-bottom:not(.ag-invisible)){border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block;&:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-group-title-bar) .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-flow:row wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}:where(.ag-ltr) .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}:where(.ag-group-item-alignment-stretch) .ag-group-item{align-items:stretch}:where(.ag-group-item-alignment-start) .ag-group-item{align-items:flex-start}:where(.ag-group-item-alignment-end) .ag-group-item{align-items:flex-end}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-large-text-input{display:block}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-data-font-size);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after,.ag-row-highlight-inside:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;pointer-events:none;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after,:where(.ag-ltr) .ag-row-highlight-inside:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after,:where(.ag-rtl) .ag-row-highlight-inside:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto}:where(.ag-ltr) .ag-row-highlight-indent:after{left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size));right:1px}:where(.ag-rtl) .ag-row-highlight-indent:after{left:1px;right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside:after{background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);display:block;height:auto;inset:0;width:auto}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden),.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)),.ag-header-group-cell{&:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}&:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}}:where(.ag-header-cell:not(.ag-floating-filter) *,.ag-header-group-cell *){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-accent-color);content:"";height:100%;position:absolute;width:1px}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2;&:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}}:where(.ag-ltr) .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-rtl) .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-chart,.ag-dnd-ghost,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-list-item,.ag-virtual-list-item{height:var(--ag-list-item-height)}.ag-virtual-list-item{position:absolute;width:100%}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-list-item{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-column-select-column-group-readonly,.ag-column-select-column-readonly,.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-column-select-column-readonly{&.ag-icon-grip,.ag-icon-grip{opacity:.35}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color);&:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);position:relative;&:after{background-color:var(--ag-icon-button-active-indicator-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}:where(.ag-ltr) .ag-filter-active{&:after{right:-1px}}:where(.ag-rtl) .ag-filter-active{&:after{left:-1px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto}.ag-menu,.ag-resizer{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-resizer{pointer-events:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',Zs=typeof window!="object"||!((Ed=(Rd=window==null?void 0:window.document)==null?void 0:Rd.fonts)!=null&&Ed.forEach),It=(e,t,o,i,s,n)=>{if(Zs)return;i&&(e=`@layer ${CSS.escape(i)} { ${e} }`);let r=At.map.get(t);if(r||(r=[],At.map.set(t,r)),r.find(c=>c.css===e))return;const l=document.createElement("style");n&&l.setAttribute("nonce",n),l.dataset.agGlobalCss=o,l.textContent=e;const a={css:e,el:l,priority:s};let d;for(const c of r){if(c.priority>s)break;d=c}if(d){d.el.insertAdjacentElement("afterend",l);const c=r.indexOf(d);r.splice(c+1,0,a)}else t.insertBefore(l,t.querySelector(":not(title, meta)")),r.push(a)},Wl=(e,t,o)=>{It(VC,e,"core",t,0,o),Array.from(Wu()).sort((i,s)=>i.moduleName.localeCompare(s.moduleName)).forEach(i=>{var s;return(s=i.css)==null?void 0:s.forEach(n=>It(n,e,`module-${i.moduleName}`,t,0,o))})},NC=e=>{At.grids.add(e)},_C=e=>{if(At.grids.delete(e),At.grids.size===0){At.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},zl,At=(zl=typeof window=="object"?window:{}).agStyleInjectionState??(zl.agStyleInjectionState={map:new WeakMap,grids:new Set}),xe=e=>new $l(e),Ke="$default",WC=0,$l=class{constructor({feature:e,params:t,modeParams:o={},css:i,cssImports:s}){this.feature=e,this.css=i,this.cssImports=s,this.modeParams={[Ke]:{...o[Ke]??{},...t??{}},...o}}use(e,t,o){let i=this._inject;if(i==null){let{css:s}=this;if(s){const n=`ag-theme-${this.feature??"part"}-${++WC}`;typeof s=="function"&&(s=s()),s=`:where(.${n}) {
|
|
3
|
+
Alternatively register the ValidationModule to see the full message in the console.`}`};function M(...e){is(Zt,e[0],e[1])}function j(...e){is(wt,e[0],e[1])}function Qt(e,t,o){is(wt,e,t,o)}function fc(e,t){const o=t[0];return`error #${o} `+Xn(o,t[1],e).join(" ")}function Ee(...e){return fc(void 0,e)}function er(e,t){return e.get("rowModelType")===t}function ne(e,t){return er(e,"clientSide")}function Lo(e,t){return er(e,"serverSide")}function ie(e,t){return e.get("domLayout")===t}function et(e){return Bo(e)!==void 0}function tr(e){return typeof e.get("getRowHeight")=="function"}function Cc(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function ze(e,t,o=!1,i){const{gos:s,environment:n}=e;if(i==null&&(i=n.getDefaultRowHeight()),tr(s)){if(o)return{height:i,estimated:!0};const l={node:t,data:t.data},d=s.getCallback("getRowHeight")(l);if(rs(d))return d===0&&M(23),{height:Math.max(1,d),estimated:!1}}if(t.detail&&s.get("masterDetail"))return mc(s);const r=s.get("rowHeight");return{height:r&&rs(r)?r:i,estimated:!1}}function mc(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return rs(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function ns(e){const{environment:t,gos:o}=e,i=o.get("rowHeight");if(!i||q(i))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(M(24),t.getDefaultRowHeight())}function rs(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function or(e,t,o){const i=t[e.getDomDataKey()];return i?i[o]:void 0}function tt(e,t,o,i){const s=e.getDomDataKey();let n=t[s];q(n)&&(n={},t[s]=n),n[o]=i}function te(e){const{gos:t,eGridDiv:o}=e;let i=null;const s=t.get("getDocument");return s&&A(s)?i=s():o&&(i=o.ownerDocument),i&&A(i)?i:document}function ir(e){return te(e).defaultView||window}function Xt(e){return e.eGridDiv.getRootNode()}function Q(e){return Xt(e).activeElement}function as(e){let t=null,o=null;try{t=te(e).fullscreenElement}catch{}finally{t||(t=Xt(e));const i=t.querySelector("body");i?o=i:t instanceof ShadowRoot?o=t:t instanceof Document?o=t==null?void 0:t.documentElement:o=t}return o}function wc(e){const t=as(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function vc(e){const t=as(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function Sc(e,t,o){const s=e.getBoundingClientRect().height,n=wc(o)-2,r=vc(o)-2;if(!e.offsetParent)return;const l=Bn(e.offsetParent),{clientY:d,clientX:c}=t;let u=d-l.top-s/2,h=c-l.left-10;const g=te(o),p=g.defaultView||window,f=p.pageYOffset||g.documentElement.scrollTop,C=p.pageXOffset||g.documentElement.scrollLeft;n>0&&h+e.clientWidth>n+C&&(h=n+C-e.clientWidth),h<0&&(h=0),r>0&&u+e.clientHeight>r+f&&(u=r+f-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}function sr(e){const t=Q(e);return t===null||t===te(e).body}function St(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function nr(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||ie(e,"print"))}function xe(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function rr(e){return e.get("grandTotalRow")}function ar(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function bc(e,t,o){return!!t.group&&!t.footer&&ar(e,o)}function Go(e){const t=e.getCallback("getRowId");return t===void 0?t:o=>{let i=t(o);return typeof i!="string"&&(ts(()=>M(25,{id:i}),"getRowIdString"),i=String(i)),i}}function bt(e){return(e==null?void 0:e.checkboxes)??!0}function Ho(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function Oo(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function yc(e){return typeof e.get("rowSelection")!="string"}function ot(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function ls(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function Bo(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==null?void 0:t.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function Jt(e){return Bo(e)==="multiRow"}function Vo(e){const t=e.get("rowSelection");if(typeof t=="string"){const o=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return o&&i?"filteredDescendants":o?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function Rc(e,t=!0){const o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function eo(e){const t=Vo(e);return t==="descendants"||t==="filteredDescendants"}function No(e){return e.get("columnMenu")==="legacy"}function Ec(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function xc(e,t,o){typeof e!="object"&&(e={});const i={...e};return o.forEach(s=>{const n=t[s];typeof n<"u"&&(i[s]=n)}),i}function Dc(e,t){if(!e)return;const o={};let i=!1;if(Object.keys(e).forEach(r=>{o[r]=e[r],i=!0}),!i)return;const s={type:"gridOptionsChanged",options:o};t.dispatchEvent(s);const n={type:"componentStateChanged",...o};t.dispatchEvent(n)}function _(e,t){return e.addGridCommonParams(t)}function Fc(e){return e.get("treeData")?e.get("treeDataParentIdField")?"treeSelfRef":e.get("treeDataChildrenField")?"treeNested":"treePath":"group"}var lr="__ag_Grid_Stop_Propagation",Pc=["touchstart","touchend","touchmove","touchcancel","scroll"],Tc=["wheel"],ds={};function yt(e){e[lr]=!0}function Ge(e){return e[lr]===!0}var dr=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return o=>{if(typeof ds[o]=="boolean")return ds[o];const i=document.createElement(e[o]||"div");return o="on"+o,ds[o]=o in i}})();function cr(e,t,o){let i=t;for(;i;){const s=or(e,i,o);if(s)return s;i=i.parentElement}return null}function Ic(e,t){return!t||!e?!1:Mc(t).indexOf(e)>=0}function Ac(e){const t=[];let o=e.target;for(;o;)t.push(o),o=o.parentElement;return t}function Mc(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():Ac(t)}function kc(e,t,o,i){const s=ur(o);let n;s!=null&&(n={passive:s}),e&&e.addEventListener&&e.addEventListener(t,o,i,n)}var ur=e=>{const t=Pc.includes(e),o=Tc.includes(e);if(t)return!0;if(o)return!1},x=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,o){this.localEventService||(this.localEventService=new Ze),this.localEventService.addEventListener(e,t,o)}removeEventListener(e,t,o){var i;(i=this.localEventService)==null||i.removeEventListener(e,t,o)}dispatchLocalEvent(e){var t;(t=this.localEventService)==null||t.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const o=[];for(const i of Object.keys(t)){const s=t[i];s&&o.push(this._setupListener(e,i,s))}return o}_setupListener(e,t,o){if(this.destroyed)return()=>null;let i;return Lc(e)?(e.__addEventListener(t,o),i=()=>(e.__removeEventListener(t,o),null)):(e instanceof HTMLElement?kc(this.beans.frameworkOverrides,e,t,o):e.addEventListener(t,o),i=()=>(e.removeEventListener(t,o),null)),this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}setupGridOptionListener(e,t){const{gos:o}=this;o.addPropertyEventListener(e,t);const i=()=>(o.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const o=e.join("-")+this.propertyListenerId++,i=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[o])return;this.lastChangeSetIdLookup[o]=s.changeSet.id}const n={type:"gridPropertyChanged",changeSet:s.changeSet,source:s.source};t(n)};e.forEach(s=>this.setupGridOptionListener(s,i))}getLocaleTextFunc(){return bn(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const o=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),o}createBean(e,t,o){return(t||this.stubContext).createBean(e,o)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function Lc(e){return e.__addEventListener!==void 0}var Gc=/[&<>"']/g,Hc={"&":"&","<":"<",">":">",'"':""","'":"'"};function Rt(e){return(e==null?void 0:e.toString().toString())??null}function _o(e){var t;return((t=Rt(e))==null?void 0:t.replace(Gc,o=>Hc[o]))??null}var Oc={resizable:!0,sortable:!0},Bc=0;function hr(){return Bc++}function it(e){return e instanceof $e}var $e=class extends x{constructor(e,t,o,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=o,this.primary=i,this.isColumn=!0,this.instanceId=hr(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new Ze,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=_o(o)}destroy(){var e;super.destroy(),(e=this.beans.rowSpanSvc)==null||e.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:o,colFlex:i}}=this;t==null||t.initCol(this);const s=e.hide;s!==void 0?this.visible=!s:this.visible=!e.initialHide,o==null||o.initCol(this),i==null||i.initCol(this)}setColDef(e,t,o){var s;const i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&((s=this.beans.rowSpanSvc)==null||s.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",o)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.setState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:o}}=this,i=e.get("suppressFieldDotNotation");this.fieldContainsDots=A(t)&&t.indexOf(".")>=0&&!i,this.tooltipFieldContainsDots=A(o)&&o.indexOf(".")>=0&&!i}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){var e;(e=this.beans.tooltipSvc)==null||e.initCol(this)}initRowSpan(){var e;this.colDef.spanRows&&((e=this.beans.rowSpanSvc)==null||e.register(this))}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:o=>{const i=e.recreateColDef(this.colDef);this.setColDef(i,i,o.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const o=e.width,i=e.initialWidth;return o!=null?t=o:i!=null?t=i:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){var t;return((t=this.beans.showRowGroupCols)==null?void 0:t.isRowGroupDisplayed(this,e))??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){var i,s,n;this.frameworkEventListenerService=(s=(i=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:s.call(i,this.frameworkEventListenerService,this.colEventSvc);const o=((n=this.frameworkEventListenerService)==null?void 0:n.wrap(e,t))??t;this.colEventSvc.addEventListener(e,o)}removeEventListener(e,t){var i;const o=((i=this.frameworkEventListenerService)==null?void 0:i.unwrap(e,t))??t;this.colEventSvc.removeEventListener(e,o)}createColumnFunctionCallbackParams(e){return _(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){var t;return((t=this.beans.cellNavigation)==null?void 0:t.isSuppressNavigable(this,e))??!1}isCellEditable(e){var t;return((t=this.beans.editSvc)==null?void 0:t.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){var t;return((t=this.beans.selectionSvc)==null?void 0:t.isCellCheckboxSelection(this,e))??!1}isSuppressPaste(e){var t;return this.isColumnFunc(e,((t=this.colDef)==null?void 0:t.suppressPaste)??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??Oc[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const o=this.createColumnFunctionCallbackParams(e);return t(o)}return!1}createColumnEvent(e,t){return _(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return q(this.sort)}isSorting(){return A(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){var e;return M(261),!!((e=this.beans.colHover)!=null&&e.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 o=e===!0;this.visible!==o&&(this.visible=o,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e&&e.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let o=!0;for(;e;){if(!e.isPadding()){o=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:o}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return _(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(q(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),o=this.colDef.colSpan(t);return Math.max(o,1)}getRowSpan(e){if(q(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),o=this.colDef.rowSpan(t);return Math.max(o,1)}setActualWidth(e,t,o=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),o||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchColEvent(e,t,o){const i=this.createColumnEvent(e,t);o&&de(i,o),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function se(e){return e instanceof Wo}var Wo=class extends x{constructor(e,t,o,i){super(),this.colGroupDef=e,this.groupId=t,this.padding=o,this.level=i,this.isColumn=!1,this.expandable=!1,this.instanceId=hr(),this.expandableListenerRemoveCallback=null,this.expanded=!!(e!=null&&e.openByDefault)}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(const t of this.children)it(t)?e(t):se(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){this.children&&this.children.forEach(t=>{it(t)?e.push(t):se(t)&&t.addLeafColumns(e)})}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.__addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.__removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,o=!1;const i=this.findChildrenRemovingPadding();for(let n=0,r=i.length;n<r;n++){const a=i[n];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,o=!0):l==="closed"?(t=!0,o=!0):(e=!0,t=!0)}const s=e&&t&&o;this.expandable!==s&&(this.expandable=s,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=o=>{o.forEach(i=>{se(i)&&i.isPadding()?t(i.children):e.push(i)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},Vc={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function gr(e,t,o){const i={},s=e.gos;return Object.assign(i,s.get("defaultColGroupDef")),Object.assign(i,t),s.validateColDef(i,o),i}var Nc=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=Li(e);let o=0;for(;;){let i=e??t;if(i?o!==0&&(i+="_"+o):i=o,!this.existingKeys[i]){const s=String(i);return e&&o>0&&M(273,{providedId:e,usedId:s}),this.existingKeys[s]=!0,s}o++}}},pr=Object.freeze([]);function U(e){if(e!=null&&e.length)return e[e.length-1]}function to(e,t,o){return e==null&&t==null?!0:e!=null&&t!=null&&e.length===t.length&&e.every((i,s)=>o?o(i,t[s]):t[s]===i)}function zo(e,t){if(e)for(const o of e)t(o)}function Se(e,t){const o=e.indexOf(t);o>=0&&e.splice(o,1)}function fr(e,t,o){for(let i=0;i<t.length;i++)Se(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(o,0,t[i])}var $o="ag-Grid-AutoColumn",Cr="ag-Grid-SelectionColumn",mr="ag-Grid-RowNumbersColumn";function wr(e){const t=[],o=i=>{for(let s=0;s<i.length;s++){const n=i[s];it(n)?t.push(n):se(n)&&o(n.getChildren())}};return o(e),t}function He(e){return e.reduce((t,o)=>t+o.getActualWidth(),0)}function Uo(e,t,o){const i={};if(!t)return;Oe(null,t,n=>{i[n.getInstanceId()]=n}),o&&Oe(null,o,n=>{i[n.getInstanceId()]=null});const s=Object.values(i).filter(n=>n!=null);e.context.destroyBeans(s)}function vr(e){return e.getId().startsWith($o)}function st(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(Cr))??!1}function nt(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(mr))??!1}function _c(e){return st(e)||nt(e)}function Ko(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function Wc(e,t){return to(e,t,(o,i)=>o.getColId()===i.getColId())}function zc(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function Et(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function Sr(e,t){const o=e===t,i=e.getColDef()===t,s=e.getColId()==t;return o||i||s}var $c=(e,t)=>(o,i)=>{const s={value1:void 0,value2:void 0};let n=!1;return e&&(e[o]!==void 0&&(s.value1=e[o],n=!0),A(i)&&e[i]!==void 0&&(s.value2=e[i],n=!0)),!n&&t&&(t[o]!==void 0&&(s.value1=t[o]),A(i)&&t[i]!==void 0&&(s.value2=t[i])),s};function Uc(e,t=null,o,i,s){const n=new Nc,{existingCols:r,existingGroups:a,existingColKeys:l}=Kc(i);n.addExistingKeys(l);const d=br(e,t,0,o,r,n,a,s),{colGroupSvc:c}=e,u=(c==null?void 0:c.findMaxDepth(d,0))??0,h=c?c.balanceColumnTree(d,0,u,n):d;return Oe(null,h,(p,f)=>{se(p)&&p.setupExpandable(),p.originalParent=f}),{columnTree:h,treeDepth:u}}function Kc(e){const t=[],o=[],i=[];return e&&Oe(null,e,s=>{if(se(s)){const n=s;o.push(n)}else{const n=s;i.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:o,existingColKeys:i}}function br(e,t,o,i,s,n,r,a){if(!t)return[];const{colGroupSvc:l}=e,d=new Array(t.length);for(let c=0;c<d.length;c++){const u=t[c];l&&Xc(u)?d[c]=l.createProvidedColumnGroup(i,u,o,s,n,r,a):d[c]=jc(e,i,u,s,n,a)}return d}function jc(e,t,o,i,s,n){var l;const r=Yc(o,i);r&&(i==null||i.splice(r.idx,1));let a=r==null?void 0:r.column;if(a){const d=cs(e,o,a.getColId());a.setColDef(d,o,n),qc(e,a,d,n)}else{const d=s.getUniqueKey(o.colId,o.field),c=cs(e,o,d);a=new $e(c,o,d,t),e.context.createBean(a)}return(l=e.dataTypeSvc)==null||l.addColumnListeners(a),a}function yr(e,t,o,i,s,n,r,a){const{sortSvc:l,pinnedCols:d,colFlex:c}=e;o!==void 0&&t.setVisible(!o,a),l&&(l.updateColSort(t,i,a),s!==void 0&&l.setColSortIndex(t,s)),n!==void 0&&(d==null||d.setColPinned(t,n)),r!==void 0&&(c==null||c.setColFlex(t,r))}function qc(e,t,o,i){yr(e,t,o.hide,o.sort,o.sortIndex,o.pinned,o.flex,i);const s=t.getFlex();if(!(s!=null&&s>0))if(o.width!=null)t.setActualWidth(o.width,i);else{const n=t.getActualWidth();t.setActualWidth(n,i)}}function Yc(e,t){if(t)for(let o=0;o<t.length;o++){const i=t[o].getUserProvidedColDef();if(!i)continue;if(e.colId!=null){if(t[o].getId()===e.colId)return{idx:o,column:t[o]};continue}if(e.field!=null){if(i.field===e.field)return{idx:o,column:t[o]};continue}if(i===e)return{idx:o,column:t[o]}}}function cs(e,t,o,i){const{gos:s,dataTypeSvc:n}=e,r={},a=s.get("defaultColDef");de(r,a,!1,!0);const l=Zc(e,r,t,o);l&&Qc(e,l,r);const d=r.cellDataType;de(r,t,!1,!0),d!==void 0&&(r.cellDataType=d);const c=s.get("autoGroupColumnDef"),u=xe(s);return t.rowGroup&&c&&u&&de(r,{sort:c.sort,initialSort:c.initialSort},!1,!0),n&&(n.postProcess(r),n.validateColDef(r)),s.validateColDef(r,o,i),r}function Zc(e,t,o,i){var r;const s=(r=e.dataTypeSvc)==null?void 0:r.updateColDefAndGetColumnType(t,o,i),n=o.type??s??t.type;return t.type=n,n?Ko(n):void 0}function Qc(e,t,o){if(!t.length)return;const i=Object.assign({},Vc),s=e.gos.get("columnTypes")||{};for(const n of Object.keys(s)){const r=s[n];n in i?M(34,{key:n}):(r.type&&M(35),i[n]=r)}t.forEach(n=>{const r=i[n.trim()];r?de(o,r,!1,!0):M(36,{t:n})})}function Xc(e){return e.children!==void 0}function Oe(e,t,o){if(t)for(let i=0;i<t.length;i++){const s=t[i];se(s)&&Oe(s,s.getChildren(),o),o(s,e)}}function Rr(e,t){const o=[],i=[],s=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?s.push(r):a==="left"||a===!0?o.push(r):i.push(r)}),t.get("enableRtl")?[...s,...i,...o]:[...o,...i,...s]}function Er(e,t){let o=!0;return Oe(null,t,i=>{if(!se(i))return;const s=i,n=s.getColGroupDef();if(!(n&&n.marryChildren))return;const a=[];s.getLeafColumns().forEach(h=>{const g=e.indexOf(h);a.push(g)});const l=Math.max.apply(Math,a),d=Math.min.apply(Math,a),c=l-d,u=s.getLeafColumns().length-1;c>u&&(o=!1)}),o}function xr(e,t){if(!e||e.length==0)return;const o=t(e[0]);for(let i=1;i<e.length;i++)if(o!==t(e[i]))return;return o}function Dr(e,t,o){if(!t.length)return;const i=t.length===1?t[0]:null,s=xr(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:i,source:o})}function Jc(e,t,o){if(!t.length)return;const i=t.length===1?t[0]:null,s=xr(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:i,source:o})}function eu(e,t,o,i){e.dispatchEvent({type:t,columns:o,column:o&&o.length==1?o[0]:null,source:i})}function xt(e,t,o,i,s=null){t!=null&&t.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:s,finished:o,source:i})}function be(e,t,o){var b;const{colModel:i,rowGroupColsSvc:s,pivotColsSvc:n,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:d,pivotResultCols:c,environment:u,valueColsSvc:h,eventSvc:g,gos:p}=e,f=i.getColDefCols()??[],C=a==null?void 0:a.getColumns();if(!(f!=null&&f.length)&&!(C!=null&&C.length))return!1;if(t!=null&&t.state&&!t.state.forEach)return M(32),!1;const m=(D,T,G,F,P)=>{if(!D)return;const H=$c(T,t.defaultState),W=H("flex").value1;if(yr(e,D,H("hide").value1,H("sort").value1,H("sortIndex").value1,H("pinned").value1,W,o),W==null){const K=H("width").value1;if(K!=null){const B=D.getColDef().minWidth??u.getDefaultColumnMinWidth();B!=null&&K>=B&&D.setActualWidth(K,o)}}P||!D.isPrimary()||(h==null||h.syncColumnWithState(D,o,H),s==null||s.syncColumnWithState(D,o,H,G),n==null||n.syncColumnWithState(D,o,H,F))},w=(D,T,G)=>{var Pd,Td;const F=Fr(e,o),P=T.slice(),H={},W={},K=[],B=[],z=[];let N=0;const $=(s==null?void 0:s.columns.slice())??[],oe=(n==null?void 0:n.columns.slice())??[];D.forEach(le=>{const xo=le.colId;if(xo.startsWith($o)){K.push(le),z.push(le);return}if(st(xo)){B.push(le),z.push(le);return}const zt=G(xo);zt?(m(zt,le,H,W,!1),Se(P,zt)):(z.push(le),N+=1)});const Me=le=>m(le,null,H,W,!1);P.forEach(Me),s==null||s.sortColumns(Tr.bind(s,H,$)),n==null||n.sortColumns(Tr.bind(n,W,oe)),i.refreshCols(!1);const Fd=(le,xo,Sn=[])=>{xo.forEach(zt=>{const Id=le(zt.colId);Se(Sn,Id),m(Id,zt,null,null,!0)}),Sn.forEach(Me)};return Fd(le=>(r==null?void 0:r.getColumn(le))??null,K,(Pd=r==null?void 0:r.getColumns())==null?void 0:Pd.slice()),Fd(le=>(a==null?void 0:a.getColumn(le))??null,B,(Td=a==null?void 0:a.getColumns())==null?void 0:Td.slice()),ou(t,i,p),d.refresh(o),g.dispatchEvent({type:"columnEverythingChanged",source:o}),F(),{unmatchedAndAutoStates:z,unmatchedCount:N}};l==null||l.start();let{unmatchedAndAutoStates:S,unmatchedCount:v}=w(t.state||[],f,D=>i.getColDefCol(D));if(S.length>0||A(t.defaultState)){const D=((b=c==null?void 0:c.getPivotResultCols())==null?void 0:b.list)??[];v=w(S,D,T=>(c==null?void 0:c.getPivotResultCol(T))??null).unmatchedCount}return l==null||l.finish(),v===0}function tu(e,t){var w,S;const{colModel:o,autoColSvc:i,selectionColSvc:s,eventSvc:n,gos:r}=e,a=o.getColDefCols();if(!(a!=null&&a.length))return;const l=o.getColDefColTree(),d=wr(l),c=[];let u=1e3,h=1e3;const g=v=>{const b=Pr(v);q(b.rowGroupIndex)&&b.rowGroup&&(b.rowGroupIndex=u++),q(b.pivotIndex)&&b.pivot&&(b.pivotIndex=h++),c.push(b)};(w=i==null?void 0:i.getColumns())==null||w.forEach(g),(S=s==null?void 0:s.getColumns())==null||S.forEach(g),d==null||d.forEach(g),be(e,{state:c},t);const p=(i==null?void 0:i.getColumns())??[],m=[...(s==null?void 0:s.getColumns())??[],...p,...a].map(v=>({colId:v.colId}));be(e,{state:m,applyOrder:!0},t),n.dispatchEvent(_(r,{type:"columnsReset",source:t}))}function Fr(e,t){const{rowGroupColsSvc:o,pivotColsSvc:i,valueColsSvc:s,colModel:n,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:(o==null?void 0:o.columns.slice())??[],pivotColumns:(i==null?void 0:i.columns.slice())??[],valueColumns:(s==null?void 0:s.columns.slice())??[]},d=jo(e),c={};return d.forEach(u=>{c[u.colId]=u}),()=>{const u=(D,T,G,F)=>{const P=T.map(F),H=G.map(F);if(to(P,H))return;const K=new Set(T);G.forEach(z=>{K.delete(z)||K.add(z)});const B=[...K];a.dispatchEvent({type:D,columns:B,column:B.length===1?B[0]:null,source:t})},h=D=>{const T=[];return n.forAllCols(G=>{const F=c[G.getColId()];F&&D(F,G)&&T.push(G)}),T},g=D=>D.getColId();u("columnRowGroupChanged",l.rowGroupColumns,(o==null?void 0:o.columns)??[],g),u("columnPivotChanged",l.pivotColumns,(i==null?void 0:i.columns)??[],g);const f=h((D,T)=>{const G=D.aggFunc!=null,F=G!=T.isValueActive(),P=G&&D.aggFunc!=T.getAggFunc();return F||P});f.length>0&&eu(a,"columnValueChanged",f,t),xt(a,h((D,T)=>D.width!=T.getActualWidth()),!0,t),Dr(a,h((D,T)=>D.pinned!=T.getPinned()),t),Jc(a,h((D,T)=>D.hide==T.isVisible()),t);const v=h((D,T)=>D.sort!=T.getSort()||D.sortIndex!=T.getSortIndex());v.length>0&&(r==null||r.dispatchSortChangedEvents(t,v));const b=jo(e);su(d,b,t,n,a)}}function jo(e){const{colModel:t,rowGroupColsSvc:o,pivotColsSvc:i}=e,s=t.getColDefCols();if(q(s)||!t.isAlive())return[];const n=o==null?void 0:o.columns,r=i==null?void 0:i.columns,a=[],l=c=>{const u=c.isRowGroupActive()&&n?n.indexOf(c):null,h=c.isPivotActive()&&r?r.indexOf(c):null,g=c.isValueActive()?c.getAggFunc():null,p=c.getSort()!=null?c.getSort():null,f=c.getSortIndex()!=null?c.getSortIndex():null;a.push({colId:c.getColId(),width:c.getActualWidth(),hide:!c.isVisible(),pinned:c.getPinned(),sort:p,sortIndex:f,aggFunc:g,rowGroup:c.isRowGroupActive(),rowGroupIndex:u,pivot:c.isPivotActive(),pivotIndex:h,flex:c.getFlex()??null})};t.forAllCols(c=>l(c));const d=new Map(t.getCols().map((c,u)=>[c.getColId(),u]));return a.sort((c,u)=>{const h=d.has(c.colId)?d.get(c.colId):-1,g=d.has(u.colId)?d.get(u.colId):-1;return h-g}),a}function Pr(e){const t=(p,f)=>p??f??null,o=e.getColDef(),i=t(o.sort,o.initialSort),s=t(o.sortIndex,o.initialSortIndex),n=t(o.hide,o.initialHide),r=t(o.pinned,o.initialPinned),a=t(o.width,o.initialWidth),l=t(o.flex,o.initialFlex);let d=t(o.rowGroupIndex,o.initialRowGroupIndex),c=t(o.rowGroup,o.initialRowGroup);d==null&&(c==null||c==!1)&&(d=null,c=null);let u=t(o.pivotIndex,o.initialPivotIndex),h=t(o.pivot,o.initialPivot);u==null&&(h==null||h==!1)&&(u=null,h=null);const g=t(o.aggFunc,o.initialAggFunc);return{colId:e.getColId(),sort:i,sortIndex:s,hide:n,pinned:r,width:a,flex:l,rowGroup:c,rowGroupIndex:d,pivot:h,pivotIndex:u,aggFunc:g}}function ou(e,t,o){if(!e.applyOrder||!e.state)return;const i=[];e.state.forEach(s=>{s.colId!=null&&i.push(s.colId)}),iu(t.cols,i,t,o)}function iu(e,t,o,i){if(e==null)return;let s=[];const n={};t.forEach(a=>{if(n[a])return;const l=e.map[a];l&&(s.push(l),n[a]=!0)});let r=0;if(e.list.forEach(a=>{const l=a.getColId();if(n[l]!=null)return;l.startsWith($o)?s.splice(r++,0,a):s.push(a)}),s=Rr(s,i),!Er(s,o.getColTree())){M(39);return}e.list=s}function su(e,t,o,i,s){const n={};t.forEach(c=>n[c.colId]=c);const r={};e.forEach(c=>{n[c.colId]&&(r[c.colId]=!0)});const a=e.filter(c=>r[c.colId]),l=t.filter(c=>r[c.colId]),d=[];l.forEach((c,u)=>{const h=a&&a[u];if(h&&h.colId!==c.colId){const g=i.getCol(h.colId);g&&d.push(g)}}),d.length&&s.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,finished:!0,source:o})}var Tr=(e,t,o,i)=>{const s=e[o.getId()],n=e[i.getId()],r=s!=null,a=n!=null;if(r&&a)return s-n;if(r)return-1;if(a)return 1;const l=t.indexOf(o),d=t.indexOf(i),c=l>=0,u=d>=0;return c&&u?l-d:c?-1:1},nu=class extends x{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(Et(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),Et(e.source)))}createColsFromColDefs(e){var m,w,S;const{beans:t}=this,{valueCache:o,colAutosize:i,rowGroupColsSvc:s,pivotColsSvc:n,valueColsSvc:r,visibleCols:a,eventSvc:l}=t,d=this.colDefs?Fr(t,e):void 0;o==null||o.expire();const c=(m=this.colDefCols)==null?void 0:m.list,u=(w=this.colDefCols)==null?void 0:w.tree,h=Uc(t,this.colDefs,!0,u,e);Uo(t,(S=this.colDefCols)==null?void 0:S.tree,h.columnTree);const g=h.columnTree,p=h.treeDepth,f=wr(g),C={};f.forEach(v=>C[v.getId()]=v),this.colDefCols={tree:g,treeDepth:p,list:f,map:C},s==null||s.extractCols(e,c),n==null||n.extractCols(e,c),r==null||r.extractCols(e,c),this.ready=!0,this.refreshCols(!0),a.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),d&&(this.changeEventsDispatching=!0,d(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&(i==null||i.applyAutosizeStrategy())}refreshCols(e){var f;if(!this.colDefCols)return;const t=(f=this.cols)==null?void 0:f.tree;this.saveColOrder();const{autoColSvc:o,selectionColSvc:i,rowNumbersSvc:s,quickFilter:n,pivotResultCols:r,showRowGroupCols:a,rowAutoHeight:l,visibleCols:d,colViewport:c,eventSvc:u}=this.beans,h=this.selectCols(r,this.colDefCols);this.createColumnsForService([o,i,s],h);const g=Cc(this.gos,this.showingPivotResult);(!e||g)&&this.restoreColOrder(h),this.positionLockedCols(h),a==null||a.refresh(),n==null||n.refreshCols(),this.setColSpanActive(),l==null||l.setAutoHeightActive(h),d.clear(),c.clear(),!to(t,this.cols.tree)&&u.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t){for(const o of e)o&&(o.createColumns(t,i=>{this.lastOrder=i(this.lastOrder),this.lastPivotOrder=i(this.lastPivotOrder)}),o.addColumns(t))}selectCols(e,t){const o=(e==null?void 0:e.getPivotResultCols())??null;this.showingPivotResult=o!=null;const{map:i,list:s,tree:n,treeDepth:r}=o??t;return this.cols={list:s.slice(),map:{...i},tree:n.slice(),treeDepth:r},o&&(o.list.some(l=>{var d;return((d=this.cols)==null?void 0:d.map[l.getColId()])!==void 0})||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{valueColsSvc:e,selectionColSvc:t,gos:o}=this.beans,i=this.isPivotMode()&&!this.showingPivotResult,s=t==null?void 0:t.isSelectionColumnEnabled(),n=o.get("rowNumbers"),r=e==null?void 0:e.columns;return this.cols.list.filter(l=>{const d=vr(l);if(i){const c=r==null?void 0:r.includes(l);return d||c||s&&st(l)||n&&nt(l)}else return d||l.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,o){be(this.beans,{state:e.map(i=>({colId:typeof i=="string"?i:i.getColId(),hide:!t}))},o)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const o=t.filter(u=>e.map[u.getId()]!=null);if(o.length===0)return;if(o.length===e.list.length){e.list=o;return}const i=u=>{const h=u.getOriginalParent();return h?h.getChildren().length>1?!0:i(h):!1};if(!o.some(u=>i(u))){const u=new Set(o);for(const h of e.list)u.has(h)||o.push(h);e.list=o;return}const s=new Map;for(let u=0;u<o.length;u++){const h=o[u];s.set(h,u)}const n=e.list.filter(u=>!s.has(u));if(n.length===0){e.list=o;return}const r=(u,h)=>{const g=h?h.getOriginalParent():u.getOriginalParent();if(!g)return null;let p=null,f=null;for(const C of g.getChildren())if(!(C===h||C===u)){if(C instanceof $e){const m=s.get(C);if(m==null)continue;(p==null||p<m)&&(p=m,f=C);continue}C.forEachLeafColumn(m=>{const w=s.get(m);w!=null&&(p==null||p<w)&&(p=w,f=m)})}return f??r(u,g)},a=[],l=new Map;for(const u of n){const h=r(u,null);if(h==null){a.push(u);continue}const g=l.get(h);g===void 0?l.set(h,u):Array.isArray(g)?g.push(u):l.set(h,[g,u])}const d=new Array(e.list.length);let c=d.length-1;for(let u=a.length-1;u>=0;u--)d[c--]=a[u];for(let u=o.length-1;u>=0;u--){const h=o[u],g=l.get(h);if(g)if(Array.isArray(g))for(let p=g.length-1;p>=0;p--){const f=g[p];d[c--]=f}else d[c--]=g;d[c--]=h}e.list=d}positionLockedCols(e){e.list=Rr(e.list,this.gos)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=((e=this.cols)==null?void 0:e.list)??null:this.lastOrder=((t=this.cols)==null?void 0:t.list)??null}getColumnDefs(){var e,t;return this.colDefCols?(t=this.beans.colDefFactory)==null?void 0:t.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,((e=this.cols)==null?void 0:e.list)??[]):void 0}setColSpanActive(){var e;this.colSpanActive=!!((e=this.cols)!=null&&e.list.some(t=>t.getColDef().colSpan!=null))}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1);const{visibleCols:o,eventSvc:i}=this.beans;o.refresh(t),i.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){var t;const e=(t=this.beans.pivotColsSvc)==null?void 0:t.columns;return this.pivotMode&&!!(e!=null&&e.length)}recreateColumnDefs(e){var o;if(!this.cols)return;(o=this.beans.autoColSvc)==null||o.updateColumns(e);const t=Et(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;Uo(this.beans,(e=this.colDefCols)==null?void 0:e.tree),super.destroy()}getColTree(){var e;return((e=this.cols)==null?void 0:e.tree)??[]}getColDefColTree(){var e;return((e=this.colDefCols)==null?void 0:e.tree)??[]}getColDefCols(){var e;return((e=this.colDefCols)==null?void 0:e.list)??null}getCols(){var e;return((e=this.cols)==null?void 0:e.list)??[]}forAllCols(e){var s,n,r,a;const{pivotResultCols:t,autoColSvc:o,selectionColSvc:i}=this.beans;zo((s=this.colDefCols)==null?void 0:s.list,e),zo((n=o==null?void 0:o.columns)==null?void 0:n.list,e),zo((r=i==null?void 0:i.columns)==null?void 0:r.list,e),zo((a=t==null?void 0:t.getPivotResultCols())==null?void 0:a.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){var t;return((t=this.cols)==null?void 0:t.map[e])??null}getColFromCollection(e,t){var s,n;if(t==null)return null;const{map:o,list:i}=t;if(typeof e=="string"&&o[e])return o[e];for(let r=0;r<i.length;r++)if(Sr(i[r],e))return i[r];return((s=this.beans.autoColSvc)==null?void 0:s.getColumn(e))??((n=this.beans.selectionColSvc)==null?void 0:n.getColumn(e))??null}},ru=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let o;return typeof t!="number"?o=0:o=t+1,this.existingIds[e]=o,o}};function qo(e,t,o){return o&&e.addDestroyFunc(()=>t.destroyBean(o)),o??e}var Ir=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){var i;if(!e)return;if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1){s.forEach(n=>this.toggleCss(n,t));return}}this.cssClassStates[e]!==t&&e.length&&((i=this.getGui())==null||i.classList.toggle(e,t),this.cssClassStates[e]=t)}},au=0,I=null,Y=class extends x{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=au++,this.cssManager=new Ir(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(o=>[o.selector,o])),e&&this.setTemplate(e)}preConstruct(){var t,o,i;this.wireTemplate(this.getGui());const e="component-"+((o=(t=Object.getPrototypeOf(this))==null?void 0:t.constructor)==null?void 0:o.name);(i=this.css)==null||i.forEach(s=>this.beans.environment.addGlobalCSS(s,e))}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute($n):null}applyElementsToComponent(e,t,o,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===I)this[t]=i??e;else{const n=o&&o[t];if(!this.suppressDataRefValidation&&!n)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${s}`)}}}createChildComponentsFromTags(e,t){const o=[];for(const i of e.childNodes??[])o.push(i);o.forEach(i=>{if(!(i instanceof HTMLElement))return;const s=this.createComponentFromElement(i,n=>{const r=n.getGui();if(r)for(const a of i.attributes??[])r.setAttribute(a.name,a.value)},t);if(s){if(s.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);const n=Array.prototype.slice.call(i.children);s.addItems(n)}this.swapComponentForNode(s,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)})}createComponentFromElement(e,t,o){const i=e.nodeName,s=this.getDataRefAttribute(e),n=i.indexOf("AG-")===0,r=n?this.componentSelectors.get(i):null;let a=null;if(r){const l=o&&s?o[s]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(n)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,s,o,a),a}swapComponentForNode(e,t,o){const i=e.getGui();t.replaceChild(i,o),t.insertBefore(document.createComment(o.nodeName),i),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach(o=>o.setAttribute("tabindex",t.toString()))}setTemplate(e,t,o){let i;typeof e=="string"||e==null?i=Zi(e):i=ee(e),this.setTemplateFromElement(i,t,o)}setTemplateFromElement(e,t,o,i=!1){if(this.eGui=e,this.suppressDataRefValidation=i,t)for(let s=0;s<t.length;s++){const n=t[s];this.componentSelectors.set(n.selector,n)}this.wireTemplate(e,o)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let o=t;return e==null?null:(o||(o=this.eGui),Ji(e)?{element:e,parent:o}:{element:e.getGui(),parent:o})}prependChild(e,t){const{element:o,parent:i}=this.getContainerAndElement(e,t)||{};!o||!i||i.insertAdjacentElement("afterbegin",o)}appendChild(e,t){const{element:o,parent:i}=this.getContainerAndElement(e,t)||{};!o||!i||i.appendChild(o)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:o}=t;ic(this.eGui,e,{skipAriaHidden:o})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:o}=t;X(this.eGui,e,{skipAriaHidden:o});const i={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(i)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,o){this.eGui.addEventListener(e,t,o),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}},oo=class Do{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(o=>this.onDone(o),o=>this.onReject(o))}static all(t){return t.length?new Do(o=>{let i=t.length;const s=new Array(i);t.forEach((n,r)=>{n.then(a=>{s[r]=a,i--,i===0&&o(s)})})}):Do.resolve()}static resolve(t=null){return new Do(o=>o(t))}then(t){return new Do(o=>{this.status===1?o(t(this.resolution)):this.waiters.push(i=>o(t(i)))})}onDone(t){this.status=1,this.resolution=t,this.waiters.forEach(o=>o(t))}onReject(t){}};function lu(e){return e?e.prototype&&"getGui"in e.prototype:!1}function du(e,t,o,i){const{name:s}=o;let n,r,a,l,d,c;if(t){const u=t,h=u[s+"Selector"],g=h?h(i):null,p=f=>{typeof f=="string"?n=f:f!=null&&f!==!0&&(e.isFrameworkComponent(f)?a=f:r=f)};g?(p(g.component),l=g.params,d=g.popup,c=g.popupPosition):p(u[s])}return{compName:n,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:d,popupPositionFromSelector:c}}var cu=class extends x{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,o,i=!1){return this.getCompDetails(this.gridOptions,e,t,o,i)}getCompDetails(e,t,o,i,s=!1){var S;const{name:n,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:d,paramsFromSelector:c,popupFromSelector:u,popupPositionFromSelector:h}=du(this.beans.frameworkOverrides,e,t,i),g,p;const f=v=>{const b=this.registry.getUserComponent(n,v);b&&(l=b.componentFromFramework?void 0:b.component,d=b.componentFromFramework?b.component:void 0,g=b.params,p=b.processParams)};if(a!=null&&f(a),l==null&&d==null&&o!=null&&f(o),l&&r&&!lu(l)&&(l=(S=this.agCompUtils)==null?void 0:S.adaptFunction(t,l)),!l&&!d){const{validation:v}=this.beans;s&&(a!==o||!o)?a?v!=null&&v.isProvidedUserComp(a)||j(50,{compName:a}):o?v||j(260,{...this.gos.getModuleErrorParams(),propName:n,compName:o}):j(216,{name:n}):o&&!v&&j(146,{comp:o});return}const C=this.mergeParams(e,t,i,c,g,p),m=l==null,w=l??d;return{componentFromFramework:m,componentClass:w,params:C,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(w,m,C,t)}}newAgStackInstance(e,t,o,i){var a;const s=!t;let n;s?n=new e:n=this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(n);const r=(a=n.init)==null?void 0:a.call(n,o);return r==null?oo.resolve(n):r.then(()=>n)}mergeParams(e,t,o,i=null,s,n){const r={...o,...s},a=e,l=a&&a[t.name+"Params"];if(typeof l=="function"){const d=l(o);de(r,d)}else typeof l=="object"&&de(r,l);return de(r,i),n?n(r):r}},uu={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},hu={name:"headerComponent",optionalMethods:["refresh"]},gu={name:"innerHeaderComponent"},pu={name:"innerHeaderGroupComponent"},fu={name:"headerGroupComponent"},Cu={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},mu={name:"loadingCellRenderer",cellRenderer:!0},wu={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},vu={name:"loadingOverlayComponent",optionalMethods:["refresh"]},Su={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},bu={name:"tooltipComponent"},yu={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Ru={name:"loadingCellRenderer",cellRenderer:!0},Eu={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},xu={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function Du(e,t){return e.getCompDetailsFromGridOptions(uu,"agDragAndDropImage",t,!0)}function Fu(e,t,o){return e.getCompDetails(t,hu,"agColumnHeader",o)}function Pu(e,t,o){return e.getCompDetails(t,gu,void 0,o)}function Tu(e,t){const o=t.columnGroup.getColGroupDef();return e.getCompDetails(o,fu,"agColumnGroupHeader",t)}function Iu(e,t,o){return e.getCompDetails(t,pu,void 0,o)}function Au(e,t){return e.getCompDetailsFromGridOptions(yu,void 0,t,!0)}function Mu(e,t){return e.getCompDetailsFromGridOptions(Ru,"agLoadingCellRenderer",t,!0)}function ku(e,t){return e.getCompDetailsFromGridOptions(Eu,"agGroupRowRenderer",t,!0)}function Lu(e,t){return e.getCompDetailsFromGridOptions(xu,"agDetailCellRenderer",t,!0)}function Ar(e,t,o){return e.getCompDetails(t,Cu,void 0,o)}function Mr(e,t,o){return e.getCompDetails(t,mu,"agSkeletonCellRenderer",o,!0)}function kr(e,t,o){return e.getCompDetails(t,wu,"agCellEditor",o,!0)}function Gu(e,t){return e.getCompDetailsFromGridOptions(vu,"agLoadingOverlay",t,!0)}function Hu(e,t){return e.getCompDetailsFromGridOptions(Su,"agNoRowsOverlay",t,!0)}function Ou(e,t){return e.getCompDetails(t.colDef,bu,"agTooltipComponent",t,!0)}function us(e){const t=e;return t!=null&&t.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var Lr=new Set,Yo={},Dt={},Zo,Gr=!1,Hr=!1,Bu=!1;function Vu(e){const[t,o]=e.version.split(".")||[],[i,s]=Zo.split(".")||[];return t===i&&o===s}function Nu(e){Zo||(Zo=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.`;if(e.version?Vu(e)||wt(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Zo}.`)):wt(t(`'${e.moduleName}' is incompatible.`)),e.validate){const o=e.validate();o.isValid||wt(`${o.message}`)}}function Ft(e,t,o=!1){o||(Gr=!0),Nu(e);const i=e.rowModels??["all"];Lr.add(e);let s;t!==void 0?(Hr=!0,Dt[t]===void 0&&(Dt[t]={}),s=Dt[t]):s=Yo,i.forEach(n=>{s[n]===void 0&&(s[n]={}),s[n][e.moduleName]=e}),e.dependsOn&&e.dependsOn.forEach(n=>Ft(n,t,o))}function _u(e){delete Dt[e]}function hs(e,t,o){const i=s=>{var n,r,a;return!!((n=Yo[s])!=null&&n[e])||!!((a=(r=Dt[t])==null?void 0:r[s])!=null&&a[e])};return i(o)||i("all")}function gs(){return Hr}function Wu(e,t){const o=Dt[e]??{};return[...Object.values(Yo.all??{}),...Object.values(o.all??{}),...Object.values(Yo[t]??{}),...Object.values(o[t]??{})]}function zu(){return new Set(Lr)}function $u(){return Gr}function Uu(){return Bu}var Ku=class{static register(e){Ft(e,void 0)}static registerModules(e){e.forEach(t=>Ft(t,void 0))}},ju=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,!(!e||!e.beanClasses)&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){var t;for(const o of Object.keys(e.providedBeanInstances))this.beans[o]=e.providedBeanInstances[o];e.beanClasses.forEach(o=>{const i=new o;i.beanName?this.beans[i.beanName]=i:console.error(`Bean ${o.name} is missing beanName`),this.createdBeans.push(i)}),(t=e.derivedBeans)==null||t.forEach(o=>{const{beanName:i,bean:s}=o(this);this.beans[i]=s,this.createdBeans.push(s)}),e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){return this.initBeans([e],t),e}initBeans(e,t){e.forEach(o=>{var i,s;(i=o.preWireBeans)==null||i.call(o,this.beans),(s=o.wireBeans)==null||s.call(o,this.beans)}),e.forEach(o=>{var i;return(i=o.preConstruct)==null?void 0:i.call(o)}),t&&e.forEach(t),e.forEach(o=>{var i;return(i=o.postConstruct)==null?void 0:i.call(o)})}getBeans(){return this.beans}getBean(e){return this.beans[e]}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[]}destroyBean(e){var t;(t=e==null?void 0:e.destroy)==null||t.call(e)}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}};function qu(e){return typeof e=="object"&&!!e.getComp}var Yu=class extends ju{init(e){this.gridId=e.gridId,this.beans.context=this,this.destroyCallback=e.destroyCallback,super.init(e)}destroy(){var e;super.destroy(),_u(this.gridId),(e=this.destroyCallback)==null||e.call(this)}getGridId(){return this.gridId}},Zu=class extends x{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new Or,this.rowValidations=new Br,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;const o=this.getEditRow(e);t?o.delete(t):o.clear(),o.size===0&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits||this.edits.size===0)return;const o=e&&this.edits.get(e);if(o)return o;if(t.checkSiblings){const i=e.pinnedSibling;if(i)return this.getEditRow(i)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(this.edits.size===0)return e.data;const o=this.getEditRow(e),i=e.pinnedSibling,s=t&&i&&this.getEditRow(i);if(!o&&!s)return e.data;const n=Object.assign({},e.data),r=(a,l)=>a.forEach(({pendingValue:d},c)=>{d!==Ce&&(l[c.getColId()]=d)});return o&&r(o,n),s&&r(s,n),n}getEdit(e,t){const o=this._getEdit(e);return t&&o?{...o}:o}_getEdit(e){var t;if(!this.suspendEdits&&this.edits.size!==0)return e.rowNode&&e.column&&((t=this.getEditRow(e.rowNode))==null?void 0:t.get(e.column))}getEditMap(e=!0){if(this.suspendEdits||this.edits.size===0)return new Map;if(!e)return this.edits;const t=new Map;return this.edits.forEach((o,i)=>t.set(i,new Map(o))),t}setEditMap(e){this.edits.clear(),e.forEach((t,o)=>{const i=new Map;t.forEach((s,n)=>i.set(n,{...s})),this.edits.set(o,i)})}setEdit(e,t){(this.edits.size===0||!this.edits.has(e.rowNode))&&this.edits.set(e.rowNode,new Map);const o={...this._getEdit(e),...t};return this.getEditRow(e.rowNode).set(e.column,o),o}clearEditValue(e){var i;const{rowNode:t,column:o}=e;if(t)if(o){const s=this._getEdit(e);s&&(s.editorValue=void 0,s.pendingValue=s.sourceValue,s.state="changed")}else(i=this.getEditRow(t))==null||i.forEach(s=>{s.editorValue=void 0,s.pendingValue=s.sourceValue,s.state="changed"})}getState(e){var t;if(!this.suspendEdits)return(t=this.getEdit(e))==null?void 0:t.state}getEditPositions(e){if(this.suspendEdits||(e??this.edits).size===0)return[];const t=[];return(e??this.edits).forEach((o,i)=>{for(const s of o.keys())t.push({rowNode:i,column:s,...o.get(s)})}),t}hasRowEdits(e,t){return this.suspendEdits||this.edits.size===0?!1:!!this.getEditRow(e,t)}hasEdits(e={},t={}){var n;if(this.suspendEdits||this.edits.size===0)return!1;const{rowNode:o,column:i}=e,{withOpenEditor:s}=t;if(o){const r=this.getEditRow(o,t);return r?i?s?((n=this.getEdit(e))==null?void 0:n.state)==="editing":r.has(i)??!1:r.size!==0?s?Array.from(r.values()).some(({state:a})=>a==="editing"):!0:!1:!1}return s?this.getEditPositions().some(({state:r})=>r==="editing"):this.edits.size>0}start(e){const t=this.getEditRow(e.rowNode)??new Map,{rowNode:o,column:i}=e;i&&!t.has(i)&&t.set(i,{editorValue:void 0,pendingValue:Ce,sourceValue:this.beans.valueSvc.getValue(i,o,!0,"api"),state:"editing"}),this.edits.set(o,t)}stop(e){this.hasEdits(e)&&(e?this.removeEdits(e):this.clear())}clear(){for(const e of this.edits.values())e.clear();this.edits.clear()}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(e){this.cellValidations=e}setRowValidationModel(e){this.rowValidations=e}destroy(){super.destroy(),this.clear()}},Or=class{constructor(){this.cellValidations=new Map}getCellValidation(e){var i,s;const{rowNode:t,column:o}=e||{};return(s=(i=this.cellValidations)==null?void 0:i.get(t))==null?void 0:s.get(o)}hasCellValidation(e){return!e||!e.rowNode||!e.column?this.cellValidations.size>0:!!this.getCellValidation(e)}setCellValidation(e,t){const{rowNode:o,column:i}=e;this.cellValidations.has(o)||this.cellValidations.set(o,new Map),this.cellValidations.get(o).set(i,t)}clearCellValidation(e){var i;const{rowNode:t,column:o}=e;(i=this.cellValidations.get(t))==null||i.delete(o)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},Br=class{constructor(){this.rowValidations=new Map}getRowValidation(e){const{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return!e||!e.rowNode?this.rowValidations.size>0:!!this.getRowValidation(e)}setRowValidation({rowNode:e},t){this.rowValidations.set(e,t)}clearRowValidation({rowNode:e}){this.rowValidations.delete(e)}setRowValidationMap(e){this.rowValidations=e}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}};function Qu(e){const{rowIndex:t,rowPinned:o,column:i}=e;return`${t}.${o??"null"}.${i.getId()}`}function Xu(e,t){const o=e.column===t.column,i=e.rowPinned===t.rowPinned,s=e.rowIndex===t.rowIndex;return o&&i&&s}function Ju(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(A(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function eh(e){let t=0,o;const{pinnedRowModel:i,rowModel:s,pageBounds:n}=e;return i!=null&&i.getPinnedTopRowCount()?o="top":s.getRowCount()?(o=null,t=n.getFirstRow()):i!=null&&i.getPinnedBottomRowCount()&&(o="bottom"),o===void 0?null:{rowIndex:t,rowPinned:o}}function th(e){let t,o=null;const{pinnedRowModel:i,pageBounds:s}=e,n=i==null?void 0:i.getPinnedBottomRowCount(),r=i==null?void 0:i.getPinnedTopRowCount();return n?(o="bottom",t=n-1):e.rowModel.getRowCount()?(o=null,t=s.getLastRow()):r&&(o="top",t=r-1),t===void 0?null:{rowIndex:t,rowPinned:o}}function rt(e,t){var o,i;switch(t.rowPinned){case"top":return(o=e.pinnedRowModel)==null?void 0:o.getPinnedTopRow(t.rowIndex);case"bottom":return(i=e.pinnedRowModel)==null?void 0:i.getPinnedBottomRow(t.rowIndex);default:return e.rowModel.getRow(t.rowIndex)}}function Qo(e,t){var s;const o=(s=e.spannedRowRenderer)==null?void 0:s.getCellByPosition(t);if(o)return o;const i=e.rowRenderer.getRowByPosition(t);return i?i.getCellCtrl(t.column):null}function oh(e,t,o){const{rowModel:i,pinnedRowModel:s}=e;let n;return n??(n=i==null?void 0:i.getRowNode(t)),o?n??(n=s==null?void 0:s.getPinnedRowById(t,o)):(n??(n=s==null?void 0:s.getPinnedRowById(t,"top")),n??(n=s==null?void 0:s.getPinnedRowById(t,"bottom"))),n}function Xo(e,t){const{rowIndex:o,rowPinned:i}=t,{pageBounds:s,pinnedRowModel:n,rowModel:r}=e;if(o===0)return i==="top"?null:i==="bottom"&&r.isRowsToRender()?{rowIndex:s.getLastRow(),rowPinned:null}:n!=null&&n.isRowsToRender("top")?{rowIndex:n.getPinnedTopRowCount()-1,rowPinned:"top"}:null;const a=i?void 0:r.getRow(o);return Nr(e,a,!0)??{rowIndex:o-1,rowPinned:i}}function Vr(e,t){const{rowIndex:o,rowPinned:i}=t,{pageBounds:s,pinnedRowModel:n,rowModel:r}=e;if(ih(e,t))return i==="bottom"?null:i==="top"&&r.isRowsToRender()?{rowIndex:s.getFirstRow(),rowPinned:null}:n!=null&&n.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;const a=i?void 0:r.getRow(o);return Nr(e,a)??{rowIndex:o+1,rowPinned:i}}function Nr(e,t,o=!1){const{gos:i,rowRenderer:s}=e;if(!(t!=null&&t.sticky)||!nr(i))return;const n=s.getStickyTopRowCtrls(),r=s.getStickyBottomRowCtrls(),a=!r.some(u=>u.rowNode.rowIndex===t.rowIndex),l=a?n:r,d=(o?-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 ih(e,t){const{rowPinned:o,rowIndex:i}=t,{pinnedRowModel:s,pageBounds:n}=e;return o==="top"?((s==null?void 0:s.getPinnedTopRowCount())??0)-1<=i:o==="bottom"?((s==null?void 0:s.getPinnedBottomRowCount())??0)-1<=i:n.getLastRow()<=i}function ps(e,t={}){var d;const{rowIndex:o,rowId:i,rowCtrl:s,rowPinned:n}=t;if(s)return s;const{rowModel:r,rowRenderer:a}=e;let{rowNode:l}=t;return l||(i?l=oh(e,i,n):o!=null&&(l=r.getRow(o))),(d=a.getRowCtrls(l?[l]:[]))==null?void 0:d[0]}function Z(e,t={}){var c;const{cellCtrl:o,colId:i,columnId:s,column:n}=t;if(o)return o;const r=e.colModel.getCol(i??s??fs(n)),a=t.rowCtrl??ps(e,t),l=(a==null?void 0:a.getCellCtrl(r))??void 0;if(l)return l;const d=t.rowNode??(a==null?void 0:a.rowNode);if(d)return(c=e.rowRenderer.getCellCtrls([d],[r]))==null?void 0:c[0]}function _r(e){const{editSvc:t}=e;t!=null&&t.isBatchEditing()?Tt(e):t==null||t.stopEditing(void 0,{source:"api"})}function sh(e,t,o){const{gos:i,popupSvc:s}=t;if(!i.get("stopEditingWhenCellsLoseFocus"))return;const n=r=>{const a=r.relatedTarget;if(Ki(a)===null){_r(t);return}let l=o.some(d=>d.contains(a))&&Jr(i,a);l||(l=!!s&&(s.getActivePopups().some(d=>d.contains(a))||s.isElementWithinCustomPopup(a))),l||_r(t)};o.forEach(r=>e.addManagedElementListeners(r,{focusout:n}))}function fs(e){if(e)return typeof e=="string"?e:e.getColId()}var Ce=Symbol("unedited");function Wr(e,t={}){var s;const o=[],i=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns);for(const n of i){const r=(s=n.comp)==null?void 0:s.getCellEditor();r&&o.push({ctrl:n,editor:us(r)})}return o}var nh=(e,t={})=>Wr(e,t).map(o=>o.editor);function rh(e,t,o,i,s,n){var u;t.length===0&&(o!=null&&o.rowNode)&&(o!=null&&o.column)&&Pt(e,o,{key:i,event:s,cellStartedEdit:n});const{valueSvc:r,editSvc:a,editModelSvc:l}=e,{rowNode:d,column:c}=o??{};for(const h of t){const{rowNode:g,column:p}=h,f=Z(e,h);if(!f){if(g&&p){const m=r.getValue(p,g,void 0,"api"),v=((o==null?void 0:o.rowNode)===g&&(o==null?void 0:o.column)===p&&i||void 0)??(a==null?void 0:a.getCellDataValue(h,!1))??((u=r.getValueForDisplay(p,g))==null?void 0:u.value)??m??Ce;l==null||l.setEdit(h,{pendingValue:v,sourceValue:m,state:"editing"})}continue}const C=n&&d===f.rowNode&&f.column===c;Pt(e,{rowNode:d,column:f.column},{key:C?i:null,event:C?s:null,cellStartedEdit:C})}}function Ue({pendingValue:e,sourceValue:t}){return e===Ce&&(e=t),e!==t}function Pt(e,t,o){var C,m,w,S,v,b,D;const{key:i,event:s,cellStartedEdit:n,silent:r}=o??{},a=Z(e,t),l=(C=a==null?void 0:a.comp)==null?void 0:C.getCellEditor(),d=$r(e,t,i,n),c=(m=e.editModelSvc)==null?void 0:m.getEdit(t);let u=(i==null?void 0:i.length)===1?i:d.value;if(u===void 0&&(u=c==null?void 0:c.sourceValue),(w=e.editModelSvc)==null||w.setEdit(t,{editorValue:u,state:"editing"}),l){(S=l.refresh)==null||S.call(l,d);return}const h=t.column.getColDef(),g=kr(e.userCompFactory,h,d),p=(g==null?void 0:g.popupFromSelector)!=null?g.popupFromSelector:!!h.cellEditorPopup,f=(g==null?void 0:g.popupPositionFromSelector)!=null?g.popupPositionFromSelector:h.cellEditorPopupPosition;Ur(g.params,s),a&&(a.editCompDetails=g,(v=a.comp)==null||v.setEditDetails(g,p,f,e.gos.get("reactiveCustomComponents")),(b=a==null?void 0:a.rowCtrl)==null||b.refreshRow({suppressFlash:!0}),r||(D=e.editSvc)==null||D.dispatchCellEvent(t,s,"cellEditingStarted"))}function zr(e){var s;const t={editorValueExists:!1},o=(s=e.getValidationErrors)==null?void 0:s.call(e);return((o==null?void 0:o.length)??0)>0?t:{editorValue:e.getValue(),editorValueExists:!0}}function $r(e,t,o,i){var C,m,w,S;const{valueSvc:s,gos:n,editSvc:r}=e,a=Z(e,t),l=((C=t.rowNode)==null?void 0:C.rowIndex)??void 0,d=r==null?void 0:r.isBatchEditing(),c=e.colModel.getCol(t.column.getId()),{rowNode:u,column:h}=t,g=(m=a.comp)==null?void 0:m.getCellEditor(),p=(r==null?void 0:r.getCellDataValue(t,!1))??(g?(w=zr(g))==null?void 0:w.editorValue:void 0),f=p===Ce?(S=s.getValueForDisplay(c,u))==null?void 0:S.value:p;return _(n,{value:f,eventKey:o??null,column:h,colDef:h.getColDef(),rowIndex:l,node:u,data:u.data,cellStartedEdit:i??!1,onKeyDown:a==null?void 0:a.onKeyDown.bind(a),stopEditing:v=>{r.stopEditing(t,{source:d?"ui":"api",suppressNavigateAfterEdit:v}),ei(e,t)},eGridCell:a==null?void 0:a.eGui,parseValue:v=>s.parseValue(c,u,v,a==null?void 0:a.value),formatValue:a==null?void 0:a.formatValue.bind(a),validate:()=>{r==null||r.validateEdit()}})}function Cs(e,t){const{editModelSvc:o}=e;o==null||o.getEditMap().forEach((i,s)=>{i.forEach((n,r)=>{!t&&(n.state==="editing"||n.pendingValue===Ce)||!Ue(n)&&(n.state!=="editing"||t)&&(o==null||o.removeEdits({rowNode:s,column:r}))})})}function ah(e,t){var d;const o=(d=t.comp)==null?void 0:d.getCellEditor();if(!(o!=null&&o.refresh))return;const{eventKey:i,cellStartedEdit:s}=t.editCompDetails.params,{column:n}=t,r=$r(e,t,i,s),a=n.getColDef(),l=kr(e.userCompFactory,a,r);o.refresh(Ur(l.params,i))}function Ur(e,t){var o;return t instanceof KeyboardEvent&&e.column.getColDef().cellEditor==="agNumberCellEditor"?e.suppressPreventDefault=["-","+",".","e"].includes((t==null?void 0:t.key)??"")||e.suppressPreventDefault:(o=t==null?void 0:t.preventDefault)==null||o.call(t),e}function at(e,t){var o;(o=e.editModelSvc)==null||o.getEditPositions().forEach(i=>{const s=Z(e,i);if(!s)return;const n=s.comp.getCellEditor();if(!n)return;const{editorValue:r,editorValueExists:a}=zr(n);Jo(e,i,t,r,void 0,!a)})}function Jo(e,t,o,i,s,n){var g;const{editModelSvc:r,valueSvc:a}=e;if(!r)return;const{rowNode:l,column:d}=t;if(!(l&&d))return;const c=Z(e,t),u=!!((g=c==null?void 0:c.comp)!=null&&g.getCellEditor());let h=r.getEdit(t,!0);h!=null&&h.sourceValue||(h=r.setEdit(t,{sourceValue:a.getValue(d,l,void 0,"api"),pendingValue:Ce,state:u?"editing":"changed"})),r.setEdit(t,{editorValue:n?h.sourceValue:i,state:u?"editing":"changed"}),o&&lh(e,t)}function lh(e,t){const{editModelSvc:o}=e,i=o==null?void 0:o.getEdit(t,!0);o==null||o.setEdit(t,{pendingValue:i==null?void 0:i.editorValue})}function Tt(e,t,o){var i;t||(t=(i=e.editModelSvc)==null?void 0:i.getEditPositions()),t.forEach(s=>ei(e,s,o))}function ei(e,t,o){var h,g;const{editSvc:i,editModelSvc:s}=e,{rowNode:n,column:r}=t,a=Z(e,t);if(!a){s!=null&&s.hasEdits(t)&&n&&r&&(s==null||s.setEdit(t,{state:"changed"}));return}const{comp:l}=a;if(l&&!l.getCellEditor())return;const d=(g=(h=l==null?void 0:l.getCellEditor())==null?void 0:h.getValidationErrors)==null?void 0:g.call(h),c=s==null?void 0:s.getCellValidationModel();d!=null&&d.length?c==null||c.setCellValidation(t,{errorMessages:d}):c==null||c.clearCellValidation(t),s!=null&&s.getEdit(t)&&(s==null||s.setEdit(t,{state:"changed"})),l==null||l.setEditDetails(),l==null||l.refreshEditStyles(!1,!1),a==null||a.refreshCell({force:!0,suppressFlash:!0});const u=s==null?void 0:s.getEdit(t);(u==null?void 0:u.state)==="changed"&&!(o!=null&&o.silent)&&(i==null||i.dispatchCellEvent(t,o==null?void 0:o.event,"cellEditingStopped",{valueChanged:Ue(u),newValue:u==null?void 0:u.pendingValue,oldValue:u==null?void 0:u.sourceValue}))}function lt(e){var u,h,g,p,f,C,m,w;const t=Wr(e),o=new Or,{ariaAnnounce:i,localeSvc:s,editModelSvc:n,gos:r}=e,a=r.get("editType")==="fullRow",d=bn(s)("ariaValidationErrorPrefix","Cell Editor Validation");for(const S of t){const{ctrl:v,editor:b}=S,{rowNode:D,column:T}=v,G=((u=b.getValidationErrors)==null?void 0:u.call(b))??[],F=((h=b.getValidationElement)==null?void 0:h.call(b,!1))||!((g=b.isPopup)!=null&&g.call(b))&&v.eGui;if(F){const P=G!=null&&G.length>0,H=P?G.join(". "):"";Wd(F,P),P&&i.announceValue(`${d} ${G}`,"editorValidation"),F instanceof HTMLInputElement?F.setCustomValidity(H):F.classList.toggle("invalid",P)}(G==null?void 0:G.length)>0&&o.setCellValidation({rowNode:D,column:T},{errorMessages:G})}at(e,!1),n==null||n.setCellValidationModel(o);const c=new Set;for(const{ctrl:S}of t)c.add(S.rowCtrl);if(a){const S=dh(e);n==null||n.setRowValidationModel(S)}for(const S of c.values()){(p=S.rowEditStyleFeature)==null||p.applyRowStyles();for(const v of S.getAllCellCtrls())(f=v.tooltipFeature)==null||f.refreshTooltip(!0),(C=v.editorTooltipFeature)==null||C.refreshTooltip(!0),(w=(m=v.editStyleFeature)==null?void 0:m.applyCellStyles)==null||w.call(m)}}var dh=e=>{var s;const t=new Br,o=e.gos.get("getFullRowEditValidationErrors"),i=(s=e.editModelSvc)==null?void 0:s.getEditMap();if(!i)return t;for(const n of i.keys()){const r=i.get(n);if(!r)continue;const a=[],{rowIndex:l,rowPinned:d}=n;for(const u of r.keys()){const h=r.get(u);if(!h)continue;const{editorValue:g,pendingValue:p,sourceValue:f}=h,C=g??(p===Ce?void 0:p)??f;a.push({column:u,colId:u.getColId(),rowIndex:l,rowPinned:d,oldValue:f,newValue:C})}const c=(o==null?void 0:o({editorsState:a}))??[];c.length>0&&t.setRowValidation({rowNode:n},{errorMessages:c})}return t};function ch(e){var i;lt(e);const t=(i=e.editModelSvc)==null?void 0:i.getCellValidationModel().getCellValidationMap();if(!t)return null;const o=[];return t.forEach((s,n)=>{s.forEach(({errorMessages:r},a)=>{o.push({column:a,rowIndex:n.rowIndex,rowPinned:n.rowPinned,messages:r??null})})}),o}var uh="ag-column-first",hh="ag-column-last";function Kr(e,t,o,i){return q(e)?[]:ph(e.headerClass,e,t,o,i)}function jr(e,t,o){e.toggleCss(uh,o.isColAtEdge(t,"first")),e.toggleCss(hh,o.isColAtEdge(t,"last"))}function gh(e,t,o,i){return _(t,{colDef:e,column:o,columnGroup:i})}function ph(e,t,o,i,s){if(q(e))return[];let n;if(typeof e=="function"){const r=gh(t,o,i,s);n=e(r)}else n=e;return typeof n=="string"?[n]:Array.isArray(n)?[...n]:[]}function fh(e){return!!(e.rowPinned&&e.pinnedSibling)}var y={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",SPACE:" ",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete",F2:"F2",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",PAGE_HOME:"Home",PAGE_END:"End",A:"KeyA",C:"KeyC",D:"KeyD",V:"KeyV",X:"KeyX",Y:"KeyY",Z:"KeyZ"},ms=!1,ti=0;function Ch(e){ti>0||(e.addEventListener("keydown",oi),e.addEventListener("mousedown",oi))}function mh(e){ti>0||(e.removeEventListener("keydown",oi),e.removeEventListener("mousedown",oi))}function oi(e){const t=ms,o=e.type==="keydown";o&&(e.ctrlKey||e.metaKey||e.altKey)||t!==o&&(ms=o)}function wh(e){const t=te(e);return Ch(t),ti++,()=>{ti--,mh(t)}}function vh(){return ms}function It(e,t,o=!1){const i=oc;let s=Hn;t&&(s+=", "+t),o&&(s+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(l=>Le(l)),r=Array.prototype.slice.apply(e.querySelectorAll(s));return r.length?((l,d)=>l.filter(c=>d.indexOf(c)===-1))(n,r):n}function ii(e,t=!1,o=!1,i=!1){const s=It(e,i?".ag-tab-guard":null,o),n=t?U(s):s[0];return n?(n.focus({preventScroll:!0}),!0):!1}function si(e,t,o,i){const s=It(t,null),n=Q(e);let r;r=s.indexOf(n);const a=r+(i?-1:1);return a<0||a>=s.length?null:s[a]}function Sh(e,t=5){let o=0;for(;e&&Ki(e)===null&&++o<=t;)e=e.parentElement;return Ki(e)===null?null:e}function dt(e){var t;return e.gos.get("suppressHeaderFocus")||!!((t=e.overlays)!=null&&t.isExclusive())}function ni(e){var t;return e.gos.get("suppressCellFocus")||!!((t=e.overlays)!=null&&t.isExclusive())}function io(e,t,o=!1){const i=e.ctrlsSvc.get("gridCtrl");return!o&&i.focusNextInnerContainer(t)?!0:((o||!t&&!i.isDetailGrid())&&i.forceFocusOutOfContainer(t),!1)}function bh(e,t,o,{rowNode:i,column:s},n){return _(e.gos,{type:o,node:i,data:i.data,value:n,column:s,colDef:s.getColDef(),rowPinned:i.rowPinned,event:t,rowIndex:i.rowIndex})}function yh(e,t=!1){return e===y.DELETE?!0:!t&&e===y.BACKSPACE?kn():!1}var Rh=class extends x{constructor(e,t,o,i){super(),this.cellCtrl=e,this.rowNode=o,this.rowCtrl=i,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){const t=e.key;switch(t){case y.ENTER:this.onEnterKeyDown(e);break;case y.F2:this.onF2KeyDown(e);break;case y.ESCAPE:this.onEscapeKeyDown(e);break;case y.TAB:this.onTabKeyDown(e);break;case y.BACKSPACE:case y.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case y.DOWN:case y.UP:case y.RIGHT:case y.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){var s,n;const{cellCtrl:o,beans:i}=this;if(!((s=i.editSvc)!=null&&s.isEditing(o,{withOpenEditor:!0}))){if(e.shiftKey&&o.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const r=o.getFocusedCellPosition();(n=i.navigation)==null||n.navigateToNextCell(e,t,r,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:o}=this.beans;if(!t)return;const i=t.extendLatestRangeInDirection(e);i&&(e.key===y.LEFT||e.key===y.RIGHT?o==null||o.ensureColumnVisible(i.column):o==null||o.ensureRowVisible(i.rowIndex))}onTabKeyDown(e){var t;(t=this.beans.navigation)==null||t.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){var d;const{cellCtrl:o,beans:i,rowNode:s}=this,{gos:n,rangeSvc:r,eventSvc:a,editSvc:l}=i;if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),yh(e,n.get("enableCellEditingOnBackspace"))&&!(l!=null&&l.isEditing(o,{withOpenEditor:!0}))){if(r&&ot(n))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(o.isCellEditable()){const{column:c}=o,u=this.beans.valueSvc.getDeleteValue(c,s);s.setDataValue(c,u,"cellClear")}}else l!=null&&l.isEditing(o,{withOpenEditor:!0})||(d=i.editSvc)==null||d.startEditing(o,{startedEdit:!0,event:t});a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(e){var d;const{cellCtrl:t,beans:o}=this,{editSvc:i,navigation:s}=o,n=i==null?void 0:i.isEditing(t),r=t.rowNode,a=i==null?void 0:i.isRowEditing(r),l=c=>{(i==null?void 0:i.startEditing(c,{startedEdit:!0,event:e}))&&e.preventDefault()};if(n||a){if(this.isCtrlEnter(e)){i==null||i.applyBulkEdit(t,((d=o==null?void 0:o.rangeSvc)==null?void 0:d.getCellRanges())||[]);return}if(lt(o),(i==null?void 0:i.checkNavWithValidation(void 0,e))==="block-stop")return;i!=null&&i.isEditing(t,{withOpenEditor:!0})?i==null||i.stopEditing(t,{event:e}):a&&!t.isCellEditable()?i==null||i.stopEditing({rowNode:r},{event:e}):l(t)}else if(o.gos.get("enterNavigatesVertically")){const c=e.shiftKey?y.UP:y.DOWN;s==null||s.navigateToNextCell(null,c,t.cellPosition,!1)}else{if(i!=null&&i.hasValidationErrors())return;i!=null&&i.hasValidationErrors(t)&&i.revertSingleCellEdit(t,!0),l(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&e.key===y.ENTER}onF2KeyDown(e){const{cellCtrl:t,beans:{editSvc:o}}=this;o!=null&&o.isEditing()&&(lt(this.beans),(o==null?void 0:o.checkNavWithValidation(void 0,e))==="block-stop")||o==null||o.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){const{cellCtrl:t,beans:{editSvc:o}}=this;(o==null?void 0:o.checkNavWithValidation(t,e))==="block-stop"&&o.revertSingleCellEdit(t),o==null||o.stopEditing(t,{event:e,cancel:!0})}processCharacter(e){var r;const o=e.target!==this.eGui,{beans:{editSvc:i},cellCtrl:s}=this;if(o||i!=null&&i.isEditing(s,{withOpenEditor:!0}))return;if(e.key===y.SPACE)this.onSpaceKeyDown(e);else if(i!=null&&i.isCellEditable(s,"ui")){if(i!=null&&i.hasValidationErrors()&&!(i!=null&&i.hasValidationErrors(s)))return;i==null||i.startEditing(s,{startedEdit:!0,event:e,source:"api"});const a=s.editCompDetails;!((r=a==null?void 0:a.params)!=null&&r.suppressPreventDefault)&&e.preventDefault()}}onSpaceKeyDown(e){var s;const{gos:t,editSvc:o}=this.beans,{rowNode:i}=this.cellCtrl;!(o!=null&&o.isEditing(this.cellCtrl,{withOpenEditor:!0}))&&et(t)&&((s=this.beans.selectionSvc)==null||s.handleSelectionEvent(e,i,"spaceKey")),e.preventDefault()}};function qr(e,t,o){if(o===0)return!1;const i=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(i,s)<=o}function Yr({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var Eh=class extends x{constructor(e,t,o){super(),this.cellCtrl=e,this.column=o,this.beans=t}onMouseEvent(e,t){if(!Ge(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){var h;if((h=this.beans.touchSvc)!=null&&h.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:o,editSvc:i,editModelSvc:s,frameworkOverrides:n}=this.beans,r=e.ctrlKey||e.metaKey,{cellCtrl:a}=this,{column:l,cellPosition:d}=a;o&&r&&o.getCellRangeCount(d)>1&&o.intersectLastRange(!0);const c=a.createEvent(e,"cellClicked");t.dispatchEvent(c);const u=l.getColDef();if(u.onCellClicked&&window.setTimeout(()=>{n.wrapOutgoing(()=>{u.onCellClicked(c)})},0),(s==null?void 0:s.getState(a))!=="editing"){const g=i==null?void 0:i.isEditing(),p=(s==null?void 0:s.getCellValidationModel().getCellValidationMap().size)??0,f=(s==null?void 0:s.getRowValidationModel().getRowValidationMap().size)??0;if(g&&(p>0||f>0))return;i!=null&&i.shouldStartEditing(a,e)?i==null||i.startEditing(a,{event:e}):i!=null&&i.shouldStopEditing(a,e)&&(i==null||i.stopEditing(a))}}onCellDoubleClicked(e){var c;const{column:t,beans:o,cellCtrl:i}=this,{eventSvc:s,frameworkOverrides:n,editSvc:r,editModelSvc:a}=o,l=t.getColDef(),d=i.createEvent(e,"cellDoubleClicked");if(s.dispatchEvent(d),typeof l.onCellDoubleClicked=="function"&&window.setTimeout(()=>{n.wrapOutgoing(()=>{l.onCellDoubleClicked(d)})},0),r!=null&&r.shouldStartEditing(this.cellCtrl,e)&&((c=this.beans.editModelSvc)==null?void 0:c.getState(this.cellCtrl))!=="editing"){const u=r==null?void 0:r.isEditing(),h=(a==null?void 0:a.getCellValidationModel().getCellValidationMap().size)??0,g=(a==null?void 0:a.getRowValidationModel().getRowValidationMap().size)??0;if(u&&(h>0||g>0))return;r==null||r.startEditing(i,{event:e})}}onMouseDown(e){const{ctrlKey:t,metaKey:o,shiftKey:i}=e,s=e.target,{cellCtrl:n,beans:r}=this,{eventSvc:a,rangeSvc:l,rowNumbersSvc:d,focusSvc:c,gos:u,editSvc:h}=r;if(this.isRightClickInExistingRange(e))return;const g=l&&!l.isEmpty(),p=this.containsWidget(s),{cellPosition:f,column:C}=n,m=nt(C);if(d&&m&&!d.handleMouseDownOnCell(f,e)){l&&e.preventDefault(),e.stopImmediatePropagation();return}if(!i||!g){const w=h==null?void 0:h.isEditing(n),v=u.get("enableCellTextSelection")&&e.defaultPrevented,b=(ft()||v)&&!w&&!ji(s)&&!p;n.focusCell(b,e)}if(i&&g&&!c.isCellFocused(f)){e.preventDefault();const w=c.getFocusedCell();if(w){const{column:S,rowIndex:v,rowPinned:b}=w;h!=null&&h.isEditing(w)&&(h==null||h.stopEditing(w)),c.setFocusedCell({column:S,rowIndex:v,rowPinned:b,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}if(!p){if(l){m&&e.preventDefault();const w=Yr(this.beans,e)&&m;if(i)l.extendLatestRangeToCell(f);else if(!w){const S=t||o;l.setRangeToCell(f,S)}}a.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseDown"))}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const o=t.isCellInAnyRange(this.cellCtrl.cellPosition),i=Yr(this.beans,e);if(o&&i)return!0}return!1}containsWidget(e){return mt(e,"ag-selection-checkbox",3)||mt(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),o==null||o.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),o==null||o.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.eGui,o=t.contains(e.target),i=t.contains(e.relatedTarget);return o&&i}},xh=class extends x{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.column,this.rowNode=e.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}init(){this.eSetLeft=this.cellCtrl.getRootElement(),this.eContent=this.cellCtrl.eGui;const e=this.cellCtrl.getCellSpan();if(e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e){const t=this.refreshSpanHeight.bind(this,e);t(),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:t,recalculateRowBounds:t,pinnedHeightChanged:t})}}refreshSpanHeight(e){const t=e.getCellHeight();t!=null&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();to(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eContent)return;const e=this.getCellWidth();this.eContent.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){const{column:e,rowNode:t}=this,o=e.getColSpan(t),i=[];if(o===1)i.push(e);else{let s=e;const n=e.getPinned();for(let r=0;s&&r<o&&(i.push(s),s=this.beans.visibleCols.getColAfter(s),!(!s||q(s)||n!==s.getPinned()));r++);}return i}onLeftChanged(){if(!this.eSetLeft)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eSetLeft.style.left=e+"px"}getCellLeft(){let e;return this.beans.gos.get("enableRtl")&&this.colsSpanning?e=U(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||this.column.getPinned()==="left")return e;const{visibleCols:t}=this.beans,o=t.getColsLeftWidth();if(this.column.getPinned()==="right"){const i=t.bodyWidth;return o+i+(e||0)}return o+(e||0)}_legacyApplyRowSpan(e){if(this.rowSpan===1&&!e)return;const o=ns(this.beans)*this.rowSpan;this.eContent.style.height=`${o}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},Dh="ag-cell",Fh="ag-cell-auto-height",Ph="ag-cell-normal-height",Th="ag-cell-focus",Ih="ag-cell-first-right-pinned",Ah="ag-cell-last-left-pinned",Mh="ag-cell-not-inline-editing",kh="ag-cell-wrap-text",ri="cellCtrl";function Zr(e,t){return cr(e,t,ri)}var Lh=0,At=class extends x{constructor(e,t,o,i){super(),this.column=e,this.rowNode=t,this.rowCtrl=i,this.rangeFeature=void 0,this.rowResizeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.editStyleFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.hasEdit=!1,this.tooltipFeature=void 0,this.editorTooltipFeature=void 0,this.beans=o,this.gos=o.gos,this.editSvc=o.editSvc,this.hasEdit=!!o.editSvc;const{colId:s}=e;this.instanceId=s+"-"+Lh++,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){var i,s;const{beans:e}=this;this.positionFeature=new xh(this,e),this.customStyleFeature=(i=e.cellStyles)==null?void 0:i.createCellCustomStyleFeature(this,e),this.editStyleFeature=(s=e.editSvc)==null?void 0:s.createCellStyleFeature(this,e),this.mouseListener=new Eh(this,e,this.column),this.keyboardListener=new Rh(this,e,this.rowNode,this.rowCtrl),this.enableTooltipFeature();const{rangeSvc:t}=e;t&&ot(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(e,this)),nt(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(e,this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.editorTooltipFeature=e.destroyBean(this.editorTooltipFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.editStyleFeature=e.destroyBean(this.editStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.rowResizeFeature=e.destroyBean(this.rowResizeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){var o;this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}enableEditorTooltipFeature(e){var t;this.editorTooltipFeature&&this.disableEditorTooltipFeature(),this.editorTooltipFeature=(t=this.beans.tooltipSvc)==null?void 0:t.setupCellEditorTooltip(this,e),lt(this.beans)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(e,t,o,i,s,n,r){var a,l,d,c,u,h,g,p;this.comp=e,this.eGui=t,this.printLayout=s,r??(r=this),this.addDomData(r),this.addFeatures(),r.addDestroyFunc(()=>this.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(i,r),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),(a=this.positionFeature)==null||a.init(),(l=this.customStyleFeature)==null||l.setComp(e),(d=this.editStyleFeature)==null||d.setComp(e),(c=this.tooltipFeature)==null||c.refreshTooltip(),(u=this.keyboardListener)==null||u.init(),(h=this.rangeFeature)==null||h.setComp(e),(g=this.rowResizeFeature)==null||g.refreshRowResizer(),n&&this.isCellEditable()?(p=this.editSvc)==null||p.startEditing(this,{startedEdit:!0,source:"api"}):this.showValue(!1,!0),this.onCompAttachedFuncs.length&&(this.onCompAttachedFuncs.forEach(f=>f()),this.onCompAttachedFuncs=[])}setupAutoHeight(e,t){var o;this.isAutoHeight=((o=this.beans.rowAutoHeight)==null?void 0:o.setupCellAutoHeight(this,e,t))??!1}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}getDeferLoadingCellRenderer(){var l,d;const{beans:e,column:t}=this,{userCompFactory:o,ctrlsSvc:i,eventSvc:s}=e,n=t.getColDef(),r=this.createCellRendererParams();r.deferRender=!0;const a=Mr(o,n,r);if((d=(l=i.getGridBodyCtrl())==null?void 0:l.scrollFeature)!=null&&d.isScrolling()){let c;const u=new oo(h=>{c=h});return this.addManagedListeners(s,{bodyScrollEnd:()=>c()}),{loadingComp:a,onReady:u}}return{loadingComp:a,onReady:oo.resolve()}}showValue(e,t){var u,h,g;const{beans:o,column:i,rowNode:s,rangeFeature:n}=this,{userCompFactory:r}=o;let a=this.getValueToDisplay(),l;const d=s.stub&&((u=s.groupData)==null?void 0:u[i.getId()])==null,c=i.getColDef();if(d||this.isCellRenderer()){const p=this.createCellRendererParams();!d||nt(i)?l=Ar(r,c,p):l=Mr(r,c,p)}if(!l&&!d&&((h=o.findSvc)!=null&&h.isMatch(s,i))){const p=this.createCellRendererParams();l=Ar(r,{...i.getColDef(),cellRenderer:"agFindCellRenderer"},p)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(s,{checkSiblings:!0})){const p=this.editSvc.prepDetailsDuringBatch(this,{compDetails:l,valueToDisplay:a});p&&(p.compDetails?l=p.compDetails:p.valueToDisplay&&(a=p.valueToDisplay))}this.comp.setRenderDetails(l,a,e),!t&&n&&We(o,()=>n==null?void 0:n.refreshHandle()),(g=this.rowResizeFeature)==null||g.refreshRowResizer()}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e),!0),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}isIncludeControl(e,t=!1){return(this.rowNode.rowPinned==null||t&&fh(this.rowNode))&&!!e}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:o}=this.beans.gridOptions,i=Oo(t),s=st(this.column);return o==="custom"&&i!=="selectionColumn"&&s?!1:e.checkboxSelection||s&&typeof t=="object"&&bt(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),o=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),i=this.includeDndSource!=this.isIncludeControl(e.dndSource),s=this.isAutoHeight!=this.column.isAutoHeight();return t||o||i||s}onPopupEditorClosed(){const{editSvc:e}=this.beans;e!=null&&e.isEditing(this,{withOpenEditor:!0})&&(e==null||e.stopEditing(this,{source:e!=null&&e.isBatchEditing()?"ui":"api"}))}stopEditing(e=!1){const{editSvc:t}=this.beans;return(t==null?void 0:t.stopEditing(this,{cancel:e,source:t!=null&&t.isBatchEditing()?"ui":"api"}))??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:o,rowNode:i,comp:s,eGui:n,beans:{valueSvc:r,gos:a,editSvc:l}}=this;return _(a,{value:e,valueFormatted:t,getValue:()=>r.getValueForDisplay(o,i).value,setValue:c=>(l==null?void 0:l.setDataValue({rowNode:i,column:o},c))||r.setValue(i,o,c),formatValue:this.formatValue.bind(this),data:i.data,node:i,pinned:o.getPinned(),colDef:o.getColDef(),column:o,refreshCell:this.refreshCell.bind(this),eGridCell:n,eParentOfValue:s.getParentOfValue(),registerRowDragger:(c,u,h,g)=>this.registerRowDragger(c,u,g),setTooltip:(c,u)=>{var h;a.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(c,u),(h=this.tooltipFeature)==null||h.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){var t;this.refreshShouldDestroy()?(t=this.rowCtrl)==null||t.recreateCell(this):this.refreshCell(e)}refreshCell({force:e,suppressFlash:t,newData:o}={}){var d,c,u,h,g,p,f,C;if(this.suppressRefreshCell)return;const i=this.column.getColDef(),s=i.field==null&&i.valueGetter==null&&i.showRowGroup==null,n=e||s||o,r=!!this.comp,a=this.updateAndFormatValue(r),l=n||a;if(r){if(l){this.showValue(!!o,!1);const m=(d=this.beans.filterManager)==null?void 0:d.isSuppressFlashingCellsBecauseFiltering();!t&&!m&&i.enableCellChangeFlash&&((c=this.beans.cellFlashSvc)==null||c.flashCell(this)),(h=(u=this.editStyleFeature)==null?void 0:u.applyCellStyles)==null||h.call(u),(g=this.customStyleFeature)==null||g.applyUserStyles(),(p=this.customStyleFeature)==null||p.applyClassesFromColDef()}(f=this.tooltipFeature)==null||f.refreshTooltip(),(C=this.customStyleFeature)==null||C.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){const t=this.value,o=this.valueFormatted,{value:i,valueFormatted:s}=this.beans.valueSvc.getValueForDisplay(this.column,this.rowNode,!0);return this.value=i,this.valueFormatted=s,e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=o:!0}valuesAreEqual(e,t){const o=this.column.getColDef();return o.equals?o.equals(e,t):e===t}addDomData(e){const t=this.eGui;tt(this.beans.gos,t,ri,this),e.addDestroyFunc(()=>tt(this.beans.gos,t,ri,null))}createEvent(e,t){const{rowNode:o,column:i,value:s,beans:n}=this;return bh(n,e,t,{rowNode:o,column:i},s)}processCharacter(e){var t;(t=this.keyboardListener)==null||t.processCharacter(e)}onKeyDown(e){var t;(t=this.keyboardListener)==null||t.onKeyDown(e)}onMouseEvent(e,t){var o;(o=this.mouseListener)==null||o.onMouseEvent(e,t)}getColSpanningList(){var e;return((e=this.positionFeature)==null?void 0:e.getColSpanningList())??[]}onLeftChanged(){var e;this.comp&&((e=this.positionFeature)==null||e.onLeftChanged())}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:o}=this;jr(e,t,o.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);Tn(this.eGui,e)}onWidthChanged(){var e;return(e=this.positionFeature)==null?void 0:e.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){var e;this.comp&&((e=this.rangeFeature)==null||e.updateRangeBordersIfRangeCount())}onCellSelectionChanged(){var e;this.comp&&((e=this.rangeFeature)==null||e.onCellSelectionChanged())}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1,t){var i;const o=(i=this.editSvc)==null?void 0:i.allowedFocusTargetOnValidation(this);o&&o!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){const{beans:{editSvc:t,focusSvc:o},comp:i}=this;if(!i||t!=null&&t.isEditing(this)||!this.isCellFocused()||!o.shouldTakeFocus())return;const s=()=>{if(!this.isAlive())return;const n=i.getFocusableElement();this.isCellFocused()&&n.focus({preventScroll:!0})};if(e){setTimeout(s,0);return}s()}onRowIndexChanged(){var e,t;this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),(e=this.rangeFeature)==null||e.onCellSelectionChanged(),(t=this.rowResizeFeature)==null||t.refreshRowResizer()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&(nt(this.column)&&(e=!0),he(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.toggleCss(Ih,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.toggleCss(Ah,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){var s;const{beans:t}=this;if(ni(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}const o=this.isCellFocused(),i=((s=t.editSvc)==null?void 0:s.isEditing(this))??!1;if(this.comp.toggleCss(Th,o),o&&e&&e.forceBrowserFocus){let n=this.comp.getFocusableElement();if(i){const r=It(n,null,!0);r.length&&(n=r[0])}n.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}o&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:Qe(t),column:this.column}}applyStaticCssClasses(){const{comp:e}=this;e.toggleCss(Dh,!0),e.toggleCss(Mh,!0);const t=this.column.isAutoHeight()==!0;e.toggleCss(Fh,t),e.toggleCss(Ph,!t)}onColumnHover(){var e;(e=this.beans.colHover)==null||e.onCellColumnHover(this.column,this.comp)}onColDefChanged(){var e,t;this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),(e=this.editSvc)!=null&&e.isEditing(this)?(t=this.editSvc)==null||t.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.toggleCss(kh,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),o=this.createEvent(e,"cellContextMenu"),{beans:i}=this;i.eventSvc.dispatchEvent(o),t.onCellContextMenu&&window.setTimeout(()=>{i.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(o)})},0)}getCellRenderer(){var e;return((e=this.comp)==null?void 0:e.getCellRenderer())??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){var e;return((e=this.eGui)==null?void 0:e.contains(Q(this.beans)))??!1}createSelectionCheckbox(){var t;const e=(t=this.beans.selectionSvc)==null?void 0:t.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,o){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const i=this.createRowDragComp(e,t,o);i&&(this.customRowDragComp=i,this.addDestroyFunc(()=>{this.beans.context.destroyBean(i),this.customRowDragComp=null}))}createRowDragComp(e,t,o){var s;const i=(s=this.beans.rowDragSvc)==null?void 0:s.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,o);if(i)return this.beans.context.createBean(i),i}cellEditorAttached(){this.onEditorAttachedFuncs.forEach(e=>e()),this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){}getRootElement(){return this.eGui}},Qr="__ag_grid_instance";function Xr(e,t){t[Qr]=e.gridInstanceId}function so(e,t){return Jr(e,t.target)}function Jr(e,t){let o=t;for(;o;){const i=o[Qr];if(A(i))return i===e.gridInstanceId;o=o.parentElement}return!1}function Gh(e,t){var o;return((o=Zr(e,t.target))==null?void 0:o.getFocusedCellPosition())??null}var Hh=class extends x{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dropTargets=[]}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.dragSvc=e.dragSvc,this.environment=e.environment,this.userCompFactory=e.userCompFactory}addDragSource(e,t=!1){const o={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:o,dragSource:e}),this.dragSvc.addDragSource(o)}getDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;return!e||!e.comp?null:e.comp}removeDragSource(e){const{dragSourceAndParamsList:t,dragSvc:o}=this,i=t.find(s=>s.dragSource===e);i&&(o.removeDragSource(i.params),Se(t,i))}destroy(){const{dragSourceAndParamsList:e,dragSvc:t,dropTargets:o}=this;e.forEach(i=>t.removeDragSource(i.params)),e.length=0,o.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){var o;this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=e.getDragItem(),(o=e.onDragStarted)==null||o.call(e),this.createDragAndDropImageComponent()}onDragStop(e){var o,i;(i=(o=this.dragSource)==null?void 0:o.onDragStopped)==null||i.call(o);const{lastDropTarget:t}=this;if(t!=null&&t.onDragStop){const s=this.createDropTargetEvent(t,e,null,null,!1);t.onDragStop(s)}this.clearDragAndDropProperties()}onDragCancel(){var o;const{dragSource:e,lastDropTarget:t}=this;(o=e==null?void 0:e.onDragCancelled)==null||o.call(e),t!=null&&t.onDragCancel&&t.onDragCancel(this.createDropTargetEvent(t,this.eventLastTime,null,null,!1)),this.clearDragAndDropProperties()}clearDragAndDropProperties(){this.eventLastTime=null,this.dragging=!1,this.lastDropTarget=void 0,this.dragItem=null,this.dragSource=null,this.removeDragAndDropImageComponent()}onDragging(e,t=!1){var c,u;const o=this.getHorizontalDirection(e),i=this.getVerticalDirection(e);this.eventLastTime=e,this.positionDragAndDropImageComp(e);const s=this.dropTargets.filter(h=>this.isMouseOnDropTarget(e,h)),n=this.findCurrentDropTarget(e,s),{lastDropTarget:r,dragSource:a,dragAndDropImageComp:l,dragItem:d}=this;if(n!==r){if(this.leaveLastTargetIfExists(e,o,i,t),r!==null&&n===null&&((c=a==null?void 0:a.onGridExit)==null||c.call(a,d)),r===null&&n!==null&&((u=a==null?void 0:a.onGridEnter)==null||u.call(a,d)),this.enterDragTargetIfExists(n,e,o,i,t),n&&l){const{comp:h,promise:g}=l;h?h.setIcon(n.getIconName?n.getIconName():null,!1):g.then(p=>{p&&p.setIcon(n.getIconName?n.getIconName():null,!1)})}this.lastDropTarget=n}else if(n&&n.onDragging){const h=this.createDropTargetEvent(n,e,o,i,t);n.onDragging(h)}}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,o=[[e.getContainer()]];return t?o.concat(t):o}isMouseOnDropTarget(e,t){const o=this.getAllContainersFromDropTarget(t);let i=!1;const s=(a,l)=>{for(const d of l){const{width:c,height:u,left:h,right:g,top:p,bottom:f}=d.getBoundingClientRect();if(c===0||u===0)return!1;const C=a.clientX>=h&&a.clientX<g,m=a.clientY>=p&&a.clientY<f;if(!C||!m)return!1}return!0};for(const a of o)if(s(e,a)){i=!0;break}const{eElement:n,type:r}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(n)?!1:i&&t.isInterestedIn(r,n)}findCurrentDropTarget(e,t){const o=t.length;if(o===0)return null;if(o===1)return t[0];const s=Xt(this.beans).elementsFromPoint(e.clientX,e.clientY);for(const n of s)for(const r of t)if(this.getAllContainersFromDropTarget(r).flatMap(l=>l).indexOf(n)!==-1)return r;return null}enterDragTargetIfExists(e,t,o,i,s){if(e&&e.onDragEnter){const n=this.createDropTargetEvent(e,t,o,i,s);e.onDragEnter(n)}}leaveLastTargetIfExists(e,t,o,i){const{lastDropTarget:s}=this;if(!s)return;if(s.onDragLeave){const r=this.createDropTargetEvent(s,e,t,o,i);s.onDragLeave(r)}const n=this.getDragAndDropImageComponent();n&&n.setIcon(null,!1)}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.filter(o=>o.external).find(o=>o.getContainer()===e.getContainer())||null}isDropZoneWithinThisGrid(e){const o=this.ctrlsSvc.getGridBodyCtrl().eGridBody,{dropZoneTarget:i}=e;return o.contains(i)}getHorizontalDirection(e){var i;const t=(i=this.eventLastTime)==null?void 0:i.clientX,o=e.clientX;return t===o?null:t>o?"left":"right"}getVerticalDirection(e){var i;const t=(i=this.eventLastTime)==null?void 0:i.clientY,o=e.clientY;return t===o?null:t>o?"up":"down"}createDropTargetEvent(e,t,o,i,s){const n=e.getContainer(),r=n.getBoundingClientRect(),{dragItem:a,dragSource:l,gos:d}=this,c=t.clientX-r.left,u=t.clientY-r.top;return _(d,{event:t,x:c,y:u,vDirection:i,hDirection:o,dragSource:l,fromNudge:s,dragItem:a,dropZoneTarget:n})}positionDragAndDropImageComp(e){const t=this.getDragAndDropImageComponent();t&&Sc(t.getGui(),e,this.beans)}removeDragAndDropImageComponent(){var t;const{dragAndDropImageComp:e}=this;if(e){const{comp:o}=e;if(o){const i=o.getGui();(t=this.dragAndDropImageParent)==null||t.removeChild(i),this.destroyBean(o)}}this.dragAndDropImageComp=null}createDragAndDropImageComponent(){const{dragSource:e,gos:t,userCompFactory:o}=this;if(!e)return;const i=Du(o,_(t,{dragSource:e}));if(!i)return;const s=i.newAgStackInstance();this.dragAndDropImageComp={promise:s},s.then(n=>{!n||!this.isAlive()||(this.processDragAndDropImageComponent(n),this.dragAndDropImageComp.comp=n)})}processDragAndDropImageComponent(e){const{dragSource:t,environment:o}=this;if(!t)return;const i=e.getGui();i.style.setProperty("position","absolute"),i.style.setProperty("z-index","9999"),Xr(this.gos,i),o.applyThemeClasses(i),e.setIcon(null,!1);let{dragItemName:s}=t;typeof s=="function"&&(s=s()),e.setLabel(s||""),i.style.top="20px",i.style.left="20px";const n=as(this.beans);this.dragAndDropImageParent=n,n?n.appendChild(i):M(54)}registerGridDropTarget(e,t){const o={getContainer:e,isInterestedIn:i=>i===1||i===0,getIconName:()=>"notAllowed"};this.addDropTarget(o),t.addDestroyFunc(()=>this.removeDropTarget(o))}},Oh=class extends x{constructor(){super(...arguments),this.beanName="dragSvc",this.dragEndFunctions=[],this.dragSources=[]}destroy(){const{dragSources:e}=this;e.forEach(this.removeListener.bind(this)),e.length=0,super.destroy()}removeListener(e){const t=e.dragSource.eElement,o=e.mouseDownListener;if(t.removeEventListener("mousedown",o),e.touchEnabled){const i=e.touchStartListener;t.removeEventListener("touchstart",i,{passive:!0})}}removeDragSource(e){const{dragSources:t}=this,o=t.find(i=>i.dragSource===e);o&&(this.removeListener(o),Se(t,o))}addDragSource(e){const t=this.onMouseDown.bind(this,e),{eElement:o,includeTouch:i,stopPropagationForTouch:s}=e;o.addEventListener("mousedown",t);let n=null;const r=this.gos.get("suppressTouch");i&&!r&&(n=a=>{ji(a.target)||(s&&a.stopPropagation(),this.onTouchStart(e,a))},o.addEventListener("touchstart",n,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:n,touchEnabled:!!i})}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;const o=t.touches[0];this.touchLastTime=o,this.touchStart=o;const i=l=>this.onTouchMove(l,e.eElement),s=l=>this.onTouchUp(l,e.eElement),n=l=>{l.cancelable&&l.preventDefault()},r=t.target,a=[{target:Xt(this.beans),type:"touchmove",listener:n,options:{passive:!1}},{target:r,type:"touchmove",listener:i,options:{passive:!0}},{target:r,type:"touchend",listener:s,options:{passive:!0}},{target:r,type:"touchcancel",listener:s,options:{passive:!0}}];this.addTemporaryEvents(a),e.dragStartPixels===0&&this.onCommonMove(o,this.touchStart,e.eElement)}onMouseDown(e,t){const o=t;if(e.skipMouseEvent&&e.skipMouseEvent(t)||o._alreadyProcessedByDragService||(o._alreadyProcessedByDragService=!0,t.button!==0))return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;const i=d=>this.onMouseMove(d,e.eElement),s=d=>this.onMouseUp(d,e.eElement),n=d=>d.preventDefault(),r=d=>{d.key===y.ESCAPE&&this.cancelDrag(e.eElement)},a=Xt(this.beans),l=[{target:a,type:"mousemove",listener:i},{target:a,type:"mouseup",listener:s},{target:a,type:"contextmenu",listener:n},{target:a,type:"keydown",listener:r}];this.addTemporaryEvents(l),e.dragStartPixels===0&&this.onMouseMove(t,e.eElement)}addTemporaryEvents(e){e.forEach(t=>{const{target:o,type:i,listener:s,options:n}=t;o.addEventListener(i,s,n)}),this.dragEndFunctions.push(()=>{e.forEach(t=>{const{target:o,type:i,listener:s,options:n}=t;o.removeEventListener(i,s,n)})})}isEventNearStartEvent(e,t){const{dragStartPixels:o}=this.currentDragParams,i=A(o)?o:4;return qr(e,t,i)}getFirstActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}onCommonMove(e,t,o){var i;if(!this.dragging){if(this.isEventNearStartEvent(e,t))return;if(this.dragging=!0,this.eventSvc.dispatchEvent({type:"dragStarted",target:o}),this.currentDragParams.onDragStart(t),!this.currentDragParams){this.dragging=!1;return}this.currentDragParams.onDragging(t)}(i=this.currentDragParams)==null||i.onDragging(e)}onTouchMove(e,t){const o=this.getFirstActiveTouch(e.touches);o&&this.onCommonMove(o,this.touchStart,t)}onMouseMove(e,t){var o;ft()&&((o=te(this.beans).getSelection())==null||o.removeAllRanges()),this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)}shouldPreventMouseEvent(e){const{gos:t}=this,o=t.get("enableCellTextSelection"),i=e.type==="mousemove",s=n=>{const r=n.target,a=r==null?void 0:r.tagName.toLocaleLowerCase();return!!(a!=null&&a.match("^a$|textarea|input|select|button"))};return o&&i&&e.cancelable&&so(t,e)&&!s(e)}onTouchUp(e,t){let o=this.getFirstActiveTouch(e.changedTouches);o||(o=this.touchLastTime),this.onUpCommon(o,t)}onMouseUp(e,t){this.onUpCommon(e,t)}onUpCommon(e,t){this.dragging&&(this.dragging=!1,this.currentDragParams.onDragStop(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t})),this.resetDragProperties()}cancelDrag(e){var t,o;this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),(o=(t=this.currentDragParams)==null?void 0:t.onDragCancel)==null||o.call(t),this.resetDragProperties()}resetDragProperties(){this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null;const{dragEndFunctions:e}=this;e.forEach(t=>t()),e.length=0}};function ea(e,t){return e+"_"+t}function J(e){return e instanceof no}var no=class extends x{constructor(e,t,o,i){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=o,this.pinned=i,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return ea(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{J(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=U(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){var t;let e=0;return(t=this.displayedChildren)==null||t.forEach(o=>{e+=o.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){var e;return!!((e=this.getColGroupDef())!=null&&e.autoHeaderHeight)}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{it(t)?e.push(t):J(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{it(t)?e.push(t):J(t)&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return!this.isPadding()||!e||!e.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}this.children.forEach(o=>{var n;if(J(o)&&!((n=o.displayedChildren)!=null&&n.length))return;switch(o.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(o);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(o);break;default:this.displayedChildren.push(o);break}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},ws="row-group-",vs="t-",Ss="b-",Bh=0,ro=class{constructor(e){this.master=!1,this.detail=void 0,this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=Bh++,this.alreadyRendered=!1,this.hovered=!1,this.__selected=!1,this.beans=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){var a,l,d;const{valueCache:o,eventSvc:i}=this.beans,s=this.data;this.data=e,o==null||o.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,s,t);if((a=this.__localEventService)==null||a.dispatchEvent(n),this.sibling){this.sibling.data=e;const c=this.sibling.createDataChangedEvent(e,s,t);(l=this.sibling.__localEventService)==null||l.dispatchEvent(c)}i.dispatchEvent({type:"rowNodeDataChanged",node:this});const r=this.pinnedSibling;r&&(r.data=e,(d=r.__localEventService)==null||d.dispatchEvent(r.createDataChangedEvent(e,s,t)),i.dispatchEvent({type:"rowNodeDataChanged",node:r}))}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(e,t,o){return{type:"dataChanged",node:this,oldData:t,newData:e,update:o}}getRowIndexString(){return this.rowIndex==null?(j(13),null):this.rowPinned==="top"?vs+this.rowIndex:this.rowPinned==="bottom"?Ss+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){var r,a;const{selectionSvc:o}=this.beans,i=(r=o==null?void 0:o.createDaemonNode)==null?void 0:r.call(o,this),s=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),o&&(o.updateRowSelectable(this),o.syncInRowNode(this,i));const n=this.createDataChangedEvent(e,s,!1);(a=this.__localEventService)==null||a.dispatchEvent(n)}setId(e){var o;const t=Go(this.beans.gos);if(t)if(this.data){const i=((o=this.parent)==null?void 0:o.getRoute())??[];this.id=t({data:this.data,parentKeys:i.length>0?i:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(ws)&&j(14,{groupPrefix:ws})}else this.id=void 0;else this.id=e}setRowTop(e){this.oldRowTop=this.rowTop,this.rowTop!==e&&(this.rowTop=e,this.dispatchRowEvent("topChanged"),this.setDisplayed(e!==null))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,o){var i;(i=this.beans.expansionSvc)==null||i.setExpanded(this,e,t,o)}setDataValue(e,t,o){const{colModel:i,valueSvc:s,gos:n,editSvc:r}=this.beans,a=typeof e!="string"?e:i.getCol(e)??i.getColDefCol(e);if(!a)return!1;const l=s.getValueForDisplay(a,this,void 0,void 0,"api").value;if(n.get("readOnlyEdit")){const{beans:{eventSvc:u},data:h,rowIndex:g,rowPinned:p}=this;return u.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:g,rowPinned:p,column:a,colDef:a.colDef,data:h,node:this,oldValue:l,newValue:t,value:t,source:o}),!1}if(r){const u=r.setDataValue({rowNode:this,column:a},t,o);if(u!=null)return u}const d=s.setValue(this,a,t,o);this.dispatchCellChangedEvent(a,t,l);const c=this.pinnedSibling;return c&&d&&c.dispatchCellChangedEvent(a,t,l),d}updateHasChildren(){let e=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,o){var s;const i={type:"cellChanged",node:this,column:e,newValue:t,oldValue:o};(s=this.__localEventService)==null||s.dispatchEvent(i)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){var e;return((e=this.beans.expansionSvc)==null?void 0:e.isExpandable(this))??!1}isSelected(){return this.footer?this.sibling.isSelected():this.rowPinned&&this.pinnedSibling?this.pinnedSibling.isSelected():this.__selected}depthFirstSearch(e){var t;(t=this.childrenAfterGroup)==null||t.forEach(o=>o.depthFirstSearch(e)),e(this)}dispatchRowEvent(e){var t;(t=this.__localEventService)==null||t.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,o="api"){var i;(i=this.beans.selectionSvc)==null||i.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:o})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){this.__localEventService||(this.__localEventService=new Ze),this.__localEventService.addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){var i,s,n,r;(i=this.beans.validation)==null||i.checkRowEvents(e),this.__localEventService||(this.__localEventService=new Ze),this.frameworkEventListenerService=(n=(s=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:n.call(s,this.frameworkEventListenerService,this.__localEventService);const o=((r=this.frameworkEventListenerService)==null?void 0:r.wrap(e,t))??t;this.__localEventService.addEventListener(e,o)}removeEventListener(e,t){var i;const o=((i=this.frameworkEventListenerService)==null?void 0:i.unwrap(e,t))??t;this.removeLocalListener(e,o)}removeLocalListener(e,t){var o,i;(o=this.__localEventService)==null||o.removeEventListener(e,t),(i=this.__localEventService)!=null&&i.noRegisteredListenersExist()&&(this.__localEventService=null)}isFullWidthCell(){if(M(61),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;const e=[];let t=this;for(;t&&t.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setFirstChild(e){this.firstChild!==e&&(this.firstChild=e,this.dispatchRowEvent("firstChildChanged"))}setDisplayed(e){this.displayed!==e&&(this.displayed=e,this.dispatchRowEvent("displayedChanged"))}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}getFirstChild(){var e;return this.childStore?this.childStore.getFirstNode():((e=this.childrenAfterSort)==null?void 0:e[0])??null}};function Vh(e,t,o){return _(t,{type:o,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var Nh=new Set(["__localEventService","__objectId","sticky","__autoHeights","__checkAutoHeightsDebounced","childStore"]);function _h(e,t){const o=new ro(t);return Object.keys(e).forEach(i=>{Nh.has(i)||(o[i]=e[i])}),o.oldRowTop=null,o}var Wh={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"};new Set(Object.values(Wh));var bs="T",zh=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${bs}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function ta(e,t){return e.toString().padStart(t,"0")}function Ke(e,t=!0,o="-"){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>ta(s,2)).join(o);return t&&(i+=bs+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>ta(s,2)).join(":")),i}function ai(e,t=!1){return!!ao(e,t)}function $h(e){return ai(e,!0)}function ao(e,t=!1){if(!e||!zh.test(e))return null;const[o,i]=e.split(bs);if(!o)return null;const s=o.split("-").map(h=>parseInt(h,10));if(s.filter(h=>!isNaN(h)).length!==3)return null;const[n,r,a]=s,l=new Date(n,r-1,a);if(l.getFullYear()!==n||l.getMonth()!==r-1||l.getDate()!==a||!i&&t)return null;if(!i||i==="00:00:00")return l;const[d,c,u]=i.split(":").map(h=>parseInt(h,10));if(d>=0&&d<24)l.setHours(d);else if(t)return null;if(c>=0&&c<60)l.setMinutes(c);else if(t)return null;if(u>=0&&u<60)l.setSeconds(u);else if(t)return null;return l}var Uh="ag-focus-managed",li=class extends x{constructor(e,t={}){super(),this.eFocusable=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:o=>{if(o.defaultPrevented)return;const i=si(this.beans,this.eFocusable,!1,o.shiftKey);i&&(i.focus(),o.preventDefault())},...t}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:o}}=this;e.classList.add(Uh),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),o&&this.addManagedElementListeners(e,{focusout:o})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:t=>{if(t.defaultPrevented||Ge(t))return;const{callbacks:o}=this;if(o.shouldStopEventPropagation(t)){yt(t);return}t.key===y.TAB?o.onTabKeyDown(t):o.handleKeyDown&&o.handleKeyDown(t)}})}},ye={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},ys=class extends x{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"},o=t.autoHeight?ye.AUTO_HEIGHT:t.print?ye.PRINT:ye.NORMAL;this.view.updateLayoutClasses(o,t)}},je="Viewport",oa="fakeVScrollComp",Rs=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],ia=100,Es=150,Kh=class extends x{constructor(e){super(),this.clearRetryListenerFncs=[],this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isScrollActive=!1,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=fe(this,()=>this.lastScrollSource[1]=null,Es),this.resetLastVScrollDebounced=fe(this,()=>this.lastScrollSource[0]=null,Es)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),this.clearRetryListenerFncs=[],window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),gridSizeChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,o=>{this.centerRowsCtrl=o.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,je)});for(const e of Rs){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.ctrlsSvc.get("fakeVScrollComp"),t=this.gos.get("debounceVerticalScrollbar"),o=t?fe(this,this.onVScroll.bind(this,je),ia):this.onVScroll.bind(this,je),i=t?fe(this,this.onVScroll.bind(this,oa),ia):this.onVScroll.bind(this,oa);this.addManagedElementListeners(this.eBodyViewport,{scroll:o}),this.registerScrollPartner(e,i)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...Rs,je]){if(this.lastScrollSource[1]===t)continue;const o=this.getViewportForSource(t);To(o,e,this.enableRtl)}}getViewportForSource(e){return e===je?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.eViewport,{scrollLeft:o}=t;if(this.shouldBlockScrollUpdate(1,o,!0))return;const i=Po(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(i),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(e===je?t=this.eBodyViewport.scrollTop:t=this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0))return;const{animationFrameSvc:o}=this;o==null||o.setScrollTop(t),this.nextScrollTop=t,e===je?this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,o!=null&&o.active?o.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.ctrlsSvc.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}isScrolling(){return this.isScrollActive}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"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"})},Es)}shouldBlockScrollUpdate(e,t,o=!1){return o&&!Ct()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=qi(this.eBodyViewport),{scrollHeight:o}=this.eBodyViewport;return e<0||e+t>o}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:o}=this.centerRowsCtrl.eViewport;if(this.enableRtl){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>o}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){const e=this.scrollLeft;let t=!1;for(const o of Rs)if(this.getViewportForSource(o).scrollLeft!==e){t=!0;break}t&&this.onHScroll(je)}scrollGridIfNeeded(e=!1){const t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){const i=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:i:e=Math.min(Math.max(e,0),i)),To(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){const{lastOffsetHeight:o,lastScrollTop:i}=this;return{top:i,bottom:i+o}}this.isVerticalPositionInvalidated=!1;const{scrollTop:e,offsetHeight:t}=this.eBodyViewport;return this.lastScrollTop=e,this.lastOffsetHeight=t,{top:e,bottom:e+t}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.isHorizontalPositionInvalidated&&(this.lastIsHorizontalScrollShowing=this.centerRowsCtrl.isHorizontalScrollShowing(),this.isHorizontalPositionInvalidated=!1),this.lastIsHorizontalScrollShowing}scrollHorizontally(e){const t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){const{rowModel:o}=this.beans,i=o.getRowCount();let s=-1;for(let n=0;n<i;n++){const r=o.getRow(n);if(typeof e=="function"){if(r&&e(r)){s=n;break}}else if(e===r||e===r.data){s=n;break}}s>=0&&this.ensureIndexVisible(s,t)}ensureIndexVisible(e,t,o=0){if(ie(this.gos,"print"))return;const{rowModel:i}=this.beans,s=i.getRowCount();if(typeof e!="number"||e<0||e>=s){M(88,{index:e});return}this.clearRetryListeners();const{frameworkOverrides:n,pageBounds:r,rowContainerHeight:a,rowRenderer:l}=this.beans;n.wrapIncoming(()=>{var p,f;const d=this.ctrlsSvc.getGridBodyCtrl(),c=i.getRow(e);let u,h,g=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:C,stickyBottomHeight:m}=d,w=c.rowTop,S=c.rowHeight,v=r.getPixelOffset(),b=c.rowTop-v,D=b+c.rowHeight,T=this.getVScrollPosition(),G=a.divStretchOffset,F=T.top+G,P=T.bottom+G,H=P-F,W=a.getScrollPositionForPixel(b),K=a.getScrollPositionForPixel(D-H),B=Math.min((W+K)/2,b),z=F+C>b,N=P-m<D;let $=null;t==="top"?$=W-C:t==="bottom"?$=K+m:t==="middle"?$=B:z?$=W-C:N&&(K-W>H?$=W-C:$=K+m),$!==null&&(this.setVerticalScrollPosition($),l.redraw({afterScroll:!0})),u=w!==c.rowTop||S!==c.rowHeight,h=C!==d.stickyTopHeight||m!==d.stickyBottomHeight,g++}while((u||h)&&g<10);if((p=this.animationFrameSvc)==null||p.flushAllFrames(),o<10&&(c!=null&&c.stub||!((f=this.beans.rowAutoHeight)!=null&&f.areRowsMeasured()))){const C=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{const m=this.getVScrollPosition().top;C!==m&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=i.getRowCount())&&this.ensureIndexVisible(e,t,o+1)}})}})}clearRetryListeners(){this.clearRetryListenerFncs.forEach(e=>e()),this.clearRetryListenerFncs=[]}ensureColumnVisible(e,t="auto"){const{colModel:o,frameworkOverrides:i}=this.beans,s=o.getCol(e);if(!s||s.isPinned()||!this.visibleCols.isColDisplayed(s))return;const n=this.getPositionedHorizontalScroll(s,t);i.wrapIncoming(()=>{var r;n!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),(r=this.animationFrameSvc)==null||r.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:o,columnAfterEnd:i}=this.isColumnOutsideViewport(e),s=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),n=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl;let a=(r?o:i)||s,l=r?i:o;t!=="auto"&&(a=t==="start",l=t==="end");const d=t==="middle";if(a||l||d){const{colLeft:c,colMiddle:u,colRight:h}=this.getColumnBounds(e);return d?u-n/2:a?r?h:c:r?c-n:h-n}return null}isColumnOutsideViewport(e){const{start:t,end:o}=this.getViewportBounds(),{colLeft:i,colRight:s}=this.getColumnBounds(e),n=this.enableRtl,r=n?t>s:o<s,a=n?o<i:t>i;return{columnBeforeStart:r,columnAfterEnd:a}}getColumnBounds(e){const t=this.enableRtl,o=this.visibleCols.bodyWidth,i=e.getActualWidth(),s=e.getLeft(),n=t?-1:1,r=t?o-s:s,a=r+i*n,l=r+i/2*n;return{colLeft:r,colMiddle:l,colRight:a}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),o=t,i=e+t;return{start:o,end:i,width:e}}},xs=class extends x{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=ie(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:o}=this.beans,i=t.bodyWidth,s=t.getColsLeftWidth(),n=t.getDisplayedColumnsRightWidth();let r;e?r=i+s+n:(r=i,this.addSpacer&&(this.gos.get("enableRtl")?s:n)===0&&o.verticalScrollShowing&&(r+=o.getScrollbarWidth())),this.callback(r)}},jh=class extends x{constructor(e){super(),this.centerContainerCtrl=e}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const{beans:e,centerContainerCtrl:t,gridBodyCtrl:o}=this,i=()=>{We(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(i),o.registerBodyViewportResizeListener(i)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e==null||e.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const o=this.centerContainerCtrl.getCenterWidth();o!==this.centerWidth&&(this.centerWidth=o,t==null||t.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl.eBodyViewport,t=qi(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){const e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.beans.colViewport.setScrollPosition(e,t)}};function Ds(e,t,o,i,s,n){if(o==null&&t==null)return;const r={},a={},l=(d,c)=>{d.split(" ").forEach(u=>{u.trim()!=""&&c(u)})};if(o){const d=Object.keys(o);for(let c=0;c<d.length;c++){const u=d[c],h=o[u];let g;typeof h=="string"?g=e?e.evaluate(h,i):!0:typeof h=="function"&&(g=h(i)),l(u,p=>{g?r[p]=!0:a[p]=!0})}}t&&n&&Object.keys(t).forEach(d=>l(d,c=>{r[c]||(a[c]=!0)})),n&&Object.keys(a).forEach(n),Object.keys(r).forEach(s)}function sa(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var qh=class extends x{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const o=this.gos,i=r=>{typeof r=="string"?e.push(r):Array.isArray(r)&&r.forEach(a=>e.push(a))},s=o.get("rowClass");s&&i(s);const n=o.getCallback("getRowClass");if(n){const r={data:t.data,node:t,rowIndex:t.rowIndex},a=n(r);i(a)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,o=>{e.push(o)},()=>{})}processRowClassRules(e,t,o){const{gos:i,expressionSvc:s}=this.beans,n=_(i,{data:e.data,node:e,rowIndex:e.rowIndex});Ds(s,void 0,i.get("rowClassRules"),n,t,o)}processStylesFromGridOptions(e){const t=this.gos,o=t.get("rowStyle"),i=t.getCallback("getRowStyle");let s;if(i){const n={data:e.data,node:e,rowIndex:e.rowIndex};s=i(n)}if(s||o)return Object.assign({},o,s)}},Yh=0,di="renderedRow",ci=class extends x{constructor(e,t,o,i,s){var n,r;super(),this.rowNode=e,this.useAnimationFrameForCreate=i,this.printLayout=s,this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=((n=t.pagination)==null?void 0:n.getCurrentPage())??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+Yh++,this.rowId=_o(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=sa(this.rowNode),this.setRowType(),this.setAnimateFlags(o),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=(r=t.editSvc)==null?void 0:r.createRowStyleFeature(this,t),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=_o(e)}updateGui(e,t){e==="left"?this.leftGui=t:e==="right"?this.rightGui=t:e==="fullWidth"?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,o,i){var u,h;const{context:s,focusSvc:n}=this.beans;i=qo(this,s,i);const r={rowComp:e,element:t,containerType:o,compBean:i};this.allRowGuis.push(r),this.updateGui(o,r),this.initialiseRowComp(r);const a=this.rowNode,l=this.rowType==="FullWidthLoading"||a.stub,d=!a.data&&this.beans.rowModel.getType()==="infinite";!l&&!d&&!a.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent();const c=(u=this.fullWidthGui)==null?void 0:u.element;c&&!((h=this.beans.editSvc)!=null&&h.isEditing(this))&&n.isRowFocused(a.rowIndex,a.rowPinned)&&n.shouldTakeFocus()&&setTimeout(()=>c.focus({preventScroll:!0}),0)}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";this.allRowGuis.forEach(o=>o.element.style.display=t)}initialiseRowComp(e){const t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),et(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const o=e.rowComp;this.getInitialRowClasses(e.containerType).forEach(s=>o.toggleCss(s,!0)),this.executeSlideAndFadeAnimations(e),this.rowNode.group&&Oi(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(o),this.setRowCompRowBusinessKey(o),tt(t,e.element,di,this),e.compBean.addDestroyFunc(()=>tt(t,e.element,di,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.toggleCss("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=_o(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(os(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(os(()=>{e.rowComp.toggleCss("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){var i;const t=(i=this.beans.rowDragSvc)==null?void 0:i.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const o=this.createBean(t,this.beans.context);this.rowDragComps.push(o),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(s=>s!==o),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),this.destroyBean(o,this.beans.context)})}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),o=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(o)}getFullWidthCellRenderers(){var e,t;return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(o=>{var i;return(i=o==null?void 0:o.rowComp)==null?void 0:i.getFullWidthCellRenderer()}):[(t=(e=this.fullWidthGui)==null?void 0:e.rowComp)==null?void 0:t.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;const t={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(t)}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:o,beans:{visibleCols:i}}=this,s=!!e||!i.isPinningLeft(),n=!!t,r=!!o||!i.isPinningRight();return s&&n&&r}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){const e=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow")&&!this.gos.get("groupHideOpenParents"),t=this.isNodeFullWidthCell(),o=this.gos.get("masterDetail")&&this.rowNode.detail,i=this.beans.colModel.isPivotMode(),s=bc(this.gos,this.rowNode,i);e?this.rowType="FullWidthLoading":o?this.rowType="FullWidthDetail":t?this.rowType="FullWidth":s?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:o}=this.beans;if(!(o!=null&&o.active)||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(o.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){var o;if(!((o=this.beans.rowSpanSvc)!=null&&o.isCellSpanning(e,this.rowNode)))return new At(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){var t;return!((t=this.beans.rowSpanSvc)!=null&&t.isCellSpanning(e.column,this.rowNode))}createCellCtrls(e,t,o=null){const i={list:[],map:{}},s=(d,c,u)=>{u!=null?i.list.splice(u,0,c):i.list.push(c),i.map[d]=c},n=[];for(const d of t){const c=d.getInstanceId();let u=e.map[c];u&&!this.isCorrectCtrlForSpan(u)&&(u.destroy(),u=void 0),u||(u=this.getNewCellCtrl(d)),u&&s(c,u)}for(const d of e.list){const c=d.column.getInstanceId();if(i.map[c]!=null)continue;!this.isCellEligibleToBeRemoved(d,o)?n.push([c,d]):d.destroy()}if(n.length)for(const[d,c]of n){const u=i.list.findIndex(g=>g.column.getLeft()>c.column.getLeft()),h=u===-1?void 0:Math.max(u-1,0);s(d,c,h)}const{focusSvc:r,visibleCols:a}=this.beans,l=r.getFocusedCell();if(l&&l.column.getPinned()==o){const d=l.column.getInstanceId();if(!i.map[d]&&a.allCols.includes(l.column)){const u=this.createFocusedCellCtrl();if(u){const h=i.list.findIndex(p=>p.column.getLeft()>u.column.getLeft()),g=h===-1?void 0:Math.max(h-1,0);s(d,u,g)}}}return i}createFocusedCellCtrl(){const{focusSvc:e,rowSpanSvc:t}=this.beans,o=e.getFocusedCell();if(!o)return;const i=t==null?void 0:t.getCellSpan(o.column,this.rowNode);if(i){if(i.firstNode!==this.rowNode||!i.doesSpanContain(o))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(o.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){this.allRowGuis.forEach(t=>{const o=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(o,e)})}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){const e=this.beans.colViewport,t=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const o=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,o);const i=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,i,"left");const s=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,s,"right")}}isCellEligibleToBeRemoved(e,t){const{column:s}=e;if(s.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;const{visibleCols:n,editSvc:r}=this.beans,a=r==null?void 0:r.isEditing(e),l=e.isCellFocused();return a||l?!(n.allCols.indexOf(s)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||ie(this.gos,"print")}listenOnDomOrder(e){const t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;const t=A(this.rowNode.oldRowTop),{visibleCols:o}=this.beans,i=o.isPinningLeft(),s=o.isPinningRight();if(t){const{slideInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=i,n.right=s}else{const{fadeInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=i,n.right=s}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const e=(r,a)=>r?r.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(r.element,a).params):!0,t=e(this.fullWidthGui,null),o=e(this.centerGui,null),i=e(this.leftGui,"left"),s=e(this.rightGui,"right");return t&&o&&i&&s}addListeners(){const{beans:e,gos:t,rowNode:o}=this,{expansionSvc:i,eventSvc:s,context:n,rowSpanSvc:r}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...(i==null?void 0:i.getRowExpandedListeners(this))??{}}),o.detail&&this.addManagedListeners(o.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(o,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this),rowPinned:this.onRowPinned.bind(this)}),this.addManagedListeners(s,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),r&&this.addManagedListeners(r,{spannedCellsUpdated:({pinned:a})=>{a&&!o.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,n),this.tooltipFeature=this.destroyBean(this.tooltipFeature,n),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,n)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow")){this.allRowGuis.forEach(l=>{this.addRowDraggerToRow(l)});return}this.rowDragComps=this.destroyBeans(this.rowDragComps,n)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>this.getAllCellCtrls().forEach(e=>e.onRowIndexChanged()),cellChanged:e=>this.getAllCellCtrls().forEach(t=>t.onCellChanged(e))})}onRowPinned(){for(const e of this.allRowGuis)e.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){this.refreshRow({suppressFlash:!e.update,newData:!e.update})}refreshRow(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}this.getAllCellCtrls().forEach(o=>o.refreshCell(e)),this.allRowGuis.forEach(o=>{this.setRowCompRowId(o.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(o.rowComp)}),this.onRowSelected(),this.postProcessCss()}postProcessCss(){var e;this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),(e=this.rowEditStyleFeature)==null||e.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.beans.rowDropHighlightSvc,t=(e==null?void 0:e.row)===this.rowNode?e.position:"none",o=t==="above",i=t==="inside",s=t==="below",r=this.gos.get("treeData")&&(s||o),a=this.rowNode.uiLevel.toString();this.allRowGuis.forEach(l=>{const d=l.rowComp;d.toggleCss("ag-row-highlight-above",o),d.toggleCss("ag-row-highlight-inside",i),d.toggleCss("ag-row-highlight-below",s),d.toggleCss("ag-row-highlight-indent",r),r?l.element.style.setProperty("--ag-row-highlight-level",a):l.element.style.removeProperty("--ag-row-highlight-level")})}postProcessRowDragging(){const e=this.rowNode.dragging;this.allRowGuis.forEach(t=>t.rowComp.toggleCss("ag-row-dragging",e))}onDisplayedColumnsChanged(){var e;this.updateColumnLists(!0),(e=this.beans.rowAutoHeight)==null||e.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:Qe(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.findFullWidthInfoForEvent(e);if(!t)return;const{rowGui:o,column:i}=t;if(!(o.element===e.target))return;const r=this.rowNode,{focusSvc:a,navigation:l}=this.beans,d=a.getFocusedCell(),c={rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:(d==null?void 0:d.column)??i};l==null||l.navigateToNextCell(e,e.key,c,!0),e.preventDefault()}onTabKeyDown(e){var a;if(e.defaultPrevented||Ge(e))return;const t=this.allRowGuis.find(l=>l.element.contains(e.target)),o=t?t.element:null,i=o===e.target,s=Q(this.beans);let n=!1;o&&s&&(n=o.contains(s)&&s.classList.contains("ag-cell"));let r=null;!i&&!n&&(r=si(this.beans,o,!1,e.shiftKey)),(this.isFullWidth()&&i||!r)&&((a=this.beans.navigation)==null||a.onTabKeyDown(this,e))}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){var t;const e=(t=this.allRowGuis.find(o=>Le(o.element)))==null?void 0:t.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:-1;this.allRowGuis.forEach(o=>{he(o.element,"tabindex",t)})}onFullWidthRowFocused(e){var s,n,r;const t=this.rowNode,o=e?this.isFullWidth()&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned:!1;let i;if(this.fullWidthGui)i=this.fullWidthGui.element;else{const a=this.beans.colModel.getCol(e==null?void 0:e.column),l=a==null?void 0:a.pinned;l?i=l==="right"?(s=this.rightGui)==null?void 0:s.element:(n=this.leftGui)==null?void 0:n.element:i=(r=this.centerGui)==null?void 0:r.element}i&&(i.classList.toggle("ag-full-width-focus",o),o&&(e!=null&&e.forceBrowserFocus)&&i.focus({preventScroll:!0}))}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){const o={list:[],map:{}};return e.list.forEach(i=>{i!==t&&(o.list.push(i),o.map[i.column.getInstanceId()]=i)}),o}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){const{rowNode:o}=this;return _(this.gos,{type:e,node:o,data:o.data,rowIndex:o.rowIndex,rowPinned:o.rowPinned,event:t})}createRowEventWithSource(e,t){const o=this.createRowEvent(e,t);return o.source=this,o}onRowDblClick(e){Ge(e)||this.beans.eventSvc.dispatchEvent(this.createRowEventWithSource("rowDoubleClicked",e))}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),o=this.getColumnForFullWidth(t);if(!(!t||!o))return{rowGui:t,column:o}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){const{visibleCols:t}=this.beans;switch(e==null?void 0:e.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=mt(e.target,"ag-row-drag",3),!this.isFullWidth())return;const t=this.rowNode,{rangeSvc:o,focusSvc:i}=this.beans;o==null||o.removeAllCellRanges();const s=this.findFullWidthInfoForEvent(e);if(!s)return;const{rowGui:n,column:r}=s,a=n.element,l=e.target;let d=e.defaultPrevented||ft();a&&a.contains(l)&&ji(l)&&(d=!1),i.setFocusedCell({rowIndex:t.rowIndex,column:r,rowPinned:t.rowPinned,forceBrowserFocus:d})}onRowClick(e){if(Ge(e)||this.lastMouseDownOnDragger)return;const{eventSvc:o,selectionSvc:i}=this.beans;o.dispatchEvent(this.createRowEventWithSource("rowClicked",e)),i==null||i.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){var t;this.rowType==="FullWidthDetail"&&((t=this.beans.masterDetailSvc)==null||t.setupDetailRowAutoHeight(this,e))}createFullWidthCompDetails(e,t){const{gos:o,rowNode:i}=this,s=_(o,{fullWidth:!0,data:i.data,node:i,value:i.key,valueFormatted:i.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(r,a,l,d)=>this.addFullWidthRowDragging(r,a,l,d),setTooltip:(r,a)=>{o.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(r,a)}}),n=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return Lu(n,s);case"FullWidthGroup":{const{value:r,valueFormatted:a}=this.beans.valueSvc.getValueForDisplay(void 0,this.rowNode,!0);return s.value=r,s.valueFormatted=a,ku(n,s)}case"FullWidthLoading":return Mu(n,s);default:return Au(n,s)}}setupFullWidthRowTooltip(e,t){var o;this.fullWidthGui&&(this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.setupFullWidthRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,o="",i){const{rowDragSvc:s,context:n}=this.beans;if(!s||!this.isFullWidth())return;const r=s.createRowDragComp(()=>o,this.rowNode,void 0,e,t,i);this.createBean(r,n),this.addDestroyFunc(()=>{this.destroyBean(r,n)})}onUiLevelChanged(){const e=sa(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,o="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(i=>{i.rowComp.toggleCss(t,!0),i.rowComp.toggleCss(o,!1)})}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach(o=>o.rowComp.toggleCss("ag-row-first",e))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach(o=>o.rowComp.toggleCss("ag-row-last",t)))}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){var t;const e=[];(t=this.beans.rowStyleSvc)==null||t.processClassesFromGridOptions(e,this.rowNode),e.length&&e.forEach(o=>{this.allRowGuis.forEach(i=>i.rowComp.toggleCss(o,!0))})}postProcessRowClassRules(){var e;(e=this.beans.rowStyleSvc)==null||e.processRowClassRules(this.rowNode,t=>{this.allRowGuis.forEach(o=>o.rowComp.toggleCss(t,!0))},t=>{this.allRowGuis.forEach(o=>o.rowComp.toggleCss(t,!1))})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,o=>o.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){var a,l;const t=this.getPinnedForContainer(e),o=this.isFullWidth(),{rowNode:i,beans:s}=this,n=[];n.push("ag-row"),n.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&n.push("ag-opacity-zero"),n.push(i.rowIndex%2===0?"ag-row-even":"ag-row-odd"),i.isRowPinned()&&(n.push("ag-row-pinned"),(a=s.pinnedRowModel)!=null&&a.isManual()&&n.push("ag-row-pinned-manual")),!i.isRowPinned()&&i.pinnedSibling&&n.push("ag-row-pinned-source"),i.isSelected()&&n.push("ag-row-selected"),i.footer&&n.push("ag-row-footer"),n.push("ag-row-level-"+this.rowLevel),i.stub&&n.push("ag-row-loading"),o&&n.push("ag-full-width-row"),(l=s.expansionSvc)==null||l.addExpandedCss(n,i),i.dragging&&n.push("ag-row-dragging");const{rowStyleSvc:r}=s;return r&&(r.processClassesFromGridOptions(n,i),r.preProcessRowClassRules(n,i)),n.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&n.push("ag-row-first"),this.isLastRowOnPage()&&n.push("ag-row-last"),o&&(t==="left"&&n.push("ag-cell-last-left-pinned"),t==="right"&&n.push("ag-cell-first-right-pinned")),n}processStylesFromGridOptions(){var e;return((e=this.beans.rowStyleSvc)==null?void 0:e.processStylesFromGridOptions(this.rowNode))??this.emptyStyle}onRowSelected(e){var t;(t=this.beans.selectionSvc)==null||t.onRowCtrlSelected(this,o=>{(o===this.centerGui||o===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){var e;(e=this.beans.selectionSvc)==null||e.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:o}=e,{rowNode:i,beans:s,gos:n}=this;o.addManagedListeners(t,{pointerenter:r=>{r.pointerType==="mouse"&&i.dispatchRowEvent("mouseEnter")},pointerleave:r=>{r.pointerType==="mouse"&&i.dispatchRowEvent("mouseLeave")}}),o.addManagedListeners(i,{mouseEnter:()=>{var r;!((r=s.dragSvc)!=null&&r.dragging)&&!n.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),i.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){const t=e?[e]:this.allRowGuis.map(o=>o.element);for(const o of t)o.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),o=this.applyPaginationOffset(t.top,!0)-100,i=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(o,e),i)}forEachGui(e,t){e?t(e):this.allRowGuis.forEach(t)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;const t=this.rowNode.rowHeight,o=this.beans.environment.getDefaultRowHeight(),s=tr(this.gos)?ze(this.beans,this.rowNode).height:void 0,n=s?`${Math.min(o,s)-2}px`:void 0;this.forEachGui(e,r=>{r.element.style.height=`${t}px`,n&&r.element.style.setProperty("--ag-line-height",n)})}destroyFirstPass(e=!1){var i;this.active=!1;const{rowNode:t}=this;if(!e&&St(this.gos)&&!t.sticky)if(t.rowTop!=null){const n=this.roundRowTopToBounds(t.rowTop);this.setRowTop(n)}else this.allRowGuis.forEach(n=>n.rowComp.toggleCss("ag-opacity-zero",!0));(i=this.fullWidthGui)!=null&&i.element.contains(Q(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);const o=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(o),this.beans.eventSvc.dispatchEvent(o),super.destroy()}destroySecondPass(){this.allRowGuis.length=0;const e=t=>(t.list.forEach(o=>o.destroy()),{list:[],map:{}});this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.toggleCss("ag-row-focus",this.rowFocused),t.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e}=this.beans,t=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses())}onPaginationChanged(){var t;const e=((t=this.beans.pagination)==null?void 0:t.getCurrentPage())??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const o=this.beans.pageBounds.getPixelOffset();return e+o*(t?1:-1)}setRowTop(e){if(!this.printLayout&&A(e)){const t=this.applyPaginationOffset(e),s=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(s)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";const t=this.rowNode;let o;if(t.sticky)o=t.stickyRowTop;else{const i=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,s=this.applyPaginationOffset(i);o=t.isRowPinned()?s:this.beans.rowContainerHeight.getRealPixelPosition(s)}return o+"px"}setRowTopStyle(e){this.allRowGuis.forEach(t=>this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`))}getCellCtrl(e,t=!1){let o=null;return this.getAllCellCtrls().forEach(i=>{i.column==e&&(o=i)}),o!=null||t||this.getAllCellCtrls().forEach(i=>{(i==null?void 0:i.getColSpanningList().indexOf(e))>=0&&(o=i)}),o}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){var n,r;const t=this.rowNode.getRowIndexString();if(t===null)return;const o=(((n=this.beans.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:n.getRowCount())??0)+(((r=this.beans.filterManager)==null?void 0:r.getHeaderRowCount())??0),i=this.rowNode.rowIndex%2===0,s=o+this.rowNode.rowIndex+1;this.forEachGui(e,a=>{a.rowComp.setRowIndex(t),a.rowComp.toggleCss("ag-row-even",i),a.rowComp.toggleCss("ag-row-odd",!i),Fo(a.element,s)})}};function na(e){var o;return e.altKey||e.ctrlKey||e.metaKey?!1:((o=e.key)==null?void 0:o.length)===1}function Fs(e,t,o,i,s){const n=i?i.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const r=_(e,{event:t,editing:s,column:i,node:o,data:o.data,colDef:i.getColDef()});return!!(n&&n(r))}function Zh(e){const{pinnedRowModel:t,rowModel:o}=e,[i,s]=[(t==null?void 0:t.isEmpty("top"))??!0,(t==null?void 0:t.isEmpty("bottom"))??!0],n=i?null:"top";let r,a;s?(r=null,a=o.getRowCount()-1):(r="bottom",a=(t==null?void 0:t.getPinnedBottomRowCount())??-1);const{visibleCols:l,rangeSvc:d}=e,c=l.allCols;!d||!(c!=null&&c.length)||d.setCellRange({rowStartIndex:0,rowStartPinned:n,rowEndIndex:a,rowEndPinned:r})}var Qh=65,Xh=67,Jh=86,eg=68,tg=90,og=89;function ig(e){const{keyCode:t}=e;let o;switch(t){case Qh:o=y.A;break;case Xh:o=y.C;break;case Jh:o=y.V;break;case eg:o=y.D;break;case tg:o=y.Z;break;case og:o=y.Y;break;default:o=e.code}return o}var sg=class extends x{constructor(e){super(),this.element=e}postConstruct(){var e;this.addKeyboardListeners(),this.addMouseListeners(),(e=this.beans.touchSvc)==null||e.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",dr("touchstart")?"touchstart":"mousedown"].forEach(o=>{const i=this.processMouseEvent.bind(this,o);this.addManagedElementListeners(this.element,{[o]:i})})}processMouseEvent(e,t){var s;if(!so(this.gos,t)||Ge(t))return;const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(o!=null&&o.column&&o.dispatchCellContextMenuEvent(t),(s=this.beans.contextMenuSvc)==null||s.handleContextMenuMouseEvent(t,void 0,i,o)):(o&&o.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:Zr(t,e),rowCtrl:cr(t,e,di)}}processKeyboardEvent(e,t){const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(o?this.processCellKeyboardEvent(o,e,t):i!=null&&i.isFullWidth()&&this.processFullWidthRowKeyboardEvent(i,e,t))}processCellKeyboardEvent(e,t,o){var n,r;const i=((n=this.editSvc)==null?void 0:n.isEditing(e,{withOpenEditor:!0}))??!1;!Fs(this.gos,o,e.rowNode,e.column,i)&&t==="keydown"&&(!i&&((r=this.beans.navigation)!=null&&r.handlePageScrollingKey(o))||e.onKeyDown(o),this.doGridOperations(o,i),na(o)&&e.processCharacter(o)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(o,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,o){const{rowNode:i}=e,{focusSvc:s,navigation:n}=this.beans,r=s.getFocusedCell(),a=r==null?void 0:r.column;if(!Fs(this.gos,o,i,a,!1)){const d=o.key;if(t==="keydown")switch(d){case y.PAGE_HOME:case y.PAGE_END:case y.PAGE_UP:case y.PAGE_DOWN:n==null||n.handlePageScrollingKey(o,!0);break;case y.LEFT:case y.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case y.UP:case y.DOWN:e.onKeyboardNavigate(o);break;case y.TAB:e.onTabKeyDown(o);break}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",o))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!so(this.gos,e))return;const o=ig(e),{clipboardSvc:i,undoRedo:s}=this.beans;if(o===y.A)return this.onCtrlAndA(e);if(o===y.C)return this.onCtrlAndC(i,e);if(o===y.D)return this.onCtrlAndD(i,e);if(o===y.V)return this.onCtrlAndV(i,e);if(o===y.X)return this.onCtrlAndX(i,e);if(o===y.Y)return this.onCtrlAndY(s);if(o===y.Z)return this.onCtrlAndZ(s,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:o,selectionSvc:i},gos:s}=this;o&&ot(s)&&t.isRowsToRender()?Zh(this.beans):i&&(i==null||i.selectAllRowNodes({source:"keyboardSelectAll",selectAll:Rc(s)})),e.preventDefault()}onCtrlAndC(e,t){var i;if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:o}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.isEditing(o,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){var i;if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:o}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.isEditing(o,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){var i;const{cellCtrl:o}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.isEditing(o,{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==null||e.redo("ui")}},ra=class extends x{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){const t=e.uiContainerHeight,o=t!=null?`${t}px`:"";this.eContainer.style.height=o,this.eViewport&&(this.eViewport.style.height=o)}},ui=e=>e.topRowCtrls,hi=e=>e.getStickyTopRowCtrls(),gi=e=>e.getStickyBottomRowCtrls(),pi=e=>e.bottomRowCtrls,fi=e=>e.allRowCtrls,Ps=e=>e.getCtrls("top"),Ts=e=>e.getCtrls("center"),Is=e=>e.getCtrls("bottom"),ng={center:{type:"center",name:"center-cols",getRowCtrls:fi,getSpannedRowCtrls:Ts},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:fi,getSpannedRowCtrls:Ts},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:fi,getSpannedRowCtrls:Ts},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:fi},topCenter:{type:"center",name:"floating-top",getRowCtrls:ui,getSpannedRowCtrls:Ps},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:ui,getSpannedRowCtrls:Ps},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:ui,getSpannedRowCtrls:Ps},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:ui},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:hi},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:hi},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:hi},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:hi},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:gi},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:gi},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:gi},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:gi},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:pi,getSpannedRowCtrls:Is},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:pi,getSpannedRowCtrls:Is},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:pi,getSpannedRowCtrls:Is},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:pi}};function aa(e){return`ag-${lo(e).name}-viewport`}function Ci(e){const t=lo(e);return t.container??`ag-${t.name}-container`}function rg(e){return`ag-${lo(e).name}-spanned-cells-container`}function lo(e){return ng[e]}var ag=["topCenter","topLeft","topRight"],lg=["bottomCenter","bottomLeft","bottomRight"],dg=["center","left","right"],cg=["center","left","right","fullWidth"],ug=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],hg=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],gg=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],la=["stickyTopCenter","stickyTopLeft","stickyTopRight"],da=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],pg=[...la,"stickyTopFullWidth",...da,"stickyBottomFullWidth"],fg=[...ag,...lg,...dg,...la,...da],Cg=class extends x{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=lo(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new jh(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,o,i){this.comp=e,this.eContainer=t,this.eSpannedContainer=o,this.eViewport=i,this.createManagedBean(new sg(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:s,rangeSvc:n}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(hg,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s==null?void 0:s.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(gg,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s==null?void 0:s.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(cg,()=>this.createManagedBean(new ra(this.eContainer,this.name==="center"?i:void 0))),n&&this.forContainers(fg,()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer))),this.forContainers(ug,()=>this.createManagedBean(new xs(a=>this.comp.setContainerWidth(`${a}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){const{spannedRowRenderer:e,gos:t}=this.beans,o=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:o,displayedColumnsWidthChanged:o,displayedRowsChanged:i=>this.onDisplayedRowsChanged(i.afterScroll)}),o(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const i=this.options.getSpannedRowCtrls(e);i&&this.comp.setSpannedRowCtrls(i,!1)}})}listenOnDomOrder(){if(pg.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const o=this.gos.get("ensureDomOrder"),i=ie(this.gos,"print");this.comp.setDomOrder(o||i)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=o=>{e.dragging&&o.cancelable&&o.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),o=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,o,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return jt(this.eViewport)}getCenterViewportScrollLeft(){return Po(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=Je(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return Vn(this.eViewport)}getViewportScrollLeft(){return Po(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||Wn(this.eViewport)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){To(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}const o=ie(this.gos,"print"),s=this.gos.get("embedFullWidthRows")||o,n=t.filter(r=>{const a=r.isFullWidth();return this.options.fullWidth?!s&&a:s||!a});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},ca="ag-force-vertical-scroll",mg="ag-selectable",wg="ag-column-moving",vg=class extends x{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,o,i,s,n,r){var a,l;this.comp=e,this.eGridBody=t,this.eBodyViewport=o,this.eTop=i,this.eBottom=s,this.eStickyTop=n,this.eStickyBottom=r,this.eCenterColsViewport=o.querySelector(`.${aa("center")}`),this.eFullWidthContainer=o.querySelector(`.${Ci("fullWidth")}`),this.eStickyTopFullWidthContainer=n.querySelector(`.${Ci("stickyTopFullWidth")}`),this.eStickyBottomFullWidthContainer=r.querySelector(`.${Ci("stickyBottomFullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",d=>this.setCellTextSelection(d.currentValue)),this.createManagedBean(new ys(this.comp)),this.scrollFeature=this.createManagedBean(new Kh(o)),(a=this.beans.rowDragSvc)==null||a.setupRowDrag(o,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([i,o,s,n,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),(l=this.filterManager)==null||l.setupAdvFilterHeaderComp(i),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this),o=this.toggleRowResizeStyles.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,pinnedRowsChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t,rowResizeStarted:o,rowResizeEnded:o}),this.addManagedPropertyListener("treeData",t)}toggleRowResizeStyles(e){const t=e.type==="rowResizeStarted";this.eBodyViewport.classList.toggle("ag-prevent-animation",t)}onGridColumnsChanged(){const e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();const o=t&&e.getScrollbarWidth()||0,i=Gn()?16:0,s=`calc(100% + ${o+i}px)`;We(this.beans,()=>this.comp.setBodyViewportWidth(s)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t}=this;let o=this.gos.get("treeData");if(!o){const i=t.isPivotMode();o=(e?e.columns.length:0)>=(i?2:1)}this.comp.setGridRootRole(o?"treegrid":"grid")}addFocusListeners(e){e.forEach(t=>{this.addManagedElementListeners(t,{focusin:o=>{const{target:i}=o,s=mt(i,"ag-root",t);t.classList.toggle("ag-has-focus",!s)},focusout:o=>{const{target:i,relatedTarget:s}=o,n=t.contains(s),r=mt(s,"ag-root",t);mt(i,"ag-root",t)||(!n||r)&&t.classList.remove("ag-has-focus")}})})}setColumnMovingCss(e){this.comp.setColumnMovingCss(wg,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(mg,e)}updateScrollingClasses(){const{eGridBody:{classList:e},scrollVisibleSvc:t}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){var e;(e=this.beans.editSvc)==null||e.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){var s,n;const e=(((s=this.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:s.getRowCount())??0)+(((n=this.filterManager)==null?void 0:n.getHeaderRowCount())??0),{rowModel:t}=this.beans,o=t.isLastRowIndexKnown()?t.getRowCount():-1,i=o===-1?-1:e+o;this.comp.setRowCount(i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const e=this.gos.get("alwaysShowVerticalScroll"),t=e?ca:null,o=ie(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||o&&zn(this.eBodyViewport)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let o=t.sizesMeasured;const i=()=>{const s=o&&St(this.gos)&&!e.stretching,n=s?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(n,s)};i(),this.addManagedEventListeners({heightScaleChanged:i}),this.addManagedPropertyListener("animateRows",i),this.addManagedEventListeners({gridStylesChanged:()=>{!o&&t.sizesMeasured&&(o=!0,i())}})}addBodyViewportListener(){const{eBodyViewport:e,eStickyTop:t,eStickyBottom:o,eTop:i,eBottom:s,beans:{popupSvc:n,touchSvc:r}}=this,a=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:a}),r==null||r.mockBodyContextMenu(this,a),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,n)});const l=this.onStickyWheel.bind(this);for(const c of[t,o,i,s])this.addManagedElementListeners(c,{wheel:l});const d=this.onHorizontalWheel.bind(this);for(const c of["left","right","topLeft","topRight","bottomLeft","bottomRight"])this.addManagedElementListeners(this.ctrlsSvc.get(c).eContainer,{wheel:d});this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:o,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(o))&&so(this.gos,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onHorizontalWheel(e){const{deltaX:t,deltaY:o,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(o))&&this.scrollGridBodyToMatchEvent(e)}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:o}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||o})}onBodyViewportContextMenu(e,t,o){var s;if(!e&&!o)return;this.gos.get("preventDefaultOnContextMenu")&&(e||o).preventDefault();const{target:i}=e||t;(i===this.eBodyViewport||i===this.ctrlsSvc.get("center").eViewport)&&((s=this.beans.contextMenuSvc)==null||s.showContextMenu({mouseEvent:e,touchEvent:o,value:null,anchorToElement:this.eGridBody,source:"ui"}))}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e!=null&&e.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){const{pinnedRowModel:e,beans:{environment:t}}=this,o=e==null?void 0:e.getPinnedTopTotalHeight(),i=e==null?void 0:e.getPinnedBottomTotalHeight(),s=t.getPinnedRowBorderWidth(),n=t.getRowBorderWidth(),r=s-n,a=o?r+o:0,l=i?r+i:0;this.comp.setTopHeight(a),this.comp.setBottomHeight(l),this.comp.setTopInvisible(a<=0),this.comp.setBottomInvisible(l<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){var s,n;const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(((s=this.filterManager)==null?void 0:s.getHeaderHeight())??0),o=((n=this.pinnedRowModel)==null?void 0:n.getPinnedTopTotalHeight())??0;let i=0;t>0&&(i+=t),o>0&&(i+=o),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:o}=this,i=(e==null?void 0:e.getPinnedBottomTotalHeight())??0,n=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,r=i+n;o.setStickyBottomBottom(`${r}px`)}},ua=class extends Y{constructor(e,t){super(),this.direction=t,this.eViewport=I,this.eContainer=I,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",kn()||Ct())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=Gn(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.toggleCss("ag-scrollbar-active",!0),o=()=>this.toggleCss("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:o,touchend:o})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),We(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;lc(()=>Le(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},Sg={tag:"div",cls:"ag-body-horizontal-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eLeftSpacer",cls:"ag-horizontal-left-spacer"},{tag:"div",ref:"eViewport",cls:"ag-body-horizontal-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-horizontal-scroll-container"}]},{tag:"div",ref:"eRightSpacer",cls:"ag-horizontal-right-spacer"}]},bg=class extends ua{constructor(){super(Sg,"horizontal"),this.eLeftSpacer=I,this.eRightSpacer=I,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.createManagedBean(new xs(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){var t;if(!this.invisibleScrollbar)return;const e=((t=this.beans.pinnedRowModel)==null?void 0:t.getPinnedBottomTotalHeight())??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleSvc.verticalScrollShowing;let t=this.visibleCols.getDisplayedColumnsRightWidth();const o=!this.enableRtl&&e,i=this.scrollVisibleSvc.getScrollbarWidth();o&&(t+=i),_e(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=i);let s=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(s+=i),_e(this.eLeftSpacer,s),this.eLeftSpacer.classList.toggle("ag-scroller-corner",s<=i)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,o=this.gos.get("suppressHorizontalScroll"),i=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,n=o?0:i===0&&t?16:i,r=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),Qi(this.getGui(),n),Qi(this.eViewport,n),Qi(this.eContainer,n),n||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(r,100):r()}getScrollPosition(){return Po(this.eViewport,this.enableRtl)}setScrollPosition(e){Le(this.eViewport)||this.attemptSettingScrollPosition(e),To(this.eViewport,e,this.enableRtl)}},yg={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:bg},Rg={tag:"div",cls:"ag-body-vertical-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eViewport",cls:"ag-body-vertical-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-vertical-scroll-container"}]}]},Eg=class extends ua{constructor(){super(Rg,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new ra(this.eContainer));const{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){const{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,o=this.invisibleScrollbar,i=t&&e.getScrollbarWidth()||0,s=i===0&&o?16:i;this.toggleCss("ag-scrollbar-invisible",o),_e(this.getGui(),s),_e(this.eViewport,s),_e(this.eContainer,s),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const o=e.getGridBodyCtrl().eBodyViewport,i=this.getScrollPosition(),s=o.scrollTop;i!=s&&this.setScrollPosition(s,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!Le(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},xg={selector:"AG-FAKE-VERTICAL-SCROLL",component:Eg};function De(e){var t;return((t=e.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:t.getRowCount())??0}function As(e){const t=[],o=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const i of o){if(!i)continue;const s=i.getGroupRowCount()||0;for(let n=0;n<s;n++){const r=i.getGroupRowCtrlAtIndex(n),a=t[n];if(r){const l=Dg(e,r);(a==null||l>a)&&(t[n]=l)}}}return t}function Dg(e,t){let i=e.colModel.isPivotMode()?Pg(e):ga(e);const s=t.getHeaderCellCtrls();for(const n of s){const{column:r}=n,a=r.getAutoHeaderHeight();a!=null&&a>i&&r.isAutoHeaderHeight()&&(i=a)}return i}function Ms(e){let o=e.colModel.isPivotMode()?Fg(e):co(e);return e.colModel.forAllCols(i=>{const s=i.getAutoHeaderHeight();s!=null&&s>o&&i.isAutoHeaderHeight()&&(o=s)}),o}function co(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function ha(e){return e.gos.get("floatingFiltersHeight")??co(e)}function ga(e){return e.gos.get("groupHeaderHeight")??co(e)}function Fg(e){return e.gos.get("pivotHeaderHeight")??co(e)}function Pg(e){return e.gos.get("pivotGroupHeaderHeight")??ga(e)}var Tg=class extends x{setComp(e,t,o){this.comp=e,this.eGui=t;const{beans:i}=this,{headerNavigation:s,touchSvc:n,ctrlsSvc:r}=i;s&&this.createManagedBean(new li(o,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,i),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,i)}),this.onPivotModeChanged(i),this.setupHeaderHeight();const a=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:a}),n==null||n.mockHeaderContextMenu(this,a),r.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({headerRowsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>We(this.beans,()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){var n;const{beans:e}=this;let t=0;const o=As(e).reduce((r,a)=>r+a,0),i=Ms(e);if((n=e.filterManager)!=null&&n.hasFloatingFilters()&&(t+=ha(e)),t+=o,t+=i,this.headerHeight===t)return;this.headerHeight=t;const s=`${t+1}px`;this.comp.setHeightAndMinHeight(s),this.eventSvc.dispatchEvent({type:"headerHeightChanged"})}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const o=e.visibleCols.allCols.some(i=>i.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",o)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),o=e.shiftKey,i=o!==t?"LEFT":"RIGHT",{beans:s}=this,{headerNavigation:n,focusSvc:r}=s;(n.navigateHorizontally(i,!0,e)||!o&&r.focusOverlay(!1)||io(s,o,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:o}=this.beans;switch(e.key){case y.LEFT:t="LEFT";case y.RIGHT:{A(t)||(t="RIGHT"),o.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case y.UP:t="UP";case y.DOWN:{A(t)||(t="DOWN"),o.navigateVertically(t,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:o,beans:i}=this;!t&&o.contains(Q(i))||o.contains(t)||(i.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,o){var r;const{menuSvc:i,ctrlsSvc:s}=this.beans;if(!e&&!o||!(i!=null&&i.isHeaderContextMenuEnabled()))return;const{target:n}=e??t;(n===this.eGui||n===((r=s.getHeaderRowContainerCtrl())==null?void 0:r.eViewport))&&i.showHeaderContextMenu(void 0,e,o)}},ks=class extends Y{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},Ig={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"}]},Ag=class extends ks{constructor(e){super(Ig,e),this.eResize=I,this.eHeaderCompWrapper=I,this.headerCompVersion=0}postConstruct(){const e=this.getGui(),t=(s,n)=>{n!=null&&n!=""?e.setAttribute(s,n):e.removeAttribute(s)},o=()=>{const s=this.ctrl.getSelectAllGui();s&&(this.eResize.insertAdjacentElement("afterend",s),this.addDestroyFunc(()=>s.remove()))};t("col-id",this.ctrl.column.getColId());const i={setWidth:s=>e.style.width=s,toggleCss:(s,n)=>this.toggleCss(s,n),setUserStyles:s=>qt(e,s),setAriaSort:s=>s?Zd(e,s):Qd(e),setUserCompDetails:s=>this.setUserCompDetails(s),getUserCompInstance:()=>this.headerComp,refreshSelectAllGui:o,removeSelectAllGui:()=>{var s;return(s=this.ctrl.getSelectAllGui())==null?void 0:s.remove()}};this.ctrl.setComp(i,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0),o()}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;const t=this.headerCompVersion;e.newAgStackInstance().then(o=>this.afterCompCreated(t,o))}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())}},Mg={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"}]},kg=class extends ks{constructor(e){super(Mg,e),this.eResize=I,this.eHeaderCompWrapper=I}postConstruct(){const e=this.getGui(),t=(i,s)=>s!=null?e.setAttribute(i,s):e.removeAttribute(i);e.setAttribute("col-id",this.ctrl.column.getUniqueId());const o={toggleCss:(i,s)=>this.toggleCss(i,s),setUserStyles:i=>qt(e,i),setHeaderWrapperHidden:i=>{i?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:i=>{i!=null?this.eHeaderCompWrapper.style.setProperty("max-height",`${i}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",i!=null)},setResizableDisplayed:i=>X(this.eResize,i),setWidth:i=>e.style.width=i,setAriaExpanded:i=>t("aria-expanded",i),setUserCompDetails:i=>this.setUserCompDetails(i),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(o,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 o=this.getGui(),i=e.getGui();this.eHeaderCompWrapper.appendChild(i),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(o)}},Lg={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"}}]}]},Gg=class extends ks{constructor(e){super(Lg,e),this.eFloatingFilterBody=I,this.eButtonWrapper=I,this.eButtonShowMainFilter=I}postConstruct(){const e=this.getGui(),t={toggleCss:(o,i)=>this.toggleCss(o,i),setUserStyles:o=>qt(e,o),addOrRemoveBodyCssClass:(o,i)=>this.eFloatingFilterBody.classList.toggle(o,i),setButtonWrapperDisplayed:o=>X(this.eButtonWrapper,o),setCompDetails:o=>this.setCompDetails(o),getFloatingFilterComp:()=>this.compPromise,setWidth:o=>e.style.width=o,setMenuIcon:o=>this.eButtonShowMainFilter.appendChild(o)};this.ctrl.setComp(t,e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(t=>this.afterCompCreated(t))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(e){if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()}}},Hg=class extends Y{constructor(e){super({tag:"div",cls:e.headerRowClass,role:"row"}),this.ctrl=e,this.headerComps={}}postConstruct(){Fo(this.getGui(),this.ctrl.getAriaRowIndex());const e={setHeight:t=>this.getGui().style.height=t,setTop:t=>this.getGui().style.top=t,setHeaderCtrls:(t,o)=>this.setHeaderCtrls(t,o),setWidth:t=>this.getGui().style.width=t,setRowIndex:t=>Fo(this.getGui(),t)};this.ctrl.setComp(e,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;const o=this.headerComps;if(this.headerComps={},e.forEach(i=>{const s=i.instanceId;let n=o[s];delete o[s],n==null&&(n=this.createHeaderComp(i),this.getGui().appendChild(n.getGui())),this.headerComps[s]=n}),Object.values(o).forEach(i=>{this.getGui().removeChild(i.getGui()),this.destroyBean(i)}),t){const i=Object.values(this.headerComps);i.sort((n,r)=>{const a=n.getCtrl().column.getLeft(),l=r.getCtrl().column.getLeft();return a-l});const s=i.map(n=>n.getGui());_n(this.getGui(),s)}}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new kg(e);break;case"filter":t=new Gg(e);break;default:t=new Ag(e);break}return this.createBean(t),t.setParentComponent(this),t}},pa=class extends x{constructor(e,t,o,i){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=i,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=o}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){const{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?U(t):this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const{gos:e,colAnimation:t}=this.beans,o=e.get("suppressColumnMoveAnimation"),i=A(this.columnOrGroup.getOldLeft());(t==null?void 0:t.isActive())&&i&&!o?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),o=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=o,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===o&&this.setLeft(o)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){const{gos:o,visibleCols:i}=this.beans;if(!ie(o,"print")||e.getPinned()==="left")return t;const n=i.getColsLeftWidth();if(e.getPinned()==="right"){const r=i.bodyWidth;return n+r+t}return n+t}setLeft(e){if(A(e)&&(this.eCell.style.left=`${e}px`),J(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&Yd(this.ariaEl,t.length)}}},Og=0,fa="headerCtrl",Ca=class extends x{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.instanceId=e.getUniqueId()+"-"+Og++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}shouldStopEventPropagation(e){const{headerRowIndex:t,column:o}=this.beans.focusSvc.focusedHeader,i=o.getDefinition(),s=i&&i.suppressHeaderKeyboardEvent;if(!A(s))return!1;const n=_(this.gos,{colDef:i,column:o,headerRowIndex:t,event:e});return!!s(n)}getWrapperHasFocus(){return Q(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 o;if(typeof t=="function"){const i=this.getHeaderClassParams();o=t(i)}else o=t;o&&this.comp.setUserStyles(o)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:o,compBean:i}=e,{beans:s}=this,n=u=>{if(!this.isAlive()||!i.isAlive())return;const{paddingTop:h,paddingBottom:g,borderBottomWidth:p,borderTopWidth:f}=Xe(this.eGui),C=h+g+p+f,w=t.offsetHeight+C;if(u<5){const S=te(s),v=!S||!S.contains(t),b=w==0;if(v||b){os(()=>n(u+1),"raf",s);return}}this.setColHeaderHeight(this.column,w)};let r=!1,a;const l=()=>{const u=this.column.isAutoHeaderHeight();u&&!r&&d(),!u&&r&&c()},d=()=>{r=!0,n(0),this.comp.toggleCss("ag-header-cell-auto-height",!0),a=Je(this.beans,t,()=>n(0))},c=()=>{r=!1,a&&a(),this.comp.toggleCss("ag-header-cell-auto-height",!1),a=void 0};l(),i.addDestroyFunc(()=>c()),i.addManagedListeners(this.column,{widthChanged:()=>r&&n(0)}),i.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>n(0))}}),o&&o(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:o,eGui:i}=this;!e||!t||!i||(jr(e,t,o.visibleCols),Tn(i,o.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=dt(this.beans);this.eGui&&he(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){var n;const t=Q(this.beans),o=e.key===y.LEFT||e.key===y.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey||((this.isResizing||o)&&(e.preventDefault(),e.stopImmediatePropagation()),!o))return;const s=e.key===y.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const r=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(r,e.shiftKey),(n=this.resizeFeature)==null||n.toggleColumnResizing(!0)}else this.moveHeader(s)}moveHeader(e){var t;(t=this.beans.colMoves)==null||t.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:o}=this.beans;return o?o.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:o}=this;let i=e.key===y.LEFT!==t.get("enableRtl");const s=o.getPinned(),n=t.get("enableRtl");return s&&n!==(s==="right")&&(i=!i),(i?-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(()=>{var e;(e=this.resizeFeature)==null||e.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case y.PAGE_DOWN:case y.PAGE_UP:case y.PAGE_HOME:case y.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=fa,{eGui:o,gos:i}=this;tt(i,o,t,this),e.addDestroyFunc(()=>tt(i,o,t,null))}focus(e){const{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus(),!0):!1}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){var e;this.dragSource&&((e=this.beans.dragAndDrop)==null||e.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,o){const i=e??t,{menuSvc:s,gos:n}=this.beans;n.get("preventDefaultOnContextMenu")&&i.preventDefault(),s!=null&&s.isHeaderContextMenuEnabled(o)&&s.showHeaderContextMenu(o,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",o)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:o}=this;e.isColumn?o.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):o.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}},Bg=class extends Ca{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}setComp(e,t,o,i,s){this.comp=e;const{rowCtrl:n,column:r,beans:a}=this,{colResize:l,context:d,colHover:c,rangeSvc:u}=a,h=qo(this,d,s);this.setGui(t,h),this.updateState(),this.setupWidth(h),this.setupMovingCss(h),this.setupMenuClass(h),this.setupSortableClass(h),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:i,checkMeasuringCallback:p=>this.setRefreshFunction("measuring",p),compBean:h}),this.addColumnHoverListener(h),this.setupFilterClass(h),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(h),this.setupSelectAll(h),this.setupUserComp(),this.refreshAria(),l?this.resizeFeature=h.createManagedBean(l.createResizeFeature(n.pinned,r,o,e,this)):X(o,!1),c==null||c.createHoverFeature(h,[r],t),u==null||u.createRangeHighlightFeature(h,r,e),h.createManagedBean(new pa(r,t,a)),h.createManagedBean(new li(t,{shouldStopEventPropagation:p=>this.shouldStopEventPropagation(p),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(h),h.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),h.addManagedListeners(r,{colDefChanged:()=>this.refresh()}),h.addManagedListeners(r,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const g=()=>this.checkDisplayName();h.addManagedEventListeners({columnValueChanged:g,columnRowGroupChanged:g,columnPivotChanged:g,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),h.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){var o;(o=this.beans.colResize)==null||o.resizeHeader(this.column,e,t)}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.colDef;return _(t.gos,{colDef:o,column:e,floatingFilter:!1})}setupUserComp(){const e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return Fu(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:o,gos:i}=this.beans;return _(i,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!(e!=null&&e.isHeaderFilterButtonEnabled(this.column)),enableFilterIcon:!!o&&(!this.openFilterEnabled||No(this.gos)),showColumnMenu:(n,r)=>{e==null||e.showColumnMenu({column:this.column,buttonElement:n,positionBy:"button",onClosedCallback:r})},showColumnMenuAfterMouseClick:(n,r)=>{e==null||e.showColumnMenu({column:this.column,mouseEvent:n,positionBy:"mouse",onClosedCallback:r})},showFilter:n=>{e==null||e.showFilterMenu({column:this.column,buttonElement:n,containerType:"columnFilter",positionBy:"button"})},progressSort:n=>{t==null||t.progressSort(this.column,!!n,"uiColumnSorted")},setSort:(n,r)=>{t==null||t.setSortForColumn(this.column,n,!!r,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(n,r)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}})}setupSelectAll(e){var o;const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),(o=this.selectAllFeature)==null||o.setComp(this),e.addManagedPropertyListener("rowSelection",()=>{var s;const i=t.createSelectAllFeature(this.column);i&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(i),(s=this.selectAllFeature)==null||s.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!i&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}getSelectAllGui(){var e;return(e=this.selectAllFeature)==null?void 0:e.getCheckboxGui()}handleKeyDown(e){var t;super.handleKeyDown(e),e.key===y.SPACE&&((t=this.selectAllFeature)==null||t.onSpaceKeyDown(e)),e.key===y.ENTER&&this.onEnterKeyDown(e),e.key===y.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){var t;e.ctrlKey||e.metaKey?this.showMenuOnKeyPress(e,!0):this.sortable&&((t=this.beans.sortSvc)==null||t.progressSort(this.column,e.shiftKey,"uiColumnSorted"))}showMenuOnKeyPress(e,t){const o=this.comp.getUserCompInstance();ma(o)&&o.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),vh()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){var o;this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),o=Kr(t,this.gos,this.column,null),i=this.userHeaderClasses;this.userHeaderClasses=new Set(o),o.forEach(s=>{i.has(s)?i.delete(s):this.comp.toggleCss(s,!0)}),i.forEach(s=>this.comp.toggleCss(s,!1))};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){var t;this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=((t=this.beans.colMoves)==null?void 0:t.setDragSourceForHeader(e,this.column,this.displayName))??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!(e!=null&&e.isColumnMenuInHeaderEnabled(this.column)),this.openFilterEnabled=!!(e!=null&&e.isFilterMenuInHeaderEnabled(this.column)),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),Object.values(this.refreshFunctions).forEach(e=>e())}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const t=()=>{const o=this.column.getActualWidth();this.comp.setWidth(`${o}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{var o;(o=this.comp)==null||o.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 o=this.column.isFilterActive();this.comp.toggleCss("ag-header-cell-filtered",o),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,o=e===1;this.comp.toggleCss("ag-header-highlight-before",t),this.comp.toggleCss("ag-header-highlight-after",o)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){var h;const{eGui:e,column:t,comp:o,beans:i}=this,s=As(this.beans),n=s.reduce((g,p)=>g+=p,0)===0;if(o.toggleCss("ag-header-parent-hidden",n),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),o.toggleCss("ag-header-span-height",!1),o.toggleCss("ag-header-span-total",!1);return}const{numberOfParents:r,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();o.toggleCss("ag-header-span-height",r>0);const l=Ms(i);if(r===0){o.toggleCss("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}o.toggleCss("ag-header-span-total",a);const d=(((h=this.column.getFirstRealParent())==null?void 0:h.getLevel())??-1)+1,c=s.length-d;let u=0;for(let g=0;g<c;g++)u+=s[s.length-1-g];e.style.setProperty("top",`${-u}px`),e.style.setProperty("height",`${l+u}px`)}refreshAriaSort(){var e;if(this.sortable){const t=this.getLocaleTextFunc(),o=((e=this.beans.sortSvc)==null?void 0:e.getDisplaySortForColumn(this.column))||null;this.comp.setAriaSort(Bd(o)),this.setAriaDescriptionProperty("sort",t("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!No(this.gos)){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){const e=this.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(e,t){t!=null?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){var t;if(!this.eGui.contains(Q(this.beans)))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((o,i)=>o==="filter"?-1:i.charCodeAt(0)-o.charCodeAt(0)).map(o=>this.ariaDescriptionProperties.get(o)).join(". ");(t=this.beans.ariaAnnounce)==null||t.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){var t;(t=this.beans.colHover)==null||t.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=s=>this.handleMouseOverChange(s.type==="mouseenter"),o=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},i=s=>this.handleContextMenuMouseEvent(s,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:o,contextmenu:i})}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 ma(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function ma(e){return typeof(e==null?void 0:e.getAnchorElementForMenu)=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var Vg=0,Ls=class extends x{constructor(e,t,o){super(),this.rowIndex=e,this.pinned=t,this.type=o,this.instanceId=Vg++,this.comp=null,this.allCtrls=[];let i="ag-header-row-column";o==="group"?i="ag-header-row-group":o==="filter"&&(i="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${i}`}setRowIndex(e){var t;this.rowIndex=e,(t=this.comp)==null||t.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=ie(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.allCtrls.every(e=>e.eGui!=null):!1}setComp(e,t,o=!0){this.comp=e,t=qo(this,this.beans.context,t),o&&(this.setRowIndex(this.rowIndex),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this),o=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:o,virtualColumnsChanged:i=>this.onVirtualColumnsChanged(i.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",o),e.addManagedPropertyListener("ensureDomOrder",i=>this.isEnsureDomOrder=i.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=ie(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleCols:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){if(!this.comp)return;const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let e=0;const t=As(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 o=Ms(this.beans);if(this.type==="column")return{topOffset:e,rowHeight:o};e+=o;const i=ha(this.beans);return{topOffset:e,rowHeight:i}}onVirtualColumnsChanged(e=!1){if(!this.comp)return;const t=this.getUpdatedHeaderCtrls(),o=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,o,e)}getUpdatedHeaderCtrls(){const e=this.ctrlsById;this.ctrlsById=new Map;const t=this.getColumnsInViewport();for(const i of t)this.recycleAndCreateHeaderCtrls(i,this.ctrlsById,e);const o=i=>{const{focusSvc:s,visibleCols:n}=this.beans;return s.isHeaderWrapperFocused(i)?n.isVisible(i.column):!1};if(e)for(const[i,s]of e)o(s)?this.ctrlsById.set(i,s):this.destroyBean(s);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,o){if(e.isEmptyGroup())return;const i=e.getUniqueId();let s;if(o&&(s=o.get(i),o.delete(i)),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 Bg(e,this));break}t.set(i,s)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];const e=[];return["left",null,"right"].forEach(t=>{e.push(...this.getComponentsToRender(t))}),e}getComponentsToRender(e=this.pinned){return this.type==="group"?this.beans.colViewport.getHeadersToRender(e,this.rowIndex):this.beans.colViewport.getColumnHeadersToRender(e)}focusHeader(e,t){const o=this.allCtrls.find(s=>s.column==e);return o?o.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},Ng=class extends x{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;const{pinnedCols:o,ctrlsSvc:i,colModel:s,colMoves:n}=this.beans;this.setupCenterWidth(),o==null||o.setupHeaderPinnedWidth(this),this.setupDragAndDrop(n,this.eViewport);const r=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:r,advancedFilterEnabledChanged:r});const a=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;i.register(a,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:o,visibleCols:i}=this.beans;let s=0;const n=t.getFocusHeaderToUseAfterRefresh(),r=()=>{const u=i.headerGroupRowCount;s=u;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 Ls(g,this.pinned,"group"));this.groupsRowCtrls.push(p)}}},a=()=>{const u=s++;if(this.hidden){this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl);return}this.columnsRowCtrl==null||!e?(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new Ls(u,this.pinned,"column"))):this.columnsRowCtrl.rowIndex!==u&&this.columnsRowCtrl.setRowIndex(u)},l=()=>{this.includeFloatingFilter=!!(o!=null&&o.hasFloatingFilters())&&!this.hidden;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 Ls(h,this.pinned,"filter"))},d=this.getAllCtrls();r(),a(),l();const c=this.getAllCtrls();this.comp.setCtrls(c),this.restoreFocusOnHeader(t,n),d.length!==c.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){const t=o=>o==null?void 0:o.getHeaderCellCtrls().find(i=>i.column===e);if(it(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let o=0;o<this.groupsRowCtrls.length;o++){const i=t(this.groupsRowCtrls[o]);if(i)return i}}getHtmlElementForColumnHeader(e){var t;return((t=this.getHeaderCtrlForColumn(e))==null?void 0:t.eGui)??null}getRowType(e){var t;return(t=this.getAllCtrls()[e])==null?void 0:t.type}focusHeader(e,t,o){const s=this.getAllCtrls()[e];return s?s.focusHeader(t,o):!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 o=e==null?void 0:e.createBodyDropTarget(this.pinned,t);o&&this.createManagedBean(o)}restoreFocusOnHeader(e,t){if(!t)return;const{column:o}=t;o.getPinned()==this.pinned&&e.focusHeaderPosition({headerPosition:t})}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new xs(e=>this.comp.setCenterWidth(`${e}px`),!0))}},Gs=class extends Y{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},mi=class extends Gs{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.errorMessages=null}},wa=class extends Y{constructor(){super()}},_g={tag:"span",cls:"ag-overlay-loading-center",attrs:{"aria-live":"polite","aria-atomic":"true"}},Wg=class extends wa{init(){var t;const e=Qe((t=this.gos.get("overlayLoadingTemplate"))==null?void 0:t.trim());if(this.setTemplate(e??_g),!e){const o=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=o("loadingOoo","Loading...")})}}},zg={tag:"span",cls:"ag-overlay-no-rows-center"},$g=class extends wa{init(){var t;const e=Qe((t=this.gos.get("overlayNoRowsTemplate"))==null?void 0:t.trim());if(this.setTemplate(e??zg),!e){const o=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=o("noRowsToShow","No Rows To Show")})}}};function Ug(e,t,o){const i=Mt(e,t,o);if(i){const{className:n}=i;if(typeof n=="string"&&n.indexOf("ag-icon")>-1||typeof n=="object"&&n["ag-icon"])return i}const s=ee({tag:"span"});return s.appendChild(i),s}function Mt(e,t,o){var n;let i=null;e==="smallDown"?M(262):e==="smallLeft"?M(263):e==="smallRight"&&M(264);const s=o&&o.getColDef().icons;if(s&&(i=s[e]),t.gos&&!i){const r=t.gos.get("icons");r&&(i=r[e])}if(i){let r;if(typeof i=="function")r=i();else if(typeof i=="string")r=i;else{M(38,{iconName:e});return}if(typeof r=="string")return Zi(r);if(Ji(r))return r;M(133,{iconName:e});return}else{const r=t.registry.getIcon(e);return r||(n=t.validation)==null||n.validateIcon(e),ee({tag:"span",cls:`ag-icon ag-icon-${r??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var Kg=".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}",jg={tag:"div",children:[{tag:"div",ref:"eGhost",cls:"ag-dnd-ghost ag-unselectable",children:[{tag:"span",ref:"eIcon",cls:"ag-dnd-ghost-icon ag-shake-left-to-right"},{tag:"div",ref:"eLabel",cls:"ag-dnd-ghost-label"}]}]},qg=class extends Y{constructor(){super(),this.dragSource=null,this.eIcon=I,this.eLabel=I,this.eGhost=I,this.registerCSS(Kg)}postConstruct(){const e=t=>Ug(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(jg),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eIcon:o,dragSource:i,dropIconMap:s,gos:n}=this;pe(o);let r=null;e||(e=i!=null&&i.getDefaultIconName?i.getDefaultIconName():"notAllowed"),r=s[e],o.classList.toggle("ag-shake-left-to-right",t),!(r===s.hide&&n.get("suppressDragLeaveHidesColumns"))&&r&&o.appendChild(r)}setLabel(e){this.eLabel.textContent=e}},Yg=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",Zg=class extends Y{constructor(e,t,o){super(t,o),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(Yg)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:o,labelAlignment:i,disabled:s}=this.config;s!=null&&this.setDisabled(s),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),o!=null&&this.setLabelWidth(o),this.setLabelAlignment(i||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;pe(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(X(t,!1),Ne(t,"presentation")):(X(t,!0),Ne(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 o=this.getGui().classList;return o.toggle("ag-label-align-left",e==="left"),o.toggle("ag-label-align-right",e==="right"),o.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:(Ao(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return On(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},va=class extends Zg{constructor(e,t,o,i){super(e,t,o),this.className=i}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:o}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),o!=null&&this.onValueChange(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(),o=this.getLabel();o==null||o==""||Vd(e)!==null?Kt(e,""):Kt(e,t??"")}setAriaLabel(e){return Ut(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 _e(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function Qg(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 Hs=class extends va{constructor(e,t,o="text",i="input"){super(e,(e==null?void 0:e.template)??Qg(i),[],t),this.inputType=o,this.displayFieldTag=i,this.eLabel=I,this.eWrapper=I,this.eInput=I}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:o,className:i}=this;e.classList.add(`${i}-label`),t.classList.add(`${i}-input-wrapper`),o.classList.add(`${i}-input`),this.addCss("ag-input-field"),o.id=o.id||`ag-${this.getCompId()}-input`;const{inputName:s,inputWidth:n}=this.config;s!=null&&this.setInputName(s),n!=null&&this.setInputWidth(n),this.addInputListeners(),this.activateTabIndex([o])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,he(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return Ao(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 he(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Ut(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return On(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)he(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";he(this.eInput,"autocomplete",t)}return this}},Sa=class extends Hs{constructor(e,t="ag-checkbox",o="checkbox"){super(e,t,o),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const o=this.eInput;o.checked=e,o.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,o){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:o});const i=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:i.id,name:i.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),o=this.selected=e.target.checked;this.refreshSelectedClass(o),this.dispatchChange(o,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},Os={selector:"AG-CHECKBOX",component:Sa},Xg=".ag-checkbox-cell{height:100%}",Jg={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},ep=class extends Y{constructor(){super(Jg,[Os]),this.eCheckbox=I,this.registerCSS(Xg)}init(e){this.refresh(e);const{eCheckbox:t,beans:o}=this,i=t.getInputElement();i.setAttribute("tabindex","-1"),Fn(i,"polite"),this.addManagedListeners(i,{click:s=>{if(yt(s),t.isDisabled())return;const n=t.getValue();this.onCheckboxChanged(n)},dblclick:s=>{yt(s)}}),this.addManagedElementListeners(e.eGridCell,{keydown:s=>{if(s.key===y.SPACE&&!t.isDisabled()){e.eGridCell===Q(o)&&t.toggle();const n=t.getValue();this.onCheckboxChanged(n),s.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,o=!0;const{value:i,column:s,node:n}=e;if(n.group&&s)if(typeof i=="boolean")t=i;else{const u=s.getColId();u.startsWith($o)?t=i==null||i===""?void 0:i==="true":n.aggData&&n.aggData[u]!==void 0?t=i??void 0:o=!1}else t=i??void 0;const{eCheckbox:r}=this;if(!o){r.setDisplayed(!1);return}r.setValue(t);const a=e.disabled??!(s!=null&&s.isCellEditable(n));r.setDisabled(a);const l=this.getLocaleTextFunc(),d=An(l,t),c=a?d:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${d})`;r.setInputAriaLabel(c)}onCheckboxChanged(e){var r,a,l,d;const{params:t}=this,{column:o,node:i,value:s}=t;(a=(r=this.beans)==null?void 0:r.editSvc)==null||a.setEditingCells([{column:o,colId:o.getColId(),rowIndex:i.rowIndex,rowPinned:i.rowPinned,state:"changed",oldValue:s,newValue:s}],{update:!0});const n=i.setDataValue(o,e,"renderer");(d=this.beans.editSvc)==null||d.stopEditing({rowNode:i,column:o},{source:(l=this.beans.editSvc)!=null&&l.isBatchEditing()?"ui":"api"}),n||this.updateCheckbox(t)}},ba=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:o,order:i}=this;t.has(e)||(t.add(e),o.add(e),i.push(e),this.sort())}delete(e){this.all.delete(e),this.visible.delete(e),this.queued.delete(e.id),Se(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:o,queued:i}=this;e.clear(),i.clear(),t.clear(),o.length=0}sort(){const{sortSvc:e,rowNodeSorter:t,gos:o}=this.beans,i=(e==null?void 0:e.getSortOptions())??[],s=ip(this.order);if(this.order.sort((r,a)=>{var l,d;return(((l=r.pinnedSibling)==null?void 0:l.rowIndex)??0)-(((d=a.pinnedSibling)==null?void 0:d.rowIndex)??0)}),this.order=(t==null?void 0:t.doFullSort(this.order,i))??this.order,!s)return;const n=rr(o);n==="bottom"||n==="pinnedBottom"?this.order.push(s):this.order.unshift(s)}hide(e){const{all:t,visible:o}=this;t.forEach(i=>e(i)?o.delete(i):o.add(i)),this.order=Array.from(o),this.sort()}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function ya(e){var o;if(e.level===-1)return!0;const t=e.parent;return(o=t==null?void 0:t.childrenAfterSort)!=null&&o.some(i=>i==e)?ya(t):!1}function Bs(e,t){const{gos:o,rowModel:i,filterManager:s}=e;return Lo(o)?!i.getRowNode(t.id):s!=null&&s.isAnyFilterPresent()?!ya(t):o.get("pivotMode")?!t.group:!1}function tp(e){return!!e.footer&&e.level===-1}function op(e){return!!e.pinnedSibling&&tp(e.pinnedSibling)}function ip(e){var o;const t=e.findIndex(op);if(t>-1)return(o=e.splice(t,1))==null?void 0:o[0]}var Ra=class extends x{postConstruct(){const{gos:e,beans:t}=this;this.top=new ba(t,"top"),this.bottom=new ba(t,"bottom");const o=s=>Bs(t,s.pinnedSibling),i=()=>{const s=e.get("isRowPinned");s&&e.get("enableRowPinning")&&t.rowModel.forEachNode(n=>this.pinRow(n,s(n)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:s})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow(),this.forContainers(n=>n.hide(o)),this.refreshRowPositions(),s||this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(np),this.refreshRowPositions()},rowNodeDataChanged:({node:s})=>{const n=e.get("isRowPinnable");((n==null?void 0:n(s))??!0)||this.pinRow(s,null)},firstDataRendered:i}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(s=>s.hide(o)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:s})=>{this._grandTotalPinned=s==="pinnedBottom"?"bottom":s==="pinnedTop"?"top":null}),this.addManagedPropertyListener("isRowPinned",i)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{const o=[];t.forEach(i=>o.push(i)),o.forEach(i=>this.pinRow(i,null)),t.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,o){var r;if(e.footer&&e.level>-1)return;if(e.footer&&e.level===-1){this._grandTotalPinned=t,ap(this.beans);return}const i=e.rowPinned??((r=e.pinnedSibling)==null?void 0:r.rowPinned);if(i!=null&&t!=null&&t!=i){const a=e.rowPinned?e:e.pinnedSibling,l=e.rowPinned?e.pinnedSibling:e;this.pinRow(a,null,o),this.pinRow(l,t,o);return}const n=o&&rp(this.beans,e,o);if(n){n.forEach(a=>this.pinRow(a,t));return}if(t==null){const a=e.rowPinned?e:e.pinnedSibling,l=this.findPinnedRowNode(a);if(!l)return;l.delete(a);const d=a.pinnedSibling;Vs(a),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(d)}else{const a=Ea(this.beans,e,t),l=this.getContainer(t);l.add(a),Bs(this.beans,e)&&l.hide(d=>Bs(this.beans,d.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 o=i=>{if(i.rowHeightEstimated){const s=ze(this.beans,i);i.setRowTop(t),i.setRowHeight(s.height),t+=s.height,e=!0}};return this.bottom.forEach(o),t=0,this.top.forEach(o),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return xa(this.top)}getPinnedBottomTotalHeight(){return xa(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 o=[];return this.forEachPinnedRow(t,i=>o.push(i.pinnedSibling.id)),o};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,o)=>{for(const i of e[o]){const s=this.beans.rowModel.getRowNode(i);s?this.pinRow(s,o):t.queue(i)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{const o=new Set;e.forEachQueued(i=>{const s=this.beans.rowModel.getRowNode(i);s&&o.add(s)});for(const i of o)e.unqueue(i.id),this.pinRow(i,t)})}pinGrandTotalRow(){var a;const{gos:e,beans:t,_grandTotalPinned:o}=this,i=t.rowModel;if(!ne(e))return;const s=(a=i.rootNode)==null?void 0:a.sibling;if(!s)return;const n=s.pinnedSibling,r=n&&this.findPinnedRowNode(n);if(o){if(r&&r.floating!==o&&(r.delete(n),Vs(n)),!r||r.floating!==o){const l=Ea(t,s,o);this.getContainer(o).add(l)}}else{if(!r)return;r.delete(n),Vs(n)}}onGridStylesChanges(e){e.rowHeightChanged&&this.forContainers(t=>t.forEach(o=>o.setRowHeight(o.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=>sp(this.beans,o);return e==null?this.forContainers(t):t(this.getContainer(e))}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e==null||e.dispatchRowEvent("rowPinned")}};function sp(e,t){let o=0;t.forEach((i,s)=>{i.setRowTop(o),(i.rowHeightEstimated||i.rowHeight==null)&&i.setRowHeight(ze(e,i).height),i.setRowIndex(s),o+=i.rowHeight})}function Ea(e,t,o){if(t.pinnedSibling)return t.pinnedSibling;const i=_h(t,e);i.setRowTop(null),i.setRowIndex(null),i.rowPinned=o;const s=o==="top"?vs:Ss;return i.id=`${s}${o}-${t.id}`,i.pinnedSibling=t,t.pinnedSibling=i,i}function Vs(e){if(!e.pinnedSibling)return;e.rowPinned=null,e.setRowTop(null),e.setRowIndex(null);const t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function np(e){const t=new Set;e.forEach(o=>{o.group&&t.add(o)}),t.forEach(o=>e.delete(o))}function rp(e,t,o){var n;const{rowSpanSvc:i}=e,s=(o&&(i==null?void 0:i.isCellSpanning(o,t)))??!1;if(o&&s)return(n=i==null?void 0:i.getCellSpan(o,t))==null?void 0:n.spannedNodes}function xa(e){const t=e.size();if(t===0)return 0;const o=e.getByIndex(t-1);return o===void 0?0:o.rowTop+o.rowHeight}function ap({gos:e,rowModel:t}){ne(e)&&t.refreshModel({step:"map"})}var Da=class extends x{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){const e=this.gos;this.setPinnedRowData(e.get("pinnedTopRowData"),"top"),this.setPinnedRowData(e.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",t=>this.setPinnedRowData(t.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",t=>this.setPinnedRowData(t.currentValue,"bottom")),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this)})}reset(){}isEmpty(e){return this.getCache(e).order.length===0}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}onGridStylesChanges(e){if(e.rowHeightChanged){const t=o=>{o.setRowHeight(o.rowHeight,!0)};ho(this.pinnedBottomRows,t),ho(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0;const o=i=>{if(i.rowHeightEstimated){const s=ze(this.beans,i);i.setRowTop(t),i.setRowHeight(s.height),t+=s.height,e=!0}};return ho(this.pinnedBottomRows,o),t=0,ho(this.pinnedTopRows,o),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){const o=this.getCache(t);if(e===void 0){o.order.length=0,o.cache={};return}const i=Go(this.gos),s=t==="top"?vs:Ss,n=new Set(o.order),r=[],a=new Set;let l=0,d=-1;for(const c of e){const u=(i==null?void 0:i({data:c,level:0,rowPinned:t}))??s+this.nextId++;if(a.has(u)){M(96,{id:u,data:c});continue}d++,a.add(u),r.push(u);const h=uo(o,u);if(h!==void 0)h.data!==c&&h.updateData(c),l+=this.setRowTopAndRowIndex(h,l,d),n.delete(u);else{const g=new ro(this.beans);g.id=u,g.data=c,g.rowPinned=t,l+=this.setRowTopAndRowIndex(g,l,d),o.cache[u]=g,o.order.push(u)}}n.forEach(c=>{var u;(u=uo(o,c))==null||u.clearRowTopAndRowIndex(),delete o.cache[c]}),o.order=r}setRowTopAndRowIndex(e,t,o){return e.setRowTop(t),e.setRowHeight(ze(this.beans,e).height),e.setRowIndex(o),e.rowHeight}getPinnedTopTotalHeight(){return Fa(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return Fa(this.pinnedBottomRows)}getPinnedTopRowCount(){return _s(this.pinnedTopRows)}getPinnedBottomRowCount(){return _s(this.pinnedBottomRows)}getPinnedTopRow(e){return Ns(this.pinnedTopRows,e)}getPinnedBottomRow(e){return Ns(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return uo(this.getCache(t),e)}forEachPinnedRow(e,t){return ho(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function Fa(e){const t=_s(e);if(t===0)return 0;const o=Ns(e,t-1);return o===void 0?0:o.rowTop+o.rowHeight}function uo(e,t){return e.cache[t]}function Ns(e,t){return uo(e,e.order[t])}function ho(e,t){e.order.forEach((o,i)=>{const s=uo(e,o);s&&t(s,i)})}function _s(e){return e.order.length}var lp=class extends x{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,t=()=>{const o=e.get("enableRowPinning"),i=rr(e),n=!!o||(i==="pinnedBottom"||i==="pinnedTop"),r=n?this.inner instanceof Da:this.inner instanceof Ra;this.inner&&r&&this.destroyBean(this.inner),(r||!this.inner)&&(this.inner=this.createManagedBean(n?new Ra:new Da))};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,o){return this.inner.pinRow(e,t,o)}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()}},Ws=class extends Hs{constructor(e,t="ag-text-field",o="text"){super(e,t,o)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const o=this.eInput;return o.value!==e&&(o.value=A(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=o=>{na(o)&&o.key&&!e.test(o.key)&&o.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:o=>{var s;const i=(s=o.clipboardData)==null?void 0:s.getData("text");i&&i.split("").some(n=>!e.test(n))&&o.preventDefault()}})}},dp={selector:"AG-INPUT-TEXT-FIELD",component:Ws},cp=class extends Hs{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const o=super.setValue(e,t);return this.eInput.value=e,o}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},up={selector:"AG-INPUT-TEXT-AREA",component:cp},hp=class extends Ws{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const n=parseFloat(e.value),r=isNaN(n)?"":this.normalizeValue(n.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:o,max:i,step:s}=this.config;typeof t=="number"&&this.setPrecision(t),typeof o=="number"&&this.setMin(o),typeof i=="number"&&this.setMax(i),typeof s=="number"&&this.setStep(s)}onWheel(e){Q(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const o=this.precision;if(o==null)return e;if(t){const s=parseFloat(e).toFixed(o);return parseFloat(s).toString()}const i=String(e).split(".");if(i.length>1){if(i[1].length<=o)return e;if(o>0)return`${i[0]}.${i[1].slice(0,o)}`}return i[0]}setMin(e){return this.min===e?this:(this.min=e,he(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,he(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,he(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(o=>super.setValue(o,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,o){if(A(o)){let i=this.isScientificNotation(o);if(i&&this.eInput.validity.valid)return e(o);if(!i){o=this.adjustPrecision(o);const s=this.normalizeValue(o);i=o!=s}if(i)return t(o)}return e(o)}getValue(){const e=this.eInput;if(!e.validity.valid)return;const t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},gp={selector:"AG-INPUT-NUMBER-FIELD",component:hp},pp=class extends Ws{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=ft();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){Q(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?Ke(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,he(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?Ke(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,he(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,he(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return ao(this.getValue())??void 0}setDate(e,t){this.setValue(Ke(e??null,this.includeTime),t)}},Pa={selector:"AG-INPUT-DATE-FIELD",component:pp},fp=class extends Y{constructor(e="default",t=!1){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.unFocusable=t,this.activeClass="ag-active-item",this.options=[],this.itemEls=[]}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()}),!this.unFocusable&&this.addManagedElementListeners(e,{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(e){const t=e.key;switch(t){case y.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{const o=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(o)}break;case y.DOWN:case y.UP:e.preventDefault(),this.navigate(t);break;case y.PAGE_DOWN:case y.PAGE_UP:case y.PAGE_HOME:case y.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}navigate(e){const t=e===y.DOWN;let o;const{itemEls:i,highlightedEl:s}=this;if(!s)o=i[t?0:i.length-1];else{let r=i.indexOf(s)+(t?1:-1);r=Math.min(Math.max(r,0),i.length-1),o=i[r]}this.highlightItem(o)}navigateToPage(e){const{itemEls:t,highlightedEl:o}=this;if(!o||t.length===0)return;const i=t.indexOf(o),s=this.options.length-1,n=t[0].clientHeight,r=Math.floor(this.getGui().clientHeight/n);let a=-1;e===y.PAGE_HOME?a=0:e===y.PAGE_END?a=s:e===y.PAGE_DOWN?a=Math.min(i+r,s):e===y.PAGE_UP&&(a=Math.max(i-r,0)),a!==-1&&this.highlightItem(t[a])}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){const{value:t,text:o}=e,i=o??t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach(e=>{ke(e)}),this.itemEls=[],this.refreshAriaRole()}refreshAriaRole(){const e=this.getGui();Ne(e,this.options.length===0?"presentation":"listbox")}updateIndices(){const e=this.getGui().querySelectorAll(".ag-list-item");this.refreshAriaRole(),e.forEach((t,o)=>{$d(t,o+1),zd(t,e.length)})}renderOption(e,t){const o=ee({tag:"div",cls:`ag-list-item ag-${this.cssIdentifier}-list-item`,attrs:{role:"option"}}),i=ee({tag:"span",children:t});o.appendChild(i),this.unFocusable||(o.tabIndex=-1),this.itemEls.push(o),this.addManagedListeners(o,{mouseover:()=>this.highlightItem(o),mousedown:s=>{s.preventDefault(),s.stopPropagation(),this.setValue(e)}}),this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getTooltipValue:()=>t,getGui:()=>o,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>i.scrollWidth>i.clientWidth})),this.getGui().appendChild(o)}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const o=this.options.findIndex(i=>i.value===e);if(o!==-1){const i=this.options[o];this.value=i.value,this.displayValue=i.text,this.highlightItem(this.itemEls[o]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.itemEls[e])}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}highlightItem(e){if(!Le(e))return;this.clearHighlighted(),this.highlightedEl=e,e.classList.add(this.activeClass),Bi(e,!0);const t=this.getGui(),{scrollTop:o,clientHeight:i}=t,{offsetTop:s,offsetHeight:n}=e;(s+n>o+i||s<o)&&e.scrollIntoView({block:"nearest"}),this.unFocusable||e.focus()}clearHighlighted(){const e=this.highlightedEl;!e||!Le(e)||(e.classList.remove(this.activeClass),Bi(e,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},Cp=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.ag-picker-has-focus),&:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:disabled{opacity:.5}}",mp={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"}}]}]},wp=class extends va{constructor(e){if(super(e,(e==null?void 0:e.template)||mp,(e==null?void 0:e.agComponents)||[],e==null?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=I,this.eWrapper=I,this.eDisplayField=I,this.eIcon=I,this.registerCSS(Cp),this.ariaRole=e==null?void 0:e.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:o,variableWidth:i,minPickerWidth:s,maxPickerWidth:n}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,o!=null&&this.setPickerMaxHeight(o),s!=null&&this.setPickerMinWidth(s),n!=null&&this.setPickerMaxWidth(n)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:o,inputWidth:i}=this.config;if(o){const s=Mt(o,this.beans);s&&this.eIcon.appendChild(s)}i!=null&&this.setInputWidth(i)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),Oi(e,!1),this.ariaRole&&Ne(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&(e==null?void 0: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 y.UP:case y.DOWN:case y.ENTER:case y.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case y.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:o,pickerAriaLabelValue:i,modalPicker:s=!0},maxPickerHeight:n,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:d,eWrapper:c}=this,u={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const f=sr(d);this.beforeHidePicker(),f&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(o,i),anchorToElement:c};e.style.position="absolute";const h=d.popupSvc,g=h.addPopup(u);l?(r&&(e.style.minWidth=r),e.style.width=Xi(Yi(c)),a&&(e.style.maxWidth=a)):Ao(e,a??Yi(c));const p=n??`${qi(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:o,gos:i},eWrapper:s,pickerComponent:n}=this,r=i.get("enableRtl")?"right":"left";o.positionPopupByComponent({type:t,eventSource:s,ePopup:n.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();Oi(t,e);const o=this.eWrapper.classList;o.toggle("ag-picker-expanded",e),o.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){var t;(t=this.pickerComponent)!=null&&t.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 Ao(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},vp=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}",Sp=class extends wp{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(vp)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Io(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:o}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),o&&t==null&&(this.eDisplayField.textContent=o),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new fp("select",!0));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),o=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",o),Jd(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i==null||i.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}onKeyDown(e){var o;const{key:t}=e;switch(t===y.TAB&&this.hidePicker(),t){case y.ENTER:case y.UP:case y.DOWN:case y.PAGE_UP:case y.PAGE_DOWN:case y.PAGE_HOME:case y.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(o=this.listComponent)==null||o.handleKeyDown(e):super.onKeyDown(e);break;case y.ESCAPE:super.onKeyDown(e);break;case y.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){var e;return(e=this.listComponent)==null||e.clearOptions(),this.setValue(void 0,!0),this}setValue(e,t,o){const{listComponent:i,config:{placeholder:s},eDisplayField:n,tooltipFeature:r}=this;if(this.value===e||!i)return this;if(o||i.setValue(e,!0),i.getValue()===this.getValue())return this;let l=i.getDisplayValue();return l==null&&s&&(l=s),n.textContent=l,r==null||r.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},bp={selector:"AG-SELECT",component:Sp},zs={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},yp=class extends x{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:t,eTopGuard:o,eBottomGuard:i,focusTrapActive:s,forceFocusOutWhenTabGuardsAreEmpty:n,isFocusableContainer:r,focusInnerElement:a,onFocusIn:l,onFocusOut:d,shouldStopEventPropagation:c,onTabKeyDown:u,handleKeyDown:h,isEmpty:g,eFocusableElement:p}=e;this.comp=t,this.eTopGuard=o,this.eBottomGuard=i,this.providedFocusInnerElement=a,this.eFocusableElement=p,this.focusTrapActive=!!s,this.forceFocusOutWhenTabGuardsAreEmpty=!!n,this.isFocusableContainer=!!r,this.providedFocusIn=l,this.providedFocusOut=d,this.providedShouldStopEventPropagation=c,this.providedOnTabKeyDown=u,this.providedHandleKeyDown=h,this.providedIsEmpty=g}postConstruct(){this.createManagedBean(new li(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach(e=>this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)}))}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():It(this.eFocusableElement,".ag-tab-guard").length===0)){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;const t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){var l;const t=te(this.beans),o=It(t.body,null,!0),i=o.indexOf(e?this.eTopGuard:this.eBottomGuard);if(i===-1)return;let s,n;e?(s=0,n=i):(s=i+1,n=o.length);const r=o.slice(s,n),a=this.gos.get("tabIndex");r.sort((d,c)=>{const u=parseInt(d.getAttribute("tabindex")||"0"),h=parseInt(c.getAttribute("tabindex")||"0");return h===a?1:u===a?-1:u===0?1:h===0?-1:u-h}),(l=r[e?r.length-1:0])==null||l.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const o=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),o&&(o.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=It(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length?(t[e?t.length-1:0].focus({preventScroll:!0}),!0):!1}getNextFocusableElement(e){return si(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},Rp=class extends x{constructor(e){super(),this.comp=e}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:o,eFocusableElement:i}=this,s=[t,o],n={setTabIndex:C=>{s.forEach(m=>C!=null?m.setAttribute("tabindex",C):m.removeAttribute("tabindex"))}};this.addTabGuards(t,o);const{focusTrapActive:r=!1,onFocusIn:a,onFocusOut:l,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f}=e;this.tabGuardCtrl=this.createManagedBean(new yp({comp:n,focusTrapActive:r,eTopGuard:t,eBottomGuard:o,eFocusableElement:i,onFocusIn:a,onFocusOut:l,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=te(this.beans).createElement("div"),o=e==="top"?zs.TAB_GUARD_TOP:zs.TAB_GUARD_BOTTOM;return t.classList.add(zs.TAB_GUARD,o),Ne(t,"presentation"),t}addTabGuards(e,t){const o=this.eFocusableElement;o.insertAdjacentElement("afterbegin",e),o.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];pe(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,o){Ji(t)||(t=t.getGui());const{eBottomGuard:i}=this;i?i.insertAdjacentElement("beforebegin",t):e(t,o)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;ke(e),ke(t),super.destroy()}},Ep=class extends Y{initialiseTabGuard(e){this.tabGuardFeature=this.createManagedBean(new Rp(this)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},ct=class{constructor(e,t=!1){this.DOUBLE_TAP_MILLIS=500,this.destroyFuncs=[],this.touching=!1,this.localEventService=new Ze,this.preventMouseClick=t;const o=this.onTouchStart.bind(this),i=this.onTouchMove.bind(this),s=this.onTouchEnd.bind(this);e.addEventListener("touchstart",o,{passive:!0}),e.addEventListener("touchmove",i,{passive:!0}),e.addEventListener("touchend",s,{passive:!1}),this.destroyFuncs.push(()=>{e.removeEventListener("touchstart",o,{passive:!0}),e.removeEventListener("touchmove",i,{passive:!0}),e.removeEventListener("touchend",s,{passive:!1})})}getActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}onTouchStart(e){if(this.touching)return;this.touchStart=e.touches[0],this.touching=!0,this.moved=!1;const t=this.touchStart;window.setTimeout(()=>{const o=this.touchStart===t;if(this.touching&&o&&!this.moved){this.moved=!0;const i={type:"longTap",touchStart:this.touchStart,touchEvent:e};this.localEventService.dispatchEvent(i)}},500)}onTouchMove(e){if(!this.touching)return;const t=this.getActiveTouch(e.touches);if(!t)return;!qr(t,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(e){if(this.touching){if(!this.moved){const t={type:"tap",touchStart:this.touchStart};this.localEventService.dispatchEvent(t),this.checkForDoubleTap()}this.preventMouseClick&&e.cancelable&&e.preventDefault(),this.touching=!1}}checkForDoubleTap(){const e=Date.now();if(this.lastTapTime&&this.lastTapTime>0)if(e-this.lastTapTime>this.DOUBLE_TAP_MILLIS){const o={type:"doubleTap",touchStart:this.touchStart};this.localEventService.dispatchEvent(o),this.lastTapTime=null}else this.lastTapTime=e;else this.lastTapTime=e}destroy(){this.destroyFuncs.forEach(e=>e())}},Ta=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${qn}/${this.frameworkName}-data-grid`,cc(this.baseDocLink)}setInterval(e,t){return new oo(o=>{o(window.setInterval(e,t))})}addEventListener(e,t,o,i){let s={};if(typeof i=="object"?s=i:typeof i=="boolean"&&(s={capture:i}),s.passive==null){const n=ur(t);n!=null&&(s.passive=n)}e.addEventListener(t,o,s)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return`${this.baseDocLink}${e?`/${e}`:""}`}};function xp(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var Dp=["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","rowSpanSvc","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","funcColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],Ia=Object.fromEntries(Dp.map((e,t)=>[e,t]));function Fp(e,t){const o=(e.beanName?Ia[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,i=(t.beanName?Ia[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return o-i}function Pp(e,t){return(e==null?void 0:e.beanName)==="gridDestroySvc"?-1:(t==null?void 0:t.beanName)==="gridDestroySvc"?1:0}var Tp={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},Ip={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},Ap={tag:"div",cls:"ag-header-viewport",role:"presentation",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"rowgroup"}]},$s=class extends Y{constructor(e){super(),this.eCenterContainer=I,this.headerRowComps={},this.rowCompsList=[],this.pinned=e}postConstruct(){this.selectAndSetTemplate();const e={setDisplayed:o=>this.setDisplayed(o),setCtrls:o=>this.setCtrls(o),setCenterWidth:o=>this.eCenterContainer.style.width=o,setViewportScrollLeft:o=>this.getGui().scrollLeft=o,setPinnedContainerWidth:o=>{const i=this.getGui();i.style.width=o,i.style.maxWidth=o,i.style.minWidth=o}};this.createManagedBean(new Ng(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){const e=this.pinned=="left",t=this.pinned=="right",o=e?Tp:t?Ip:Ap;this.setTemplate(o),this.eRowContainer=this.eCenterContainer!==I?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())}setCtrls(e){const t=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let o;const i=s=>{const n=s.getGui();n.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(n),o&&Nn(this.eRowContainer,n,o),o=n};e.forEach(s=>{const n=s.instanceId,r=t[n];delete t[n];const a=r||this.createBean(new Hg(s));this.headerRowComps[n]=a,this.rowCompsList.push(a),i(a)}),Object.values(t).forEach(s=>this.destroyRowComp(s))}},Mp={tag:"div",cls:"ag-header",role:"presentation"},kp=class extends Y{constructor(){super(Mp)}postConstruct(){const e={toggleCss:(i,s)=>this.toggleCss(i,s),setHeightAndMinHeight:i=>{this.getGui().style.height=i,this.getGui().style.minHeight=i}};this.createManagedBean(new Tg).setComp(e,this.getGui(),this.getFocusableElement());const o=i=>{this.createManagedBean(i),this.appendChild(i)};o(new $s("left")),o(new $s(null)),o(new $s("right"))}},Lp={selector:"AG-HEADER-ROOT",component:kp},Gp=class extends Y{constructor(e,t,o,i,s){super(),this.cellCtrl=t,this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.gos=e.gos,this.column=t.column,this.rowNode=t.rowNode,this.eRow=i;const n=ee({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.column.colIdSanitised}});this.eCell=n;let r;t.isCellSpanning()?(r=ee({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),r.appendChild(n),this.setTemplateFromElement(r)):this.setTemplateFromElement(n),this.cellCssManager=new Ir(()=>n),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);const a={toggleCss:(l,d)=>this.cellCssManager.toggleCss(l,d),setUserStyles:l=>qt(n,l),getFocusableElement:()=>n,setIncludeSelection:l=>this.includeSelection=l,setIncludeRowDrag:l=>this.includeRowDrag=l,setIncludeDndSource:l=>this.includeDndSource=l,setRenderDetails:(l,d,c)=>this.setRenderDetails(l,d,c),setEditDetails:(l,d,c)=>this.setEditDetails(l,d,c),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue(),refreshEditStyles:(l,d)=>this.refreshEditStyles(l,d)};t.setComp(a,n,r,this.eCellWrapper,o,s,void 0)}getParentOfValue(){return this.eCellValue??this.eCellWrapper??this.eCell}setRenderDetails(e,t,o){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;const s=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(o||s)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t))}setEditDetails(e,t,o){e?this.createCellEditorInstance(e,t,o):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,o=t||this.forceWrapper,i=o&&this.eCellWrapper==null;i&&(this.eCellWrapper=ee({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));const s=!o&&this.eCellWrapper!=null;s&&(ke(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssManager.toggleCss("ag-cell-value",!o);const n=!e&&o,r=n&&this.eCellValue==null;r&&(this.eCellValue=ee({tag:"span",cls:"ag-cell-value",role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue));const a=!n&&this.eCellValue!=null;a&&(ke(this.eCellValue),this.eCellValue=void 0);const l=i||s||r||a;return l&&this.removeControls(),!e&&t&&this.addControls(),l}addControls(){const{cellCtrl:e,eCellWrapper:t,eCellValue:o,includeRowDrag:i,includeDndSource:s,includeSelection:n}=this,r=a=>{a&&t.insertBefore(a.getGui(),o)};i&&this.rowDraggingComp==null&&(this.rowDraggingComp=e.createRowDragComp(),r(this.rowDraggingComp)),s&&this.dndSourceComp==null&&(this.dndSourceComp=e.createDndSource(),r(this.dndSourceComp)),n&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=e.createSelectionCheckbox(),r(this.checkboxSelectionComp))}createCellEditorInstance(e,t,o){const i=this.editorVersion,s=e.newAgStackInstance(),{params:n}=e;s.then(a=>this.afterCellEditorCreated(i,a,n,t,o)),q(this.cellEditor)&&n.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();pe(t);const o=Rt(e);o!=null&&(t.textContent=o)}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),ke(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){var o,i;const{context:e}=this.beans;(((o=this.cellEditorPopupWrapper)==null?void 0:o.getGui().contains(Q(this.beans)))||this.cellCtrl.hasBrowserFocus())&&this.eCell.focus({preventScroll:!0}),(i=this.hideEditorPopup)==null||i.call(this),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),ke(this.cellEditorGui),this.cellCtrl.disableEditorTooltipFeature(),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){var o;if(((o=this.cellRenderer)==null?void 0:o.refresh)==null||this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return t===!0||t===void 0}createCellRendererInstance(e){var n;const t=this.rendererVersion,o=r=>a=>{if(this.rendererVersion!==t||!this.isAlive())return;const d=r.newAgStackInstance(),c=this.afterCellRendererCreated.bind(this,t,r.componentClass);d==null||d.then(c)},{animationFrameSvc:i}=this.beans;let s;if(i!=null&&i.active&&this.firstRender?s=(r,a=!1)=>{i.createTask(o(r),this.rowNode.rowIndex,"p2",r.componentFromFramework,a)}:s=r=>o(r)(),(n=e.params)!=null&&n.deferRender&&!this.cellCtrl.rowNode.group){const{loadingComp:r,onReady:a}=this.cellCtrl.getDeferLoadingCellRenderer();r&&(s(r),a.then(()=>s(e,!0)))}else s(e)}afterCellRendererCreated(e,t,o){if(!this.isAlive()||e!==this.rendererVersion){this.beans.context.destroyBean(o);return}this.cellRenderer=o,this.cellRendererClass=t;const s=o.getGui();if(this.cellRendererGui=s,s!=null){const n=this.getParentOfValue();pe(n),n.appendChild(s)}}afterCellEditorCreated(e,t,o,i,s){var d;const n=e!==this.editorVersion,{context:r}=this.beans;if(n){r.destroyBean(t);return}if(t.isCancelBeforeStart&&t.isCancelBeforeStart()){r.destroyBean(t),this.cellCtrl.stopEditing(!0);return}if(!t.getGui){M(97,{colId:this.column.getId()}),r.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();const l=i||t.isPopup!==void 0&&t.isPopup();l?this.addPopupCellEditor(o,s):this.addInCellEditor(),this.refreshEditStyles(!0,l),(d=t.afterGuiAttached)==null||d.call(t),this.cellCtrl.enableEditorTooltipFeature(t),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){const{cellCssManager:o}=this;o.toggleCss("ag-cell-inline-editing",e&&!t),o.toggleCss("ag-cell-popup-editing",e&&!!t),o.toggleCss("ag-cell-not-inline-editing",!e||!!t)}addInCellEditor(){const{eCell:e}=this;e.contains(Q(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),pe(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){var v;const{gos:o,context:i,popupSvc:s,editSvc:n}=this.beans;o.get("editType")==="fullRow"&&M(98);const r=this.cellEditorPopupWrapper=i.createBean(n.createPopupEditorWrapper(e)),{cellEditor:a,cellEditorGui:l,eCell:d,rowNode:c,column:u,cellCtrl:h}=this,g=r.getGui();l&&g.appendChild(l);const p=o.get("stopEditingWhenCellsLoseFocus"),f=t??((v=a.getPopupPosition)==null?void 0:v.call(a))??"over",C=o.get("enableRtl"),m={ePopup:g,column:u,rowNode:c,type:"popupCellEditor",eventSource:d,position:f,alignSide:C?"right":"left",keepWithinBounds:!0},w=s.positionPopupByComponent.bind(s,m),S=s.addPopup({modal:p,eChild:g,closeOnEsc:!0,closedCallback:()=>{h.onPopupEditorClosed()},anchorToElement:d,positionCallback:w,ariaOwns:d});S&&(this.hideEditorPopup=S.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}destroy(){this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},Hp=class extends Y{constructor(e,t,o){super(),this.cellComps=new Map,this.beans=t,this.rowCtrl=e;const i=ee({tag:"div",role:"row",attrs:{"comp-id":`${this.getCompId()}`}});this.setInitialStyle(i,o),this.setTemplateFromElement(i);const s=i.style;this.domOrder=this.rowCtrl.getDomOrder();const n={setDomOrder:r=>this.domOrder=r,setCellCtrls:r=>this.setCellCtrls(r),showFullWidth:r=>this.showFullWidth(r),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,toggleCss:(r,a)=>this.toggleCss(r,a),setUserStyles:r=>qt(i,r),setTop:r=>s.top=r,setTransform:r=>s.transform=r,setRowIndex:r=>i.setAttribute("row-index",r),setRowId:r=>i.setAttribute("row-id",r),setRowBusinessKey:r=>i.setAttribute("row-business-key",r),refreshFullWidth:r=>{var a,l;return((l=(a=this.fullWidthCellRenderer)==null?void 0:a.refresh)==null?void 0:l.call(a,r()))??!1}};e.setComp(n,this.getGui(),o,void 0),this.addDestroyFunc(()=>{e.unsetComp(o)})}setInitialStyle(e,t){const o=this.rowCtrl.getInitialTransform(t);if(o)e.style.setProperty("transform",o);else{const i=this.rowCtrl.getInitialRowTop(t);i&&e.style.setProperty("top",i)}}showFullWidth(e){const t=i=>{if(this.isAlive()){const s=i.getGui();this.getGui().appendChild(s),this.rowCtrl.setupDetailRowAutoHeight(s),this.setFullWidthRowComp(i)}else this.beans.context.destroyBean(i)};e.newAgStackInstance().then(t)}setCellCtrls(e){const t=new Map(this.cellComps);for(const o of e){const i=o.instanceId;this.cellComps.has(i)?t.delete(i):this.newCellComp(o)}this.destroyCells(t),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;const t=[];for(const o of e){const i=this.cellComps.get(o.instanceId);i&&t.push(i.getGui())}_n(this.getGui(),t)}newCellComp(e){var i;const t=((i=this.beans.editSvc)==null?void 0:i.isEditing(e,{withOpenEditor:!0}))??!1,o=new Gp(this.beans,e,this.rowCtrl.printLayout,this.getGui(),t);this.cellComps.set(e.instanceId,o),this.getGui().appendChild(o.getGui())}destroy(){super.destroy(),this.destroyCells(this.cellComps)}setFullWidthRowComp(e){this.fullWidthCellRenderer=e,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer)})}destroyCells(e){for(const t of e.values()){if(!t)return;const o=t.cellCtrl.instanceId;if(this.cellComps.get(o)!==t)return;t.detach(),t.destroy(),this.cellComps.delete(o)}}};function Op(e,t,o){const i=!!o.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls,s={tag:"div",ref:"eContainer",cls:Ci(e),role:"rowgroup"};if(t.type==="center"||i){const n={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${rg(e)}`,role:"rowgroup"};return{tag:"div",ref:"eViewport",cls:`ag-viewport ${aa(e)}`,role:"presentation",children:[s,i?n:null]}}return s}var Bp=class extends Y{constructor(e){super(),this.eViewport=I,this.eContainer=I,this.eSpannedContainer=I,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=e==null?void 0:e.name,this.options=lo(this.name)}postConstruct(){this.setTemplate(Op(this.name,this.options,this.beans));const e={setHorizontalScroll:o=>this.eViewport.scrollLeft=o,setViewportHeight:o=>this.eViewport.style.height=o,setRowCtrls:({rowCtrls:o})=>this.setRowCtrls(o),setSpannedRowCtrls:o=>this.setRowCtrls(o,!0),setDomOrder:o=>{this.domOrder=o},setContainerWidth:o=>{this.eContainer.style.width=o,this.eSpannedContainer&&(this.eSpannedContainer.style.width=o)},setOffsetTop:o=>{const i=`translateY(${o})`;this.eContainer.style.transform=i,this.eSpannedContainer&&(this.eSpannedContainer.style.transform=i)}};this.createManagedBean(new Cg(this.name)).setComp(e,this.eContainer,this.eSpannedContainer,this.eViewport)}destroy(){this.setRowCtrls([]),this.setRowCtrls([],!0),super.destroy(),this.lastPlacedElement=null}setRowCtrls(e,t){const{beans:o,options:i}=this,s=t?this.eSpannedContainer:this.eContainer,n=t?{...this.rowCompsWithSpan}:{...this.rowCompsNoSpan},r={};t?this.rowCompsWithSpan=r:this.rowCompsNoSpan=r,this.lastPlacedElement=null;const a=[];for(const l of e){const d=l.instanceId,c=n[d];let u;if(c)u=c,delete n[d];else{if(!l.rowNode.displayed)continue;u=new Hp(l,o,i.type)}r[d]=u,a.push([u,!c])}this.removeOldRows(Object.values(n),s),this.addRowNodes(a,s)}addRowNodes(e,t){const{domOrder:o}=this;for(const[i,s]of e){const n=i.getGui();o?this.ensureDomOrder(n,t):s&&t.appendChild(n)}}removeOldRows(e,t){for(const o of e)t.removeChild(o.getGui()),o.destroy()}ensureDomOrder(e,t){Nn(t,e,this.lastPlacedElement),this.lastPlacedElement=e}},Vp={selector:"AG-ROW-CONTAINER",component:Bp};function go(e,t){return t.map(o=>{const i=`e${o[0].toUpperCase()+o.substring(1)}RowContainer`;return e[i]={name:o},{tag:"ag-row-container",ref:i,attrs:{name:o}}})}function Np(e){const t={},o={tag:"div",ref:"eGridRoot",cls:"ag-root ag-unselectable",children:[{tag:"ag-header-root"},{tag:"div",ref:"eTop",cls:"ag-floating-top",role:"presentation",children:go(t,["topLeft","topCenter","topRight","topFullWidth"])},{tag:"div",ref:"eBody",cls:"ag-body",role:"presentation",children:[{tag:"div",ref:"eBodyViewport",cls:"ag-body-viewport",role:"presentation",children:go(t,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:go(t,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:go(t,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:go(t,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},e?{tag:"ag-overlay-wrapper"}:null]};return{paramsMap:t,elementParams:o}}var _p=class extends Y{constructor(){super(...arguments),this.eGridRoot=I,this.eBodyViewport=I,this.eStickyTop=I,this.eStickyBottom=I,this.eTop=I,this.eBottom=I,this.eBody=I}postConstruct(){const{overlays:e,rangeSvc:t}=this.beans,o=e==null?void 0:e.getOverlayWrapperSelector(),{paramsMap:i,elementParams:s}=Np(!!o);this.setTemplate(s,[...o?[o]:[],yg,xg,Lp,Vp],i);const n=(a,l)=>{const d=`${a}px`;l.style.minHeight=d,l.style.height=d},r={setRowAnimationCssOnBodyViewport:(a,l)=>this.setRowAnimationCssOnBodyViewport(a,l),setColumnCount:a=>qd(this.getGui(),a),setRowCount:a=>Kd(this.getGui(),a),setTopHeight:a=>n(a,this.eTop),setBottomHeight:a=>n(a,this.eBottom),setTopInvisible:a=>this.eTop.classList.toggle("ag-invisible",a),setBottomInvisible:a=>this.eBottom.classList.toggle("ag-invisible",a),setStickyTopHeight:a=>this.eStickyTop.style.height=a,setStickyTopTop:a=>this.eStickyTop.style.top=a,setStickyTopWidth:a=>this.eStickyTop.style.width=a,setStickyBottomHeight:a=>{this.eStickyBottom.style.height=a,this.eStickyBottom.classList.toggle("ag-invisible",a==="0px")},setStickyBottomBottom:a=>this.eStickyBottom.style.bottom=a,setStickyBottomWidth:a=>this.eStickyBottom.style.width=a,setColumnMovingCss:(a,l)=>this.toggleCss(a,l),updateLayoutClasses:(a,l)=>{const d=[this.eBodyViewport.classList,this.eBody.classList];for(const c of d)c.toggle(ye.AUTO_HEIGHT,l.autoHeight),c.toggle(ye.NORMAL,l.normal),c.toggle(ye.PRINT,l.print);this.toggleCss(ye.AUTO_HEIGHT,l.autoHeight),this.toggleCss(ye.NORMAL,l.normal),this.toggleCss(ye.PRINT,l.print)},setAlwaysVerticalScrollClass:(a,l)=>this.eBodyViewport.classList.toggle(ca,l),registerBodyViewportResizeListener:a=>{const l=Je(this.beans,this.eBodyViewport,a);this.addDestroyFunc(()=>l())},setPinnedTopBottomOverflowY:a=>this.eTop.style.overflowY=this.eBottom.style.overflowY=a,setCellSelectableCss:(a,l)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(d=>d.classList.toggle(a,l))},setBodyViewportWidth:a=>this.eBodyViewport.style.width=a,setGridRootRole:a=>Ne(this.eGridRoot,a)};this.ctrl=this.createManagedBean(new vg),this.ctrl.setComp(r,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(t&&ot(this.gos)||Jt(this.gos))&&Ud(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){const o=this.eBodyViewport.classList;o.toggle("ag-row-animation",t),o.toggle("ag-row-no-animation",!t)}},Wp={selector:"AG-GRID-BODY",component:_p},zp=class extends x{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,o){this.view=e,this.eGridHostDiv=t,this.eGui=o,this.eGui.setAttribute("grid-id",this.beans.context.getGridId());const{dragAndDrop:i,ctrlsSvc:s}=this.beans;i==null||i.registerGridDropTarget(()=>this.eGui,this),Xr(this.gos,t),this.createManagedBean(new ys(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const n=Je(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),s.register("gridCtrl",this)}isDetailGrid(){var t;const e=Sh(this.getGui());return((t=e==null?void 0:e.getAttribute("row-id"))==null?void 0:t.startsWith("detail"))||!1}getOptionalSelectors(){var t,o,i,s,n;const e=this.beans;return{paginationSelector:(t=e.pagination)==null?void 0:t.getPaginationSelector(),gridHeaderDropZonesSelector:(o=e.registry)==null?void 0:o.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:(i=e.sideBar)==null?void 0:i.getSelector(),statusBarSelector:(s=e.registry)==null?void 0:s.getSelector("AG-STATUS-BAR"),watermarkSelector:(n=e.licenseManager)==null?void 0:n.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){const{view:t}=this;if(e===!1)t.setCursor(null);else{const o=e===1?"ew-resize":"ns-resize";t.setCursor(o)}}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:o,nextIndex:i}=this.getNextFocusableIndex(t,e);if(i<0||i>=t.length)return!1;if(i===0){if(o>0){const{visibleCols:s,focusSvc:n}=this.beans,r=s.allCols,a=U(r);if(n.focusGridView({column:a,backwards:!0}))return!0}return!1}return this.focusContainer(t[i],e)}focusInnerElement(e){const t=this.gos.getCallback("focusGridInnerElement");if(t&&t({fromBottom:!!e}))return!0;const o=this.getFocusableContainers(),{focusSvc:i,visibleCols:s}=this.beans,n=s.allCols;if(e){if(o.length>1)return this.focusContainer(U(o),e);const r=U(n);if(i.focusGridView({column:r,backwards:e}))return!0}if(this.gos.get("headerHeight")===0||dt(this.beans)){if(i.focusGridView({column:n[0],backwards:e}))return!0;for(let r=1;r<o.length;r++)if(ii(o[r].getGui(),e))return!0;return!1}return i.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){var n;const t=this.view.getFocusableContainers(),{nextIndex:o,indexWithFocus:i}=this.getNextFocusableIndex(t,e);if(i===-1||o<0||o>=t.length)return;const s=t[o];(n=s.setAllowFocus)==null||n.call(s,!0),setTimeout(()=>{var r;(r=s.setAllowFocus)==null||r.call(s,!1)})}isFocusable(){var t,o;const e=this.beans;return!ni(e)||!dt(e)||!!((o=(t=e.sideBar)==null?void 0:t.comp)!=null&&o.isDisplayed())}getNextFocusableIndex(e,t){const o=Q(this.beans),i=e.findIndex(n=>n.getGui().contains(o)),s=i+(t?-1:1);return{indexWithFocus:i,nextIndex:s}}focusContainer(e,t){var i,s;(i=e.setAllowFocus)==null||i.call(e,!0);const o=ii(e.getGui(),t,!1,!0);return(s=e.setAllowFocus)==null||s.call(e,!1),o}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},$p=class extends Ep{constructor(e){super(),this.gridBody=I,this.sideBar=I,this.pagination=I,this.rootWrapperBody=I,this.eGridDiv=e}postConstruct(){const e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:n=>this.addCss(n),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:n=>{this.getGui().style.userSelect=n??"",this.getGui().style.webkitUserSelect=n??""},setCursor:n=>{this.getGui().style.cursor=n??""}},t=this.createManagedBean(new zp),o=t.getOptionalSelectors(),i=this.createTemplate(o),s=[Wp,...Object.values(o).filter(n=>!!n)];this.setTemplate(i,s),t.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>t.focusInnerElement(n),forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:()=>!t.isFocusable()})}insertGridIntoDom(){const e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{this.eGridDiv.removeChild(e),Yt(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){const o=this.rootWrapperBody.classList,{AUTO_HEIGHT:i,NORMAL:s,PRINT:n}=ye,{autoHeight:r,normal:a,print:l}=t;o.toggle(i,r),o.toggle(s,a),o.toggle(n,l),this.toggleCss(i,r),this.toggleCss(s,a),this.toggleCss(n,l)}createTemplate(e){const t=e.gridHeaderDropZonesSelector?{tag:"ag-grid-header-drop-zones"}:null,o=e.sideBarSelector?{tag:"ag-side-bar",ref:"sideBar"}:null,i=e.statusBarSelector?{tag:"ag-status-bar"}:null,s=e.watermarkSelector?{tag:"ag-watermark"}:null,n=e.paginationSelector?{tag:"ag-pagination",ref:"pagination"}:null;return{tag:"div",cls:"ag-root-wrapper",role:"presentation",children:[t,{tag:"div",ref:"rootWrapperBody",cls:"ag-root-wrapper-body",role:"presentation",children:[{tag:"ag-grid-body",ref:"gridBody"},o]},i,n,s]}}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){var t;if(!e&&((t=this.pagination)!=null&&t.isDisplayed())){this.pagination.forceFocusOutOfContainer(e);return}super.forceFocusOutOfContainer(e)}getFocusableContainers(){const e=[this.gridBody];return[this.sideBar,this.pagination].forEach(t=>{t&&e.push(t)}),e.filter(t=>Le(t.getGui()))}},V=(e,t)=>{for(const o of Object.keys(t))t[o]=e;return t},Aa={dispatchEvent:"CommunityCore",...V("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...V("GridState",{getState:0,setState:0}),...V("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...V("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...V("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...V("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...V("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...V("ValueCache",{expireValueCache:0}),...V("CellApi",{getCellValue:0}),...V("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...V("Sort",{onSortChanged:0}),...V("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...V("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...V("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...V("HighlightChanges",{flashCells:0}),...V("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...V("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}),...V("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...V("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...V("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...V("ColumnResize",{setColumnWidths:0}),...V("ColumnHover",{isColumnHovered:0}),...V("EditCore",{getCellEditorInstances:0,getEditingCells:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...V("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...V("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...V("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...V("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...V("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...V("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...V("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...V("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,onRowHeightChanged:0}),...V("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...V("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,resetRowHeights:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0}),...V("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...V("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...V("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...V("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...V("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...V("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...V("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...V("ContextMenu",{showContextMenu:0}),...V("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...V("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...V("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...V("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...V("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}),...V("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0}),...V("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...V("StatusBar",{getStatusPanel:0})},Us={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},Up=(e,t)=>e.eventSvc.dispatchEvent(t),Ma=class{};Reflect.defineProperty(Ma,"name",{value:"GridApi"});var Kp=class extends x{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new Ma,this.fns={...Us,dispatchEvent:Up},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(Aa))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){var s;const{fns:o,beans:i}=this;o!==Us&&(o[e]=((s=i==null?void 0:i.validation)==null?void 0:s.validateApiFunction(e,t))??t)}makeApi(e){return{[e]:(...t)=>{const{beans:o,fns:{[e]:i}}=this;return i?i(o,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:o,preDestroyLink:i}=this;if(!t)M(26,{fnName:e,preDestroyLink:i});else{const s=Aa[e];o.assertModuleRegistered(s,`api.${e}`)&&M(27,{fnName:e,module:s})}}destroy(){super.destroy(),this.fns=Us,this.beans=null}};function jp(e){return e.context.getGridId()}function qp(e){e.gridDestroySvc.destroy()}function Yp(e){return e.gridDestroySvc.destroyCalled}function Zp(e,t){return e.gos.get(t)}function Qp(e,t,o){ka(e,{[t]:o})}function ka(e,t){e.gos.updateGridOptions({options:t})}function Xp(e,t){const o=t.replace(/Module$/,"");return e.gos.isModuleRegistered(o)}var Jp={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},ef=class extends Y{constructor(e,t,o){super(Jp),this.rowNode=e,this.column=t,this.eCell=o}postConstruct(){this.getGui().appendChild(Mt("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:o,eCell:i,gos:s}=this,n=o.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(i,0,0),n){const a=_(s,{rowNode:t,dragEvent:e});n(a)}else try{const a=JSON.stringify(t.data);r.setData("application/json",a),r.setData("text/plain",a)}catch{}}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}},tf=class extends x{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:o}=this.beans;return o.addDragSource(t),()=>o.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const o=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(o)}setResizeIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(1),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}},wi=class{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}depthFirstSearchChangedPath(e,t){const{rowNode:o,children:i}=e;if(i)for(let s=0;s<i.length;++s)this.depthFirstSearchChangedPath(i[s],t);t(o)}depthFirstSearchEverything(e,t,o){const i=e.childrenAfterGroup;if(i)for(let s=0,n=i.length;s<n;++s){const r=i[s];r.childrenAfterGroup?this.depthFirstSearchEverything(r,t,o):o&&t(r)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,o=!1){this.active&&!o?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,o=0;for(;!this.mapToItems[t.id];){const i={rowNode:t,children:null};this.mapToItems[t.id]=i,o++,t=t.parent}return o}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let o=e;for(;o;)this.nodeIdsToColumns[o.id]||(this.nodeIdsToColumns[o.id]={}),t.forEach(i=>this.nodeIdsToColumns[o.id][i.getId()]=!0),o=o.parent}linkPathItems(e,t){let o=e;for(let i=0;i<t;i++){const s=this.mapToItems[o.id],n=this.mapToItems[o.parent.id];n.children||(n.children=[]),n.children.push(s),o=o.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;const o=this.createPathItems(e);this.linkPathItems(e,o),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const o=this.nodeIdsToColumns[e.id];return t.filter(s=>o[s.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const o=this.nodeIdsToColumns[e.id];return t.filter(s=>!o[s.getId()])}},La={moduleName:"Drag",version:L,beans:[Oh]},of={moduleName:"DragAndDrop",version:L,dynamicBeans:{dndSourceComp:ef},icons:{rowDrag:"grip"}},sf={moduleName:"SharedDragAndDrop",version:L,beans:[Hh],dependsOn:[La],userComponents:{agDragAndDropImage:qg},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},nf={moduleName:"HorizontalResize",version:L,beans:[tf],dependsOn:[La]},rf=":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}",af=class extends x{constructor(){super(...arguments),this.beanName="colAnimation",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){if(this.active)return;const{gos:e}=this;e.get("suppressColumnMoveAnimation")||e.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush(()=>this.activeNext=!1,()=>this.active=!1)}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)})}flush(e,t){const{executeNextFuncs:o,executeLaterFuncs:i}=this;if(o.length===0&&i.length===0){e(),t();return}const s=n=>{for(;n.length;){const r=n.pop();r&&r()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),s(o)},0),window.setTimeout(()=>{t(),s(i)},200)})}};function lf(e,t,o){var i;(i=e.colMoves)==null||i.moveColumnByIndex(t,o,"api")}function df(e,t,o){var i;(i=e.colMoves)==null||i.moveColumns(t,o,"api")}var cf=class extends x{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;t&&t.forEach(o=>{o.isPrimary()&&(o.isAnyFunctionActive()||(o.isAllowValue()?this.columnsToAggregate.push(o):o.isAllowRowGroup()?this.columnsToGroup.push(o):o.isAllowPivot()&&this.columnsToPivot.push(o)))})}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){const{valueColsSvc:t,rowGroupColsSvc:o,pivotColsSvc:i}=this.beans;this.columnsToAggregate.length>0&&(t==null||t.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop")),this.columnsToGroup.length>0&&(o==null||o.addColumns(this.columnsToGroup,"toolPanelDragAndDrop")),this.columnsToPivot.length>0&&(i==null||i.addColumns(this.columnsToPivot,"toolPanelDragAndDrop"))}onDragCancel(){this.clearColumnsList()}};function uf(e,t){!t||t.length<=1||t.filter(i=>e.indexOf(i)<0).length>0||t.sort((i,s)=>{const n=e.indexOf(i),r=e.indexOf(s);return n-r})}function hf(e){const t=[...e];return e.forEach(o=>{var n;let i=null,s=o.getParent();for(;s!=null&&s.getDisplayedLeafColumns().length===1;)i=s,s=s.getParent();i!=null&&(!!((n=i.getColGroupDef())!=null&&n.marryChildren)?i.getProvidedColumnGroup().getLeafColumns():i.getLeafColumns()).forEach(l=>{t.includes(l)||t.push(l)})}),t}function gf(e,t,o,i){const s=i.allCols;let n=null,r=null;for(let a=0;a<e.length;a++){const l=e[a],d=o.getProposedColumnOrder(t,l);if(!o.doesOrderPassRules(d))continue;const c=d.filter(h=>s.includes(h));if(r===null)r=c;else if(!to(c,r))break;const u=ff(d);(n===null||u<n.fragCount)&&(n={move:l,fragCount:u})}return n}function Ga(e){const{isFromHeader:t,fromLeft:o,xPosition:i,fromEnter:s,fakeEvent:n,pinned:r,gos:a,colModel:l,colMoves:d,visibleCols:c}=e;let{allMovingColumns:u}=e;t&&(u=hf(u));const h=u.slice();uf(l.getCols(),h);const g=mf({movingCols:h,draggingRight:o,xPosition:i,pinned:r,gos:a,colModel:l,visibleCols:c}),p=pf(h,l);if(g.length===0)return;const f=g[0];if(p!==null&&(t||!s)&&!n&&(!o&&f>=p||o&&f<=p))return;const m=gf(g,h,d,c);if(!m)return;const w=m.move;if(!(w>l.getCols().length-h.length))return{columns:h,toIndex:w}}function Ha(e){const{columns:t,toIndex:o}=Ga(e)||{},{finished:i,colMoves:s}=e;return!t||o==null?null:(s.moveColumns(t,o,"uiColumnMoved",i),i?null:{columns:t,toIndex:o})}function pf(e,t){const o=t.getCols(),i=e.map(l=>o.indexOf(l)).sort((l,d)=>l-d),s=i[0];return U(i)-s!==i.length-1?null:s}function ff(e){function t(i){const s=[];let n=i.getOriginalParent();for(;n!=null;)s.push(n),n=n.getOriginalParent();return s}let o=0;for(let i=0;i<e.length-1;i++){let s=t(e[i]),n=t(e[i+1]);[s,n]=s.length>n.length?[s,n]:[n,s],s.forEach(r=>{n.indexOf(r)===-1&&o++})}return o}function Cf(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function mf(e){const{movingCols:t,draggingRight:o,xPosition:i,pinned:s,gos:n,colModel:r,visibleCols:a}=e;if(n.get("suppressMovableColumns")||t.some(S=>S.getColDef().suppressMovable))return[];const d=Cf(a,s),c=r.getCols(),u=d.filter(S=>t.includes(S)),h=d.filter(S=>!t.includes(S)),g=c.filter(S=>!t.includes(S));let p=0,f=i;if(o){let S=0;u.forEach(v=>S+=v.getActualWidth()),f-=S}if(f>0){for(let S=0;S<h.length;S++){const v=h[S];if(f-=v.getActualWidth(),f<0)break;p++}o&&p++}let C;if(p>0){const S=h[p-1];C=g.indexOf(S)+1}else C=g.indexOf(h[0]),C===-1&&(C=0);const m=[C],w=(S,v)=>S-v;if(o){let S=C+1;const v=c.length-1;for(;S<=v;)m.push(S),S++;m.sort(w)}else{let S=C;const v=c.length-1;let b=c[S];for(;S<=v&&d.indexOf(b)<0;)S++,m.push(S),b=c[S];S=C-1;const D=0;for(;S>=D;)m.push(S),S--;m.sort(w).reverse()}return m}function Ks(e){var d;const{pinned:t,fromKeyboard:o,gos:i,ctrlsSvc:s,useHeaderRow:n,skipScrollPadding:r}=e;let a=(d=s.getHeaderRowContainerCtrl(t))==null?void 0:d.eViewport,{x:l}=e;return a?(o&&(l-=a.getBoundingClientRect().left),i.get("enableRtl")&&(n&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),t==null&&!r&&(l+=s.get("center").getCenterViewportScrollLeft()),l):0}function js(e,t){for(const o of e)o.moving=t,o.dispatchColEvent("movingChanged","uiColumnMoved")}var Oa=7,qs=100,vi=qs/2,wf=5,vf=100,Sf=class extends x{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!A(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,{dragItem:o}=t||{},i=(o==null?void 0:o.columns)??[];for(const s of i){const n=s.getPinned();if(s.getColDef().lockPinned){if(n==e)return"move";continue}const r=o==null?void 0:o.containerType;if(r===e||!e)return"move";if(e&&(!n||r!==e))return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,o=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(o,!0,"uiColumnDragged");else{const s=t.visibleState,n=(o||[]).filter(r=>s[r.getId()]&&!r.isVisible());this.setColumnsVisible(n,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(o,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,o=!1,i=!1){const{gos:s,ctrlsSvc:n}=this.beans,r=s.get("suppressMoveWhenColumnDragging");if(i&&!r){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!i&&q(e.hDirection))return;const a=Ks({x:e.x,pinned:this.pinned,gos:s,ctrlsSvc:n});t||this.checkCenterForScrolling(a),r?this.handleColumnDragWhileSuppressingMovement(e,t,o,a,i):this.handleColumnDragWhileAllowingMovement(e,t,o,a,i)}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,o){if(!(e!=null&&e.length))return;const i=e.filter(s=>!s.getColDef().lockVisible);i.length&&this.beans.colModel.setColsVisible(i,t,o)}finishColumnMoving(){this.clearHighlighted();const e=this.lastMovedInfo;if(!e)return;const{columns:t,toIndex:o}=e;this.beans.colMoves.moveColumns(t,o,"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,o,i,s){const n=this.getAllMovingColumns(e,!0);if(s){const r=this.isAttemptingToPin(n);r&&this.attemptToPinColumns(n,void 0,!0);const{fromLeft:a,xPosition:l}=this.getNormalisedXPositionInfo(n,r)||{};if(a==null||l==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:n,xPosition:l,fromEnter:t,fakeEvent:o,fromLeft:a})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(n,i)}}handleColumnDragWhileAllowingMovement(e,t,o,i,s){const n=this.getAllMovingColumns(e),r=this.normaliseDirection(e.hDirection)==="right",a=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:n,isFromHeader:a,xPosition:i,fromLeft:r,fromEnter:t,fakeEvent:o}),d=Ha({...l,finished:s});d&&(this.lastMovedInfo=d)}getAllMovingColumns(e,t=!1){const o=e.dragSource.getDragItem();let i=null;t?(i=o.columnsInSplit,i||(i=o.columns)):i=o.columns;const s=n=>n.getColDef().lockPinned?n.getPinned()==this.pinned:!0;return i?i.filter(s):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:o,xPosition:i,fromLeft:s,fromEnter:n,fakeEvent:r}=e,{gos:a,colModel:l,colMoves:d,visibleCols:c}=this.beans;return{allMovingColumns:t,isFromHeader:o,fromLeft:s,xPosition:i,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:a,colModel:l,colMoves:d,visibleCols:c}}highlightHoveredColumn(e,t){var c;const{gos:o,colModel:i}=this.beans,s=o.get("enableRtl"),n=i.getCols().filter(u=>u.isVisible()&&u.getPinned()===this.pinned);let r=null,a=null,l=null;for(const u of n){if(a=u.getActualWidth(),r=this.getNormalisedColumnLeft(u,0,s),r!=null){const h=r+a;if(r<=t&&h>=t){l=u;break}}r=null,a=null}if(l)e.indexOf(l)!==-1&&(l=null);else{for(let u=n.length-1;u>=0;u--){const h=n[u],g=n[u].getParent();if(!g){l=h;break}const p=g==null?void 0:g.getDisplayedLeafColumns();if(p.length){l=U(p);break}}if(!l)return;r=this.getNormalisedColumnLeft(l,0,s),a=l.getActualWidth()}if(((c=this.lastHighlightedColumn)==null?void 0:c.column)!==l&&this.clearHighlighted(),l==null||r==null||a==null)return;let d;t-r<a/2!==s?d=0:d=1,Ba(l,d),this.lastHighlightedColumn={column:l,position:d}}getNormalisedXPositionInfo(e,t){const{gos:o,visibleCols:i}=this.beans,s=o.get("enableRtl"),{firstMovingCol:n,column:r,position:a}=this.getColumnMoveAndTargetInfo(e,t,s);if(!n||!r||a==null)return;const l=i.allCols,d=l.indexOf(n),c=l.indexOf(r),u=a===0!==s,h=d<c||d===c&&!u;let g=0;if(u?h&&(g-=1):h||(g+=1),c+g===d)return;const p=l[c+g];if(!p)return;const f=this.getNormalisedColumnLeft(p,20,s);return{fromLeft:h,xPosition:f}}getColumnMoveAndTargetInfo(e,t,o){const i=this.lastHighlightedColumn||{},{firstMovingCol:s,lastMovingCol:n}=bf(e);if(!s||!n||i.column||!t)return{firstMovingCol:s,...i};const a=this.getPinDirection()==="left";return{firstMovingCol:s,position:a?1:0,column:a!==o?s:n}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case"left":return"right";case"right":return"left"}return e}getNormalisedColumnLeft(e,t,o){const{gos:i,ctrlsSvc:s}=this.beans,n=e.getLeft();if(n==null)return null;const r=e.getActualWidth();return Ks({x:o?n+r-t:n+t,pinned:e.getPinned(),useHeaderRow:o,skipScrollPadding:!0,gos:i,ctrlsSvc:s})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,o=this.failedMoveAttempts>Oa;return t&&o||e.some(i=>i.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:o,fromEnter:i,fakeEvent:s,fromLeft:n}=e,r=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:o,fromLeft:n,fromEnter:i,fakeEvent:s}),{columns:a,toIndex:l}=Ga(r)||{};a&&l!=null&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(Ba(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),o=t.getCenterViewportScrollLeft(),i=o+t.getCenterWidth();let s,n;this.gos.get("enableRtl")?(s=e<o+vi,n=e>i-vi):(n=e<o+vi,s=e>i-vi),this.needToMoveRight=s,this.needToMoveLeft=n,n||s?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){var e;this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),vf),(e=this.beans.dragAndDrop.getDragAndDropImageComponent())==null||e.setIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){var e;this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,(e=this.beans.dragAndDrop.getDragAndDropImageComponent())==null||e.setIcon(this.getIconName(),!1))}moveInterval(){var i,s;let e;this.intervalCount++,e=10+this.intervalCount*wf,e>qs&&(e=qs);let t=null;const o=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=o.scrollHorizontally(-e):this.needToMoveRight&&(t=o.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{pinnedCols:n,dragAndDrop:r,gos:a}=this.beans;if(this.failedMoveAttempts<=Oa+1||!n)return;if((i=r.getDragAndDropImageComponent())==null||i.setIcon("pinned",!1),!a.get("suppressMoveWhenColumnDragging")){const l=(s=this.lastDraggingEvent)==null?void 0:s.dragItem.columns;this.attemptToPinColumns(l,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,o=!1){const i=(e||[]).filter(r=>!r.getColDef().lockPinned);if(!i.length)return 0;o&&(t=this.getPinDirection());const{pinnedCols:s,dragAndDrop:n}=this.beans;return s==null||s.setColsPinned(i,t,"uiColumnDragged"),o&&n.nudge(),i.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function Ba(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function bf(e){const t=e.length;let o,i;for(let s=0;s<t;s++){if(!o){const n=e[s];n.getLeft()!=null&&(o=n)}if(!i){const n=e[t-1-s];n.getLeft()!=null&&(i=n)}if(o&&i)break}return{firstMovingCol:o,lastMovingCol:i}}var yf=class extends x{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans,o=this.pinned;e.whenReady(this,i=>{let s;const n=i.gridBodyCtrl.eBodyViewport;switch(o){case"left":s=[[n,i.left.eContainer],[i.bottomLeft.eContainer],[i.topLeft.eContainer]];break;case"right":s=[[n,i.right.eContainer],[i.bottomRight.eContainer],[i.topRight.eContainer]];break;default:s=[[n,i.center.eViewport],[i.bottomCenter.eViewport],[i.topCenter.eViewport]];break}this.eSecondaryContainers=s}),this.moveColumnFeature=this.createManagedBean(new Sf(o)),this.bodyDropPivotTarget=this.createManagedBean(new cf(o)),t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&e.dragSource.type===0}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}onDragCancel(){this.currentDropListener.onDragCancel()}},Rf=class extends x{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,o){const i=this.beans.colModel.getCols();if(!i)return;const s=i[e];this.moveColumns([s],t,o)}moveColumns(e,t,o,i=!0){const{colModel:s,colAnimation:n,visibleCols:r,eventSvc:a}=this.beans,l=s.getCols();if(!l)return;if(t>l.length-e.length){M(30,{toIndex:t});return}n==null||n.start();const d=s.getColsForKeys(e);this.doesMovePassRules(d,t)&&(fr(s.getCols(),d,t),r.refresh(o),a.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,toIndex:t,finished:i,source:o})),n==null||n.finish()}doesMovePassRules(e,t){const o=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(o)}doesOrderPassRules(e){const{colModel:t,gos:o}=this.beans;return!(!Er(e,t.getColTree())||!(s=>{const n=d=>d?d==="left"||d===!0?-1:1:0,r=o.get("enableRtl");let a=r?1:-1,l=!0;return s.forEach(d=>{const c=n(d.getColDef().lockPosition);r?c>a&&(l=!1):c<a&&(l=!1),a=c}),l})(e))}getProposedColumnOrder(e,t){const i=this.beans.colModel.getCols().slice();return fr(i,e,t),i}createBodyDropTarget(e,t){return new yf(e,t)}moveHeader(e,t,o,i,s){const{ctrlsSvc:n,gos:r,colModel:a,visibleCols:l,focusSvc:d}=this.beans,c=t.getBoundingClientRect(),u=c.left,h=J(o),g=h?c.width:o.getActualWidth(),p=e==="left"!==r.get("enableRtl"),f=Ks({x:p?u-20:u+g+20,pinned:i,fromKeyboard:!0,gos:r,ctrlsSvc:n}),C=d.focusedHeader;Ha({allMovingColumns:h?o.getLeafColumns():[o],isFromHeader:!0,fromLeft:e==="right",xPosition:f,pinned:i,fromEnter:!1,fakeEvent:!1,gos:r,colModel:a,colMoves:this,visibleCols:l,finished:!0});let m;if(h){const w=o.getDisplayedLeafColumns();m=p?w[0]:U(w)}else m=o;if(n.getScrollFeature().ensureColumnVisible(m,"auto"),(!s.isAlive()||r.get("ensureDomOrder"))&&C){let w;if(h){const S=o.getGroupId(),v=o.getLeafColumns();if(!v.length)return;const b=v[0].getParent();if(!b)return;w=Ef(b,S)}else w=o;w&&d.focusHeaderPosition({headerPosition:{...C,column:w}})}}setDragSourceForHeader(e,t,o){const{gos:i,colModel:s,dragAndDrop:n,visibleCols:r}=this.beans;let a=!i.get("suppressDragLeaveHidesColumns");const l=J(t),d=l?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>Df(t,r.allCols):()=>xf(t),dragItemName:o,onDragStarted:()=>{a=!i.get("suppressDragLeaveHidesColumns"),js(d,!0)},onDragStopped:()=>js(d,!1),onDragCancelled:()=>js(d,!1),onGridEnter:h=>{if(a){const{columns:g=[],visibleState:p}=h??{},f=l?m=>!p||p[m.getColId()]:()=>!0,C=g.filter(m=>!m.getColDef().lockVisible&&f(m));s.setColsVisible(C,!0,"uiColumnMoved")}},onGridExit:h=>{var g;if(a){const p=((g=h==null?void 0:h.columns)==null?void 0:g.filter(f=>!f.getColDef().lockVisible))||[];s.setColsVisible(p,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}};function Ef(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function xf(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function Df(e,t){var a;const o=e.getProvidedColumnGroup().getLeafColumns(),i={};o.forEach(l=>i[l.getId()]=l.isVisible());const s=[];t.forEach(l=>{o.indexOf(l)>=0&&(s.push(l),Se(o,l))}),o.forEach(l=>s.push(l));const n=[],r=e.getLeafColumns();for(const l of s)r.indexOf(l)!==-1&&n.push(l);return{columns:s,columnsInSplit:n,visibleState:i,containerType:(a=n[0])==null?void 0:a.pinned}}var Ff={moduleName:"ColumnMove",version:L,beans:[Rf,af],apiFunctions:{moveColumnByIndex:lf,moveColumns:df},dependsOn:[sf],css:[rf]},Pf=class extends x{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const o=this.getHeaderCellForColumn(e);if(!o)return-1;const i=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||i.push(o),this.getPreferredWidthForElements(i)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){const o=document.createElement("form");o.style.position="fixed";const i=this.centerRowContainerCtrl.eContainer;e.forEach(n=>this.cloneItemIntoDummy(n,o)),i.appendChild(o);const s=o.offsetWidth;return i.removeChild(o),t=t??this.gos.get("autoSizePadding"),s+t}getHeaderCellForColumn(e){let t=null;return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().forEach(o=>{const i=o.getHtmlElementForColumnHeader(e);i!=null&&(t=i)}),t}cloneItemIntoDummy(e,t){const o=e.cloneNode(!0);o.style.width="",o.style.position="static",o.style.left="";const i=document.createElement("div"),s=i.classList;["ag-header-cell","ag-header-group-cell"].some(a=>o.classList.contains(a))?(s.add("ag-header","ag-header-row"),i.style.position="static"):s.add("ag-row");let r=e.parentElement;for(;r;){if(["ag-header-row","ag-row"].some(l=>r.classList.contains(l))){for(let l=0;l<r.classList.length;l++){const d=r.classList[l];d!="ag-row-position-absolute"&&s.add(d)}break}r=r.parentElement}i.appendChild(o),t.appendChild(i)}},Va={moduleName:"AutoWidth",version:L,beans:[Pf]};function Tf(e,t,o=!0,i="api"){var s;(s=e.colResize)==null||s.setColumnWidths(t,!1,o,i)}var If=class extends x{constructor(e,t,o,i){super(),this.comp=e,this.eResize=t,this.pinned=o,this.columnGroup=i}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:o}=this.beans,i=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(i),!t.get("suppressAutoSize")&&o&&this.addDestroyFunc(o.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:o,resizeRatios:i,groupAfterColumns:s,groupAfterStartWidth:n,groupAfterRatios:r}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=o,this.resizeRatios=i,this.resizeTakeFromCols=s,this.resizeTakeFromStartWidth=n,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(e,t,o="uiColumnResized"){const i=this.normaliseDragChange(t),s=this.resizeStartWidth+i;this.resizeColumnsFromLocalValues(s,o,e)}getInitialValues(e){var l;const t=d=>d.reduce((c,u)=>c+u.getActualWidth(),0),o=(d,c)=>d.map(u=>u.getActualWidth()/c),i=this.getColumnsToResize(),s=t(i),n=o(i,s),r={columnsToResize:i,resizeStartWidth:s,resizeRatios:n};let a=null;if(e&&(a=((l=this.beans.colGroupSvc)==null?void 0:l.getGroupAtDirection(this.columnGroup,"After"))??null),a){const d=a.getDisplayedLeafColumns(),c=r.groupAfterColumns=d.filter(h=>h.isResizable()),u=r.groupAfterStartWidth=t(c);r.groupAfterRatios=o(c,u)}else r.groupAfterColumns=void 0,r.groupAfterStartWidth=void 0,r.groupAfterRatios=void 0;return r}resizeLeafColumnsToFit(e){const t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),o=this.getInitialValues();t>o.resizeStartWidth&&this.resizeColumns(o,t,e,!0)}resizeColumnsFromLocalValues(e,t,o=!0){if(!this.resizeCols||!this.resizeRatios)return;const i={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(i,e,t,o)}resizeColumns(e,t,o,i=!0){var u;const{columnsToResize:s,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:d}=e,c=[];if(c.push({columns:s,ratios:r,width:t}),a){const h=t-n;c.push({columns:a,ratios:d,width:l-h})}(u=this.beans.colResize)==null||u.resizeColumnSets({resizeSets:c,finished:i,source:o}),i&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},Af=class extends x{constructor(e,t,o,i,s){super(),this.pinned=e,this.column=t,this.eResize=o,this.comp=i,this.ctrl=s}postConstruct(){const e=[];let t,o;const i=()=>{if(X(this.eResize,t),!t)return;const{horizontalResizeSvc:r,colAutosize:a}=this.beans,l=r.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(l),o&&a&&e.push(a.addColumnAutosize(this.eResize,this.column))},s=()=>{e.forEach(r=>r()),e.length=0},n=()=>{const r=this.column.isResizable(),a=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(r!==t||a!==o)&&(t=r,o=a,s(),i())};n(),this.addDestroyFunc(s),this.ctrl.setRefreshFunction("resize",n)}onResizing(e,t){const{column:o,lastResizeAmount:i,resizeStartWidth:s,beans:n}=this,r=this.normaliseResizeAmount(t),a=s+r,l=[{key:o,newWidth:a}],{pinnedCols:d,ctrlsSvc:c,colResize:u}=n;if(this.column.getPinned()){const h=(d==null?void 0:d.leftWidth)??0,g=(d==null?void 0:d.rightWidth)??0,p=jt(c.getGridBodyCtrl().eBodyViewport)-50;if(h+g+(r-i)>p)return}this.lastResizeAmount=r,u==null||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 o=this.pinned!=="left",i=this.pinned==="right";return this.gos.get("enableRtl")?o&&(t*=-1):i&&(t*=-1),t}},Mf=class extends x{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,o,i){const s=[],{colModel:n,gos:r,visibleCols:a}=this.beans;e.forEach(l=>{const d=n.getColDefCol(l.key)||n.getCol(l.key);if(!d)return;if(s.push({width:l.newWidth,ratios:[1],columns:[d]}),r.get("colResizeDefault")==="shift"&&(t=!t),t){const u=a.getColAfter(d);if(!u)return;const h=d.getActualWidth()-l.newWidth,g=u.getActualWidth()+h;s.push({width:g,ratios:[1],columns:[u]})}}),s.length!==0&&this.resizeColumnSets({resizeSets:s,finished:o,source:i})}resizeColumnSets(e){const{resizeSets:t,finished:o,source:i}=e;if(!(!t||t.every(c=>kf(c)))){if(o){const c=t&&t.length>0?t[0].columns:null;xt(this.eventSvc,c,o,i)}return}const n=[],r=[];t.forEach(c=>{const{width:u,columns:h,ratios:g}=c,p={},f={};h.forEach(w=>r.push(w));let C=!0,m=0;for(;C;){if(m++,m>1e3){j(31);break}C=!1;const w=[];let S=0,v=u;h.forEach((D,T)=>{if(f[D.getId()])v-=p[D.getId()];else{w.push(D);const F=g[T];S+=F}});const b=1/S;w.forEach((D,T)=>{const G=T===w.length-1;let F;G?F=v:(F=Math.round(g[T]*u*b),v-=F);const P=D.getMinWidth(),H=D.getMaxWidth();F<P?(F=P,f[D.getId()]=!0,C=!0):H>0&&F>H&&(F=H,f[D.getId()]=!0,C=!0),p[D.getId()]=F})}h.forEach(w=>{const S=p[w.getId()];w.getActualWidth()!==S&&(w.setActualWidth(S,i),n.push(w))})});const a=n.length>0;let l=[];if(a){const{colFlex:c,visibleCols:u,colViewport:h}=this.beans;l=(c==null?void 0:c.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0}))??[],u.setLeftValues(i),u.updateBodyWidths(),h.checkViewportColumns()}const d=r.concat(l);(a||o)&&xt(this.eventSvc,d,o,i,l)}resizeHeader(e,t,o){if(!e.isResizable())return;const i=e.getActualWidth(),s=e.getMinWidth(),n=e.getMaxWidth(),r=Math.min(Math.max(i+t,s),n);this.setColumnWidths([{key:e,newWidth:r}],o,!0,"uiColumnResized")}createResizeFeature(e,t,o,i,s){return new Af(e,t,o,i,s)}createGroupResizeFeature(e,t,o,i){return new If(e,t,o,i)}};function kf(e){const{columns:t,width:o}=e;let i=0,s=0,n=!0;t.forEach(l=>{const d=l.getMinWidth();i+=d||0;const c=l.getMaxWidth();c>0?s+=c:n=!1});const r=o>=i,a=!n||o<=s;return r&&a}var Lf={moduleName:"ColumnResize",version:L,beans:[Mf],apiFunctions:{setColumnWidths:Tf},dependsOn:[nf,Va]},Gf=class extends x{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})})}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach(e=>e()),this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.toggleCss("ag-hidden",e===0)}},Hf=class extends Ca{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}setComp(e,t,o,i,s){const{column:n,beans:r}=this,{context:a,colNames:l,colHover:d,rangeSvc:c,colResize:u}=r;this.comp=e,s=qo(this,a,s),this.setGui(t,s),this.displayName=l.getDisplayNameForColumnGroup(n,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(s),this.setupExpandable(s),this.setupTooltip(),this.setupAutoHeight({wrapperElement:i,compBean:s}),this.setupUserComp(),this.addHeaderMouseListeners(s),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const h=this.rowCtrl.pinned,g=n.getProvidedColumnGroup().getLeafColumns();d==null||d.createHoverFeature(s,g,t),c==null||c.createRangeHighlightFeature(s,n,e),s.createManagedBean(new pa(n,t,r)),s.createManagedBean(new Gf(e,n)),u?this.resizeFeature=s.createManagedBean(u.createGroupResizeFeature(e,o,h,n)):e.setResizableDisplayed(!1),s.createManagedBean(new li(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(s,g),s.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(s),s.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.getDefinition();return _(t.gos,{colDef:o,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,o=e.get("groupHeaderHeight");o!=null?o===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(o):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const o of t)e.addManagedListeners(o,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,o)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),o=t[0]===e,i=U(t)===e;if(!o&&!i)return;const s=e.getHighlighted(),n=!!this.rowCtrl.getHeaderCellCtrls().find(l=>l.column.isMoving());let r=!1,a=!1;if(n){const l=this.beans.gos.get("enableRtl"),d=s===1,c=s===0;o&&(l?a=d:r=c),i&&(l?r=c:a=d)}this.comp.toggleCss("ag-header-highlight-before",r),this.comp.toggleCss("ag-header-highlight-after",a)}resizeHeader(e,t){const{resizeFeature:o}=this;if(!o)return;const i=o.getInitialValues(t);o.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){var t;(t=this.resizeFeature)==null||t.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:o,enterpriseMenuFactory:i}=this.beans,s=this.column,n=s.getProvidedColumnGroup(),r=_(o,{displayName:this.displayName,columnGroup:s,setExpanded:l=>{e.setColumnGroupOpened(n,l,"gridInitializing")},setTooltip:(l,d)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(l,d)},showColumnMenu:(l,d)=>i==null?void 0:i.showMenuAfterButtonClick(n,l,"columnMenu",d),showColumnMenuAfterMouseClick:(l,d)=>i==null?void 0:i.showMenuAfterMouseEvent(n,l,"columnMenu",d),eGridHeader:this.eGui}),a=Tu(t,r);a&&this.comp.setUserCompDetails(a)}addHeaderMouseListeners(e){const t=s=>this.handleMouseOverChange(s.type==="mouseenter"),o=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column.getProvidedColumnGroup()),i=s=>this.handleContextMenuMouseEvent(s,void 0,this.column.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:o,contextmenu:i})}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){var o;this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const o=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:o,expandableChanged:o})}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){const{column:e}=this,t=e.getColGroupDef(),o=Kr(t,this.gos,null,e);e.isPadding()?(o.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(s=>s.isSpanHeaderHeight())&&o.push("ag-header-span-height")):(o.push("ag-header-group-cell-with-group"),t!=null&&t.wrapHeaderText&&o.push("ag-header-cell-wrap-text")),o.forEach(i=>this.comp.toggleCss(i,!0))}setupMovingCss(e){const{column:t}=this,i=t.getProvidedColumnGroup().getLeafColumns(),s=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());i.forEach(n=>{e.addManagedListeners(n,{movingChanged:s})}),s()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||this.focusThis()}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();if(!(!this.expandable||!t)&&e.key===y.ENTER){const o=this.column,i=!o.isExpanded();this.beans.colGroupSvc.setColumnGroupOpened(o.getProvidedColumnGroup(),i,"uiColumnExpanded")}}setDragSource(e){var t;!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=((t=this.beans.colMoves)==null?void 0:t.setDragSourceForHeader(e,this.column,this.displayName))??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some(e=>e.getColDef().suppressMovable||e.getColDef().lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function Of(e,t,o){var i;(i=e.colGroupSvc)==null||i.setColumnGroupOpened(t,o,"api")}function Bf(e,t,o){var i;return((i=e.colGroupSvc)==null?void 0:i.getColumnGroup(t,o))??null}function Vf(e,t){var o;return((o=e.colGroupSvc)==null?void 0:o.getProvidedColGroup(t))??null}function Nf(e,t,o){return e.colNames.getDisplayNameForColumnGroup(t,o)||""}function _f(e){var t;return((t=e.colGroupSvc)==null?void 0:t.getColumnGroupState())??[]}function Wf(e,t){var o;(o=e.colGroupSvc)==null||o.setColumnGroupState(t,"api")}function zf(e){var t;(t=e.colGroupSvc)==null||t.resetColumnGroupState("api")}function $f(e){return e.visibleCols.treeLeft}function Uf(e){return e.visibleCols.treeCenter}function Kf(e){return e.visibleCols.treeRight}function jf(e){return e.visibleCols.getAllTrees()}function qf(e,t){for(let o=0;o<t.length;o++){const i=e.indexOf(t[o]);i>=0&&(e[i]=e[e.length-1],e.pop())}}var Yf=class extends x{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.headerGroupRowCount=0,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colFlex:o,colModel:i,colGroupSvc:s,colViewport:n,selectionColSvc:r}=this.beans;t||this.buildTrees(i,s),s==null||s.updateOpenClosedVisibility(),this.leftCols=Ys(this.treeLeft),this.centerCols=Ys(this.treeCenter),this.rightCols=Ys(this.treeRight),r==null||r.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(i),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(a=>a.isAutoHeight()),o==null||o.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(i,this.leftCols,this.rightCols,e),n.checkViewportColumns(!1),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}getHeaderRowCount(){if(!this.gos.get("hidePaddedHeaderRows"))return this.beans.colModel.cols.treeDepth;let e=0;for(const t of this.allCols){let o=t.getParent();for(;o;){if(!o.isPadding()){const i=o.getProvidedColumnGroup().getLevel()+1;i>e&&(e=i);break}o=o.getParent()}}return e}updateBodyWidths(){const e=He(this.centerCols),t=He(this.leftCols),o=He(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==o)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=o,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,o,i){let s,n;this.gos.get("enableRtl")?(s=t?t[0]:null,n=o?U(o):null):(s=t?U(t):null,n=o?o[0]:null),e.getCols().forEach(r=>{r.setLastLeftPinned(r===s,i),r.setFirstRightPinned(r===n,i)})}buildTrees(e,t){const o=e.getColsToShow(),i=o.filter(l=>l.getPinned()=="left"),s=o.filter(l=>l.getPinned()=="right"),n=o.filter(l=>l.getPinned()!="left"&&l.getPinned()!="right"),r=new ru,a=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=a({columns:i,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=a({columns:s,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=a({columns:n,idCreator:r,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){const t=e.getCols(),o=[],i=[],s=[];for(const n of t){const r=n.getPinned();r?r===!0||r==="left"?o.push(n):s.push(n):i.push(n)}this.ariaOrderColumns=o.concat(i).concat(s)}getAriaColIndex(e){let t;return J(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(t=>{J(t)&&t.checkLeft()})})}setLeftValuesOfCols(e){const{colModel:t}=this.beans;if(!t.getColDefCols())return;const i=t.getCols().slice(0),s=this.gos.get("enableRtl");[this.leftCols,this.rightCols,this.centerCols].forEach(n=>{if(s){let r=He(n);n.forEach(a=>{r-=a.getActualWidth(),a.setLeft(r,e)})}else{let r=0;n.forEach(a=>{a.setLeft(r,e),r+=a.getActualWidth()})}qf(i,n)}),i.forEach(n=>{n.setLeft(null,e)})}joinCols(){this.gos.get("enableRtl")?this.allCols=this.rightCols.concat(this.centerCols).concat(this.leftCols):this.allCols=this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}isColDisplayed(e){return this.allCols.indexOf(e)>=0}getLeftColsForRow(e){const{leftCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){const{rightCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,o,i){const s=[];let n=null;for(let r=0;r<t.length;r++){const a=t[r],l=t.length-r,d=Math.min(a.getColSpan(e),l),c=[a];if(d>1){const h=d-1;for(let g=1;g<=h;g++)c.push(t[r+g]);r+=h}let u;o?(u=!1,c.forEach(h=>{o(h)&&(u=!0)})):u=!0,u&&(s.length===0&&n&&(i&&i(a))&&s.push(n),s.push(a)),n=a}return s}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){const t=this.allCols,o=t.indexOf(e);return o>0?t[o-1]:null}isPinningLeft(){return this.leftCols.length>0}isPinningRight(){return this.rightCols.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};ut(this.treeCenter,!1,e),ut(this.treeLeft,!1,e),ut(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["leftCols","centerCols","rightCols"];e&&t.reverse();for(let o=0;o<t.length;o++){const i=this[t[o]];if(i.length)return e?U(i):i[0]}return null}getColAfter(e){const t=this.allCols,o=t.indexOf(e);return o<t.length-1?t[o+1]:null}getColsLeftWidth(){return He(this.leftCols)}getDisplayedColumnsRightWidth(){return He(this.rightCols)}isColAtEdge(e,t){const o=this.allCols;if(!o.length)return!1;const i=t==="first";let s;if(J(e)){const n=e.getDisplayedLeafColumns();if(!n.length)return!1;s=i?n[0]:U(n)}else s=e;return(i?o[0]:U(o))===s}};function ut(e,t,o){if(e)for(let i=0;i<e.length;i++){const s=e[i];if(J(s)){const n=t?s.getDisplayedChildren():s.getChildren();ut(n,t,o)}o(s)}}function Ys(e){const t=[];return ut(e,!0,o=>{it(o)&&t.push(o)}),t}var Zf=class extends x{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return Oe(null,t,o=>{se(o)&&e.push({groupId:o.getGroupId(),open:o.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const o=[];Oe(null,t,i=>{if(se(i)){const s=i.getColGroupDef(),n={groupId:i.getGroupId(),open:s?s.openByDefault:void 0};o.push(n)}}),this.setColumnGroupState(o,e)}setColumnGroupState(e,t){const{colModel:o,colAnimation:i,visibleCols:s,eventSvc:n}=this.beans;if(!o.getColTree().length)return;i==null||i.start();const a=[];e.forEach(l=>{const d=l.groupId,c=l.open,u=this.getProvidedColGroup(d);u&&u.isExpanded()!==c&&(u.setExpanded(c),a.push(u))}),s.refresh(t,!0),a.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:a.length===1?a[0]:void 0,columnGroups:a}),i==null||i.finish()}setColumnGroupOpened(e,t,o){let i;se(e)?i=e.getId():i=e||"",this.setColumnGroupState([{groupId:i,open:t}],o)}getProvidedColGroup(e){let t=null;return Oe(null,this.beans.colModel.getColTree(),o=>{se(o)&&o.getId()===e&&(t=o)}),t}getGroupAtDirection(e,t){const o=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),i=e.getDisplayedLeafColumns(),s=t==="After"?U(i):i[0],n=`getCol${t}`;for(;;){const r=this.beans.visibleCols[n](s);if(!r)return null;const a=this.getColGroupAtLevel(r,o);if(a!==e)return a}}getColGroupAtLevel(e,t){let o=e.getParent(),i,s;for(;i=o.getProvidedColumnGroup().getLevel(),s=o.getPaddingLevel(),!(i+s<=t);)o=o.getParent();return o}updateOpenClosedVisibility(){const e=this.beans.visibleCols.getAllTrees();ut(e,!1,t=>{J(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(J(e))return e;const o=this.beans.visibleCols.getAllTrees(),i=typeof t=="number";let s=null;return ut(o,!1,n=>{if(J(n)){const r=n;let a;i?a=e===r.getGroupId()&&t===r.getPartId():a=e===r.getGroupId(),a&&(s=r)}}),s}createColumnGroups(e){const{columns:t,idCreator:o,pinned:i,oldDisplayedGroups:s,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(s),a=[];let l=t;for(;l.length;){const d=l;l=[];let c=0;const u=h=>{const g=c;c=h;const p=d[g],C=(J(p)?p.getProvidedColumnGroup():p).getOriginalParent();if(C==null){for(let w=g;w<h;w++)a.push(d[w]);return}const m=this.createColumnGroup(C,o,r,i,n);for(let w=g;w<h;w++)m.addChild(d[w]);l.push(m)};for(let h=1;h<d.length;h++){const g=d[h],f=(J(g)?g.getProvidedColumnGroup():g).getOriginalParent(),C=d[c],w=(J(C)?C.getProvidedColumnGroup():C).getOriginalParent();f!==w&&u(h)}c<d.length&&u(d.length)}return n||this.setupParentsIntoCols(a,null),a}createProvidedColumnGroup(e,t,o,i,s,n,r){const a=s.getUniqueKey(t.groupId||null,null),l=gr(this.beans,t,a),d=new Wo(l,a,!1,o);this.createBean(d);const c=this.findExistingGroup(t,n);c&&n.splice(c.idx,1);const u=c==null?void 0:c.group;u&&d.setExpanded(u.isExpanded());const h=br(this.beans,l.children,o+1,e,i,s,n,r);return d.setChildren(h),d}balanceColumnTree(e,t,o,i){const s=[];for(let n=0;n<e.length;n++){const r=e[n];if(se(r)){const a=r,l=this.balanceColumnTree(a.getChildren(),t+1,o,i);a.setChildren(l),s.push(a)}else{let a,l;for(let d=t;d<o;d++){const c=i.getUniqueKey(null,null),u=gr(this.beans,null,c),h=new Wo(u,c,!0,d);this.createBean(h),l&&l.setChildren([h]),l=h,a||(a=l)}if(a&&l)if(s.push(a),e.some(c=>se(c))){l.setChildren([r]);continue}else{l.setChildren(e);break}s.push(r)}}return s}findDepth(e){let t=0,o=e;for(;o&&o[0]&&se(o[0]);)t++,o=o[0].getChildren();return t}findMaxDepth(e,t){let o=t;for(let i=0;i<e.length;i++){const s=e[i];if(se(s)){const n=s,r=this.findMaxDepth(n.getChildren(),t+1);o<r&&(o=r)}}return o}balanceTreeForAutoCols(e,t){const o=[];return e.forEach(i=>{let s=i;for(let n=t-1;n>=0;n--){const r=new Wo(null,`FAKE_PATH_${i.getId()}}_${n}`,!0,n);this.createBean(r),r.setChildren([s]),s.originalParent=r,s=r}t===0&&(i.originalParent=null),o.push(s)}),o}findExistingGroup(e,t){if(e.groupId!=null)for(let i=0;i<t.length;i++){const s=t[i];if(s.getColGroupDef()&&s.getId()===e.groupId)return{idx:i,group:s}}}createColumnGroup(e,t,o,i,s){const n=e.getGroupId(),r=t.getInstanceIdForKey(n),a=ea(n,r);let l=o[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),A(l)?l.reset():(l=new no(e,n,r,i),s||this.createBean(l)),l}mapOldGroupsById(e){const t={},o=i=>{i.forEach(s=>{if(J(s)){const n=s;t[s.getUniqueId()]=n,o(n.getChildren())}})};return e&&o(e),t}setupParentsIntoCols(e,t){e.forEach(o=>{if(o.parent!==t&&(this.beans.colViewport.colsWithinViewportHash=""),o.parent=t,J(o)){const i=o;this.setupParentsIntoCols(i.getChildren(),i)}})}},Qf={moduleName:"ColumnGroup",version:L,dynamicBeans:{headerGroupCellCtrl:Hf},beans:[Zf],apiFunctions:{getAllDisplayedColumnGroups:jf,getCenterDisplayedColumnGroups:Uf,getColumnGroup:Bf,getColumnGroupState:_f,getDisplayNameForColumnGroup:Nf,getLeftDisplayedColumnGroups:$f,getProvidedColumnGroup:Vf,getRightDisplayedColumnGroups:Kf,resetColumnGroupState:zf,setColumnGroupOpened:Of,setColumnGroupState:Wf}},Xf={tag:"div",cls:"ag-skeleton-container"},Jf=class extends Y{constructor(){super(Xf)}init(e){const t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>Kt(e.eParentOfValue)),Kt(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");Ut(this.getGui(),t)}setupLoading(e){const t=ee({tag:"div",cls:"ag-skeleton-effect"}),o=e.node.rowIndex;if(o!=null){const n=75+25*(o%2===0?Math.sin(o):Math.cos(o));t.style.width=`${n}%`}this.getGui().appendChild(t);const i=this.getLocaleTextFunc(),s=e.deferRender?i("ariaDeferSkeletonCellLoading","Cell is loading"):i("ariaSkeletonCellLoading","Row data is loading");Ut(this.getGui(),s)}refresh(e){return!1}},eC={moduleName:"CheckboxCellRenderer",version:L,userComponents:{agCheckboxCellRenderer:ep}},tC={moduleName:"SkeletonCellRenderer",version:L,userComponents:{agSkeletonCellRenderer:Jf}};function oC(e,t){const o=e.colModel.getColDefCol(t);return o?o.getColDef():null}function iC(e){return e.colModel.getColumnDefs()}function sC(e,t,o){return e.colNames.getDisplayNameForColumn(t,o)||""}function nC(e,t){return e.colModel.getColDefCol(t)}function rC(e){return e.colModel.getColDefCols()}function aC(e,t){return be(e,t,"api")}function lC(e){return jo(e)}function dC(e){tu(e,"api")}function cC(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function uC(e){return e.visibleCols.isPinningLeft()}function hC(e){return e.visibleCols.isPinningRight()}function gC(e,t){return e.visibleCols.getColAfter(t)}function pC(e,t){return e.visibleCols.getColBefore(t)}function fC(e,t,o){e.colModel.setColsVisible(t,o,"api")}function CC(e,t,o){var i;(i=e.pinnedCols)==null||i.setColsPinned(t,o,"api")}function mC(e){return e.colModel.getCols()}function wC(e){return e.visibleCols.leftCols}function vC(e){return e.visibleCols.centerCols}function SC(e){return e.visibleCols.rightCols}function bC(e){return e.visibleCols.allCols}function yC(e){return e.colViewport.getViewportColumns()}function Zs(e,t){if(!e)return;const o=e,i={};return Object.keys(o).forEach(s=>{if(t&&t.indexOf(s)>=0||Rn.has(s))return;const n=o[s];typeof n=="object"&&n!==null&&n.constructor===Object?i[s]=Zs(n):i[s]=n}),i}var RC=class extends x{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,o,i){var a,l;const s=e.slice();t?s.sort((d,c)=>o.indexOf(d)-o.indexOf(c)):o&&s.sort((d,c)=>i.indexOf(d)-i.indexOf(c));const n=(a=this.rowGroupColsSvc)==null?void 0:a.columns,r=(l=this.pivotColsSvc)==null?void 0:l.columns;return this.buildColumnDefs(s,n,r)}buildColumnDefs(e,t=[],o=[]){const i=[],s={};return e.forEach(n=>{const r=this.createDefFromColumn(n,t,o);let a=!0,l=r,d=n.getOriginalParent(),c=null;for(;d;){let u=null;if(d.isPadding()){d=d.getOriginalParent();continue}const h=s[d.getGroupId()];if(h){h.children.push(l),a=!1;break}if(u=this.createDefFromGroup(d),u&&(u.children=[l],s[u.groupId]=u,l=u,d=d.getOriginalParent()),d!=null&&c===d){a=!1;break}c=d}a&&i.push(l)}),i}createDefFromGroup(e){const t=Zs(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,o){const i=Zs(e.getColDef());return i.colId=e.getColId(),i.width=e.getActualWidth(),i.rowGroup=e.isRowGroupActive(),i.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,i.pivot=e.isPivotActive(),i.pivotIndex=e.isPivotActive()?o.indexOf(e):null,i.aggFunc=e.isValueActive()?e.getAggFunc():null,i.hide=e.isVisible()?void 0:!0,i.pinned=e.isPinned()?e.getPinned():null,i.sort=e.getSort()?e.getSort():null,i.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,i}},EC=class extends x{constructor(){super(...arguments),this.beanName="colFlex"}refreshFlexedColumns(e={}){const t=e.source??"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);const o=this.flexViewportWidth;if(!o)return[];const{visibleCols:i}=this.beans,s=i.centerCols;let n=-1;if(e.resizingCols){const p=new Set(e.resizingCols);for(let f=s.length-1;f>=0;f--)if(p.has(s[f])){n=f;break}}let r=!1;const a=s.map((p,f)=>{const C=p.getFlex(),m=C!=null&&C>0&&f>n;return r||(r=m),{col:p,isFlex:m,flex:Math.max(0,C??0),initialSize:p.getActualWidth(),min:p.getMinWidth(),max:p.getMaxWidth(),targetSize:0}});if(!r)return[];let l=a.length,d=a.reduce((p,f)=>p+f.flex,0),c=o;const u=(p,f)=>{p.frozenSize=f,p.col.setActualWidth(f,t),c-=f,d-=p.flex,l-=1},h=p=>p.frozenSize!=null;for(const p of a)p.isFlex||u(p,p.initialSize);for(;l>0;){const p=Math.round(d<1?c*d:c);let f,C=0,m=0;for(const v of a){if(h(v))continue;f=v,m+=p*(v.flex/d);const b=m-C,D=Math.round(b);v.targetSize=D,C+=D}f&&(f.targetSize+=p-C);let w=0;for(const v of a){if(h(v))continue;const b=v.targetSize,D=Math.min(Math.max(b,v.min),v.max);w+=D-b,v.violationType=D===b?void 0:D<b?"max":"min",v.targetSize=D}const S=w===0?"all":w>0?"min":"max";for(const v of a)h(v)||(S==="all"||v.violationType===S)&&u(v,v.targetSize)}e.skipSetLeft||i.setLeftValues(t),e.updateBodyWidths&&i.updateBodyWidths();const g=a.filter(p=>p.isFlex&&!p.violationType).map(p=>p.col);if(e.fireResizedEvent){const p=a.filter(C=>C.initialSize!==C.frozenSize).map(C=>C.col),f=a.filter(C=>C.flex).map(C=>C.col);xt(this.eventSvc,p,!0,t,f)}return g}initCol(e){const{flex:t,initialFlex:o}=e.colDef;t!==void 0?e.flex=t:o!==void 0&&(e.flex=o)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}},xC=["dateTimeString","dateString","text","number","boolean","date"],DC=class extends x{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number(){return{cellEditor:"agNumberCellEditor"}},boolean(){return{cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:e=>!!e.colDef.editable&&e.event.key===y.SPACE}},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:o}){return{cellEditorParams:{useFormatter:!0},comparator:(i,s)=>{const n=t.getColDefCol(o),r=n==null?void 0:n.getColDef();if(!n||!r)return 0;const a=i==null?"":e({column:n,node:null,value:i}),l=s==null?"":e({column:n,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={},o={},i=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:Wa(u,this.gos)};t[c]=h,o[c]=i(h)}const s=this.gos.get("dataTypeDefinitions")??{},n={};for(const c of Object.keys(s)){const u=s[c],h=this.processDataTypeDefinition(u,s,[c],e);h&&(t[c]=h,u.dataTypeMatcher&&(n[c]=u.dataTypeMatcher),o[c]=i(h))}const{valueParser:r,valueFormatter:a}=e.object,{valueParser:l,valueFormatter:d}=t.object;this.hasObjectValueParser=l!==r,this.hasObjectValueFormatter=d!==a,this.formatValueFuncs=o,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(n,e)}sortKeysInMatchers(e,t){const o={...e};for(const i of xC)delete o[i],o[i]=e[i]??t[i].dataTypeMatcher;return o}processDataTypeDefinition(e,t,o,i){let s;const n=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let r=i[n];const a=t[n];if(r&&a&&(r=a),!_a(e,r,n))return;s=Na(r,e)}else{if(o.includes(n)){M(44);return}const r=t[n];if(!_a(e,r,n))return;const a=this.processDataTypeDefinition(r,t,[...o,n],i);if(!a)return;s=Na(a,e)}return{...s,groupSafeValueFormatter:Wa(s,this.gos)}}updateColDefAndGetColumnType(e,t,o){let{cellDataType:i}=t;const{field:s}=t;if(i===void 0&&(i=e.cellDataType),(i==null||i===!0)&&(i=this.canInferCellDataType(e,t)?this.inferCellDataType(s,o):!1),!i){e.cellDataType=!1;return}const n=this.dataTypeDefinitions[i];if(!n){M(47,{cellDataType:i});return}return e.cellDataType=i,n.groupSafeValueFormatter&&(e.valueFormatter=n.groupSafeValueFormatter),n.valueParser&&(e.valueParser=n.valueParser),n.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,i,n,o),n.columnTypes}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const o=i=>{t.add(i.key)};e.__addEventListener("columnStateUpdated",o),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",o))}canInferCellDataType(e,t){const{gos:o}=this;if(!ne(o))return!1;const i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(Qs(t,i))return!1;const s=t.type===null?e.type:t.type;if(s){const n=o.get("columnTypes")??{};if(Ko(s).some(a=>{const l=n[a.trim()];return l&&Qs(l,i)}))return!1}return!Qs(e,i)}inferCellDataType(e,t){if(!e)return;let o;const i=this.getInitialData();if(i){const n=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");o=$t(i,e,n)}else this.initWaitForRowData(t);return o==null?void 0:Object.keys(this.dataTypeMatchers).find(n=>this.dataTypeMatchers[n](o))??"object"}getInitialData(){var t;const e=this.gos.get("rowData");if(e!=null&&e.length)return e[0];if(this.initialData)return this.initialData;{const o=(t=this.beans.rowModel.rootNode)==null?void 0:t.allLeafChildren;if(o!=null&&o.length)return o[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:o,eventSvc:i}=this.beans;t&&o&&(o.shouldQueueResizeOperations=!0);const[s]=this.addManagedEventListeners({rowDataUpdateStarted:n=>{const{firstRowData:r}=n;r&&(s==null||s(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&(o==null||o.processResizeOperations()),i.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const o=[];this.destroyColumnStateUpdateListeners();const i={},s={};for(const n of Object.keys(this.columnStateUpdatesPendingInference)){const r=this.columnStateUpdatesPendingInference[n],a=this.colModel.getCol(n);if(!a)return;const l=a.getColDef();if(!this.resetColDefIntoCol(a,"cellDataTypeInferred"))return;const d=a.getColDef();if(t&&d.type&&d.type!==l.type){const c=PC(a,r);c.rowGroup&&c.rowGroupIndex==null&&(i[n]=c),c.pivot&&c.pivotIndex==null&&(s[n]=c),o.push(c)}}t&&o.push(...this.generateColumnStateForRowGroupAndPivotIndexes(i,s)),o.length&&be(this.beans,{state:o},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const o={},{rowGroupColsSvc:i,pivotColsSvc:s}=this.beans;return i==null||i.restoreColumnOrder(o,e),s==null||s.restoreColumnOrder(o,t),Object.values(o)}resetColDefIntoCol(e,t){const o=e.getUserProvidedColDef();if(!o)return!1;const i=cs(this.beans,o,e.getColId());return e.setColDef(i,o,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.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){var t;return(t=this.getDataTypeDefinition(e))==null?void 0:t.baseDataType}checkType(e,t){var i;if(t==null)return!0;const o=(i=this.getDataTypeDefinition(e))==null?void 0:i.dataTypeMatcher;return o?o(t):!0}validateColDef(e){const t=o=>M(48,{property:o});if(e.cellDataType==="object"){const{object:o}=this.dataTypeDefinitions;e.valueFormatter===o.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&t("Formatter"),e.editable&&e.valueParser===o.valueParser&&!this.hasObjectValueParser&&t("Parser")}}postProcess(e){var r;const t=e.cellDataType;if(!t||typeof t!="string")return;const{dataTypeDefinitions:o,beans:i,formatValueFuncs:s}=this,n=o[t];(r=i.colFilter)==null||r.setColDefPropsForDataType(e,n,s[t])}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,o,i){const s=this.formatValueFuncs[t],n=this.columnDefinitionPropsPerDataType[o.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:o,colId:i,formatValue:s});Object.assign(e,n)}getDateObjectTypeDef(e){const t=this.getLocaleTextFunc(),o=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:i=>ao(i.newValue&&String(i.newValue)),valueFormatter:i=>i.value==null?"":!(i.value instanceof Date)||isNaN(i.value.getTime())?t("invalidDate","Invalid Date"):Ke(i.value,o)??"",dataTypeMatcher:i=>i instanceof Date}}getDateStringTypeDef(e){const t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:o=>ao(o)??void 0,dateFormatter:o=>Ke(o??null,t)??void 0,valueParser:o=>ai(String(o.newValue))?o.newValue:null,valueFormatter:o=>ai(String(o.value))?String(o.value):"",dataTypeMatcher:o=>typeof o=="string"&&ai(o)}}getDefaultDataTypes(){const e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>{var o,i;return((i=(o=t.newValue)==null?void 0:o.trim)==null?void 0:i.call(o))===""?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"},text:{baseDataType:"text",valueParser:t=>t.newValue===""?null:Li(t.newValue),dataTypeMatcher:t=>typeof t=="string"},boolean:{baseDataType:"boolean",valueParser:t=>{var o,i;return t.newValue==null?t.newValue:((i=(o=t.newValue)==null?void 0:o.trim)==null?void 0:i.call(o))===""?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"&&$h(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>Li(t.value)??""}}}destroyColumnStateUpdateListeners(){this.columnStateUpdateListenerDestroyFuncs.forEach(e=>e()),this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function Na(e,t){const o={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(o.columnTypes=[...Ko(e.columnTypes),...Ko(t.columnTypes)]),o}function _a(e,t,o){return t?t.baseDataType!==e.baseDataType?(M(46),!1):!0:(M(45,{parentCellDataType:o}),!1)}function Wa(e,t){if(e.valueFormatter)return o=>{var i,s;if((i=o.node)!=null&&i.group){const n=(o.colDef.pivotValueColumn??o.column).getAggFunc();if(n){if(n==="first"||n==="last")return e.valueFormatter(o);if(e.baseDataType==="number"&&n!=="count"){if(typeof o.value=="number")return e.valueFormatter(o);if(typeof o.value=="object"){if(!o.value)return;if("toNumber"in o.value)return e.valueFormatter({...o,value:o.value.toNumber()});if("value"in o.value)return e.valueFormatter({...o,value:o.value.value})}}return}}else if(t.get("groupHideOpenParents")&&o.column.isRowGroupActive()&&typeof o.value=="string"&&!((s=e.dataTypeMatcher)!=null&&s.call(e,o.value)))return;return e.valueFormatter(o)}}function FC(e,t,o,i){if(!t[o])return!1;const s=e[o];return s===null?(t[o]=!1,!1):i===void 0?!!s:s===i}function Qs(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([o,i])=>FC(e,t,o,i))}function PC(e,t){const o=Pr(e);return t.forEach(i=>{delete o[i],i==="rowGroup"?delete o.rowGroupIndex:i==="pivot"&&delete o.pivotIndex}),o}var TC={moduleName:"DataType",version:L,beans:[DC],dependsOn:[eC]},IC={moduleName:"ColumnFlex",version:L,beans:[EC]},za={moduleName:"ColumnApi",version:L,beans:[RC],apiFunctions:{getColumnDef:oC,getDisplayNameForColumn:sC,getColumn:nC,getColumns:rC,applyColumnState:aC,getColumnState:lC,resetColumnState:dC,isPinning:cC,isPinningLeft:uC,isPinningRight:hC,getDisplayedColAfter:gC,getDisplayedColBefore:pC,setColumnsVisible:fC,setColumnsPinned:CC,getAllGridColumns:mC,getDisplayedLeftColumns:wC,getDisplayedCenterColumns:vC,getDisplayedRightColumns:SC,getAllDisplayedColumns:bC,getAllDisplayedVirtualColumns:yC,getColumnDefs:iC}};function AC(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,o=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(o,"$1 $2$3").replace(/\./g," ").split(" ").map(s=>s.substring(0,1).toUpperCase()+(s.length>1?s.substring(1,s.length):"")).join(" ")}var MC=class extends x{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,o=!1){if(!e)return null;const i=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:s}=this.beans;return o&&s?s.getHeaderName(e,i):i}getDisplayNameForProvidedColumnGroup(e,t,o){const i=t==null?void 0:t.getColGroupDef();return i?this.getHeaderName(i,null,e,t,o):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,o,i,s){var r;const n=e.headerValueGetter;if(n){const a=_(this.gos,{colDef:e,column:t,columnGroup:o,providedColumnGroup:i,location:s});return typeof n=="function"?n(a):typeof n=="string"?((r=this.beans.expressionSvc)==null?void 0:r.evaluate(n,a))??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return AC(e.field)}return""}},kC=class extends x{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[]}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}setScrollPosition(e,t,o=!1){const{visibleCols:i}=this,s=i.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!s)){if(this.scrollWidth=e,this.scrollPosition=t,i.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const r=i.bodyWidth;this.viewportLeft=r-t-e,this.viewportRight=r-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(o)}}getColumnHeadersToRender(e){switch(e){case"left":return this.columnsToRenderLeft;case"right":return this.columnsToRenderRight;default:return this.columnsToRenderCenter}}getHeadersToRender(e,t){let o;switch(e){case"left":o=this.rowsOfHeadersToRenderLeft[t];break;case"right":o=this.rowsOfHeadersToRenderRight[t];break;default:o=this.rowsOfHeadersToRenderCenter[t];break}return o??[]}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.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||LC(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,o=t+e.getActualWidth(),i=this.viewportLeft-200,s=this.viewportRight+200,n=t<i&&o<i,r=t>s&&o>s;return!n&&!r}getViewportColumns(){const{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;const t=n=>{const r=n.getLeft();return A(r)&&r>this.viewportLeft},o=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:i}=this,s=i.centerCols;return i.getColsForRow(e,s,o,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 o=i=>{const s=new Set,n={};for(const r of i){let a=r.getParent();const l=r.isSpanHeaderHeight();for(;a&&!s.has(a);){if(l&&a.isPadding()){a=a.getParent();continue}const c=a.getProvidedColumnGroup().getLevel();n[c]??(n[c]=[]),n[c].push(a),s.add(a),a=a.getParent()}}return n};this.rowsOfHeadersToRenderLeft=o(e),this.rowsOfHeadersToRenderRight=o(t),this.rowsOfHeadersToRenderCenter=o(this.headerColsWithinViewport)}extractViewport(){const e=i=>`${i.getId()}-${i.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),o=this.colsWithinViewportHash!==t;return o&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),o}};function LC(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var GC=class extends x{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class o{refresh(){return!1}getGui(){return this.eGui}init(s){const n=t(s),r=typeof n;if(r==="string"||r==="number"||r==="boolean"){this.eGui=Zi("<span>"+n+"</span>");return}if(n==null){this.eGui=ee({tag:"span"});return}this.eGui=n}}return o}},HC={moduleName:"CellRendererFunction",version:L,beans:[GC]},OC=class extends x{constructor(){super(...arguments),this.beanName="registry",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:o,dynamicBeans:i,selectors:s}=e;if(o){const n=(r,a,l,d)=>{this.agGridDefaults[r]=a,(l||d)&&(this.agGridDefaultOverrides[r]={params:l,processParams:d})};for(const r of Object.keys(o)){let a=o[r];if(qu(a)&&(a=a.getComp(this.beans)),typeof a=="object"){const{classImp:l,params:d,processParams:c}=a;n(r,l,d,c)}else n(r,a)}}if(i){this.dynamicBeans??(this.dynamicBeans={});for(const n of Object.keys(i))this.dynamicBeans[n]=i[n]}if(s==null||s.forEach(n=>{this.selectors[n.selector]=n}),t)for(const n of Object.keys(t))this.icons[n]=t[n]}getUserComponent(e,t){var a;const o=(l,d,c,u)=>({componentFromFramework:d,component:l,params:c,processParams:u}),{frameworkOverrides:i}=this.beans,s=i.frameworkComponent(t,this.gos.get("components"));if(s!=null)return o(s,!0);const n=this.jsComps[t];if(n){const l=i.isFrameworkComponent(n);return o(n,l)}const r=this.agGridDefaults[t];if(r){const l=this.agGridDefaultOverrides[t];return o(r,!1,l==null?void 0:l.params,l==null?void 0:l.processParams)}return(a=this.beans.validation)==null||a.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}createDynamicBean(e,t,...o){var s;if(!this.dynamicBeans)throw new Error(Ee(279,{name:e}));const i=this.dynamicBeans[e];if(i==null){if(t)throw new Error(((s=this.beans.validation)==null?void 0:s.missingDynamicBean(e))??Ee(256));return}return new i(...o)}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}},BC=23,VC=class extends x{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){var e,t;this.addEventListener("ready",()=>{this.updateReady(),this.ready&&(this.readyCallbacks.forEach(o=>o(this.params)),this.readyCallbacks.length=0)},((t=(e=this.beans.frameworkOverrides).runWhenReadyAsync)==null?void 0:t.call(e))??!1)}updateReady(){const e=Object.values(this.params);this.ready=e.length===BC&&e.every(t=>(t==null?void 0:t.isAlive())??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{const o=this.readyCallbacks.indexOf(t);o>=0&&this.readyCallbacks.splice(o,1)})}register(e,t){this.params[e]=t,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:"ready"}),t.addDestroyFunc(()=>{this.updateReady()})}get(e){return this.params[e]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){const{leftHeader:e,centerHeader:t,rightHeader:o}=this.params;return[e,o,t]}getHeaderRowContainerCtrl(e){const t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},NC=':where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}&:where(button){color:inherit}}:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-tab-guard{display:block;height:0;position:absolute;width:0}:where(.ag-virtual-list-viewport) .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-virtual-list-viewport{overflow:auto;width:100%}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-virtual-list-container{overflow:hidden}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-scrolling,.ag-scrollbar-active){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value,.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-top:not(.ag-invisible)){border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-bottom:not(.ag-invisible)){border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block;&:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-group-title-bar) .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-flow:row wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}:where(.ag-ltr) .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}:where(.ag-group-item-alignment-stretch) .ag-group-item{align-items:stretch}:where(.ag-group-item-alignment-start) .ag-group-item{align-items:flex-start}:where(.ag-group-item-alignment-end) .ag-group-item{align-items:flex-end}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-large-text-input{display:block}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-data-font-size);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after,.ag-row-highlight-inside:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;pointer-events:none;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after,:where(.ag-ltr) .ag-row-highlight-inside:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after,:where(.ag-rtl) .ag-row-highlight-inside:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto}:where(.ag-ltr) .ag-row-highlight-indent:after{left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size));right:1px}:where(.ag-rtl) .ag-row-highlight-indent:after{left:1px;right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside:after{background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);display:block;height:auto;inset:0;width:auto}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden),.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)),.ag-header-group-cell{&:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}&:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}}:where(.ag-header-cell:not(.ag-floating-filter) *,.ag-header-group-cell *){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-accent-color);content:"";height:100%;position:absolute;width:1px}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2;&:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}}:where(.ag-ltr) .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-rtl) .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-chart,.ag-dnd-ghost,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-list-item,.ag-virtual-list-item{height:var(--ag-list-item-height)}.ag-virtual-list-item{position:absolute;width:100%}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-list-item{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-column-select-column-group-readonly,.ag-column-select-column-readonly,.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-column-select-column-readonly{&.ag-icon-grip,.ag-icon-grip{opacity:.35}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color);&:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);position:relative;&:after{background-color:var(--ag-icon-button-active-indicator-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}:where(.ag-ltr) .ag-filter-active{&:after{right:-1px}}:where(.ag-rtl) .ag-filter-active{&:after{left:-1px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto}.ag-menu,.ag-resizer{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-resizer{pointer-events:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',Xs=typeof window!="object"||!((Dd=(xd=window==null?void 0:window.document)==null?void 0:xd.fonts)!=null&&Dd.forEach),kt=(e,t,o,i,s,n)=>{if(Xs)return;i&&(e=`@layer ${CSS.escape(i)} { ${e} }`);let r=Lt.map.get(t);if(r||(r=[],Lt.map.set(t,r)),r.find(c=>c.css===e))return;const a=document.createElement("style");n&&a.setAttribute("nonce",n),a.dataset.agGlobalCss=o,a.textContent=e;const l={css:e,el:a,priority:s};let d;for(const c of r){if(c.priority>s)break;d=c}if(d){d.el.insertAdjacentElement("afterend",a);const c=r.indexOf(d);r.splice(c+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),r.push(l)},$a=(e,t,o)=>{kt(NC,e,"core",t,0,o),Array.from(zu()).sort((i,s)=>i.moduleName.localeCompare(s.moduleName)).forEach(i=>{var s;return(s=i.css)==null?void 0:s.forEach(n=>kt(n,e,`module-${i.moduleName}`,t,0,o))})},_C=e=>{Lt.grids.add(e)},WC=e=>{if(Lt.grids.delete(e),Lt.grids.size===0){Lt.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},Ua,Lt=(Ua=typeof window=="object"?window:{}).agStyleInjectionState??(Ua.agStyleInjectionState={map:new WeakMap,grids:new Set}),Fe=e=>new Ka(e),qe="$default",zC=0,Ka=class{constructor({feature:e,params:t,modeParams:o={},css:i,cssImports:s}){this.feature=e,this.css=i,this.cssImports=s,this.modeParams={[qe]:{...o[qe]??{},...t??{}},...o}}use(e,t,o){let i=this._inject;if(i==null){let{css:s}=this;if(s){const n=`ag-theme-${this.feature??"part"}-${++zC}`;typeof s=="function"&&(s=s()),s=`:where(.${n}) {
|
|
4
4
|
${s}
|
|
5
5
|
}
|
|
6
6
|
`;for(const r of this.cssImports??[])s=`@import url(${JSON.stringify(r)});
|
|
7
|
-
${s}`;i={css:s,class:n}}else i=!1;this._inject=i}return i&&e&&It(i.css,e,i.class,t,1,o),i?i.class:!1}},zC=e=>e.replace(/[A-Z]/g,t=>`-${t}`).toLowerCase(),Ul=e=>`--ag-${zC(e)}`,De=e=>`var(${Ul(e)})`,$C=(e,t,o)=>Math.max(t,Math.min(o,e)),UC=e=>{const t=new Map;return o=>{const i=o;return t.has(i)||t.set(i,e(o)),t.get(i)}},Fe=e=>({ref:"accentColor",mix:e}),fe=e=>({ref:"foregroundColor",mix:e}),Ce=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),KC=e=>({ref:"foregroundColor",mix:e,onto:"headerBackgroundColor"}),le={ref:"backgroundColor"},Mt={ref:"foregroundColor"},He={ref:"accentColor"},wi={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:fe(.15),chromeBackgroundColor:Ce(.02),browserColorScheme:"light"},jC={...wi,textColor:Mt,accentColor:"#2196f3",invalidColor:"#e02525",wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:le,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},cellFontFamily:{ref:"fontFamily"},headerFontWeight:500,headerFontSize:{ref:"fontSize"},dataFontSize:{ref:"fontSize"},headerTextColor:{ref:"textColor"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},subtleTextColor:{ref:"textColor",mix:.5},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:He,rangeSelectionBackgroundColor:Fe(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:Fe(.5),rangeHeaderHighlightColor:KC(.08),rowNumbersSelectedColor:Fe(.5),rowHoverColor:Fe(.08),columnHoverColor:Fe(.05),selectedRowBackgroundColor:Fe(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},oddRowBackgroundColor:le,borderWidth:1,borderRadius:4,wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",spacing:8,fontSize:14,rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,paginationPanelHeight:{ref:"rowHeight",calc:"max(rowHeight, 22px)"},popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},dragAndDropImageBackgroundColor:le,dragAndDropImageBorder:!0,dragAndDropImageShadow:{ref:"popupShadow"},dragHandleColor:fe(.7),focusShadow:{spread:3,color:Fe(.5)},focusErrorShadow:{spread:3,color:{ref:"invalidColor",onto:"backgroundColor",mix:.5}},headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},iconSize:16,iconColor:"inherit",iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:fe(.1),iconButtonActiveColor:He,iconButtonActiveBackgroundColor:Fe(.28),iconButtonActiveIndicatorColor:He,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:He,toggleButtonOffBackgroundColor:Ce(.3),toggleButtonSwitchBackgroundColor:le,toggleButtonSwitchInset:2,menuBorder:{color:fe(.2)},menuBackgroundColor:Ce(.03),menuTextColor:Ce(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"},setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:fe(.8),dialogShadow:{ref:"popupShadow"},cellEditingBorder:{color:He},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},dialogBorder:{color:fe(.2)},panelBackgroundColor:le,panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipErrorBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.1},tooltipTextColor:{ref:"textColor"},tooltipErrorTextColor:{ref:"invalidColor"},tooltipBorder:!0,tooltipErrorBorder:{color:{ref:"invalidColor",onto:"backgroundColor",mix:.25}},columnDropCellBackgroundColor:fe(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:fe(.13)},selectCellBackgroundColor:fe(.07),selectCellBorder:{color:fe(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:le,filterPanelApplyButtonBackgroundColor:He,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:Mt,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:Mt,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:fe(.15),statusBarLabelColor:Mt,statusBarLabelFontWeight:500,statusBarValueColor:Mt,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"backgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"backgroundColor"},pinnedRowTextColor:{ref:"textColor"}},qC=".ag-cell-batch-edit{background-color:var(--ag-cell-batch-edit-background-color);color:var(--ag-cell-batch-edit-text-color);display:inherit}.ag-row-batch-edit{background-color:var(--ag-row-batch-edit-background-color);color:var(--ag-row-batch-edit-text-color)}",Kl={cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"}},YC={...Kl,cellBatchEditTextColor:"#f3d0b3"},ZC=()=>xe({feature:"batchEditStyle",params:Kl,css:qC}),QC=ZC(),XC=":where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}",JC={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"}},em=()=>xe({feature:"buttonStyle",params:{...JC,buttonBackgroundColor:le,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:He}},css:XC}),tm=em(),om=".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}",im=()=>xe({feature:"columnDropStyle",css:om}),jl=im(),sm=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],nm=UC(e=>(e=e.toLowerCase(),sm.find(t=>e.endsWith(t.toLowerCase()))??"length")),vi=e=>typeof e=="object"&&(e!=null&&e.ref)?De(e.ref):typeof e=="string"?e:typeof e=="number"?String(e):!1,Qs=e=>{if(typeof e=="string")return e;if(e&&"ref"in e){const t=De(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?De(e.onto):"transparent"}, ${t} ${$C(e.mix*100,0,100)}%)`}return!1},rm=vi,kt=e=>typeof e=="string"?e:typeof e=="number"?`${e}px`:e&&"calc"in e?`calc(${e.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,o=>o[0]==="-"?o:` ${De(o)} `)})`:e&&"ref"in e?De(e.ref):!1,lm=vi,Xs=(e,t)=>typeof e=="string"?e:e===!0?Xs({},t):e===!1?t==="columnBorder"?Xs({color:"transparent"},t):"none":e&&"ref"in e?De(e.ref):ql(e.style??"solid")+" "+kt(e.width??{ref:"borderWidth"})+" "+Qs(e.color??{ref:"borderColor"}),am=e=>typeof e=="string"?e:e===!1?"none":e&&"ref"in e?De(e.ref):[kt(e.offsetX??0),kt(e.offsetY??0),kt(e.radius??0),kt(e.spread??0),Qs(e.color??{ref:"foregroundColor"})].join(" "),ql=vi,Yl=e=>typeof e=="string"?e.includes(",")?e:Zl(e):e&&"googleFont"in e?Yl(e.googleFont):e&&"ref"in e?De(e.ref):Array.isArray(e)?e.map(t=>(typeof t=="object"&&"googleFont"in t&&(t=t.googleFont),Zl(t))).join(", "):!1,Zl=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),dm=vi,Ql=e=>typeof e=="string"?e:e&&"url"in e?`url(${JSON.stringify(e.url)})`:e&&"svg"in e?Ql({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):e&&"ref"in e?De(e.ref):!1,cm=(e,t)=>typeof e=="string"?e:typeof e=="number"?(e>=10&&U(104,{value:e,param:t}),`${e}s`):e&&"ref"in e?De(e.ref):!1,um={color:Qs,colorScheme:rm,length:kt,scale:lm,border:Xs,borderStyle:ql,shadow:am,image:Ql,fontFamily:Yl,fontWeight:dm,duration:cm},hm=(e,t)=>{const o=nm(e);return um[o](t,e)},gm=()=>new Xl().withPart(tm).withPart(jl).withPart(QC),Xl=class Id{constructor(t=[]){this.parts=t}withPart(t){return typeof t=="function"&&(t=t()),t instanceof $l?new Id([...this.parts,t]):(Yt(259,{part:t},"Invalid part"),this)}withoutPart(t){return this.withPart(xe({feature:t}))}withParams(t,o=Ke){return this.withPart(xe({modeParams:{[o]:t}}))}_startUse({styleContainer:t,cssLayer:o,nonce:i,loadThemeGoogleFonts:s}){if(Zs)return;fm(),Wl(t,o,i);const n=pm(this);if(n.length>0)for(const r of n)s&&mm(r,i);for(const r of this.parts)r.use(t,o,i)}_getCssClass(){return this._cssClassCache??(this._cssClassCache=Jl(this.parts).map(t=>t.use(void 0,void 0,void 0)).filter(Boolean).join(" "))}_getModeParams(){let t=this._paramsCache;if(!t){const o={[Ke]:{...jC}};for(const i of Jl(this.parts))for(const s of Object.keys(i.modeParams)){const n=i.modeParams[s];if(n){const r=o[s]??(o[s]={}),l=new Set;for(const a of Object.keys(n)){const d=n[a];d!==void 0&&(r[a]=d,l.add(a))}if(s===Ke)for(const a of Object.keys(o)){const d=o[a];if(a!==Ke)for(const c of l)delete d[c]}}}this._paramsCache=t=o}return t}_getPerGridCss(t){const o="##SELECTOR##";let i=this._paramsCssCache;if(!i){let s="",n="";const r=this._getModeParams();for(const a of Object.keys(r)){const d=r[a];if(a!==Ke){const u=`:where([data-ag-theme-mode="${typeof CSS=="object"?CSS.escape(a):a}"]) & {
|
|
8
|
-
`;s+=u,n+=u}for(const c of Object.keys(d).sort()){const u=d[c],h=
|
|
7
|
+
${s}`;i={css:s,class:n}}else i=!1;this._inject=i}return i&&e&&kt(i.css,e,i.class,t,1,o),i?i.class:!1}},$C=e=>e.replace(/[A-Z]/g,t=>`-${t}`).toLowerCase(),ja=e=>`--ag-${$C(e)}`,Pe=e=>`var(${ja(e)})`,UC=(e,t,o)=>Math.max(t,Math.min(o,e)),KC=e=>{const t=new Map;return o=>{const i=o;return t.has(i)||t.set(i,e(o)),t.get(i)}},Te=e=>({ref:"accentColor",mix:e}),me=e=>({ref:"foregroundColor",mix:e}),we=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),jC=e=>({ref:"foregroundColor",mix:e,onto:"headerBackgroundColor"}),ce={ref:"backgroundColor"},Gt={ref:"foregroundColor"},Be={ref:"accentColor"},Si={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:me(.15),chromeBackgroundColor:we(.02),browserColorScheme:"light"},qC={...Si,textColor:Gt,accentColor:"#2196f3",invalidColor:"#e02525",wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:ce,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},cellFontFamily:{ref:"fontFamily"},headerFontWeight:500,headerFontSize:{ref:"fontSize"},dataFontSize:{ref:"fontSize"},headerTextColor:{ref:"textColor"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},subtleTextColor:{ref:"textColor",mix:.5},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:Be,rangeSelectionBackgroundColor:Te(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:Te(.5),rangeHeaderHighlightColor:jC(.08),rowNumbersSelectedColor:Te(.5),rowHoverColor:Te(.08),columnHoverColor:Te(.05),selectedRowBackgroundColor:Te(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},oddRowBackgroundColor:ce,borderWidth:1,borderRadius:4,wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",spacing:8,fontSize:14,rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,paginationPanelHeight:{ref:"rowHeight",calc:"max(rowHeight, 22px)"},popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},dragAndDropImageBackgroundColor:ce,dragAndDropImageBorder:!0,dragAndDropImageShadow:{ref:"popupShadow"},dragHandleColor:me(.7),focusShadow:{spread:3,color:Te(.5)},focusErrorShadow:{spread:3,color:{ref:"invalidColor",onto:"backgroundColor",mix:.5}},headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},iconSize:16,iconColor:"inherit",iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:me(.1),iconButtonActiveColor:Be,iconButtonActiveBackgroundColor:Te(.28),iconButtonActiveIndicatorColor:Be,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:Be,toggleButtonOffBackgroundColor:we(.3),toggleButtonSwitchBackgroundColor:ce,toggleButtonSwitchInset:2,menuBorder:{color:me(.2)},menuBackgroundColor:we(.03),menuTextColor:we(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"},setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:me(.8),dialogShadow:{ref:"popupShadow"},cellEditingBorder:{color:Be},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},dialogBorder:{color:me(.2)},panelBackgroundColor:ce,panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipErrorBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.1},tooltipTextColor:{ref:"textColor"},tooltipErrorTextColor:{ref:"invalidColor"},tooltipBorder:!0,tooltipErrorBorder:{color:{ref:"invalidColor",onto:"backgroundColor",mix:.25}},columnDropCellBackgroundColor:me(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:me(.13)},selectCellBackgroundColor:me(.07),selectCellBorder:{color:me(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:ce,filterPanelApplyButtonBackgroundColor:Be,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:Gt,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:Gt,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:me(.15),statusBarLabelColor:Gt,statusBarLabelFontWeight:500,statusBarValueColor:Gt,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"backgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"backgroundColor"},pinnedRowTextColor:{ref:"textColor"}},YC=".ag-cell-batch-edit{background-color:var(--ag-cell-batch-edit-background-color);color:var(--ag-cell-batch-edit-text-color);display:inherit}.ag-row-batch-edit{background-color:var(--ag-row-batch-edit-background-color);color:var(--ag-row-batch-edit-text-color)}",qa={cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"}},ZC={...qa,cellBatchEditTextColor:"#f3d0b3"},QC=()=>Fe({feature:"batchEditStyle",params:qa,css:YC}),XC=QC(),JC=":where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}",em={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"}},tm=()=>Fe({feature:"buttonStyle",params:{...em,buttonBackgroundColor:ce,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:Be}},css:JC}),om=tm(),im=".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}",sm=()=>Fe({feature:"columnDropStyle",css:im}),Ya=sm(),nm=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],rm=KC(e=>(e=e.toLowerCase(),nm.find(t=>e.endsWith(t.toLowerCase()))??"length")),bi=e=>typeof e=="object"&&(e!=null&&e.ref)?Pe(e.ref):typeof e=="string"?e:typeof e=="number"?String(e):!1,Js=e=>{if(typeof e=="string")return e;if(e&&"ref"in e){const t=Pe(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?Pe(e.onto):"transparent"}, ${t} ${UC(e.mix*100,0,100)}%)`}return!1},am=bi,Ht=e=>typeof e=="string"?e:typeof e=="number"?`${e}px`:e&&"calc"in e?`calc(${e.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,o=>o[0]==="-"?o:` ${Pe(o)} `)})`:e&&"ref"in e?Pe(e.ref):!1,lm=bi,en=(e,t)=>typeof e=="string"?e:e===!0?en({},t):e===!1?t==="columnBorder"?en({color:"transparent"},t):"none":e&&"ref"in e?Pe(e.ref):Za(e.style??"solid")+" "+Ht(e.width??{ref:"borderWidth"})+" "+Js(e.color??{ref:"borderColor"}),dm=e=>typeof e=="string"?e:e===!1?"none":e&&"ref"in e?Pe(e.ref):[Ht(e.offsetX??0),Ht(e.offsetY??0),Ht(e.radius??0),Ht(e.spread??0),Js(e.color??{ref:"foregroundColor"})].join(" "),Za=bi,Qa=e=>typeof e=="string"?e.includes(",")?e:Xa(e):e&&"googleFont"in e?Qa(e.googleFont):e&&"ref"in e?Pe(e.ref):Array.isArray(e)?e.map(t=>(typeof t=="object"&&"googleFont"in t&&(t=t.googleFont),Xa(t))).join(", "):!1,Xa=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),cm=bi,Ja=e=>typeof e=="string"?e:e&&"url"in e?`url(${JSON.stringify(e.url)})`:e&&"svg"in e?Ja({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):e&&"ref"in e?Pe(e.ref):!1,um=(e,t)=>typeof e=="string"?e:typeof e=="number"?(e>=10&&j(104,{value:e,param:t}),`${e}s`):e&&"ref"in e?Pe(e.ref):!1,hm={color:Js,colorScheme:am,length:Ht,scale:lm,border:en,borderStyle:Za,shadow:dm,image:Ja,fontFamily:Qa,fontWeight:cm,duration:um},gm=(e,t)=>{const o=rm(e);return hm[o](t,e)},pm=()=>new el().withPart(om).withPart(Ya).withPart(XC),el=class Ad{constructor(t=[]){this.parts=t}withPart(t){return typeof t=="function"&&(t=t()),t instanceof Ka?new Ad([...this.parts,t]):(Qt(259,{part:t},"Invalid part"),this)}withoutPart(t){return this.withPart(Fe({feature:t}))}withParams(t,o=qe){return this.withPart(Fe({modeParams:{[o]:t}}))}_startUse({styleContainer:t,cssLayer:o,nonce:i,loadThemeGoogleFonts:s}){if(Xs)return;Cm(),$a(t,o,i);const n=fm(this);if(n.length>0)for(const r of n)s&&wm(r,i);for(const r of this.parts)r.use(t,o,i)}_getCssClass(){return this._cssClassCache??(this._cssClassCache=tl(this.parts).map(t=>t.use(void 0,void 0,void 0)).filter(Boolean).join(" "))}_getModeParams(){let t=this._paramsCache;if(!t){const o={[qe]:{...qC}};for(const i of tl(this.parts))for(const s of Object.keys(i.modeParams)){const n=i.modeParams[s];if(n){const r=o[s]??(o[s]={}),a=new Set;for(const l of Object.keys(n)){const d=n[l];d!==void 0&&(r[l]=d,a.add(l))}if(s===qe)for(const l of Object.keys(o)){const d=o[l];if(l!==qe)for(const c of a)delete d[c]}}}this._paramsCache=t=o}return t}_getPerGridCss(t){const o="##SELECTOR##";let i=this._paramsCssCache;if(!i){let s="",n="";const r=this._getModeParams();for(const l of Object.keys(r)){const d=r[l];if(l!==qe){const u=`:where([data-ag-theme-mode="${typeof CSS=="object"?CSS.escape(l):l}"]) & {
|
|
8
|
+
`;s+=u,n+=u}for(const c of Object.keys(d).sort()){const u=d[c],h=gm(c,u);if(h===!1)j(107,{key:c,value:u});else{const g=ja(c),p=g.replace("--ag-","--ag-inherited-");s+=` ${g}: var(${p}, ${h});
|
|
9
9
|
`,n+=` ${p}: var(${g});
|
|
10
|
-
`}}
|
|
10
|
+
`}}l!==qe&&(s+=`}
|
|
11
11
|
`,n+=`}
|
|
12
|
-
`)}let
|
|
12
|
+
`)}let a=`${o} {
|
|
13
13
|
${s}}
|
|
14
|
-
`;
|
|
14
|
+
`;a+=`:has(> ${o}):not(${o}) {
|
|
15
15
|
${n}}
|
|
16
|
-
`,this._paramsCssCache=i=
|
|
17
|
-
`;It(o,document.head,`googleFont:${e}`,void 0,0,t)},wm="fonts.googleapis.com",vm='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);:where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}&:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color);&:after{background-color:var(--ag-checkbox-checked-shape-color)}}&:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color);&:after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}}.ag-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',bm=()=>xe({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:le,checkboxUncheckedBorderColor:Ce(.3),checkboxCheckedBackgroundColor:He,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:le,checkboxIndeterminateBackgroundColor:Ce(.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:le,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:vm}),Sm=bm(),ta=()=>({...wi,...YC,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:Ce(.05),rowHoverColor:Fe(.15),selectedRowBackgroundColor:Fe(.2),menuBackgroundColor:Ce(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:Mt,findMatchColor:le,findActiveMatchColor:le,checkboxUncheckedBorderColor:Ce(.4),toggleButtonOffBackgroundColor:Ce(.4),rowBatchEditBackgroundColor:Ce(.1)}),ym=()=>({...ta(),backgroundColor:"#1f2836"}),Rm=()=>xe({feature:"colorScheme",params:wi,modeParams:{light:wi,dark:ta(),"dark-blue":ym()}}),Em=Rm(),oa={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<path d="m18 6-12 12"/><path d="m6 6 12 12"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>'},ia={"column-arrow":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 32 32"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 26C0 28.2092 1.79086 30 4 30H14C16.2091 30 18 28.2092 18 26V15H25.8786L24.4394 16.4393C23.8536 17.0251 23.8536 17.9749 24.4394 18.5607C25.0252 19.1464 25.9748 19.1464 26.5606 18.5607L30.5606 14.5607C31.1464 13.9749 31.1464 13.0251 30.5606 12.4393L26.5606 8.43934C25.9748 7.85356 25.0252 7.85356 24.4394 8.43934C23.8536 9.02512 23.8536 9.97488 24.4394 10.5607L25.8786 12H18V6C18 3.79086 16.2091 2 14 2H4C1.79086 2 0 3.79086 0 6V26ZM14 5H10.5V12H15V6C15 5.44772 14.5523 5 14 5ZM4 5H7.5V12H3V6C3 5.44772 3.44772 5 4 5ZM10.5 15H15V26C15 26.5522 14.5523 27 14 27H10.5V15ZM4 27H7.5V15H3V26C3 26.5522 3.44772 27 4 27Z" fill="currentColor"/></svg>',"small-down":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>',"small-up":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>',"pinned-top":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22ZM3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536Z"/></svg>',"pinned-bottom":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22ZM12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536Z"/></svg>',"un-pin":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11Z"/><path fill="currentColor" d="M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904l.589-.825Zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28l2.887-4.044ZM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972L9.277 1Z"/></svg>',"chevron-down":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 6L8 10L4 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-up":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 10L8 6L12 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-left":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-right":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L10 8L6 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"filter-add":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.12126 7.75L10.8517 7.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M6.65934 11.748L9.32778 11.748" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12.2943 1.04872V6.19184M14.9886 3.74341H9.68478" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M8.25488 3C8.04799 3.18323 7.91706 3.45099 7.91699 3.74902C7.91713 4.04868 8.04988 4.31681 8.25879 4.5H2C1.58579 4.5 1.25 4.16421 1.25 3.75C1.25 3.33579 1.58579 3 2 3H8.25488Z" fill="currentColor"/></svg>',edit:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 10.6262V12.5012H5.375L10.905 6.97122L9.03 5.09622L3.5 10.6262ZM12.355 5.52122C12.4014 5.47497 12.4381 5.42002 12.4632 5.35953C12.4883 5.29905 12.5012 5.23421 12.5012 5.16872C12.5012 5.10324 12.4883 5.0384 12.4632 4.97791C12.4381 4.91742 12.4014 4.86248 12.355 4.81622L11.185 3.64622C11.1387 3.59987 11.0838 3.5631 11.0233 3.53801C10.9628 3.51291 10.898 3.5 10.8325 3.5C10.767 3.5 10.7022 3.51291 10.6417 3.53801C10.5812 3.5631 10.5263 3.59987 10.48 3.64622L9.565 4.56122L11.44 6.43622L12.355 5.52122Z" fill="currentColor"/></svg>'},xm=(e={})=>{let t="";for(const o of[...Object.keys(oa),...Object.keys(ia)]){const i=Dm(o,e.strokeWidth);t+=`.ag-icon-${o}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(i)}'); }
|
|
18
|
-
`}return t},Dm=(e,t=1.5)=>{const o=ia[e];if(o)return o;const i=oa[e];if(!i)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>`+i+"</svg>"},Fm=(e={})=>xe({feature:"iconSet",css:()=>xm(e)}),Pm=Fm(),Tm=':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-right:var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}',Im=".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:focus{box-shadow:var(--ag-focus-shadow);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}",Am={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"},colorPickerThumbSize:18,colorPickerTrackSize:12,colorPickerThumbBorderWidth:3,colorPickerTrackBorderRadius:12,colorPickerColorBorderRadius:4},Mm=()=>xe({feature:"inputStyle",params:{...Am,inputBackgroundColor:le,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:He},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:Ce(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>Tm+Im}),km=Mm(),Lm='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:solid var(--ag-border-width) var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative;&:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}&.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}&:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}&.ag-tab-selected:after{opacity:1}}:where(.ag-ltr) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}}}:where(.ag-rtl) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}}}',Gm={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},Hm=()=>xe({feature:"tabStyle",params:{...Gm,tabBarBorder:!0,tabBarBackgroundColor:fe(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:le},css:Lm}),Om=Hm(),Bm=()=>gm().withPart(Sm).withPart(Em).withPart(Pm).withPart(Om).withPart(km).withPart(jl).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),Vm=Bm(),Nm={cssName:"--ag-cell-horizontal-padding",changeKey:"cellHorizontalPaddingChanged",defaultValue:16},_m={cssName:"--ag-indentation-level",changeKey:"indentationLevelChanged",defaultValue:0,noWarn:!0,cacheDefault:!0},Wm={cssName:"--ag-row-group-indent-size",changeKey:"rowGroupIndentSizeChanged",defaultValue:0},sa={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},na={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},ra={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},Js={cssName:"--ag-row-border",changeKey:"rowBorderWidthChanged",defaultValue:1,border:!0},la={cssName:"--ag-pinned-row-border",changeKey:"pinnedRowBorderWidthChanged",defaultValue:1,border:!0},zm=0,$m=class extends x{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.paramsClass=`ag-theme-params-${++zm}`,this.globalCSS=[]}wireBeans(e){const{eGridDiv:t,gridOptions:o}=e;this.eGridDiv=t,this.eStyleContainer=o.themeStyleContainer??(t.getRootNode()===document?document.head:t),this.cssLayer=o.themeCssLayer,this.styleNonce=o.styleNonce}postConstruct(){this.addManagedPropertyListener("theme",()=>this.handleThemeGridOptionChange()),this.handleThemeGridOptionChange(),this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(sa),this.getSizeEl(na),this.getSizeEl(ra),this.getSizeEl(Js),this.getSizeEl(la),this.refreshRowBorderWidthVariable(),this.addDestroyFunc(()=>_C(this)),this.mutationObserver=new MutationObserver(()=>{this.fireGridStylesChangedEvent("themeChanged")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(la)}getRowBorderWidth(){return this.getCSSVariablePixelValue(Js)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(sa)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(na)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(Nm)}getCellPaddingLeft(){const e=this.getDefaultCellHorizontalPadding(),t=this.getCSSVariablePixelValue(_m),o=this.getCSSVariablePixelValue(Wm);return e-1+o*t}getCellPadding(){const e=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+e}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(ra)}applyThemeClasses(e){const{gridTheme:t}=this;let o="";if(t)o=`${this.paramsClass} ${t._getCssClass()}`;else{this.mutationObserver.disconnect();let i=this.eGridDiv;for(;i;){let s=!1;for(const n of Array.from(i.classList))n.startsWith("ag-theme-")&&(s=!0,o=o?`${o} ${n}`:n);s&&this.mutationObserver.observe(i,{attributes:!0,attributeFilter:["class"]}),i=i.parentElement}}for(const i of Array.from(e.classList))i.startsWith("ag-theme-")&&e.classList.remove(i);if(o){const i=e.className;e.className=i+(i?" ":"")+o}}refreshRowHeightVariable(){const{eGridDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),o=this.gos.get("rowHeight");if(o==null||isNaN(o)||!isFinite(o))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;const i=`${o}px`;return t!=i?(e.style.setProperty("--ag-line-height",i),o):t!=""?parseFloat(t):-1}addGlobalCSS(e,t){this.gridTheme?It(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(t!=null)return t;const o=this.measureSizeEl(e);return o==="detached"||o==="no-styles"?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,o),o)}measureSizeEl(e){const t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";const o=t.offsetWidth;return o===en?"no-styles":(this.sizesMeasured=!0,o)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=X({tag:"div",cls:"ag-measurement-container"}),this.eGridDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;const o=this.getMeasurementContainer();t=X({tag:"div"});const{border:i,noWarn:s}=e;i?(t.className="ag-measurement-element-border",t.style.setProperty("--ag-internal-measurement-border",`var(${e.cssName}, solid ${en}px)`)):t.style.width=`var(${e.cssName}, ${en}px)`,o.appendChild(t),this.sizeEls.set(e,t);let n=this.measureSizeEl(e);n==="no-styles"&&!s&&k(9,{variable:e});const r=Ze(this.beans,t,()=>{const l=this.measureSizeEl(e);l==="detached"||l==="no-styles"||(this.lastKnownValues.set(e,l),l!==n&&(n=l,this.fireGridStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>r()),t}fireGridStylesChangedEvent(e){e==="rowBorderWidthChanged"&&this.refreshRowBorderWidthVariable(),this.eventSvc.dispatchEvent({type:"gridStylesChanged",[e]:!0})}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue(Js);this.eGridDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}handleThemeGridOptionChange(){const{gos:e,eGridDiv:t,globalCSS:o,gridTheme:i}=this,s=e.get("theme");let n;if(s==="legacy")n=void 0;else{const r=s??Vm;r instanceof Xl?n=r:U(240,{theme:r})}if(n!==i){if(n){NC(this),Wl(this.eStyleContainer,this.cssLayer,this.styleNonce);for(const[l,a]of o)It(l,this.eStyleContainer,a,this.cssLayer,0,this.styleNonce);o.length=0}this.gridTheme=n,n==null||n._startUse({loadThemeGoogleFonts:e.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce});let r=this.eParamsStyle;if(!r){r=this.eParamsStyle=X({tag:"style"});const l=this.gos.get("styleNonce");l&&r.setAttribute("nonce",l),t.appendChild(r)}Zs||(r.textContent=(n==null?void 0:n._getPerGridCss(this.paramsClass))||""),this.applyThemeClasses(t),this.fireGridStylesChangedEvent("themeChanged")}n&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&U(s?106:239)}},en=15538,Um=class extends x{constructor(){super(...arguments),this.beanName="eventSvc",this.globalSvc=new je}postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}addEventListener(e,t,o){this.globalSvc.addEventListener(e,t,o)}removeEventListener(e,t,o){this.globalSvc.removeEventListener(e,t,o)}addGlobalListener(e,t=!1){this.globalSvc.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalSvc.removeGlobalListener(e,t)}dispatchLocalEvent(){}dispatchEvent(e){this.globalSvc.dispatchEvent(_(this.gos,e))}dispatchEventOnce(e){this.globalSvc.dispatchEventOnce(_(this.gos,e))}};function aa(e,t,o){const i=e.visibleCols.headerGroupRowCount;if(o>=i)return{column:t,headerRowIndex:o};let s=t.getParent();for(;s&&s.getProvidedColumnGroup().getLevel()>o;)s=s.getParent();const n=t.isSpanHeaderHeight();return!s||n&&s.isPadding()?{column:t,headerRowIndex:i}:{column:s,headerRowIndex:s.getProvidedColumnGroup().getLevel()}}var Km=class extends x{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,o=>{this.gridBodyCon=o.gridBodyCtrl});const t=J(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let o;const{colModel:i,colGroupSvc:s,ctrlsSvc:n}=this.beans;if(typeof e=="string"?(o=i.getCol(e),o||(o=(s==null?void 0:s.getColumnGroup(e))??null)):o=e,!o)return null;const r=n.getHeaderRowContainerCtrl(),l=r==null?void 0:r.getAllCtrls(),a=$(l||[]).type==="filter",d=Ee(this.beans)-1;let c=-1,u=o;for(;u;)c++,u=u.getParent();let h=c;return t&&a&&h===d-1&&h++,h===-1?null:{headerRowIndex:h,column:o}}navigateVertically(e,t){const{focusSvc:o,visibleCols:i}=this.beans,{focusedHeader:s}=o;if(!s)return!1;const{headerRowIndex:n}=s,r=s.column,l=Ee(this.beans),a=this.getHeaderRowType(n),d=i.headerGroupRowCount;let{headerRowIndex:c,column:u,headerRowIndexWithoutSpan:h}=e==="UP"?jm(a,r,n):qm(r,n,d),g=!1;return c<0&&(c=0,u=r,g=!0),c>=l?(c=-1,this.currentHeaderRowWithoutSpan=-1):h!==void 0&&(this.currentHeaderRowWithoutSpan=h),!g&&!u?!1:o.focusHeaderPosition({headerPosition:{headerRowIndex:c,column:u},allowUserOverride:!0,event:t})}navigateHorizontally(e,t=!1,o){const{focusSvc:i,gos:s}=this.beans,n={...i.focusedHeader};let r,l;this.currentHeaderRowWithoutSpan!==-1?n.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=n.headerRowIndex,e==="LEFT"!==s.get("enableRtl")?(l="Before",r=this.findHeader(n,l)):(l="After",r=this.findHeader(n,l));const a=s.getCallback("tabToNextHeader");if(t&&a){const d=i.focusHeaderPositionFromUserFunc({userFunc:a,headerPosition:r,direction:l});if(d){const{headerRowIndex:c}=i.focusedHeader||{};c!=null&&c!=n.headerRowIndex&&(this.currentHeaderRowWithoutSpan=c)}return d}return r||!t?i.focusHeaderPosition({headerPosition:r,direction:l,fromTab:t,allowUserOverride:!0,event:o}):this.focusNextHeaderRow(n,l,o)}focusNextHeaderRow(e,t,o){const i=this.beans,s=e.headerRowIndex;let n=null,r;const l=Ee(i),a=this.beans.visibleCols.allCols;if(t==="Before"){if(s<=0)return!1;n=$(a),r=s-1,this.currentHeaderRowWithoutSpan-=1}else n=a[0],r=s+1,this.currentHeaderRowWithoutSpan<l?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1;let{column:d,headerRowIndex:c}=aa(this.beans,n,r);return c>=l&&(c=-1),i.focusSvc.focusHeaderPosition({headerPosition:{column:d,headerRowIndex:c},direction:t,fromTab:!0,allowUserOverride:!0,event:o})}scrollToColumn(e,t="After"){if(e.getPinned())return;let o;if(Q(e)){const i=e.getDisplayedLeafColumns();o=t==="Before"?$(i):i[0]}else o=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(o)}findHeader(e,t){const{colGroupSvc:o,visibleCols:i}=this.beans;let s=e.column;if(s instanceof io){const a=s.getDisplayedLeafColumns();s=t==="Before"?a[0]:a[a.length-1]}const n=t==="Before"?i.getColBefore(s):i.getColAfter(s);if(!n)return;const r=i.headerGroupRowCount;if(e.headerRowIndex>=r)return{headerRowIndex:e.headerRowIndex,column:n};const l=o==null?void 0:o.getColGroupAtLevel(n,e.headerRowIndex);return l?l.isPadding()&&n.isSpanHeaderHeight()?{headerRowIndex:i.headerGroupRowCount,column:n}:{headerRowIndex:e.headerRowIndex,column:l??n}:{headerRowIndex:n instanceof We&&n.isSpanHeaderHeight()?i.headerGroupRowCount:e.headerRowIndex,column:n}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}};function jm(e,t,o){const i=o-1;if(e!=="filter"){const s=t instanceof We&&t.isSpanHeaderHeight();let n=t.getParent();for(;n&&(n.getProvidedColumnGroup().getLevel()>i||s&&n.isPadding());)n=n.getParent();if(n)return s?{column:n,headerRowIndex:n.getProvidedColumnGroup().getLevel(),headerRowIndexWithoutSpan:i}:{column:n,headerRowIndex:i,headerRowIndexWithoutSpan:i}}return{column:t,headerRowIndex:i,headerRowIndexWithoutSpan:i}}function qm(e,t,o){const i=t+1,s={column:e,headerRowIndex:i,headerRowIndexWithoutSpan:i};if(e instanceof io){if(i>=o)return{column:e.getDisplayedLeafColumns()[0],headerRowIndex:o,headerRowIndexWithoutSpan:i};let r=e.getDisplayedChildren()[0];if(r instanceof io&&r.isPadding()){const a=r.getDisplayedLeafColumns()[0];a.isSpanHeaderHeight()&&(r=a)}s.column=r,r instanceof We&&r.isSpanHeaderHeight()&&(s.headerRowIndex=o,s.headerRowIndexWithoutSpan=i)}return s}var Ym=class extends x{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(mh(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(Y(this.beans),gl)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){const e=Y(this.beans);return this.isDomDataPresentInHierarchy(e,si)?!0:this.isDomDataPresentInHierarchy(e,li)}isDomDataPresentInHierarchy(e,t){let o=e;for(;o;){if(er(this.gos,o,t))return!0;o=o.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){const{rowIndex:t,rowPinned:o,column:i}=e,s={rowIndex:t,rowPinned:o,column:i,isFullWidthCell:!1},n=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:o});return n&&(s.isFullWidthCell=n.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:o,rowPinned:i,forceBrowserFocus:s=!1,preventScrollOnBrowserFocus:n=!1,sourceEvent:r}=e,l=this.colModel.getCol(t);if(!l){this.focusedCell=null;return}this.focusedCell={rowIndex:o,rowPinned:qe(i),column:l};const a=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:"cellFocused",...a,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:s,preventScrollOnBrowserFocus:n,sourceEvent:r}),this.previousCellFocusParams=a}isCellFocused(e){return this.focusedCell==null?!1:Qu(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;const{column:t,rowCtrl:{rowIndex:o,pinned:i}}=e,{column:s,headerRowIndex:n}=this.focusedHeader;return t===s&&o===n&&i==s.getPinned()}focusHeaderPosition(e){var a;if(this.setFocusRecovered(),rt(this.beans))return!1;const{direction:t,fromTab:o,allowUserOverride:i,event:s,fromCell:n,rowWithoutSpanValue:r}=e;let{headerPosition:l}=e;if(n&&((a=this.filterManager)!=null&&a.isAdvFilterHeaderActive()))return this.focusAdvancedFilter(l);if(i){const d=this.focusedHeader,c=Ee(this.beans);if(o){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};l=u(h)}}}return l?this.focusProvidedHeaderPosition({headerPosition:l,direction:t,event:s,fromCell:n,rowWithoutSpanValue:r}):!1}focusHeaderPositionFromUserFunc(e){if(rt(this.beans))return!1;const{userFunc:t,headerPosition:o,direction:i,event:s}=e,n=this.focusedHeader,r=Ee(this.beans),l=this.getHeaderPositionFromUserFunc({userFunc:t,direction:i,currentPosition:n,headerPosition:o,headerRowCount:r});return!!l&&this.focusProvidedHeaderPosition({headerPosition:l,direction:i,event:s})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:o,currentPosition:i,headerPosition:s,headerRowCount:n}=e,l=t({backwards:o==="Before",previousHeaderPosition:i,nextHeaderPosition:s,headerRowCount:n});return l===!0?i:l===!1?null:l}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:o,fromCell:i,rowWithoutSpanValue:s,event:n}=e,{column:r,headerRowIndex:l}=t,{filterManager:a,ctrlsSvc:d,headerNavigation:c}=this.beans;if(l===-1)return a!=null&&a.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:r,event:n});c==null||c.scrollToColumn(r,o);const u=d.getHeaderRowContainerCtrl(r.getPinned()),h=(u==null?void 0:u.focusHeader(t.headerRowIndex,r,n))||!1;return c&&h&&(s!=null||i)&&(c.currentHeaderRowWithoutSpan=s??-1),h}focusFirstHeader(){var o;if((o=this.overlays)!=null&&o.isExclusive()&&this.focusOverlay())return!0;const e=this.visibleCols.allCols[0];if(!e)return!1;const t=aa(this.beans,e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){var i;if((i=this.overlays)!=null&&i.isExclusive()&&this.focusOverlay(!0))return!0;const t=Ee(this.beans)-1,o=$(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:o},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){var t;return(t=this.filterManager)!=null&&t.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===qe(t)}focusOverlay(e){var o,i;const t=((o=this.overlays)==null?void 0:o.isVisible())&&((i=this.overlays.eWrapper)==null?void 0:i.getGui());return!!t&&ti(t,e)}focusGridView(e){var n,r,l,a,d,c;const{backwards:t=!1,canFocusOverlay:o=!0,event:i}=e;if((n=this.overlays)!=null&&n.isExclusive())return o&&this.focusOverlay(t);if(ii(this.beans))return t&&!rt(this.beans)?this.focusLastHeader():o&&this.focusOverlay(t)?!0:t?!1:to(this.beans,t);const s=t?eh(this.beans):Ju(this.beans);if(s){const u=e.column??((r=this.focusedHeader)==null?void 0:r.column),{rowIndex:h,rowPinned:g}=s,p=it(this.beans,s);if(!u||!p||h==null)return!1;if(u.isSuppressNavigable(p)){const f=this.gos.get("enableRtl");let C;return!i||i.key===y.TAB?C=f?y.LEFT:y.RIGHT:C=i.key,(l=this.beans.navigation)==null||l.navigateToNextCell(null,C,{rowIndex:h,column:u,rowPinned:g||null},!0),!0}if((a=this.navigation)==null||a.ensureCellVisible({rowIndex:h,column:u,rowPinned:g}),t){const f=this.rowRenderer.getRowByPosition(s);if(f!=null&&f.isFullWidth()&&((d=this.navigation)!=null&&d.tryToFocusFullWidthRow(s,t)))return!0}return this.setFocusedCell({rowIndex:h,column:u,rowPinned:qe(g),forceBrowserFocus:!0}),(c=this.beans.rangeSvc)==null||c.setRangeToCell({rowIndex:h,rowPinned:g,column:u}),!0}return!!(o&&this.focusOverlay(t)||t&&this.focusLastHeader())}focusAdvancedFilter(e){var t;return this.advFilterFocusColumn=e==null?void 0:e.column,((t=this.beans.advancedFilter)==null?void 0:t.getCtrl().focusHeaderComp())??!1}focusNextFromAdvancedFilter(e,t){var i;const o=(t?void 0:this.advFilterFocusColumn)??((i=this.visibleCols.allCols)==null?void 0:i[0]);return e?this.focusHeaderPosition({headerPosition:{column:o,headerRowIndex:Ee(this.beans)-1}}):this.focusGridView({column:o})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},Zm=class extends x{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){this.getScrollbarWidth(),this.addManagedEventListeners({displayedColumnsChanged:this.updateScrollVisible.bind(this),displayedColumnsWidthChanged:this.updateScrollVisible.bind(this)})}updateScrollVisible(){const{colAnimation:e}=this;e!=null&&e.isActive()?e.executeLaterVMTurn(()=>{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){var o;const e=this.ctrlsSvc.get("center");if(!e||(o=this.colAnimation)!=null&&o.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){const e=this.ctrlsSvc.get("center"),t=e.hasHorizontalScrollGap(),o=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==o)&&(this.horizontalScrollGap=t,this.verticalScrollGap=o,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(this.scrollbarWidth==null){const e=this.gos.get("scrollbarWidth"),o=typeof e=="number"&&e>=0?e:ec();o!=null&&(this.scrollbarWidth=o,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},Qm=class extends x{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){var i;if(this.destroyCalled)return;const{stateSvc:e,ctrlsSvc:t,context:o}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:(e==null?void 0:e.getState())??{}}),this.destroyCalled=!0,(i=t.get("gridCtrl"))==null||i.destroyGridUi(),o.destroy(),super.destroy()}},ho=new Set(["gridPreDestroyed","fillStart","pasteStart"]),Xm=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","pinnedRowsChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterUiChanged","filterOpened","floatingFilterUiChanged","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged","rowResizeStarted","rowResizeEnded","columnsReset","bulkEditingStarted","bulkEditingStopped","batchEditingStarted","batchEditingStopped"],bi=Xm.reduce((e,t)=>(e[t]=Rc(t),e),{}),go=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),Jm={tag:"span",cls:"ag-sort-indicator-container",children:[go("Order","order"),go("Asc","ascending-icon"),go("Desc","descending-icon"),go("Mixed","mixed-icon"),go("None","none-icon")]},tn=class extends j{constructor(e){super(),this.eSortOrder=A,this.eSortAsc=A,this.eSortDesc=A,this.eSortMixed=A,this.eSortNone=A,e||this.setTemplate(Jm)}attachCustomElements(e,t,o,i,s){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=o,this.eSortMixed=i,this.eSortNone=s}setupSort(e,t=!1){if(this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),!e.isSortable()&&!e.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e);const o=this.updateIcons.bind(this),i=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",o),this.addManagedEventListeners({newColumnsLoaded:o,sortChanged:i,columnRowGroupChanged:i}),this.onSortChanged()}addInIcon(e,t,o){if(t==null)return;const i=Tt(e,this.beans,o);i&&t.appendChild(i)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortNone:o,column:i,gos:s,beans:n}=this,r=n.sortSvc.getDisplaySortForColumn(i);if(e&&Z(e,r==="asc",{skipAriaHidden:!0}),t&&Z(t,r==="desc",{skipAriaHidden:!0}),o){const l=!i.getColDef().unSortIcon&&!s.get("unSortIcon"),a=r==null;Z(o,!l&&a,{skipAriaHidden:!0})}}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:o}=this;this.addInIcon("sortUnSort",e,t);const i=t.getColDef().showRowGroup;Re(o)&&i&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:o}=this;if(e){const i=t.sortSvc.getDisplaySortForColumn(o)==="mixed";Z(e,i,{skipAriaHidden:!0})}}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:o}}=this;if(!e)return;const i=o.getColumnsWithSortingOrdered(),s=o.getDisplaySortIndexForColumn(t)??-1,n=i.some(l=>o.getDisplaySortIndexForColumn(l)??!1),r=s>=0&&n;Z(e,r,{skipAriaHidden:!0}),s>=0?e.textContent=(s+1).toString():he(e)}},ew={selector:"AG-SORT-INDICATOR",component:tn},po=["asc","desc",null],tw=class extends x{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,o){const i=this.getNextSortDirection(e);this.setSortForColumn(e,i,t,o)}progressSortFromEvent(e,t){const i=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,i,"uiColumnSorted")}setSortForColumn(e,t,o,i){var c;t!=="asc"&&t!=="desc"&&(t=null);const{gos:s,showRowGroupCols:n}=this.beans,r=Re(s);let l=[e];if(r&&e.getColDef().showRowGroup){const u=(c=n==null?void 0:n.getSourceColumnsForGroupColumn)==null?void 0:c.call(n,e),h=u==null?void 0:u.filter(g=>g.isSortable());h&&(l=[e,...h])}l.forEach(u=>this.setColSort(u,t,i));const a=(o||s.get("alwaysMultiSort"))&&!s.get("suppressMultiSort"),d=[];if(!a){const u=this.clearSortBarTheseColumns(l,i);d.push(...u)}this.updateSortIndex(e),d.push(...l),this.dispatchSortChangedEvents(i,d)}updateSortIndex(e){const{gos:t,colModel:o,showRowGroupCols:i}=this.beans,s=Re(t),n=i==null?void 0:i.getShowRowGroupCol(e.getId()),r=s&&n||e,l=this.getColumnsWithSortingOrdered();o.forAllCols(c=>this.setColSortIndex(c,null));const a=l.filter(c=>s&&c.getColDef().showRowGroup?!1:c!==r);(r.getSort()?[...a,r]:a).forEach((c,u)=>this.setColSortIndex(c,u))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols(t=>{t.getSort()&&(e=!0)}),e}dispatchSortChangedEvents(e,t){const o={type:"sortChanged",source:e};t&&(o.columns=t),this.eventSvc.dispatchEvent(o)}clearSortBarTheseColumns(e,t){const o=[];return this.beans.colModel.forAllCols(i=>{e.includes(i)||(i.getSort()&&o.push(i),this.setColSort(i,void 0,t))}),o}getNextSortDirection(e){const t=e.getColDef().sortingOrder??this.gos.get("sortingOrder")??po,o=t.indexOf(e.getSort()),i=o<0,s=o==t.length-1;return i||s?t[0]:t[o+1]}getIndexedSortMap(){const{gos:e,colModel:t,showRowGroupCols:o,rowGroupColsSvc:i}=this.beans;let s=[];if(t.forAllCols(d=>{d.getSort()&&s.push(d)}),t.isPivotMode()){const d=Re(e);s=s.filter(c=>{const u=!!c.getAggFunc(),h=!c.isPrimary(),g=d?o==null?void 0:o.getShowRowGroupCol(c.getId()):c.getColDef().showRowGroup;return u||h||g})}const n=(i==null?void 0:i.columns.filter(d=>!!d.getSort()))??[],r={};s.forEach((d,c)=>r[d.getId()]=c),s.sort((d,c)=>{const u=d.getSortIndex(),h=c.getSortIndex();if(u!=null&&h!=null)return u-h;if(u==null&&h==null){const g=r[d.getId()],p=r[c.getId()];return g>p?1:-1}else return h==null?-1:1});const l=Re(e)&&!!n.length;l&&(s=[...new Set(s.map(d=>(o==null?void 0:o.getShowRowGroupCol(d.getId()))??d))]);const a=new Map;return s.forEach((d,c)=>a.set(d,c)),l&&n.forEach(d=>{const c=o.getShowRowGroupCol(d.getId());a.set(d,a.get(c))}),a}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),colId:e.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),column:e}))}canColumnDisplayMixedSort(e){const t=Re(this.gos),o=!!e.getColDef().showRowGroup;return t&&o}getDisplaySortForColumn(e){var r;const t=(r=this.beans.showRowGroupCols)==null?void 0:r.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!(t!=null&&t.length))return e.getSort();const i=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,s=i[0].getSort();return i.every(l=>l.getSort()==s)?s:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t,o){let i=0;e.addManagedListeners(t,{movingChanged:()=>{i=Date.now()}}),o&&e.addManagedElementListeners(o,{click:n=>{const r=t.isMoving(),a=Date.now()-i<50;r||a||this.progressSortFromEvent(t,n)}});const s=()=>{var r;const n=t.getSort();if(e.toggleCss("ag-header-cell-sorted-asc",n==="asc"),e.toggleCss("ag-header-cell-sorted-desc",n==="desc"),e.toggleCss("ag-header-cell-sorted-none",!n),t.getColDef().showRowGroup){const l=(r=this.beans.showRowGroupCols)==null?void 0:r.getSourceColumnsForGroupColumn(t),d=!(l==null?void 0:l.every(c=>t.getSort()==c.getSort()));e.toggleCss("ag-header-cell-sorted-mixed",d)}};e.addManagedEventListeners({sortChanged:s,columnRowGroupChanged:s})}initCol(e){const{sort:t,initialSort:o,sortIndex:i,initialSortIndex:s}=e.colDef;t!==void 0?(t==="asc"||t==="desc")&&(e.sort=t):(o==="asc"||o==="desc")&&(e.sort=o),i!==void 0?i!==null&&(e.sortIndex=i):s!==null&&(e.sortIndex=s)}updateColSort(e,t,o){t!==void 0&&(t==="desc"||t==="asc"?this.setColSort(e,t,o):this.setColSort(e,void 0,o))}setColSort(e,t,o){e.sort!==t&&(e.sort=t,e.dispatchColEvent("sortChanged",o)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new tn(e)}getSortIndicatorSelector(){return ew}},Lt={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agDateColumnFloatingFilter:"DateFilter",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agNewFiltersToolPanel:"NewFiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"},ow=()=>({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."}}),iw={aggFunc:"SharedAggregation",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:e,editable:t})=>t?typeof e=="string"?Lt[e]??"CustomEditor":"CustomEditor":null,cellRenderer:({cellRenderer:e})=>typeof e!="string"?null:Lt[e],cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:e,cellEditor:t})=>e&&!t?"TextEditor":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:e})=>e&&typeof e!="string"&&typeof e!="boolean"?"CustomFilter":typeof e=="string"?Lt[e]??"ColumnFilter":"ColumnFilter",floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",mainMenuItems:"ColumnMenu",menuTabs:e=>{var o;const t=["columnsMenuTab","generalMenuTab"];return(o=e.menuTabs)!=null&&o.some(i=>t.includes(i))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",spanRows:"CellSpan"},sw=()=>({autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(t,{paginationAutoPageSize:o})=>o?"colDef.autoHeight is not supported with paginationAutoPageSize.":null},cellRendererParams:{validate:t=>(t.rowGroup!=null||t.rowGroupIndex!=null||t.cellRenderer==="agGroupCellRenderer")&&"checkbox"in t.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},flex:{validate:(t,o)=>o.autoSizeStrategy?"colDef.flex is not supported with gridOptions.autoSizeStrategy":null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(t,{rowSelection:o})=>o==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:o})=>o==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:o})=>o==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:t=>{const o=t.headerValueGetter;return typeof o=="function"||typeof o=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:t})=>{if(t){if(t.smallDown)return ye(262);if(t.smallLeft)return ye(263);if(t.smallRight)return ye(264)}return null}},sortingOrder:{validate:t=>{const o=t.sortingOrder;if(Array.isArray(o)&&o.length>0){const i=o.filter(s=>!po.includes(s));if(i.length>0)return`sortingOrder must be an array with elements from [${po.map(Ao).join()}], currently it includes [${i.map(Ao).join()}]`}else if(!Array.isArray(o)||o.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${o}`;return null}},type:{validate:t=>{const o=t.type;return o instanceof Array?o.some(s=>typeof s!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof o=="string"?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(t,{suppressRowTransform:o})=>o?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{dependencies:{editable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(t,{rowSelection:o,cellSelection:i,suppressRowTransform:s,enableCellSpan:n,rowDragEntireRow:r,enableCellTextSelection:l})=>typeof o=="object"&&(o==null?void 0:o.mode)==="singleRow"&&o!=null&&o.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":i?"colDef.spanRows is not supported with cellSelection.":s?"colDef.spanRows is not supported with suppressRowTransform.":n?r?"colDef.spanRows is not supported with rowDragEntireRow.":l?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."}}),nw={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0},rw=()=>Object.keys(nw),lw=()=>({objectName:"colDef",allProperties:rw(),docsUrl:"column-properties/",deprecations:ow(),validations:sw()}),aw=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","invalidEditValueMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce","renderingMode"],dw=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","advancedFilterParams","initialState","autoSizeStrategy","selectionColumnDef","findOptions","filterHandlers"],cw=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],da=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns","rowDragInsertDelay"],uw=["theme","rowSelection"],hw=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],ca=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault","enableFilterHandlers","suppressStartEditOnTab","hidePaddedHeaderRows"],gw=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getFullRowEditValidationErrors","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter","isRowPinnable","isRowPinned","isRowValidDropPosition"],on=()=>[...cw,...dw,...aw,...da,...gw,...ca,...hw,...uw],pw=()=>({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."}});function Pe(e,t,o){return typeof t=="number"||t==null?t==null||t>=o?null:`${e}: value should be greater than or equal to ${o}`:`${e}: value should be a number`}var fw={alignedGrids:"AlignedGrids",allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",invalidEditValueMode:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getFullRowEditValidationErrors:"EditCore",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:"SharedRowGrouping",grandTotalRow:"SharedRowGrouping",initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isRowPinnable:"PinnedRow",isRowPinned:"PinnedRow",localeText:"Locale",masterDetail:"SharedMasterDetail",pagination:"Pagination",pinnedBottomRowData:"PinnedRow",pinnedTopRowData:"PinnedRow",pivotMode:"SharedPivot",pivotPanelShow:"RowGroupingPanel",quickFilterText:"QuickFilter",rowClass:"RowStyle",rowClassRules:"RowStyle",rowData:"ClientSideRowModel",rowDragManaged:"RowDrag",rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:"SharedRowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:"SharedTreeData",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},Cw=()=>{const e={autoSizePadding:{validate({autoSizePadding:o}){return Pe("autoSizePadding",o,0)}},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:o}){return Pe("cacheBlockSize",o,1)}},cacheOverflowSize:{validate({cacheOverflowSize:o}){return Pe("cacheOverflowSize",o,1)}},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:o=>{const i=o.domLayout,s=["autoHeight","normal","print"];return i&&!s.includes(i)?`domLayout must be one of [${s.join()}], currently it's ${i}`:null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate({enableRowPinning:o,pinnedTopRowData:i,pinnedBottomRowData:s}){return o&&(i||s)?"Manual row pinning cannot be used together with pinned row data. Either set `enableRowPinning` to `false`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":null}},isRowPinnable:{supportedRowModels:["clientSide"],validate({enableRowPinning:o,isRowPinnable:i,pinnedTopRowData:s,pinnedBottomRowData:n}){return i&&(s||n)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!o&&i?"`isRowPinnable` requires `enableRowPinning` to be set.":null}},isRowPinned:{supportedRowModels:["clientSide"],validate({enableRowPinning:o,isRowPinned:i,pinnedTopRowData:s,pinnedBottomRowData:n}){return i&&(s||n)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!o&&i?"`isRowPinned` requires `enableRowPinning` to be set.":null}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},icons:{validate:({icons:o})=>{if(o){if(o.smallDown)return ye(262);if(o.smallLeft)return ye(263);if(o.smallRight)return ye(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:o}){return Pe("infiniteInitialRowCount",o,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},keepDetailRowsCount:{validate({keepDetailRowsCount:o}){return Pe("keepDetailRowsCount",o,1)}},paginationPageSize:{validate({paginationPageSize:o}){return Pe("paginationPageSize",o,1)}},paginationPageSizeSelector:{validate:o=>{const i=o.paginationPageSizeSelector;return typeof i=="boolean"||i==null||i.length?null:`'paginationPageSizeSelector' cannot be an empty array.
|
|
19
|
-
If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate({rowBuffer:o}){return Pe("rowBuffer",o,0)}},rowClass:{validate:o=>typeof o.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:o}){return o&&typeof o=="string"?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':o&&typeof o!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":o&&o.mode!=="multiRow"&&o.mode!=="singleRow"?`Selection mode "${o.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null}},rowStyle:{validate:o=>{const i=o.rowStyle;return i&&typeof i=="function"?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null}},serverSideDatasource:{supportedRowModels:["serverSide"]},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:o}){return Pe("serverSideInitialRowCount",o,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:o=>{const i=o.sortingOrder;if(Array.isArray(i)&&i.length>0){const s=i.filter(n=>!po.includes(n));if(s.length>0)return`sortingOrder must be an array with elements from [${po.map(Ao).join()}], currently it includes [${s.map(Ao).join()}]`}else if(!Array.isArray(i)||i.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${i}`;return null}},tooltipHideDelay:{validate:o=>o.tooltipHideDelay&&o.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:o=>o.tooltipShowDelay&&o.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:o=>{const i=o.rowModelType??"clientSide";switch(i){case"clientSide":{const{treeDataChildrenField:s,treeDataParentIdField:n,getDataPath:r,getRowId:l}=o;if(!s&&!n&&!r)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(s){if(r)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(n)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(n){if(!l)return"getRowId callback not provided, tree data with parent id cannot be built.";if(r)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":{const s=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${i} row model.`;return o.isServerSideGroup&&o.getServerSideGroupKey?null:s}}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:o}){return Pe("viewportRowModelBufferSize",o,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:o}){return Pe("viewportRowModelPageSize",o,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate({autoGroupColumnDef:o,showOpenedGroup:i}){return o!=null&&o.field&&i?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":o!=null&&o.valueGetter&&i?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null}},renderingMode:{validate:o=>{const i=o.renderingMode,s=["default","legacy"];return i&&!s.includes(i)?`renderingMode must be one of [${s.join()}], currently it's ${i}`:null}}},t={};return ca.forEach(o=>{t[o]={expectedType:"boolean"}}),da.forEach(o=>{t[o]={expectedType:"number"}}),re(t,e),t},mw=()=>({objectName:"gridOptions",allProperties:[...on(),...Object.values(bi)],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:pw(),validations:Cw()}),ww=0,vw=0,bw=class extends x{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.gridInstanceId=vw++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new je,this.globalEventHandlerFactory=e=>(t,o)=>{if(!this.isAlive())return;const i=ho.has(t);if(i&&!e||!i&&e||!Sw(t))return;const s=(n,r)=>{const l=bi[n],a=this.gridOptions[l];typeof a=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>a(r))};if(this.gridReadyFired)s(t,o);else if(t==="gridReady"){s(t,o),this.gridReadyFired=!0;for(const n of this.queueEvents)s(n.eventName,n.event);this.queueEvents=[]}else this.queueEvents.push({eventName:t,event:o})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getGridId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.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:"gridOptionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){return this.gridOptions[e]??Hd[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return M(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(o=>e(this.addGridCommonParams(o)))}updateGridOptions({options:e,force:t,source:o="api"}){const i={id:ww++,properties:[]},s=[],{gridOptions:n,validation:r}=this;for(const l of Object.keys(e)){const a=e[l];r==null||r.warnOnInitialPropertyUpdate(o,l);const d=t||typeof a=="object"&&o==="api",c=n[l];if(d||c!==a){n[l]=a;const u={type:l,currentValue:a,previousValue:c,changeSet:i,source:o};s.push(u)}}this.validateGridOptions(this.gridOptions),i.properties=s.map(l=>l.type),s.forEach(l=>{jt(this,`Updated property ${l.type} from`,l.previousValue," to ",l.currentValue),this.propEventSvc.dispatchEvent(l)})}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addGridCommonParams(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t){for(const o of Object.keys(e)){const i=e[o];if(i==null||i===!1)continue;let s=t[o];typeof s=="function"&&(s=s(e,this.gridOptions,this.beans)),s&&this.assertModuleRegistered(s,o)}}validateGridOptions(e){var t;this.validateOptions(e,fw),(t=this.validation)==null||t.processGridOptions(e)}validateColDef(e,t,o){var i,s;(o||!((i=this.beans.dataTypeSvc)!=null&&i.isColPendingInference(t)))&&(this.validateOptions(e,iw),(s=this.validation)==null||s.validateColDef(e))}assertModuleRegistered(e,t){const o=Array.isArray(e)?e.some(i=>this.isModuleRegistered(i)):this.isModuleRegistered(e);return o||U(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),o}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:us(),rowModelType:this.get("rowModelType"),isUmd:$u()}}isModuleRegistered(e){return cs(e,this.gridId,this.get("rowModelType"))}};function Sw(e){return!!bi[e]}function ua(e){const t={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:t},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:t},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:t},e?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var yw=ua(!0),Rw=ua(!1),Ew=class extends j{constructor(){super(...arguments),this.eFilter=A,this.eFilterButton=A,this.eSortIndicator=A,this.eMenu=A,this.eLabel=A,this.eText=A,this.eSortOrder=A,this.eSortAsc=A,this.eSortDesc=A,this.eSortMixed=A,this.eSortNone=A,this.isLoadingInnerComponent=!1}refresh(e){var o,i,s;const t=this.params;if(this.params=e,this.workOutTemplate(e,!!((o=this.beans)!=null&&o.sortSvc))!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){const n={...e};re(n,e.innerHeaderComponentParams),(s=(i=this.innerHeaderComponent).refresh)==null||s.call(i,n)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){const o=e.template;return o?o!=null&&o.trim?o.trim():o:t?yw:Rw}init(e){this.params=e;const{sortSvc:t,touchSvc:o,rowNumbersSvc:i,userCompFactory:s}=this.beans,n=t==null?void 0:t.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!n),this.setTemplate(this.currentTemplate,n?[n]:void 0),o==null||o.setupForHeader(this),this.setMenu(),this.setupSort(),i==null||i.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(s,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const o=Fu(e,t,t);o&&(this.isLoadingInnerComponent=!0,o.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderComponent=i,this.eText&&this.eText.appendChild(i.getGui())):this.destroyBean(i))}))}setDisplayName(e){const{displayName:t}=e,o=this.currentDisplayName;this.currentDisplayName=t,!(!this.eText||o===t||this.innerHeaderComponent||this.isLoadingInnerComponent)&&(this.eText.textContent=bt(t))}addInIcon(e,t,o){const i=Tt(e,this.beans,o);i&&t.appendChild(i)}workOutShowMenu(){var e;return this.params.enableMenu&&!!((e=this.beans.menuSvc)!=null&&e.isHeaderMenuButtonEnabled())}shouldSuppressMenuHide(){var e;return!!((e=this.beans.menuSvc)!=null&&e.isHeaderMenuButtonAlwaysShowEnabled())}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){Ae(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:o}=this,i=Bo(e);this.addInIcon(i?"menu":"menuAlt",t,o.column),t.classList.toggle("ag-header-menu-icon",!i);const s=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=s,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(s)}toggleMenuAlwaysShow(e){var t;(t=this.eMenu)==null||t.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){const{currentSuppressMenuHide:t,params:o}=this;t||this.toggleMenuAlwaysShow(!0),o.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){var a;const{params:t,gos:o,beans:i,eMenu:s,eFilterButton:n}=this,r=t.column,l=Bo(o);if(e&&!l){if((a=i.menuSvc)!=null&&a.isFilterMenuInHeaderEnabled(r))return t.showFilter(n??s??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(s??n??this.getGui()),!0;return!1}setupSort(){const{sortSvc:e}=this.beans;if(!e)return;const{enableSorting:t,column:o}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));const{eSortIndicator:i,eSortOrder:s,eSortAsc:n,eSortDesc:r,eSortMixed:l,eSortNone:a}=this;i.attachCustomElements(s,n,r,l,a)}this.eSortIndicator.setupSort(o),this.currentSort&&e.setupHeader(this,o,this.eLabel)}setupFilterIcon(){const{eFilter:e,params:t}=this;if(!e)return;const o=()=>{const i=t.column.isFilterActive();Z(e,i,{skipAriaHidden:!0})};this.configureFilter(t.enableFilterIcon,e,o,"filterActive")}setupFilterButton(){const{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0}configureFilter(e,t,o,i){if(!e)return Ae(t),!1;const s=this.params.column;return this.addInIcon(i,t,s),this.addManagedListeners(s,{filterChanged:o}),o(),!0}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:o}=this;return e?t??o??this.getGui():o??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent&&(this.destroyBean(this.innerHeaderComponent),this.innerHeaderComponent=void 0)}},xw={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"}]},Dw=class extends j{constructor(){super(xw),this.agOpened=A,this.agClosed=A,this.agLabel=A,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t,touchSvc:o}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),o==null||o.setupForHeaderGroup(this)}checkWarnings(){this.params.template&&k(89)}workOutInnerHeaderGroupComponent(e,t){const o=Tu(e,t,t);o&&(this.isLoadingInnerComponent=!0,o.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderGroupComponent=i,this.agLabel.appendChild(i.getGui())):this.destroyBean(i))}))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:o},beans:i}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const s=a=>{if(ke(a))return;const d=!o.isExpanded();i.colGroupSvc.setColumnGroupOpened(o.getProvidedColumnGroup(),d,"uiColumnExpanded")};this.addTouchAndClickListeners(i,t,s),this.addTouchAndClickListeners(i,e,s);const n=a=>{vt(a)};this.addManagedElementListeners(t,{dblclick:n}),this.addManagedElementListeners(e,{dblclick:n}),this.addManagedElementListeners(this.getGui(),{dblclick:s}),this.updateIconVisibility();const r=o.getProvidedColumnGroup(),l=this.updateIconVisibility.bind(this);this.addManagedListeners(r,{expandedChanged:l,expandableChanged:l})}addTouchAndClickListeners(e,t,o){var i;(i=e.touchSvc)==null||i.setupForHeaderGroupElement(this,t,o),this.addManagedElementListeners(t,{click:o})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:o}}=this;if(o.isExpandable()){const i=o.isExpanded();Z(e,i),Z(t,!i)}else Z(e,!1),Z(t,!1)}addInIcon(e,t){const o=Tt(e,this.beans,null);o&&t.appendChild(o)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:o}=this;Z(t,!1),Z(o,!1);return}}setupLabel(e){var s;const{displayName:t,columnGroup:o}=e,i=this.innerHeaderGroupComponent||this.isLoadingInnerComponent;M(t)&&!i&&(this.agLabel.textContent=bt(t)),this.toggleCss("ag-sticky-label",!((s=o.getColGroupDef())!=null&&s.suppressStickyLabel))}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},Fw={moduleName:"ColumnHeaderComp",version:G,userComponents:{agColumnHeader:Ew},icons:{menu:"menu",menuAlt:"menu-alt"}},Pw={moduleName:"ColumnGroupHeaderComp",version:G,userComponents:{agColumnGroupHeader:Dw},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},Tw=class extends x{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&&k(92)}createTask(e,t,o,i,s=!1){this.verify();let n=o;i&&this.batchFrameworkComps&&(n="f1");const r={task:e,index:t,createOrder:++this.taskCount,deferred:s};this.addTaskToList(this[n],r),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((o,i)=>o.deferred!==i.deferred?o.deferred?-1:1:o.index!==i.index?t*(i.index-o.index):i.createOrder-o.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){const{p1:t,p2:o,f1:i,destroyTasks:s,beans:n}=this,{ctrlsSvc:r,frameworkOverrides:l}=n,a=t.list,d=o.list,c=i.list,u=Date.now();let h=0;const g=e<=0,p=r.getScrollFeature();for(;g||h<e;){if(!p.scrollGridIfNeeded()){let C;if(a.length)this.sortTaskList(t),C=a.pop().task;else if(d.length)this.sortTaskList(o),C=d.pop().task;else if(c.length)l.wrapOutgoing(()=>{for(;(g||h<e)&&!p.scrollGridIfNeeded();){if(c.length)this.sortTaskList(i),C=c.pop().task,C();else break;h=Date.now()-u}}),C=()=>{};else if(s.length)C=s.pop();else break;C()}h=Date.now()-u}a.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);Ne(this.beans,e)}isQueueEmpty(){return!this.ticking}},Iw={moduleName:"AnimationFrame",version:G,beans:[Tw]},Aw=class extends x{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eBodyViewport,t)}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t)}mockRowContextMenu(e){if(!gt())return;const t=(o,i,s)=>{var l;const{rowCtrl:n,cellCtrl:r}=e.getControlsForEventTarget((s==null?void 0:s.target)??null);r!=null&&r.column&&r.dispatchCellContextMenuEvent(s??null),(l=this.beans.contextMenuSvc)==null||l.handleContextMenuMouseEvent(void 0,s,n,r)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!gt()||lr("dblclick"))return!1;const i=Date.now(),s=i-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=i,s})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){const{gos:t,sortSvc:o,menuSvc:i}=this.beans;if(t.get("suppressTouch"))return;const{params:s,eMenu:n,eFilterButton:r}=e,l=new lt(e.getGui(),!0),a=e.shouldSuppressMenuHide(),d=a&&M(n)&&s.enableMenu,c=d?new lt(n,!0):l;if(s.enableMenu||i!=null&&i.isHeaderContextMenuEnabled(s.column)){const u=d?"tap":"longTap",h=g=>s.showColumnMenuAfterMouseClick(g.touchStart);e.addManagedListeners(c,{[u]:h})}if(s.enableSorting){const u=h=>{const g=h.touchStart.target;a&&(n!=null&&n.contains(g)||r!=null&&r.contains(g))||o==null||o.progressSort(s.column,!1,"uiColumnSorted")};e.addManagedListeners(l,{tap:u})}if(s.enableFilterButton&&r){const u=new lt(r,!0);e.addManagedListeners(u,{tap:()=>s.showFilter(r)}),e.addDestroyFunc(()=>u.destroy())}e.addDestroyFunc(()=>l.destroy()),d&&e.addDestroyFunc(()=>c.destroy())}setupForHeaderGroup(e){var o;const t=e.params;if((o=this.beans.menuSvc)!=null&&o.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){const i=new lt(t.eGridHeader,!0),s=n=>t.showColumnMenuAfterMouseClick(n.touchStart);e.addManagedListeners(i,{longTap:s}),e.addDestroyFunc(()=>i.destroy())}}setupForHeaderGroupElement(e,t,o){const i=new lt(t,!0);e.addManagedListeners(i,{tap:o}),e.addDestroyFunc(()=>i.destroy())}mockContextMenu(e,t,o){if(!gt())return;const i=new lt(t),s=n=>{oo(this.gos,n.touchEvent)&&o(void 0,n.touchStart,n.touchEvent)};e.addManagedListeners(i,{longTap:s}),e.addDestroyFunc(()=>i.destroy())}},Mw={moduleName:"Touch",version:G,beans:[Aw]},kw=class extends x{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,o=!1){return o?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const o=e===y.UP,i=e===y.DOWN,s=e===y.LEFT;let n,r;const{pageBounds:l,gos:a,visibleCols:d,pinnedRowModel:c}=this.beans,{rowPinned:u}=t;if(o||i)u&&c?o?r=0:r=u==="top"?c.getPinnedTopRowCount()-1:c.getPinnedBottomRowCount()-1:r=o?l.getFirstRow():l.getLastRow(),n=t.column;else{const h=a.get("enableRtl");r=t.rowIndex,n=(s!==h?d.allCols:[...d.allCols].reverse()).find(p=>this.isCellGoodToFocusOn({rowIndex:r,rowPinned:null,column:p}))}return n?{rowIndex:r,rowPinned:u,column:n}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let o=t,i=!1;for(;!i;){switch(e){case y.UP:o=this.getCellAbove(o);break;case y.DOWN:o=this.getCellBelow(o);break;case y.RIGHT:o=this.gos.get("enableRtl")?this.getCellToLeft(o):this.getCellToRight(o);break;case y.LEFT:o=this.gos.get("enableRtl")?this.getCellToRight(o):this.getCellToLeft(o);break;default:o=null,k(8,{key:e});break}o?i=this.isCellGoodToFocusOn(o):i=!0}return o}isCellGoodToFocusOn(e){const t=e.column;let o;const{pinnedRowModel:i,rowModel:s}=this.beans;switch(e.rowPinned){case"top":o=i==null?void 0:i.getPinnedTopRow(e.rowIndex);break;case"bottom":o=i==null?void 0:i.getPinnedBottomRow(e.rowIndex);break;default:o=s.getRow(e.rowIndex);break}return o?!this.isSuppressNavigable(t,o):!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){var i;if(!e)return null;const t=((i=this.rowSpanSvc)==null?void 0:i.getCellEnd(e))??e,o=Or(this.beans,t);return o?{rowIndex:o.rowIndex,column:e.column,rowPinned:o.rowPinned}:null}getCellAbove(e){var i;if(!e)return null;const t=((i=this.rowSpanSvc)==null?void 0:i.getCellStart(e))??e,o=Zo(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned});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:o}=this.beans,i=t.allCols;let s=e.rowIndex,n=e.rowPinned,r=t.getColAfter(e.column);if(!r){r=i[0];const l=Or(this.beans,e);if(K(l)||!l.rowPinned&&!((o==null?void 0:o.isRowInPage(l.rowIndex))??!0))return null;s=l?l.rowIndex:null,n=l?l.rowPinned:null}return{rowIndex:s,column:r,rowPinned:n}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:o,pagination:i}=t,s=o.allCols;let n=e.rowIndex,r=e.rowPinned,l=o.getColBefore(e.column);if(!l){l=$(s);const a=Zo(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(K(a)||!a.rowPinned&&!((i==null?void 0:i.isRowInPage(a.rowIndex))??!0))return null;n=a?a.rowIndex:null,r=a?a.rowPinned:null}return{rowIndex:n,column:l,rowPinned:r}}isSuppressNavigable(e,t){const{suppressNavigable:o}=e.colDef;if(typeof o=="boolean")return o;if(typeof o=="function"){const i=e.createColumnFunctionCallbackParams(t);return o(i)}return!1}};function Lw(e){return e.focusSvc.getFocusedCell()}function Gw(e){return e.focusSvc.clearFocusedCell()}function Hw(e,t,o,i){e.focusSvc.setFocusedCell({rowIndex:t,column:o,rowPinned:i,forceBrowserFocus:!0})}function Ow(e,t){var o;return((o=e.navigation)==null?void 0:o.tabToNextCell(!1,t))??!1}function Bw(e,t){var o;return((o=e.navigation)==null?void 0:o.tabToNextCell(!0,t))??!1}function Vw(e,t,o=!1){var s;const i=(s=e.headerNavigation)==null?void 0:s.getHeaderPositionForColumn(t,o);i&&e.focusSvc.focusHeaderPosition({headerPosition:i})}var Nw=class extends x{constructor(){super(),this.beanName="navigation",this.onPageDown=Un(this.onPageDown,100),this.onPageUp=Un(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const o=e.key,i=e.altKey,s=e.ctrlKey||e.metaKey,n=!!this.beans.rangeSvc&&e.shiftKey,r=Lh(this.gos,e);let l=!1;switch(o){case y.PAGE_HOME:case y.PAGE_END:!s&&!i&&(this.onHomeOrEndKey(o),l=!0);break;case y.LEFT:case y.RIGHT:case y.UP:case y.DOWN:if(!r)return!1;s&&!i&&!n&&(this.onCtrlUpDownLeftRight(o,r),l=!0);break;case y.PAGE_DOWN:case y.PAGE_UP:!s&&!i&&(l=this.handlePageUpDown(o,r,t));break}return l&&e.preventDefault(),l}handlePageUpDown(e,t,o){return o&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===y.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:o,focusIndex:i,focusColumn:s,isAsync:n,rowPinned:r}){const{scrollFeature:l}=this.gridBodyCon;M(o)&&!o.isPinned()&&l.ensureColumnVisible(o),M(e)&&l.ensureIndexVisible(e,t),n||l.ensureIndexVisible(i);const{focusSvc:a,rangeSvc:d}=this.beans;a.setFocusedCell({rowIndex:i,column:s,rowPinned:r,forceBrowserFocus:!0}),d==null||d.setRangeToCell({rowIndex:i,rowPinned:r,column:s})}onPageDown(e){const t=this.beans,o=sn(t),i=this.getViewportHeight(),{pageBounds:s,rowModel:n,rowAutoHeight:r}=t,l=s.getPixelOffset(),a=o.top+i,d=n.getRowIndexAtPixel(a+l);r!=null&&r.active?this.navigateToNextPageWithAutoHeight(e,d):this.navigateToNextPage(e,d)}onPageUp(e){const t=this.beans,o=sn(t),{pageBounds:i,rowModel:s,rowAutoHeight:n}=t,r=i.getPixelOffset(),l=o.top,a=s.getRowIndexAtPixel(l+r);n!=null&&n.active?this.navigateToNextPageWithAutoHeight(e,a,!0):this.navigateToNextPage(e,a,!0)}navigateToNextPage(e,t,o=!1){const{pageBounds:i,rowModel:s}=this.beans,n=this.getViewportHeight(),r=i.getFirstRow(),l=i.getLastRow(),a=i.getPixelOffset(),d=s.getRow(e.rowIndex),c=o?(d==null?void 0:d.rowHeight)-n-a:n-a,u=(d==null?void 0:d.rowTop)+c;let h=s.getRowIndexAtPixel(u+a);if(h===e.rowIndex){const p=o?-1:1;t=h=e.rowIndex+p}let g;o?(g="bottom",h<r&&(h=r),t<r&&(t=r)):(g="top",h>l&&(h=l),t>l&&(t=l)),this.isRowTallerThanView(s.getRow(h))&&(t=h,g="top"),this.navigateTo({scrollIndex:t,scrollType:g,scrollColumn:null,focusIndex:h,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,o=!1){this.navigateTo({scrollIndex:t,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const i=this.getNextFocusIndexForAutoHeight(e,o);this.navigateTo({scrollIndex:t,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:i,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const o=t?-1:1,i=this.getViewportHeight(),{pageBounds:s,rowModel:n}=this.beans,r=s.getLastRow();let l=0,a=e.rowIndex;for(;a>=0&&a<=r;){const d=n.getRow(a);if(d){const c=d.rowHeight??0;if(l+c>i)break;l+=c}a+=o}return Math.max(0,Math.min(a,r))}getViewportHeight(){const e=this.beans,t=sn(e),o=this.beans.scrollVisibleSvc.getScrollbarWidth();let i=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(i-=o),i}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const o=this.beans.cellNavigation.getNextCellToFocus(e,t,!0),{rowIndex:i,rowPinned:s}=o,n=o.column;this.navigateTo({scrollIndex:i,scrollType:null,scrollColumn:n,focusIndex:i,focusColumn:n,rowPinned:s})}onHomeOrEndKey(e){const t=e===y.PAGE_HOME,{visibleCols:o,pageBounds:i,rowModel:s}=this.beans,n=o.allCols,r=t?i.getFirstRow():i.getLastRow(),l=s.getRow(r);if(!l)return;const a=(t?n:[...n].reverse()).find(d=>!d.isSuppressNavigable(l));a&&this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:a,focusIndex:r,focusColumn:a})}onTabKeyDown(e,t){const o=t.shiftKey,i=this.tabToNextCellCommon(e,o,t),s=this.beans,{ctrlsSvc:n,pageBounds:r,focusSvc:l,gos:a}=s;if(i!==!1){i?t.preventDefault():i===null&&n.get("gridCtrl").allowFocusForNextCoreContainer(o);return}if(o){const{rowIndex:d,rowPinned:c}=e.getRowPosition();(c?d===0:d===r.getFirstRow())&&(a.get("headerHeight")===0||rt(s)?to(s,!0,!0):(t.preventDefault(),l.focusPreviousFromFirstCell(t)))}else e instanceof Pt&&e.focusCell(!0),(!o&&l.focusOverlay(!1)||to(s,o))&&t.preventDefault()}tabToNextCell(e,t){const o=this.beans,{focusSvc:i,rowRenderer:s}=o,n=i.getFocusedCell();if(!n)return!1;let r=Yo(o,n);return!r&&(r=s.getRowByPosition(n),!r||!r.isFullWidth())?!1:!!this.tabToNextCellCommon(r,e,t,"api")}tabToNextCellCommon(e,t,o,i="ui"){var a;const{editSvc:s,focusSvc:n}=this.beans;let r;const l=e instanceof Pt?e:(a=e.getAllCellCtrls())==null?void 0:a[0];return s!=null&&s.isEditing()?r=s==null?void 0:s.moveToNextCell(l,t,o,i):r=this.moveToNextCellNotEditing(e,t,o),r===null?r:r||!!n.focusedHeader}moveToNextCellNotEditing(e,t,o){const i=this.beans.visibleCols.allCols;let s;if(e instanceof ai){if(s={...e.getRowPosition(),column:t?i[0]:$(i)},this.gos.get("embedFullWidthRows")&&o){const r=e.findFullWidthInfoForEvent(o);r&&(s.column=r.column)}}else s=e.getFocusedCellPosition();const n=this.findNextCellToFocusOn(s,{backwards:t,startEditing:!1});if(n===!1)return null;if(n instanceof Pt)n.focusCell(!0);else if(n)return this.tryToFocusFullWidthRow(n,t);return M(n)}findNextCellToFocusOn(e,{backwards:t,startEditing:o,skipToNextEditableCell:i}){let s=e;const n=this.beans,{cellNavigation:r,gos:l,focusSvc:a,rowRenderer:d,rangeSvc:c}=n;for(;;){e!==s&&(e=s),t||(s=this.getLastCellOfColSpan(s)),s=r.getNextTabbedCell(s,t);const u=l.getCallback("tabToNextCell");if(M(u)){const f=u({backwards:t,editing:o,previousCellPosition:e,nextCellPosition:s||null});if(f===!0)s=e;else{if(f===!1)return!1;s={rowIndex:f.rowIndex,column:f.column,rowPinned:f.rowPinned}}}if(!s)return null;if(s.rowIndex<0){const p=Ee(n);return a.focusHeaderPosition({headerPosition:{headerRowIndex:p+s.rowIndex,column:s.column},fromCell:!0}),null}const h=l.get("editType")==="fullRow";if(o&&(!h||i)&&!this.isCellEditable(s))continue;this.ensureCellVisible(s);const g=Yo(n,s);if(!g){const p=d.getRowByPosition(s);if(!p||!p.isFullWidth()||o)continue;return{...p.getRowPosition(),column:s==null?void 0:s.column}}if(!r.isSuppressNavigable(g.column,g.rowNode))return g.setFocusedCellPosition(s),c==null||c.setRangeToCell(s),g}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:o,rowModel:i}=this.beans;return t==="top"?o==null?void 0:o.getPinnedTopRow(e):t==="bottom"?o==null?void 0:o.getPinnedBottomRow(e):i.getRow(e)}navigateToNextCell(e,t,o,i){let s=o,n=!1;const r=this.beans,{cellNavigation:l,focusSvc:a,gos:d}=r;for(;s&&(s===o||!this.isValidNavigateCell(s));)d.get("enableRtl")?t===y.LEFT&&(s=this.getLastCellOfColSpan(s)):t===y.RIGHT&&(s=this.getLastCellOfColSpan(s)),s=l.getNextCellToFocus(t,s),n=K(s);if(n&&e&&e.key===y.UP&&(s={rowIndex:-1,rowPinned:null,column:o.column}),i){const u=d.getCallback("navigateToNextCell");if(M(u)){const g=u({key:t,previousCellPosition:o,nextCellPosition:s||null,event:e});M(g)?s={rowPinned:g.rowPinned,rowIndex:g.rowIndex,column:g.column}:s=null}}if(!s)return;if(s.rowIndex<0){const u=Ee(r);a.focusHeaderPosition({headerPosition:{headerRowIndex:u+s.rowIndex,column:o.column},event:e||void 0,fromCell:!0});return}const c=this.getNormalisedPosition(s);c?this.focusPosition(c):this.tryToFocusFullWidthRow(s)}getNormalisedPosition(e){var i;if(!!((i=this.beans.spannedRowRenderer)!=null&&i.getCellByPosition(e)))return e;this.ensureCellVisible(e);const o=Yo(this.beans,e);return o?(e=o.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:o,rowRenderer:i,focusSvc:s,eventSvc:n}=this.beans,r=o.allCols,l=i.getRowByPosition(e);if(!l||!l.isFullWidth())return!1;const a=s.getFocusedCell(),d={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?$(r):r[0])};this.focusPosition(d);const c=t??(a!=null&&Xu(d,a));return n.dispatchEvent({type:"fullWidthRowFocused",rowIndex:d.rowIndex,rowPinned:d.rowPinned,column:d.column,isFullWidthCell:!0,fromBelow:c}),!0}focusPosition(e){const{focusSvc:t,rangeSvc:o}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),o==null||o.setRangeToCell(e)}isValidNavigateCell(e){return!!it(this.beans,e)}getLastCellOfColSpan(e){const t=Yo(this.beans,e);if(!t)return e;const o=t.getColSpanningList();return o.length===1?e:{rowIndex:e.rowIndex,column:$(o),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=ir(this.gos),o=this.beans.rowModel.getRow(e.rowIndex),i=t&&(o==null?void 0:o.sticky),{scrollFeature:s}=this.gridBodyCon;!i&&K(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 sn(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var _w={moduleName:"KeyboardNavigation",version:G,beans:[Nw,kw,Km],apiFunctions:{getFocusedCell:Lw,clearFocusedCell:Gw,setFocusedCell:Hw,setFocusedHeader:Vw,tabToNextCell:Ow,tabToPreviousCell:Bw}},Ww=class extends x{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==null?void 0:e.animate)??!1,newData:(e==null?void 0:e.newData)??!1,newPage:(e==null?void 0:e.newPage)??!1,newPageSize:(e==null?void 0:e.newPageSize)??!1,keepRenderedRows:(e==null?void 0:e.keepRenderedRows)??!1})}calculatePages(){const{pageBounds:e,pagination:t,rowModel:o}=this.beans;t?t.calculatePages():e.calculateBounds(0,o.getRowCount()-1)}},zw=class extends x{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){var e;return((e=this.topRowBounds)==null?void 0:e.rowIndex)??-1}getLastRow(){var e;return((e=this.bottomRowBounds)==null?void 0:e.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,o=(e==null?void 0:e.rowTop)??0,i=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:o,pageLastPixel:i}}calculateBounds(e,t){const{rowModel:o}=this.beans,i=o.getRowBounds(e);i&&(i.rowIndex=e),this.topRowBounds=i;const s=o.getRowBounds(t);s&&(s.rowIndex=t),this.bottomRowBounds=s,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){var t;const e=((t=this.topRowBounds)==null?void 0:t.rowTop)??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},$w=".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}",Uw=class extends x{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 o of this.elements)o&&(Z(o,t),Ve(o,e))}},Kw=class extends x{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const{gos:e,visibleCols:t,eventSvc:o}=this.beans,i=ee(e,"print"),s=i?0:t.getColsLeftWidth(),n=i?0:t.getDisplayedColumnsRightWidth();s!=this.leftWidth&&(this.leftWidth=s,o.dispatchEvent({type:"leftPinnedWidthChanged"})),n!=this.rightWidth&&(this.rightWidth=n,o.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const e=this.gridBodyCtrl.eBodyViewport,t=Ut(e);if(t<=50)return;const o=this.getPinnedColumnsOverflowingViewport(t-50),i=this.gos.getCallback("processUnpinnedColumns"),{columns:s,hasLockedPinned:n}=o;let r=s;!r.length&&!n||(i&&(r=i({columns:r,viewportWidth:t})),!(!r||!r.length)&&(r=r.filter(l=>!ot(l)),this.setColsPinned(r,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new Uw(e,t)}setColsPinned(e,t,o){const{colModel:i,colAnimation:s,visibleCols:n,gos:r}=this.beans;if(!i.cols||!(e!=null&&e.length))return;if(ee(r,"print")){k(37);return}s==null||s.start();let l;t===!0||t==="left"?l="left":t==="right"?l="right":l=null;const a=[];e.forEach(d=>{if(!d)return;const c=i.getCol(d);c&&c.getPinned()!==l&&(this.setColPinned(c,l),a.push(c))}),a.length&&(n.refresh(o),Er(this.eventSvc,a,o)),s==null||s.finish()}initCol(e){const{pinned:t,initialPinned:o}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,o)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){const{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;const o=e.pinned==="left",i=e.pinned==="right";e.hidden=!0;const s=()=>{const n=o?this.leftWidth:this.rightWidth;if(n==null)return;const r=n==0,l=e.hidden!==r,a=this.gos.get("enableRtl"),d=t.getScrollbarWidth(),u=t.verticalScrollShowing&&(a&&o||!a&&i)?n+d:n;e.comp.setPinnedContainerWidth(`${u}px`),e.comp.setDisplayed(!r),l&&(e.hidden=r,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:s,rightPinnedWidthChanged:s,scrollVisibilityChanged:s,scrollbarWidthChanged:s})}getHeaderResizeDiff(e,t){if(t.getPinned()){const{leftWidth:i,rightWidth:s}=this,n=Ut(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(i+s+e>n)if(n>i+s)e=n-i-s;else return 0}return e}getPinnedColumnsOverflowingViewport(e){const t=this.rightWidth??0,o=this.leftWidth??0,i=t+o;let s=!1;if(i<e)return{columns:[],hasLockedPinned:s};const{visibleCols:n}=this.beans,r=[...n.leftCols],l=[...n.rightCols];let a=0,d=0;const c=0,u=[];let h=i-c-e;for(;(d<r.length||a<l.length)&&h>0;){if(a<l.length){const g=l[a++];if(g.colDef.lockPinned){s=!0;continue}h-=g.getActualWidth(),u.push(g)}if(d<r.length&&h>0){const g=r[d++];if(g.colDef.lockPinned){s=!0;continue}h-=g.getActualWidth(),u.push(g)}}return{columns:u,hasLockedPinned:s}}},jw={moduleName:"PinnedColumn",version:G,beans:[Kw],css:[$w]},qw=class extends x{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=ge(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=J(e),o=this.descriptionContainer=t.createElement("div");o.classList.add("ag-aria-description-container"),xn(o,"polite"),Nd(o,"additions text"),Vd(o,!0),e.eGridDiv.appendChild(o)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{this.handleAnnouncementUpdate(e)},50)}handleAnnouncementUpdate(e){if(!this.isAlive()||!this.descriptionContainer)return;let t=e;if(t==null||t.replace(/[ .]/g,"")==""){this.lastAnnouncement="";return}this.lastAnnouncement===t&&(t=`${t}`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}destroy(){var t;super.destroy();const{descriptionContainer:e}=this;e&&(he(e),(t=e.parentElement)==null||t.removeChild(e)),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},Yw={moduleName:"Aria",version:G,beans:[qw]};function Zw(e){var t;(t=e.overlays)==null||t.showLoadingOverlay()}function Qw(e){var t;(t=e.overlays)==null||t.showNoRowsOverlay()}function Xw(e){var t;(t=e.overlays)==null||t.hideOverlay()}var Jw=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}",ev={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"}]}]},ha=class extends j{constructor(){super(ev),this.eOverlayWrapper=A,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeCssClass=null,this.elToFocusAfter=null,this.registerCSS(Jw)}handleKeyDown(e){if(e.key!==y.TAB||e.defaultPrevented||ke(e))return;const t=this.beans;if(oi(t,this.eOverlayWrapper,!1,e.shiftKey))return;let i=!1;e.shiftKey?i=t.focusSvc.focusGridView({column:$(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):i=to(t,!1),i&&e.preventDefault()}updateLayoutClasses(e,t){const o=this.eOverlayWrapper.classList,{AUTO_HEIGHT:i,NORMAL:s,PRINT:n}=be;o.toggle(i,t.autoHeight),o.toggle(s,t.normal),o.toggle(n,t.print)}postConstruct(){this.createManagedBean(new bs(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setOverlayWrapperComp(this),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper.classList;this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,o,i){if(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,!!e){if(this.setDisplayed(!0,{skipAriaHidden:!0}),o&&this.isGridFocused()){const s=Y(this.beans);s&&!or(this.beans)&&(this.elToFocusAfter=s)}e.then(s=>{if(this.activePromise!==e){this.activeOverlay!==s&&(this.destroyBean(s),s=null);return}if(this.activePromise=null,!!s){if(this.activeOverlay!==s&&(this.eOverlayWrapper.appendChild(s.getGui()),this.activeOverlay=s,i)){const n=s;this.updateListenerDestroyFunc=this.addManagedPropertyListener(i,({currentValue:r})=>{var l;(l=n.refresh)==null||l.call(n,_(this.gos,{...r??{}}))})}o&&this.isGridFocused()&&ti(this.eOverlayWrapper)}})}}updateOverlayWrapperPaddingTop(e){this.eOverlayWrapper.style.setProperty("padding-top",`${e}px`)}destroyActiveOverlay(){var i;this.activePromise=null;const e=this.activeOverlay;if(!e)return;let t=this.elToFocusAfter;this.activeOverlay=null,this.elToFocusAfter=null,t&&!this.isGridFocused()&&(t=null);const o=this.updateListenerDestroyFunc;o&&(o(),this.updateListenerDestroyFunc=null),this.destroyBean(e),he(this.eOverlayWrapper),(i=t==null?void 0:t.focus)==null||i.call(t,{preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=Y(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setOverlayWrapperComp(void 0),super.destroy()}},tv={selector:"AG-OVERLAY-WRAPPER",component:ha},ov=class extends x{constructor(){super(...arguments),this.beanName="overlays",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}postConstruct(){this.isClientSide=oe(this.gos),this.isServerSide=!this.isClientSide&&Mo(this.gos);const e=()=>this.updateOverlayVisibility();this.addManagedEventListeners({newColumnsLoaded:e,rowDataUpdated:e,gridSizeChanged:this.refreshWrapperPadding.bind(this),rowCountReady:()=>{this.showInitialOverlay=!1,this.updateOverlayVisibility()}}),this.addManagedPropertyListener("loading",e)}setOverlayWrapperComp(e){this.eWrapper=e,this.updateOverlayVisibility()}isVisible(){return this.state!==0&&!!this.eWrapper}isExclusive(){return this.state===1&&!!this.eWrapper}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos,t=e.get("loading");!t&&(t!==void 0||e.get("suppressLoadingOverlay"))||this.doShowLoadingOverlay()}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;e.get("loading")||e.get("suppressNoRowsOverlay")||this.doShowNoRowsOverlay()}hideOverlay(){if(this.showInitialOverlay=!1,this.gos.get("loading")){k(99);return}this.doHideOverlay()}getOverlayWrapperSelector(){return tv}getOverlayWrapperCompClass(){return ha}updateOverlayVisibility(){if(!this.eWrapper){this.state=0;return}const{state:e,isClientSide:t,isServerSide:o,beans:{gos:i,colModel:s,rowModel:n}}=this;let r=this.gos.get("loading");r!==void 0&&(this.showInitialOverlay=!1),this.showInitialOverlay&&r===void 0&&!i.get("suppressLoadingOverlay")&&(r=!i.get("columnDefs")||!s.ready||!i.get("rowData")&&t),r?e!==1&&this.doShowLoadingOverlay():(this.showInitialOverlay=!1,t&&n.isEmpty()&&!i.get("suppressNoRowsOverlay")?e!==2&&this.doShowNoRowsOverlay():(e===1||!o&&e!==0)&&this.doHideOverlay())}doShowLoadingOverlay(){this.eWrapper&&(this.state=1,this.showOverlay(Lu(this.beans.userCompFactory,_(this.gos,{})),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){this.eWrapper&&(this.state=2,this.showOverlay(Gu(this.beans.userCompFactory,_(this.gos,{})),"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams"),this.updateExclusive())}doHideOverlay(){this.eWrapper&&(this.state=0,this.eWrapper.hideOverlay(),this.updateExclusive())}showOverlay(e,t,o){var s;const i=(e==null?void 0:e.newAgStackInstance())??null;(s=this.eWrapper)==null||s.showOverlay(i,t,this.isExclusive(),o),this.refreshWrapperPadding()}updateExclusive(){const e=this.exclusive;this.exclusive=this.isExclusive(),this.exclusive!==e&&this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"})}refreshWrapperPadding(){const e=this.eWrapper;if(!e)return;let t=0;if(this.state===2){const o=this.beans.ctrlsSvc.get("gridHeaderCtrl");t=(o==null?void 0:o.headerHeight)||0}else this.wrapperPadding!==0&&(t=0);this.wrapperPadding!==t&&(this.wrapperPadding=t,e.updateOverlayWrapperPaddingTop(t))}},iv={moduleName:"Overlay",version:G,userComponents:{agLoadingOverlay:_g,agNoRowsOverlay:zg},apiFunctions:{showLoadingOverlay:Zw,showNoRowsOverlay:Qw,hideOverlay:Xw},beans:[ov]},sv=class extends x{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=Jd(),jt(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;jt(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),o=e/t;return this.maxScrollY*o}},nv=400,rv=class extends x{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{this.getAllCellCtrls().forEach(n=>n.onCellSelectionChanged())},t=()=>{this.getAllCellCtrls().forEach(n=>n.updateRangeBordersIfRangeCount())},o=()=>{this.eventSvc.addEventListener("cellSelectionChanged",e),this.eventSvc.addEventListener("columnMoved",t),this.eventSvc.addEventListener("columnPinned",t),this.eventSvc.addEventListener("columnVisible",t)},i=()=>{this.eventSvc.removeEventListener("cellSelectionChanged",e),this.eventSvc.removeEventListener("columnMoved",t),this.eventSvc.removeEventListener("columnPinned",t),this.eventSvc.removeEventListener("columnVisible",t)};this.addDestroyFunc(()=>i()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{Je(this.gos)?o():i()}),Je(this.gos)&&o()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc,this.editSvc=e.editSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",i=>this.onSuppressCellFocusChanged(i.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:i,previousValue:s})=>{(!s&&i||s&&!i)&&this.redrawRows()});const{stickyRowSvc:e,gos:t,showRowGroupCols:o}=this.beans;if(o&&this.addManagedPropertyListener("showOpenedGroup",()=>{const i=o.getShowRowGroupCols();i.length&&this.refreshCells({columns:i,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const i=this.gridBodyCtrl;i.setStickyTopHeight(0),i.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=ee(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 lv(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){var e;return((e=this.stickyRowFeature)==null?void 0:e.stickyTopRowCtrls)??[]}getStickyBottomRowCtrls(){var e;return((e=this.stickyRowFeature)==null?void 0:e.stickyBottomRowCtrls)??[]}updateAllRowCtrls(){var i;const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),o=((i=this.cachedRowCtrls)==null?void 0:i.getEntries())??[];t.length>0||o.length>0?this.allRowCtrls=[...e,...t,...o]:this.allRowCtrls=e}isCellBeingRendered(e,t){var s;const o=this.rowCtrlsByRowIndex[e];return!t||!o?!!o:o.isFullWidth()?!0:!!((s=this.beans.spannedRowRenderer)==null?void 0:s.getCellByPosition({rowIndex:e,column:t,rowPinned:null}))||!!o.getCellCtrl(t)||!o.isRowRendered()}updateCellFocus(e){this.getAllCellCtrls().forEach(t=>t.onCellFocused(e)),this.getFullWidthRowCtrls().forEach(t=>t.onFullWidthRowFocused(e))}onCellFocusChanged(e){if(e&&e.rowIndex!=null&&!e.rowPinned){const t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onSuppressCellFocusChanged(e)),this.getFullWidthRowCtrls().forEach(t=>t.onSuppressCellFocusChanged(e))}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;t&&this.getAllCellCtrls().forEach(o=>t.onFlashCells(o,e))},columnHoverChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onColumnHover())},displayedColumnsChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onDisplayedColumnsChanged())},displayedColumnsWidthChanged:()=>{this.printLayout&&this.getAllCellCtrls().forEach(e=>e.onLeftChanged())}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach(e=>e()),this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners(),this.colModel.getCols().forEach(t=>{const o=a=>{this.getAllCellCtrls().forEach(d=>{d.column===t&&a(d)})},i=()=>{o(a=>a.onLeftChanged())},s=()=>{o(a=>a.onWidthChanged())},n=()=>{o(a=>a.onFirstRightPinnedChanged())},r=()=>{o(a=>a.onLastLeftPinnedChanged())},l=()=>{o(a=>a.onColDefChanged())};t.__addEventListener("leftChanged",i),t.__addEventListener("widthChanged",s),t.__addEventListener("firstRightPinnedChanged",n),t.__addEventListener("lastLeftPinnedChanged",r),t.__addEventListener("colDefChanged",l),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",i),t.__removeEventListener("widthChanged",s),t.__removeEventListener("firstRightPinnedChanged",n),t.__removeEventListener("lastLeftPinnedChanged",r),t.__removeEventListener("colDefChanged",l)})})}onDomLayoutChanged(){const e=ee(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),o=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,o&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){const t=[];return this.getAllRowCtrls().forEach(o=>{var s;const i=(s=o.getCellCtrl(e,!0))==null?void 0:s.eGui;i&&t.push(i)}),t}refreshFloatingRowComps(e=!0){this.refreshFloatingRows(this.topRowCtrls,"top",e),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",e)}refreshFloatingRows(e,t,o){const{pinnedRowModel:i,beans:s,printLayout:n}=this,r=Object.fromEntries(e.map(a=>[a.rowNode.id,a]));i==null||i.forEachPinnedRow(t,(a,d)=>{const c=e[d];c&&i.getPinnedRowById(c.rowNode.id,t)===void 0&&(c.destroyFirstPass(),c.destroySecondPass()),a.id in r&&o?(e[d]=r[a.id],delete r[a.id]):e[d]=new ai(a,s,!1,!1,n)});const l=(t==="top"?i==null?void 0:i.getPinnedTopRowCount():i==null?void 0:i.getPinnedBottomRowCount())??0;e.length=l}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){var o,i;if(e.sticky)(o=this.stickyRowFeature)==null||o.refreshStickyNode(e);else if((i=this.cachedRowCtrls)!=null&&i.has(e)){this.cachedRowCtrls.removeRow(e);return}else{const s=n=>{const r=n[e.rowIndex];r&&r.rowNode===e&&(r.destroyFirstPass(),r.destroySecondPass(),n[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":s(this.topRowCtrls);break;case"bottom":s(this.bottomRowCtrls);break;default:s(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){const{editSvc:t}=this.beans;if(t!=null&&t.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:"api"})),e!=null){e==null||e.forEach(i=>this.redrawRow(i,!0)),this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){var l;this.getLockOnRefresh();const t=(l=this.beans.focusSvc)==null?void 0:l.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const o=!e.domLayoutChanged&&!!e.recycleRows,i=e.animate&&mt(this.gos),s=o?this.getRowsToRecycle():null;o||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:n,gos:r}=this;if(n){n.checkStickyRows();const a=n.extraTopHeight+n.extraBottomHeight;a&&this.updateContainerHeights(a)}this.recycleRows(s,i),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(r.get("enableRowPinning")?o:void 0),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){var i;const t=e.newData||e.newPage,o=this.gos.get("suppressScrollOnNewData");t&&!o&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),(i=this.stickyRowFeature)==null||i.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let o=this.pageBounds.getCurrentPageHeight();o===0&&(o=1),t.setModelHeight(o+e)}getLockOnRefresh(){var e,t;if(this.refreshInProgress)throw new Error(ye(252));this.refreshInProgress=!0,(t=(e=this.beans.frameworkOverrides).getLockOnRefresh)==null||t.call(e)}releaseLockOnRefresh(){var e,t;this.refreshInProgress=!1,(t=(e=this.beans.frameworkOverrides).releaseLockOnRefresh)==null||t.call(e)}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;const t=this.beans.focusSvc,o=this.findPositionToFocus(e);if(!o){t.focusHeaderPosition({headerPosition:{headerRowIndex:Ee(this.beans)-1,column:e.column}});return}if(e.rowIndex!==o.rowIndex||e.rowPinned!=o.rowPinned){t.setFocusedCell({...o,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(_(this.gos,{...o,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){const{pagination:t,pageBounds:o}=this.beans;let i=e;for(i.rowPinned==null&&t&&o&&!t.isRowInPage(i.rowIndex)&&(i={rowPinned:null,rowIndex:o.getFirstRow()});i;){if(i.rowPinned==null&&o)if(i.rowIndex<o.getFirstRow()){if(i=Zo(this.beans,{rowPinned:null,rowIndex:0}),!i)return null}else i.rowIndex>o.getLastRow()&&(i={rowPinned:null,rowIndex:o.getLastRow()});const s=this.getRowByPosition(i);if(s!=null&&s.isAlive())return{...s.getRowPosition(),column:e.column};i=Zo(this.beans,i)}return null}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),o=t.length;for(let i=0;i<o;i++){const s=t[i].getAllCellCtrls(),n=s.length;for(let r=0;r<n;r++)e.push(s[r])}return e}getAllRowCtrls(){const{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),o=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...o,...(e==null?void 0:e.getCtrls("top"))??[],...(e==null?void 0:e.getCtrls("bottom"))??[],...(e==null?void 0:e.getCtrls("center"))??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,o){const i=this.rowCtrlsByRowIndex[t];i&&i.addEventListener(e,o)}refreshCells({rowNodes:e,columns:t,force:o,suppressFlash:i}={}){const s={force:o,newData:!1,suppressFlash:i};for(const n of this.getCellCtrls(e,t))n.refreshOrDestroyCell(s);this.refreshFullWidth(e)}refreshRows(e={}){this.getRowCtrls(e.rowNodes).forEach(t=>t.refreshRow(e)),this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=!1;for(const o of this.getRowCtrls(e)){if(!o.isFullWidth())continue;o.refreshFullWidth()||(t=!0,this.redrawRow(o.rowNode,!0))}t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){const t=nn(e),o=this.getAllRowCtrls();return!e||!t?o:o.filter(i=>{const s=i.rowNode;return rn(s,t)})}getCellCtrls(e,t){let o;M(t)&&(o={},t.forEach(s=>{const n=this.colModel.getCol(s);M(n)&&(o[n.getId()]=!0)}));const i=[];return this.getRowCtrls(e).forEach(s=>{s.getAllCellCtrls().forEach(n=>{const r=n.column.getId();o&&!o[r]||i.push(n)})}),i}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){var o;const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),(o=this.stickyRowFeature)==null||o.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const o of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[o].rowNode.id==null&&e.push(o);this.removeRowCtrls(e);const t={};for(const o of Object.values(this.rowCtrlsByRowIndex)){const i=o.rowNode;t[i.id]=o}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){e.forEach(o=>{const i=this.rowCtrlsByRowIndex[o];i&&(i.destroyFirstPass(t),i.destroySecondPass()),delete this.rowCtrlsByRowIndex[o]})}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){const{focusSvc:t,animationFrameSvc:o}=this.beans,{afterScroll:i}=e;let s;const n=this.stickyRowFeature;n&&(s=(t==null?void 0:t.getFocusCellToUseAfterRefresh())||void 0);const r=this.firstRenderedRow,l=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let a=!1;if(n){a=n.checkStickyRows();const c=n.extraTopHeight+n.extraBottomHeight;c&&this.updateContainerHeights(c)}const d=this.firstRenderedRow!==r||this.lastRenderedRow!==l;if(!(i&&!a&&!d)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,i),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(i&&!a),s!=null)){const c=t==null?void 0:t.getFocusCellToUseAfterRefresh();s!=null&&c==null&&(o==null||o.flushAllFrames(),this.restoreFocusedCell(s))}}removeRowCompsNotToDraw(e,t){const o={};e.forEach(n=>o[n]=!0);const s=Object.keys(this.rowCtrlsByRowIndex).filter(n=>!o[n]);this.removeRowCtrls(s,t)}calculateIndexesToDraw(e){var r,l;const t=[];for(let a=this.firstRenderedRow;a<=this.lastRenderedRow;a++)t.push(a);const o=this.beans.pagination,i=(l=(r=this.beans.focusSvc)==null?void 0:r.getFocusedCell())==null?void 0:l.rowIndex;i!=null&&(i<this.firstRenderedRow||i>this.lastRenderedRow)&&(!o||o.isRowInPage(i))&&i<this.rowModel.getRowCount()&&t.push(i);const s=a=>{const d=a.rowNode.rowIndex;d==null||d===i||(d<this.firstRenderedRow||d>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(a)&&t.push(d)};for(const a of Object.values(this.rowCtrlsByRowIndex))s(a);if(e)for(const a of Object.values(e))s(a);t.sort((a,d)=>a-d);const n=[];for(let a=0;a<t.length;a++){const d=t[a],c=this.rowModel.getRow(d);c&&!c.sticky&&n.push(d)}return n}recycleRows(e,t=!1,o=!1){const i=this.calculateIndexesToDraw(e);if((this.printLayout||o)&&(t=!1),this.removeRowCompsNotToDraw(i,!t),i.forEach(s=>{this.createOrUpdateRowCtrl(s,e,t,o)}),e){const{animationFrameSvc:s}=this.beans;(s==null?void 0:s.active)&&o&&!this.printLayout?s.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){const{visibleCols:e}=this.beans,t=e.isPinningLeft(),o=e.isPinningRight();(this.pinningLeft!==t||o!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=o,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];this.getFullWidthRowCtrls().forEach(t=>{const o=t.rowNode.rowIndex;e.push(o.toString())}),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=nn(e);return this.getAllRowCtrls().filter(o=>{if(!o.isFullWidth())return!1;const i=o.rowNode;return!(t!=null&&!rn(i,t))})}createOrUpdateRowCtrl(e,t,o,i){let s,n=this.rowCtrlsByRowIndex[e];if(n||(s=this.rowModel.getRow(e),M(s)&&M(t)&&t[s.id]&&s.alreadyRendered&&(n=t[s.id],t[s.id]=null)),!n)if(s||(s=this.rowModel.getRow(e)),M(s))n=this.createRowCon(s,o,i);else return;return s&&(s.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=n,n}destroyRowCtrls(e,t){const o=[];if(e){for(const i of Object.values(e))if(i){if(this.cachedRowCtrls&&i.isCacheable()){this.cachedRowCtrls.addRow(i);continue}if(i.destroyFirstPass(!t),t){const s=i.instanceId;this.zombieRowCtrls[s]=i,o.push(()=>{i.destroySecondPass(),delete this.zombieRowCtrls[s]})}else i.destroySecondPass()}}t&&(o.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),window.setTimeout(()=>o.forEach(i=>i()),nv))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=is(this.beans);return e*t}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:o}=this;e.updateOffset();let i,s;if(!o.isRowsToRender())i=0,s=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),i=t.getFirstRow(),s=t.getLastRow();else{const c=this.getRowBufferInPixels(),u=this.ctrlsSvc.getScrollFeature(),h=this.gos.get("suppressRowVirtualisation");let g=!1,p,f;do{const v=t.getPixelOffset(),{pageFirstPixel:S,pageLastPixel:D}=t.getCurrentPagePixelRange(),I=e.divStretchOffset,O=u.getVScrollPosition(),F=O.top,P=O.bottom;h?(p=S+I,f=D+I):(p=Math.max(F+v-c,S)+I,f=Math.min(P+v+c,D)+I),this.firstVisibleVPixel=Math.max(F+v,S)+I,this.lastVisibleVPixel=Math.min(P+v,D)+I,g=this.ensureAllRowsInRangeHaveHeightsCalculated(p,f)}while(g);let C=o.getRowIndexAtPixel(p),m=o.getRowIndexAtPixel(f);const w=t.getFirstRow(),b=t.getLastRow();C<w&&(C=w),m>b&&(m=b),i=C,s=m}const n=ee(this.gos,"normal"),r=this.gos.get("suppressMaxRenderedRowRestriction"),l=Math.max(this.getRowBuffer(),500);n&&!r&&s-i>l&&(s=i+l);const a=i!==this.firstRenderedRow,d=s!==this.lastRenderedRow;(a||d)&&(this.firstRenderedRow=i,this.lastRenderedRow=s,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:i,lastRow:s}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,Ne(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){var l,a;const o=(l=this.pinnedRowModel)==null?void 0:l.ensureRowHeightsValid(),i=(a=this.stickyRowFeature)==null?void 0:a.ensureRowHeightsValid(),{pageBounds:s,rowModel:n}=this,r=n.ensureRowHeightsValid(e,t,s.getFirstRow(),s.getLastRow());return(r||i)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),i||r||o?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){var d;const i=e.rowNode,s=this.focusSvc.isRowFocused(i.rowIndex,i.rowPinned),n=(d=this.editSvc)==null?void 0:d.isEditing(e),r=i.detail;return s||n||r?!!this.isRowPresent(i):!1}isRowPresent(e){var t;return this.rowModel.isRowPresent(e)?((t=this.beans.pagination)==null?void 0:t.isRowInPage(e.rowIndex))??!0:!1}createRowCon(e,t,o){var r,l;const i=((r=this.cachedRowCtrls)==null?void 0:r.getRow(e))??null;if(i)return i;const s=o&&!this.printLayout&&!!((l=this.beans.animationFrameSvc)!=null&&l.active);return new ai(e,this.beans,t,s,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(i=>i.rowNode),t=this.getStickyTopRowCtrls().map(i=>i.rowNode),o=this.getStickyBottomRowCtrls().map(i=>i.rowNode);return[...t,...e,...o]}getRowByPosition(e){let t;const{rowIndex:o}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[o];break;case"bottom":t=this.bottomRowCtrls[o];break;default:t=this.rowCtrlsByRowIndex[o],t||(t=this.getStickyTopRowCtrls().find(i=>i.rowNode.rowIndex===o)||null,t||(t=this.getStickyBottomRowCtrls().find(i=>i.rowNode.rowIndex===o)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const i=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!i}},lv=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.rowNode.id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if(e==null||e.id==null)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){const t=e.id,o=this.entriesMap[t];delete this.entriesMap[t],we(this.entriesList,o)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],we(this.entriesList,e)}getEntries(){return this.entriesList}};function nn(e){if(!e)return;const t={top:{},bottom:{},normal:{}};return e.forEach(o=>{const i=o.id;switch(o.rowPinned){case"top":t.top[i]=o;break;case"bottom":t.bottom[i]=o;break;default:t.normal[i]=o;break}}),t}function rn(e,t){const o=e.id;switch(e.rowPinned){case"top":return t.top[o]!=null;case"bottom":return t.bottom[o]!=null;default:return t.normal[o]!=null}}var av=class extends x{constructor(){super(...arguments),this.beanName="rowNodeSorter"}postConstruct(){const{gos:e}=this;this.isAccentedSort=e.get("accentedSort"),this.primaryColumnsSortGroups=Re(e),this.addManagedPropertyListener("accentedSort",t=>this.isAccentedSort=t.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=Re(e))}doFullSort(e,t){const o=e.map((i,s)=>({currentPos:s,rowNode:i}));return o.sort(this.compareRowNodes.bind(this,t)),o.map(i=>i.rowNode)}compareRowNodes(e,t,o){const i=t.rowNode,s=o.rowNode;for(let n=0,r=e.length;n<r;n++){const l=e[n],a=l.sort==="desc",d=this.getValue(i,l.column),c=this.getValue(s,l.column);let u;const h=this.getComparator(l,i);if(h?u=h(d,c,i,s,a):u=kd(d,c,this.isAccentedSort),!isNaN(u)&&u!==0)return l.sort==="asc"?u:u*-1}return t.currentPos-o.currentPos}getComparator(e,t){const o=e.column,i=o.getColDef().comparator;if(i!=null)return i;if(!o.getColDef().showRowGroup)return;const s=!t.group&&o.getColDef().field;if(!s)return;const n=this.beans.colModel.getColDefCol(s);if(n)return n.getColDef().comparator}getValue(e,t){var l,a;const{valueSvc:o,colModel:i,showRowGroupCols:s,gos:n}=this.beans;if(!this.primaryColumnsSortGroups)return o.getValue(t,e,!1);if(e.rowGroupColumn===t){if(nr(n,i.isPivotActive())){const u=(l=e.allLeafChildren)==null?void 0:l[0];return u?o.getValue(t,u,!1):void 0}const c=s==null?void 0:s.getShowRowGroupCol(t.getId());return c?(a=e.groupData)==null?void 0:a[c.getId()]:void 0}if(!(e.group&&t.getColDef().showRowGroup))return o.getValue(t,e,!1)}};function dv(e){var t;(t=e.sortSvc)==null||t.onSortChanged("api")}var ga={moduleName:"Sort",version:G,beans:[tw,av],apiFunctions:{onSortChanged:dv},userComponents:{agSortIndicator:tn},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"}},cv=class extends x{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:o}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),o.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),jt(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,St(e.source))}}};function uv(e){var t;(t=e.valueCache)==null||t.expire()}function hv(e,t){const{colKey:o,rowNode:i,useFormatter:s}=t,n=e.colModel.getColDefCol(o)??e.colModel.getCol(o);if(K(n))return null;const r=e.valueSvc.getValueForDisplay(n,i,s);return s?r.valueFormatted??bt(r.value):r.value}var gv="paste",pv=class extends x{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.clientSideRowModel=null}postConstruct(){const{gos:e,rowModel:t}=this.beans;oe(e)&&(this.clientSideRowModel=t),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){const{gos:t,rowRenderer:o}=this.beans;if(e.source===gv||t.get("suppressChangeDetection"))return;const i=e.node,s=[i],n=this.clientSideRowModel,r=n==null?void 0:n.rootNode;if(r&&!i.isRowPinned()){const l=t.get("aggregateOnlyChangedColumns"),a=new Ci(l,r);a.addParentNode(i.parent,[e.column]),n.doAggregate(a),a.forEachChangedNodeDepthFirst(d=>{s.push(d),d.sibling&&s.push(d.sibling)})}o.refreshCells({rowNodes:s})}},fv=class extends x{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);U(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(o){return U(16,{expression:e,params:t,e:o}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const o=this.createFunctionBody(e),i=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",o);return t[e]=i,i}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";"}},Cv=class extends x{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){const e=this.gos;this.active=e.get("valueCache"),this.neverExpires=e.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,o){if(this.active){const i=this.cacheVersion;e.__cacheVersion!==i&&(e.__cacheVersion=i,e.__cacheData={}),e.__cacheData[t]=o}}getValue(e,t){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[t]}},mv={moduleName:"ValueCache",version:G,beans:[Cv],apiFunctions:{expireValueCache:uv}},wv={moduleName:"Expression",version:G,beans:[fv]},vv={moduleName:"ChangeDetection",version:G,beans:[pv]},bv={moduleName:"CellApi",version:G,apiFunctions:{getCellValue:hv}},Si={checkSiblings:!0},Sv=class extends x{constructor(){super(...arguments),this.beanName="valueSvc",this.hasEdit=!1,this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc,this.editSvc=e.editSvc,this.hasEdit=!!e.editSvc}postConstruct(){this.initialised||this.init()}init(){this.executeValueGetter=this.valueCache?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=Mo(this.gos),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;const e=t=>this.callColumnCellValueChangedHandler(t);this.eventSvc.addEventListener("cellValueChanged",e,!0),this.addDestroyFunc(()=>this.eventSvc.removeEventListener("cellValueChanged",e,!0)),this.addManagedPropertyListener("treeData",t=>this.isTreeData=t.currentValue)}getValueForDisplay(e,t,o=!1,i=!1,s="ui"){const{showRowGroupColValueSvc:n}=this.beans,r=!e&&t.group,l=e==null?void 0:e.colDef.showRowGroup,a=!this.isTreeData||t.footer;if(n&&a&&(r||l)){const f=n.getGroupValue(t,e);if(f==null)return{value:null,valueFormatted:null};if(!o)return{value:f.value,valueFormatted:null};const C=n.formatAndPrefixGroupColValue(f,e,i);return{value:f.value,valueFormatted:C}}if(!e)return{value:t.key,valueFormatted:null};const d=t.leafGroup&&this.colModel.isPivotMode(),c=t.group&&t.expanded&&!t.footer&&!d,u=this.gos.get("groupSuppressBlankHeader")||!t.sibling,h=c&&!u,g=this.getValue(e,t,h,s),p=o&&!(i&&e.colDef.useValueFormatterForExport===!1);return{value:g,valueFormatted:p?this.formatValue(e,t,g):null}}getValue(e,t,o=!1,i="ui"){var f;if(this.initialised||this.init(),!t)return;const s=e.getColDef(),n=s.field,r=e.getColId();let l=t.data;if(this.hasEdit&&i==="ui"){const C=this.editSvc;if(C.isRowEditing(t,Si)&&(l=C.getRowDataValue(t,Si)),C.isEditing()){const m=C.getCellDataValue({rowNode:t,column:e},!0);if(m!==void 0)return m}}let a;const d=s.showRowGroup;if(typeof d=="string"&&(((f=this.beans.rowGroupColsSvc)==null?void 0:f.getColumnIndex(d))??-1)>t.level)return null;const c=typeof d!="string"||!t.group,u=t.groupData&&r in t.groupData,h=!o&&t.aggData&&t.aggData[r]!==void 0,g=this.isSsrm&&o&&!!s.aggFunc,p=this.isSsrm&&t.footer&&t.field&&(s.showRowGroup===!0||s.showRowGroup===t.field);if(this.isTreeData&&h)a=t.aggData[r];else if(this.isTreeData&&s.valueGetter)a=this.executeValueGetter(s.valueGetter,l,e,t);else if(this.isTreeData&&n&&l)a=Wt(l,n,e.isFieldContainsDots());else if(u)a=t.groupData[r];else if(h)a=t.aggData[r];else if(s.valueGetter&&!g){if(!c)return a;a=this.executeValueGetter(s.valueGetter,l,e,t)}else if(p)a=Wt(l,t.field,e.isFieldContainsDots());else if(n&&l&&!g){if(!c)return a;a=Wt(l,n,e.isFieldContainsDots())}if(this.cellExpressions&&typeof a=="string"&&a.indexOf("=")===0){const C=a.substring(1);a=this.executeValueGetter(C,l,e,t)}return a}parseValue(e,t,o,i){var r;const s=e.getColDef(),n=s.valueParser;if(M(n)){const l=_(this.gos,{node:t,data:t==null?void 0:t.data,oldValue:i,newValue:o,colDef:s,column:e});return typeof n=="function"?n(l):(r=this.expressionSvc)==null?void 0:r.evaluate(n,l)}return o}getDeleteValue(e,t){return M(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay(e,t).value)??null:null}formatValue(e,t,o,i,s=!0){const{expressionSvc:n}=this.beans;let r=null,l;const a=e.getColDef();if(i?l=i:s&&(l=a.valueFormatter),l){let d=t?t.data:null;if(t){const u={rowNode:t};if(this.hasEdit){const h=this.editSvc;h.isEditing(u,Si)&&(d=h.getRowDataValue(t,Si))}}const c=_(this.gos,{value:o,node:t,data:d,colDef:a,column:e});typeof l=="function"?r=l(c):r=n?n.evaluate(l,c):null}else if(a.refData)return a.refData[o]||"";return r==null&&Array.isArray(o)&&(r=o.join(", ")),r}setValue(e,t,o,i){var c,u;const s=this.colModel.getColDefCol(t);if(!e||!s)return!1;K(e.data)&&(e.data={});const{field:n,valueSetter:r}=s.getColDef();if(K(n)&&K(r))return k(17),!1;if(this.dataTypeSvc&&!this.dataTypeSvc.checkType(s,o))return k(135),!1;const l=_(this.gos,{node:e,data:e.data,oldValue:this.getValue(s,e,void 0,i),newValue:o,colDef:s.getColDef(),column:s});l.newValue=o;let a;if(M(r)?typeof r=="function"?a=r(l):a=(c=this.expressionSvc)==null?void 0:c.evaluate(r,l):a=this.setValueUsingField(e.data,n,o,s.isFieldContainsDots()),a===void 0&&(a=!0),!a)return!1;e.resetQuickFilterAggregateText(),(u=this.valueCache)==null||u.onDataChanged();const d=this.getValue(s,e);return this.dispatchCellValueChangedEvent(e,l,d,i),e.pinnedSibling&&this.dispatchCellValueChangedEvent(e.pinnedSibling,l,d,i),!0}dispatchCellValueChangedEvent(e,t,o,i){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:o,value:o,source:i})}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,context:e.context})})}setValueUsingField(e,t,o,i){if(!t)return!1;let s=!1;if(!i)s=e[t]===o,s||(e[t]=o);else{const n=t.split(".");let r=e;for(;n.length>0&&r;){const l=n.shift();n.length===0?(s=r[l]===o,s||(r[l]=o)):r=r[l]}}return!s}executeValueGetterWithValueCache(e,t,o,i){const s=o.getColId(),n=this.valueCache.getValue(i,s);if(n!==void 0)return n;const r=this.executeValueGetterWithoutValueCache(e,t,o,i);return this.valueCache.setValue(i,s,r),r}executeValueGetterWithoutValueCache(e,t,o,i){var r;const s=_(this.gos,{data:t,node:i,column:o,colDef:o.getColDef(),getValue:this.getValueCallback.bind(this,i)});let n;return typeof e=="function"?n=e(s):n=(r=this.expressionSvc)==null?void 0:r.evaluate(e,s),n}getValueCallback(e,t){const o=this.colModel.getColDefCol(t);return o?this.getValue(o,e):null}getKeyForNode(e,t){const o=this.getValue(e,t),i=e.getColDef().keyCreator;let s=o;if(i){const n=_(this.gos,{value:o,colDef:e.getColDef(),column:e,node:t,data:t.data});s=i(n)}return typeof s=="string"||s==null||(s=String(s),s==="[object Object]"&&k(121)),s}},yv={moduleName:"CommunityCore",version:G,beans:[Qm,Up,HC,du,sv,qf,Um,bw,su,zw,Ww,rv,Sv,Ym,$m,Zm,BC,cv,AC,MC],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:Kp,destroy:jp,isDestroyed:qp,getGridOption:Yp,setGridOption:Zp,updateGridOptions:Al,isModuleRegistered:Qp},dependsOn:[PC,Df,kf,ga,Fw,Zf,Pw,iv,vv,Iw,_w,jw,Yw,Mw,GC,TC,wv,eC]};function ln(e){const{inputValue:t,allSuggestions:o,hideIrrelevant:i,filterByPercentageOfBestMatch:s}=e;let n=(o??[]).map((a,d)=>({value:a,relevance:Rv(t,a),idx:d}));if(n.sort((a,d)=>a.relevance-d.relevance),i&&(n=n.filter(a=>a.relevance<Math.max(a.value.length,t.length))),n.length>0&&s&&s>0){const d=n[0].relevance*s;n=n.filter(c=>d-c.relevance<0)}const r=[],l=[];for(const a of n)r.push(a.value),l.push(a.idx);return{values:r,indices:l}}function Rv(e,t){e.length<t.length&&([e,t]=[t,e]);let o=[],i=[];const s=e.length,n=t.length;for(let l=0;l<=n;l++)o[l]=l;let r=0;for(let l=1;l<=s;l++){i[0]=l;for(let a=1;a<=n;a++){const d=e[l-1],c=t[a-1];if(d.toLocaleLowerCase()===c.toLocaleLowerCase())++r,d===c&&++r,l>1&&a>1&&e[l-2].toLocaleLowerCase()===t[a-2].toLocaleLowerCase()&&(++r,e[l-2]===t[a-2]&&++r),l<s/2-10&&++r,i[a]=o[a-1];else{const u=i[a-1],h=o[a],g=o[a-1];i[a]=1+Math.min(u,h,g)}}[o,i]=[i,o]}return o[n]/(r+1)}var pa={AdvancedFilter:1,AllEnterprise:1,BatchEdit:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,NewFiltersToolPanel:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,TreeData:1,ViewportRowModel:1},an=["TextFilter","NumberFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],Ev={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:an,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...an,"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:[...an,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},xv={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function Dv(e,t){const o=[];return(Array.isArray(e)?e:[e]).forEach(i=>{const s=Ev[i];s?s.forEach(n=>{const r=xv[n];(!r||r===t)&&o.push(n)}):o.push(i)}),o}var fa=()=>`No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:
|
|
16
|
+
`,this._paramsCssCache=i=a}return i.replaceAll(o,`:where(.${t})`)}},tl=e=>{const t=new Map;for(const i of e)t.set(i.feature,i);const o=[];for(const i of e)(!i.feature||t.get(i.feature)===i)&&o.push(i);return o},fm=e=>{const t=new Set,o=n=>{if(Array.isArray(n))n.forEach(o);else{const r=n==null?void 0:n.googleFont;typeof r=="string"&&t.add(r)}};return Object.values(e._getModeParams()).flatMap(n=>Object.values(n)).forEach(o),Array.from(t).sort()},ol=!1,Cm=()=>{if(!ol){ol=!0;for(const e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},mm=new Set,wm=async(e,t)=>{mm.add(e);const o=`@import url('https://${vm}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
|
|
17
|
+
`;kt(o,document.head,`googleFont:${e}`,void 0,0,t)},vm="fonts.googleapis.com",Sm='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);:where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}&:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color);&:after{background-color:var(--ag-checkbox-checked-shape-color)}}&:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color);&:after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}}.ag-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',bm=()=>Fe({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:ce,checkboxUncheckedBorderColor:we(.3),checkboxCheckedBackgroundColor:Be,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:ce,checkboxIndeterminateBackgroundColor:we(.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:ce,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:Sm}),ym=bm(),il=()=>({...Si,...ZC,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:we(.05),rowHoverColor:Te(.15),selectedRowBackgroundColor:Te(.2),menuBackgroundColor:we(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:Gt,findMatchColor:ce,findActiveMatchColor:ce,checkboxUncheckedBorderColor:we(.4),toggleButtonOffBackgroundColor:we(.4),rowBatchEditBackgroundColor:we(.1)}),Rm=()=>({...il(),backgroundColor:"#1f2836"}),Em=()=>Fe({feature:"colorScheme",params:Si,modeParams:{light:Si,dark:il(),"dark-blue":Rm()}}),xm=Em(),sl={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<path d="m18 6-12 12"/><path d="m6 6 12 12"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>'},nl={"column-arrow":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 32 32"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 26C0 28.2092 1.79086 30 4 30H14C16.2091 30 18 28.2092 18 26V15H25.8786L24.4394 16.4393C23.8536 17.0251 23.8536 17.9749 24.4394 18.5607C25.0252 19.1464 25.9748 19.1464 26.5606 18.5607L30.5606 14.5607C31.1464 13.9749 31.1464 13.0251 30.5606 12.4393L26.5606 8.43934C25.9748 7.85356 25.0252 7.85356 24.4394 8.43934C23.8536 9.02512 23.8536 9.97488 24.4394 10.5607L25.8786 12H18V6C18 3.79086 16.2091 2 14 2H4C1.79086 2 0 3.79086 0 6V26ZM14 5H10.5V12H15V6C15 5.44772 14.5523 5 14 5ZM4 5H7.5V12H3V6C3 5.44772 3.44772 5 4 5ZM10.5 15H15V26C15 26.5522 14.5523 27 14 27H10.5V15ZM4 27H7.5V15H3V26C3 26.5522 3.44772 27 4 27Z" fill="currentColor"/></svg>',"small-down":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>',"small-up":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>',"pinned-top":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22ZM3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536Z"/></svg>',"pinned-bottom":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22ZM12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536Z"/></svg>',"un-pin":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11Z"/><path fill="currentColor" d="M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904l.589-.825Zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28l2.887-4.044ZM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972L9.277 1Z"/></svg>',"chevron-down":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 6L8 10L4 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-up":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 10L8 6L12 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-left":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-right":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L10 8L6 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"filter-add":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.12126 7.75L10.8517 7.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M6.65934 11.748L9.32778 11.748" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12.2943 1.04872V6.19184M14.9886 3.74341H9.68478" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M8.25488 3C8.04799 3.18323 7.91706 3.45099 7.91699 3.74902C7.91713 4.04868 8.04988 4.31681 8.25879 4.5H2C1.58579 4.5 1.25 4.16421 1.25 3.75C1.25 3.33579 1.58579 3 2 3H8.25488Z" fill="currentColor"/></svg>',edit:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 10.6262V12.5012H5.375L10.905 6.97122L9.03 5.09622L3.5 10.6262ZM12.355 5.52122C12.4014 5.47497 12.4381 5.42002 12.4632 5.35953C12.4883 5.29905 12.5012 5.23421 12.5012 5.16872C12.5012 5.10324 12.4883 5.0384 12.4632 4.97791C12.4381 4.91742 12.4014 4.86248 12.355 4.81622L11.185 3.64622C11.1387 3.59987 11.0838 3.5631 11.0233 3.53801C10.9628 3.51291 10.898 3.5 10.8325 3.5C10.767 3.5 10.7022 3.51291 10.6417 3.53801C10.5812 3.5631 10.5263 3.59987 10.48 3.64622L9.565 4.56122L11.44 6.43622L12.355 5.52122Z" fill="currentColor"/></svg>'},Dm=(e={})=>{let t="";for(const o of[...Object.keys(sl),...Object.keys(nl)]){const i=Fm(o,e.strokeWidth);t+=`.ag-icon-${o}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(i)}'); }
|
|
18
|
+
`}return t},Fm=(e,t=1.5)=>{const o=nl[e];if(o)return o;const i=sl[e];if(!i)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>`+i+"</svg>"},Pm=(e={})=>Fe({feature:"iconSet",css:()=>Dm(e)}),Tm=Pm(),Im=':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-right:var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}',Am=".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:focus{box-shadow:var(--ag-focus-shadow);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}",Mm={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"},colorPickerThumbSize:18,colorPickerTrackSize:12,colorPickerThumbBorderWidth:3,colorPickerTrackBorderRadius:12,colorPickerColorBorderRadius:4},km=()=>Fe({feature:"inputStyle",params:{...Mm,inputBackgroundColor:ce,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:Be},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:we(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>Im+Am}),Lm=km(),Gm='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:solid var(--ag-border-width) var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative;&:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}&.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}&:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}&.ag-tab-selected:after{opacity:1}}:where(.ag-ltr) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}}}:where(.ag-rtl) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}}}',Hm={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},Om=()=>Fe({feature:"tabStyle",params:{...Hm,tabBarBorder:!0,tabBarBackgroundColor:me(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:ce},css:Gm}),Bm=Om(),Vm=()=>pm().withPart(ym).withPart(xm).withPart(Tm).withPart(Bm).withPart(Lm).withPart(Ya).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),Nm=Vm(),_m={cssName:"--ag-cell-horizontal-padding",changeKey:"cellHorizontalPaddingChanged",defaultValue:16},Wm={cssName:"--ag-indentation-level",changeKey:"indentationLevelChanged",defaultValue:0,noWarn:!0,cacheDefault:!0},zm={cssName:"--ag-row-group-indent-size",changeKey:"rowGroupIndentSizeChanged",defaultValue:0},rl={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},al={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},ll={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},tn={cssName:"--ag-row-border",changeKey:"rowBorderWidthChanged",defaultValue:1,border:!0},dl={cssName:"--ag-pinned-row-border",changeKey:"pinnedRowBorderWidthChanged",defaultValue:1,border:!0},$m=0,Um=class extends x{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.paramsClass=`ag-theme-params-${++$m}`,this.globalCSS=[]}wireBeans(e){const{eGridDiv:t,gridOptions:o}=e;this.eGridDiv=t,this.eStyleContainer=o.themeStyleContainer??(t.getRootNode()===document?document.head:t),this.cssLayer=o.themeCssLayer,this.styleNonce=o.styleNonce}postConstruct(){this.addManagedPropertyListener("theme",()=>this.handleThemeGridOptionChange()),this.handleThemeGridOptionChange(),this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(rl),this.getSizeEl(al),this.getSizeEl(ll),this.getSizeEl(tn),this.getSizeEl(dl),this.refreshRowBorderWidthVariable(),this.addDestroyFunc(()=>WC(this)),this.mutationObserver=new MutationObserver(()=>{this.fireGridStylesChangedEvent("themeChanged")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(dl)}getRowBorderWidth(){return this.getCSSVariablePixelValue(tn)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(rl)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(al)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(_m)}getCellPaddingLeft(){const e=this.getDefaultCellHorizontalPadding(),t=this.getCSSVariablePixelValue(Wm),o=this.getCSSVariablePixelValue(zm);return e-1+o*t}getCellPadding(){const e=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+e}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(ll)}applyThemeClasses(e){const{gridTheme:t}=this;let o="";if(t)o=`${this.paramsClass} ${t._getCssClass()}`;else{this.mutationObserver.disconnect();let i=this.eGridDiv;for(;i;){let s=!1;for(const n of Array.from(i.classList))n.startsWith("ag-theme-")&&(s=!0,o=o?`${o} ${n}`:n);s&&this.mutationObserver.observe(i,{attributes:!0,attributeFilter:["class"]}),i=i.parentElement}}for(const i of Array.from(e.classList))i.startsWith("ag-theme-")&&e.classList.remove(i);if(o){const i=e.className;e.className=i+(i?" ":"")+o}}refreshRowHeightVariable(){const{eGridDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),o=this.gos.get("rowHeight");if(o==null||isNaN(o)||!isFinite(o))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;const i=`${o}px`;return t!=i?(e.style.setProperty("--ag-line-height",i),o):t!=""?parseFloat(t):-1}addGlobalCSS(e,t){this.gridTheme?kt(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(t!=null)return t;const o=this.measureSizeEl(e);return o==="detached"||o==="no-styles"?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,o),o)}measureSizeEl(e){const t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";const o=t.offsetWidth;return o===on?"no-styles":(this.sizesMeasured=!0,o)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=ee({tag:"div",cls:"ag-measurement-container"}),this.eGridDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;const o=this.getMeasurementContainer();t=ee({tag:"div"});const{border:i,noWarn:s}=e;i?(t.className="ag-measurement-element-border",t.style.setProperty("--ag-internal-measurement-border",`var(${e.cssName}, solid ${on}px)`)):t.style.width=`var(${e.cssName}, ${on}px)`,o.appendChild(t),this.sizeEls.set(e,t);let n=this.measureSizeEl(e);n==="no-styles"&&!s&&M(9,{variable:e});const r=Je(this.beans,t,()=>{const a=this.measureSizeEl(e);a==="detached"||a==="no-styles"||(this.lastKnownValues.set(e,a),a!==n&&(n=a,this.fireGridStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>r()),t}fireGridStylesChangedEvent(e){e==="rowBorderWidthChanged"&&this.refreshRowBorderWidthVariable(),this.eventSvc.dispatchEvent({type:"gridStylesChanged",[e]:!0})}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue(tn);this.eGridDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}handleThemeGridOptionChange(){const{gos:e,eGridDiv:t,globalCSS:o,gridTheme:i}=this,s=e.get("theme");let n;if(s==="legacy")n=void 0;else{const r=s??Nm;r instanceof el?n=r:j(240,{theme:r})}if(n!==i){if(n){_C(this),$a(this.eStyleContainer,this.cssLayer,this.styleNonce);for(const[a,l]of o)kt(a,this.eStyleContainer,l,this.cssLayer,0,this.styleNonce);o.length=0}this.gridTheme=n,n==null||n._startUse({loadThemeGoogleFonts:e.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce});let r=this.eParamsStyle;if(!r){r=this.eParamsStyle=ee({tag:"style"});const a=this.gos.get("styleNonce");a&&r.setAttribute("nonce",a),t.appendChild(r)}Xs||(r.textContent=(n==null?void 0:n._getPerGridCss(this.paramsClass))||""),this.applyThemeClasses(t),this.fireGridStylesChangedEvent("themeChanged")}n&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&j(s?106:239)}},on=15538,Km=class extends x{constructor(){super(...arguments),this.beanName="eventSvc",this.globalSvc=new Ze}postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}addEventListener(e,t,o){this.globalSvc.addEventListener(e,t,o)}removeEventListener(e,t,o){this.globalSvc.removeEventListener(e,t,o)}addGlobalListener(e,t=!1){this.globalSvc.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalSvc.removeGlobalListener(e,t)}dispatchLocalEvent(){}dispatchEvent(e){this.globalSvc.dispatchEvent(_(this.gos,e))}dispatchEventOnce(e){this.globalSvc.dispatchEventOnce(_(this.gos,e))}};function cl(e,t,o){const i=e.visibleCols.headerGroupRowCount;if(o>=i)return{column:t,headerRowIndex:o};let s=t.getParent();for(;s&&s.getProvidedColumnGroup().getLevel()>o;)s=s.getParent();const n=t.isSpanHeaderHeight();return!s||n&&s.isPadding()?{column:t,headerRowIndex:i}:{column:s,headerRowIndex:s.getProvidedColumnGroup().getLevel()}}var jm=class extends x{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,o=>{this.gridBodyCon=o.gridBodyCtrl});const t=te(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let o;const{colModel:i,colGroupSvc:s,ctrlsSvc:n}=this.beans;if(typeof e=="string"?(o=i.getCol(e),o||(o=(s==null?void 0:s.getColumnGroup(e))??null)):o=e,!o)return null;const r=n.getHeaderRowContainerCtrl(),a=r==null?void 0:r.getAllCtrls(),l=U(a||[]).type==="filter",d=De(this.beans)-1;let c=-1,u=o;for(;u;)c++,u=u.getParent();let h=c;return t&&l&&h===d-1&&h++,h===-1?null:{headerRowIndex:h,column:o}}navigateVertically(e,t){const{focusSvc:o,visibleCols:i}=this.beans,{focusedHeader:s}=o;if(!s)return!1;const{headerRowIndex:n}=s,r=s.column,a=De(this.beans),l=this.getHeaderRowType(n),d=i.headerGroupRowCount;let{headerRowIndex:c,column:u,headerRowIndexWithoutSpan:h}=e==="UP"?qm(l,r,n):Ym(r,n,d),g=!1;return c<0&&(c=0,u=r,g=!0),c>=a?(c=-1,this.currentHeaderRowWithoutSpan=-1):h!==void 0&&(this.currentHeaderRowWithoutSpan=h),!g&&!u?!1:o.focusHeaderPosition({headerPosition:{headerRowIndex:c,column:u},allowUserOverride:!0,event:t})}navigateHorizontally(e,t=!1,o){const{focusSvc:i,gos:s}=this.beans,n={...i.focusedHeader};let r,a;this.currentHeaderRowWithoutSpan!==-1?n.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=n.headerRowIndex,e==="LEFT"!==s.get("enableRtl")?(a="Before",r=this.findHeader(n,a)):(a="After",r=this.findHeader(n,a));const l=s.getCallback("tabToNextHeader");if(t&&l){const d=i.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:r,direction:a});if(d){const{headerRowIndex:c}=i.focusedHeader||{};c!=null&&c!=n.headerRowIndex&&(this.currentHeaderRowWithoutSpan=c)}return d}return r||!t?i.focusHeaderPosition({headerPosition:r,direction:a,fromTab:t,allowUserOverride:!0,event:o}):this.focusNextHeaderRow(n,a,o)}focusNextHeaderRow(e,t,o){const i=this.beans,s=e.headerRowIndex;let n=null,r;const a=De(i),l=this.beans.visibleCols.allCols;if(t==="Before"){if(s<=0)return!1;n=U(l),r=s-1,this.currentHeaderRowWithoutSpan-=1}else n=l[0],r=s+1,this.currentHeaderRowWithoutSpan<a?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1;let{column:d,headerRowIndex:c}=cl(this.beans,n,r);return c>=a&&(c=-1),i.focusSvc.focusHeaderPosition({headerPosition:{column:d,headerRowIndex:c},direction:t,fromTab:!0,allowUserOverride:!0,event:o})}scrollToColumn(e,t="After"){if(e.getPinned())return;let o;if(J(e)){const i=e.getDisplayedLeafColumns();o=t==="Before"?U(i):i[0]}else o=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(o)}findHeader(e,t){const{colGroupSvc:o,visibleCols:i}=this.beans;let s=e.column;if(s instanceof no){const l=s.getDisplayedLeafColumns();s=t==="Before"?l[0]:l[l.length-1]}const n=t==="Before"?i.getColBefore(s):i.getColAfter(s);if(!n)return;const r=i.headerGroupRowCount;if(e.headerRowIndex>=r)return{headerRowIndex:e.headerRowIndex,column:n};const a=o==null?void 0:o.getColGroupAtLevel(n,e.headerRowIndex);return a?a.isPadding()&&n.isSpanHeaderHeight()?{headerRowIndex:i.headerGroupRowCount,column:n}:{headerRowIndex:e.headerRowIndex,column:a??n}:{headerRowIndex:n instanceof $e&&n.isSpanHeaderHeight()?i.headerGroupRowCount:e.headerRowIndex,column:n}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}};function qm(e,t,o){const i=o-1;if(e!=="filter"){const s=t instanceof $e&&t.isSpanHeaderHeight();let n=t.getParent();for(;n&&(n.getProvidedColumnGroup().getLevel()>i||s&&n.isPadding());)n=n.getParent();if(n)return s?{column:n,headerRowIndex:n.getProvidedColumnGroup().getLevel(),headerRowIndexWithoutSpan:i}:{column:n,headerRowIndex:i,headerRowIndexWithoutSpan:i}}return{column:t,headerRowIndex:i,headerRowIndexWithoutSpan:i}}function Ym(e,t,o){const i=t+1,s={column:e,headerRowIndex:i,headerRowIndexWithoutSpan:i};if(e instanceof no){if(i>=o)return{column:e.getDisplayedLeafColumns()[0],headerRowIndex:o,headerRowIndexWithoutSpan:i};let r=e.getDisplayedChildren()[0];if(r instanceof no&&r.isPadding()){const l=r.getDisplayedLeafColumns()[0];l.isSpanHeaderHeight()&&(r=l)}s.column=r,r instanceof $e&&r.isSpanHeaderHeight()&&(s.headerRowIndex=o,s.headerRowIndexWithoutSpan=i)}return s}var Zm=class extends x{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(wh(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(Q(this.beans),fa)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){const e=Q(this.beans);return this.isDomDataPresentInHierarchy(e,ri)?!0:this.isDomDataPresentInHierarchy(e,di)}isDomDataPresentInHierarchy(e,t){let o=e;for(;o;){if(or(this.gos,o,t))return!0;o=o.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){const{rowIndex:t,rowPinned:o,column:i}=e,s={rowIndex:t,rowPinned:o,column:i,isFullWidthCell:!1},n=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:o});return n&&(s.isFullWidthCell=n.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:o,rowPinned:i,forceBrowserFocus:s=!1,preventScrollOnBrowserFocus:n=!1,sourceEvent:r}=e,a=this.colModel.getCol(t);if(!a){this.focusedCell=null;return}this.focusedCell={rowIndex:o,rowPinned:Qe(i),column:a};const l=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:"cellFocused",...l,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:s,preventScrollOnBrowserFocus:n,sourceEvent:r}),this.previousCellFocusParams=l}isCellFocused(e){return this.focusedCell==null?!1:Xu(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;const{column:t,rowCtrl:{rowIndex:o,pinned:i}}=e,{column:s,headerRowIndex:n}=this.focusedHeader;return t===s&&o===n&&i==s.getPinned()}focusHeaderPosition(e){var l;if(this.setFocusRecovered(),dt(this.beans))return!1;const{direction:t,fromTab:o,allowUserOverride:i,event:s,fromCell:n,rowWithoutSpanValue:r}=e;let{headerPosition:a}=e;if(n&&((l=this.filterManager)!=null&&l.isAdvFilterHeaderActive()))return this.focusAdvancedFilter(a);if(i){const d=this.focusedHeader,c=De(this.beans);if(o){const u=this.gos.getCallback("tabToNextHeader");u&&(a=this.getHeaderPositionFromUserFunc({userFunc:u,direction:t,currentPosition:d,headerPosition:a,headerRowCount:c}))}else{const u=this.gos.getCallback("navigateToNextHeader");if(u&&s){const h={key:s.key,previousHeaderPosition:d,nextHeaderPosition:a,headerRowCount:c,event:s};a=u(h)}}}return a?this.focusProvidedHeaderPosition({headerPosition:a,direction:t,event:s,fromCell:n,rowWithoutSpanValue:r}):!1}focusHeaderPositionFromUserFunc(e){if(dt(this.beans))return!1;const{userFunc:t,headerPosition:o,direction:i,event:s}=e,n=this.focusedHeader,r=De(this.beans),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:i,currentPosition:n,headerPosition:o,headerRowCount:r});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:i,event:s})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:o,currentPosition:i,headerPosition:s,headerRowCount:n}=e,a=t({backwards:o==="Before",previousHeaderPosition:i,nextHeaderPosition:s,headerRowCount:n});return a===!0?i:a===!1?null:a}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:o,fromCell:i,rowWithoutSpanValue:s,event:n}=e,{column:r,headerRowIndex:a}=t,{filterManager:l,ctrlsSvc:d,headerNavigation:c}=this.beans;if(a===-1)return l!=null&&l.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:r,event:n});c==null||c.scrollToColumn(r,o);const u=d.getHeaderRowContainerCtrl(r.getPinned()),h=(u==null?void 0:u.focusHeader(t.headerRowIndex,r,n))||!1;return c&&h&&(s!=null||i)&&(c.currentHeaderRowWithoutSpan=s??-1),h}focusFirstHeader(){var o;if((o=this.overlays)!=null&&o.isExclusive()&&this.focusOverlay())return!0;const e=this.visibleCols.allCols[0];if(!e)return!1;const t=cl(this.beans,e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){var i;if((i=this.overlays)!=null&&i.isExclusive()&&this.focusOverlay(!0))return!0;const t=De(this.beans)-1,o=U(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:o},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){var t;return(t=this.filterManager)!=null&&t.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===Qe(t)}focusOverlay(e){var o,i;const t=((o=this.overlays)==null?void 0:o.isVisible())&&((i=this.overlays.eWrapper)==null?void 0:i.getGui());return!!t&&ii(t,e)}focusGridView(e){var n,r,a,l,d,c;const{backwards:t=!1,canFocusOverlay:o=!0,event:i}=e;if((n=this.overlays)!=null&&n.isExclusive())return o&&this.focusOverlay(t);if(ni(this.beans))return t&&!dt(this.beans)?this.focusLastHeader():o&&this.focusOverlay(t)?!0:t?!1:io(this.beans,t);const s=t?th(this.beans):eh(this.beans);if(s){const u=e.column??((r=this.focusedHeader)==null?void 0:r.column),{rowIndex:h,rowPinned:g}=s,p=rt(this.beans,s);if(!u||!p||h==null)return!1;if(u.isSuppressNavigable(p)){const f=this.gos.get("enableRtl");let C;return!i||i.key===y.TAB?C=f?y.LEFT:y.RIGHT:C=i.key,(a=this.beans.navigation)==null||a.navigateToNextCell(null,C,{rowIndex:h,column:u,rowPinned:g||null},!0),!0}if((l=this.navigation)==null||l.ensureCellVisible({rowIndex:h,column:u,rowPinned:g}),t){const f=this.rowRenderer.getRowByPosition(s);if(f!=null&&f.isFullWidth()&&((d=this.navigation)!=null&&d.tryToFocusFullWidthRow(s,t)))return!0}return this.setFocusedCell({rowIndex:h,column:u,rowPinned:Qe(g),forceBrowserFocus:!0}),(c=this.beans.rangeSvc)==null||c.setRangeToCell({rowIndex:h,rowPinned:g,column:u}),!0}return!!(o&&this.focusOverlay(t)||t&&this.focusLastHeader())}focusAdvancedFilter(e){var t;return this.advFilterFocusColumn=e==null?void 0:e.column,((t=this.beans.advancedFilter)==null?void 0:t.getCtrl().focusHeaderComp())??!1}focusNextFromAdvancedFilter(e,t){var i;const o=(t?void 0:this.advFilterFocusColumn)??((i=this.visibleCols.allCols)==null?void 0:i[0]);return e?this.focusHeaderPosition({headerPosition:{column:o,headerRowIndex:De(this.beans)-1}}):this.focusGridView({column:o})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},Qm=class extends x{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){this.getScrollbarWidth(),this.addManagedEventListeners({displayedColumnsChanged:this.updateScrollVisible.bind(this),displayedColumnsWidthChanged:this.updateScrollVisible.bind(this)})}updateScrollVisible(){const{colAnimation:e}=this;e!=null&&e.isActive()?e.executeLaterVMTurn(()=>{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){var o;const e=this.ctrlsSvc.get("center");if(!e||(o=this.colAnimation)!=null&&o.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){const e=this.ctrlsSvc.get("center"),t=e.hasHorizontalScrollGap(),o=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==o)&&(this.horizontalScrollGap=t,this.verticalScrollGap=o,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(this.scrollbarWidth==null){const e=this.gos.get("scrollbarWidth"),o=typeof e=="number"&&e>=0?e:tc();o!=null&&(this.scrollbarWidth=o,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},Xm=class extends x{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){var i;if(this.destroyCalled)return;const{stateSvc:e,ctrlsSvc:t,context:o}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:(e==null?void 0:e.getState())??{}}),this.destroyCalled=!0,(i=t.get("gridCtrl"))==null||i.destroyGridUi(),o.destroy(),super.destroy()}},po=new Set(["gridPreDestroyed","fillStart","pasteStart"]),Jm=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","pinnedRowsChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterUiChanged","filterOpened","floatingFilterUiChanged","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged","rowResizeStarted","rowResizeEnded","columnsReset","bulkEditingStarted","bulkEditingStopped","batchEditingStarted","batchEditingStopped"],yi=Jm.reduce((e,t)=>(e[t]=Ec(t),e),{}),fo=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),ew={tag:"span",cls:"ag-sort-indicator-container",children:[fo("Order","order"),fo("Asc","ascending-icon"),fo("Desc","descending-icon"),fo("Mixed","mixed-icon"),fo("None","none-icon")]},sn=class extends Y{constructor(e){super(),this.eSortOrder=I,this.eSortAsc=I,this.eSortDesc=I,this.eSortMixed=I,this.eSortNone=I,e||this.setTemplate(ew)}attachCustomElements(e,t,o,i,s){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=o,this.eSortMixed=i,this.eSortNone=s}setupSort(e,t=!1){if(this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),!e.isSortable()&&!e.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e);const o=this.updateIcons.bind(this),i=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",o),this.addManagedEventListeners({newColumnsLoaded:o,sortChanged:i,columnRowGroupChanged:i}),this.onSortChanged()}addInIcon(e,t,o){if(t==null)return;const i=Mt(e,this.beans,o);i&&t.appendChild(i)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortNone:o,column:i,gos:s,beans:n}=this,r=n.sortSvc.getDisplaySortForColumn(i);if(e&&X(e,r==="asc",{skipAriaHidden:!0}),t&&X(t,r==="desc",{skipAriaHidden:!0}),o){const a=!i.getColDef().unSortIcon&&!s.get("unSortIcon"),l=r==null;X(o,!a&&l,{skipAriaHidden:!0})}}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:o}=this;this.addInIcon("sortUnSort",e,t);const i=t.getColDef().showRowGroup;xe(o)&&i&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:o}=this;if(e){const i=t.sortSvc.getDisplaySortForColumn(o)==="mixed";X(e,i,{skipAriaHidden:!0})}}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:o}}=this;if(!e)return;const i=o.getColumnsWithSortingOrdered(),s=o.getDisplaySortIndexForColumn(t)??-1,n=i.some(a=>o.getDisplaySortIndexForColumn(a)??!1),r=s>=0&&n;X(e,r,{skipAriaHidden:!0}),s>=0?e.textContent=(s+1).toString():pe(e)}},tw={selector:"AG-SORT-INDICATOR",component:sn},Co=["asc","desc",null],ow=class extends x{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,o){const i=this.getNextSortDirection(e);this.setSortForColumn(e,i,t,o)}progressSortFromEvent(e,t){const i=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,i,"uiColumnSorted")}setSortForColumn(e,t,o,i){var c;t!=="asc"&&t!=="desc"&&(t=null);const{gos:s,showRowGroupCols:n}=this.beans,r=xe(s);let a=[e];if(r&&e.getColDef().showRowGroup){const u=(c=n==null?void 0:n.getSourceColumnsForGroupColumn)==null?void 0:c.call(n,e),h=u==null?void 0:u.filter(g=>g.isSortable());h&&(a=[e,...h])}a.forEach(u=>this.setColSort(u,t,i));const l=(o||s.get("alwaysMultiSort"))&&!s.get("suppressMultiSort"),d=[];if(!l){const u=this.clearSortBarTheseColumns(a,i);d.push(...u)}this.updateSortIndex(e),d.push(...a),this.dispatchSortChangedEvents(i,d)}updateSortIndex(e){const{gos:t,colModel:o,showRowGroupCols:i}=this.beans,s=xe(t),n=i==null?void 0:i.getShowRowGroupCol(e.getId()),r=s&&n||e,a=this.getColumnsWithSortingOrdered();o.forAllCols(c=>this.setColSortIndex(c,null));const l=a.filter(c=>s&&c.getColDef().showRowGroup?!1:c!==r);(r.getSort()?[...l,r]:l).forEach((c,u)=>this.setColSortIndex(c,u))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols(t=>{t.getSort()&&(e=!0)}),e}dispatchSortChangedEvents(e,t){const o={type:"sortChanged",source:e};t&&(o.columns=t),this.eventSvc.dispatchEvent(o)}clearSortBarTheseColumns(e,t){const o=[];return this.beans.colModel.forAllCols(i=>{e.includes(i)||(i.getSort()&&o.push(i),this.setColSort(i,void 0,t))}),o}getNextSortDirection(e){const t=e.getColDef().sortingOrder??this.gos.get("sortingOrder")??Co,o=t.indexOf(e.getSort()),i=o<0,s=o==t.length-1;return i||s?t[0]:t[o+1]}getIndexedSortMap(){const{gos:e,colModel:t,showRowGroupCols:o,rowGroupColsSvc:i}=this.beans;let s=[];if(t.forAllCols(d=>{d.getSort()&&s.push(d)}),t.isPivotMode()){const d=xe(e);s=s.filter(c=>{const u=!!c.getAggFunc(),h=!c.isPrimary(),g=d?o==null?void 0:o.getShowRowGroupCol(c.getId()):c.getColDef().showRowGroup;return u||h||g})}const n=(i==null?void 0:i.columns.filter(d=>!!d.getSort()))??[],r={};s.forEach((d,c)=>r[d.getId()]=c),s.sort((d,c)=>{const u=d.getSortIndex(),h=c.getSortIndex();if(u!=null&&h!=null)return u-h;if(u==null&&h==null){const g=r[d.getId()],p=r[c.getId()];return g>p?1:-1}else return h==null?-1:1});const a=xe(e)&&!!n.length;a&&(s=[...new Set(s.map(d=>(o==null?void 0:o.getShowRowGroupCol(d.getId()))??d))]);const l=new Map;return s.forEach((d,c)=>l.set(d,c)),a&&n.forEach(d=>{const c=o.getShowRowGroupCol(d.getId());l.set(d,l.get(c))}),l}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),colId:e.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),column:e}))}canColumnDisplayMixedSort(e){const t=xe(this.gos),o=!!e.getColDef().showRowGroup;return t&&o}getDisplaySortForColumn(e){var r;const t=(r=this.beans.showRowGroupCols)==null?void 0:r.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!(t!=null&&t.length))return e.getSort();const i=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,s=i[0].getSort();return i.every(a=>a.getSort()==s)?s:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t,o){let i=0;e.addManagedListeners(t,{movingChanged:()=>{i=Date.now()}}),o&&e.addManagedElementListeners(o,{click:n=>{const r=t.isMoving(),l=Date.now()-i<50;r||l||this.progressSortFromEvent(t,n)}});const s=()=>{var r;const n=t.getSort();if(e.toggleCss("ag-header-cell-sorted-asc",n==="asc"),e.toggleCss("ag-header-cell-sorted-desc",n==="desc"),e.toggleCss("ag-header-cell-sorted-none",!n),t.getColDef().showRowGroup){const a=(r=this.beans.showRowGroupCols)==null?void 0:r.getSourceColumnsForGroupColumn(t),d=!(a==null?void 0:a.every(c=>t.getSort()==c.getSort()));e.toggleCss("ag-header-cell-sorted-mixed",d)}};e.addManagedEventListeners({sortChanged:s,columnRowGroupChanged:s})}initCol(e){const{sort:t,initialSort:o,sortIndex:i,initialSortIndex:s}=e.colDef;t!==void 0?(t==="asc"||t==="desc")&&(e.sort=t):(o==="asc"||o==="desc")&&(e.sort=o),i!==void 0?i!==null&&(e.sortIndex=i):s!==null&&(e.sortIndex=s)}updateColSort(e,t,o){t!==void 0&&(t==="desc"||t==="asc"?this.setColSort(e,t,o):this.setColSort(e,void 0,o))}setColSort(e,t,o){e.sort!==t&&(e.sort=t,e.dispatchColEvent("sortChanged",o)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new sn(e)}getSortIndicatorSelector(){return tw}},Ot={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agDateColumnFloatingFilter:"DateFilter",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agNewFiltersToolPanel:"NewFiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"},iw=()=>({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."}}),sw={aggFunc:"SharedAggregation",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:e,editable:t})=>t?typeof e=="string"?Ot[e]??"CustomEditor":"CustomEditor":null,cellRenderer:({cellRenderer:e})=>typeof e!="string"?null:Ot[e],cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:e,cellEditor:t})=>e&&!t?"TextEditor":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:e})=>e&&typeof e!="string"&&typeof e!="boolean"?"CustomFilter":typeof e=="string"?Ot[e]??"ColumnFilter":"ColumnFilter",floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",mainMenuItems:"ColumnMenu",menuTabs:e=>{var o;const t=["columnsMenuTab","generalMenuTab"];return(o=e.menuTabs)!=null&&o.some(i=>t.includes(i))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",spanRows:"CellSpan"},nw=()=>({autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(t,{paginationAutoPageSize:o})=>o?"colDef.autoHeight is not supported with paginationAutoPageSize.":null},cellRendererParams:{validate:t=>(t.rowGroup!=null||t.rowGroupIndex!=null||t.cellRenderer==="agGroupCellRenderer")&&"checkbox"in t.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},flex:{validate:(t,o)=>o.autoSizeStrategy?"colDef.flex is not supported with gridOptions.autoSizeStrategy":null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(t,{rowSelection:o})=>o==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:o})=>o==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:o})=>o==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:t=>{const o=t.headerValueGetter;return typeof o=="function"||typeof o=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:t})=>{if(t){if(t.smallDown)return Ee(262);if(t.smallLeft)return Ee(263);if(t.smallRight)return Ee(264)}return null}},sortingOrder:{validate:t=>{const o=t.sortingOrder;if(Array.isArray(o)&&o.length>0){const i=o.filter(s=>!Co.includes(s));if(i.length>0)return`sortingOrder must be an array with elements from [${Co.map(ko).join()}], currently it includes [${i.map(ko).join()}]`}else if(!Array.isArray(o)||o.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${o}`;return null}},type:{validate:t=>{const o=t.type;return o instanceof Array?o.some(s=>typeof s!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof o=="string"?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(t,{suppressRowTransform:o})=>o?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{dependencies:{editable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(t,{rowSelection:o,cellSelection:i,suppressRowTransform:s,enableCellSpan:n,rowDragEntireRow:r,enableCellTextSelection:a})=>typeof o=="object"&&(o==null?void 0:o.mode)==="singleRow"&&o!=null&&o.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":i?"colDef.spanRows is not supported with cellSelection.":s?"colDef.spanRows is not supported with suppressRowTransform.":n?r?"colDef.spanRows is not supported with rowDragEntireRow.":a?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."}}),rw={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0},aw=()=>Object.keys(rw),lw=()=>({objectName:"colDef",allProperties:aw(),docsUrl:"column-properties/",deprecations:iw(),validations:nw()}),dw=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","invalidEditValueMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce","renderingMode"],cw=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","advancedFilterParams","initialState","autoSizeStrategy","selectionColumnDef","findOptions","filterHandlers"],uw=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],ul=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns","rowDragInsertDelay"],hw=["theme","rowSelection"],gw=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],hl=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault","enableFilterHandlers","suppressStartEditOnTab","hidePaddedHeaderRows"],pw=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getFullRowEditValidationErrors","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter","isRowPinnable","isRowPinned","isRowValidDropPosition"],nn=()=>[...uw,...cw,...dw,...ul,...pw,...hl,...gw,...hw],fw=()=>({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."}});function Ie(e,t,o){return typeof t=="number"||t==null?t==null||t>=o?null:`${e}: value should be greater than or equal to ${o}`:`${e}: value should be a number`}var Cw={alignedGrids:"AlignedGrids",allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",invalidEditValueMode:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getFullRowEditValidationErrors:"EditCore",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:"SharedRowGrouping",grandTotalRow:"SharedRowGrouping",initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isRowPinnable:"PinnedRow",isRowPinned:"PinnedRow",localeText:"Locale",masterDetail:"SharedMasterDetail",pagination:"Pagination",pinnedBottomRowData:"PinnedRow",pinnedTopRowData:"PinnedRow",pivotMode:"SharedPivot",pivotPanelShow:"RowGroupingPanel",quickFilterText:"QuickFilter",rowClass:"RowStyle",rowClassRules:"RowStyle",rowData:"ClientSideRowModel",rowDragManaged:"RowDrag",rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:"SharedRowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:"SharedTreeData",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},mw=()=>{const e={autoSizePadding:{validate({autoSizePadding:o}){return Ie("autoSizePadding",o,0)}},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:o}){return Ie("cacheBlockSize",o,1)}},cacheOverflowSize:{validate({cacheOverflowSize:o}){return Ie("cacheOverflowSize",o,1)}},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:o=>{const i=o.domLayout,s=["autoHeight","normal","print"];return i&&!s.includes(i)?`domLayout must be one of [${s.join()}], currently it's ${i}`:null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate({enableRowPinning:o,pinnedTopRowData:i,pinnedBottomRowData:s}){return o&&(i||s)?"Manual row pinning cannot be used together with pinned row data. Either set `enableRowPinning` to `false`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":null}},isRowPinnable:{supportedRowModels:["clientSide"],validate({enableRowPinning:o,isRowPinnable:i,pinnedTopRowData:s,pinnedBottomRowData:n}){return i&&(s||n)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!o&&i?"`isRowPinnable` requires `enableRowPinning` to be set.":null}},isRowPinned:{supportedRowModels:["clientSide"],validate({enableRowPinning:o,isRowPinned:i,pinnedTopRowData:s,pinnedBottomRowData:n}){return i&&(s||n)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!o&&i?"`isRowPinned` requires `enableRowPinning` to be set.":null}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},icons:{validate:({icons:o})=>{if(o){if(o.smallDown)return Ee(262);if(o.smallLeft)return Ee(263);if(o.smallRight)return Ee(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:o}){return Ie("infiniteInitialRowCount",o,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},keepDetailRowsCount:{validate({keepDetailRowsCount:o}){return Ie("keepDetailRowsCount",o,1)}},paginationPageSize:{validate({paginationPageSize:o}){return Ie("paginationPageSize",o,1)}},paginationPageSizeSelector:{validate:o=>{const i=o.paginationPageSizeSelector;return typeof i=="boolean"||i==null||i.length?null:`'paginationPageSizeSelector' cannot be an empty array.
|
|
19
|
+
If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate({rowBuffer:o}){return Ie("rowBuffer",o,0)}},rowClass:{validate:o=>typeof o.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:o}){return o&&typeof o=="string"?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':o&&typeof o!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":o&&o.mode!=="multiRow"&&o.mode!=="singleRow"?`Selection mode "${o.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null}},rowStyle:{validate:o=>{const i=o.rowStyle;return i&&typeof i=="function"?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null}},serverSideDatasource:{supportedRowModels:["serverSide"]},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:o}){return Ie("serverSideInitialRowCount",o,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:o=>{const i=o.sortingOrder;if(Array.isArray(i)&&i.length>0){const s=i.filter(n=>!Co.includes(n));if(s.length>0)return`sortingOrder must be an array with elements from [${Co.map(ko).join()}], currently it includes [${s.map(ko).join()}]`}else if(!Array.isArray(i)||i.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${i}`;return null}},tooltipHideDelay:{validate:o=>o.tooltipHideDelay&&o.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:o=>o.tooltipShowDelay&&o.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:o=>{const i=o.rowModelType??"clientSide";switch(i){case"clientSide":{const{treeDataChildrenField:s,treeDataParentIdField:n,getDataPath:r,getRowId:a}=o;if(!s&&!n&&!r)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(s){if(r)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(n)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(n){if(!a)return"getRowId callback not provided, tree data with parent id cannot be built.";if(r)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":{const s=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${i} row model.`;return o.isServerSideGroup&&o.getServerSideGroupKey?null:s}}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:o}){return Ie("viewportRowModelBufferSize",o,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:o}){return Ie("viewportRowModelPageSize",o,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate({autoGroupColumnDef:o,showOpenedGroup:i}){return o!=null&&o.field&&i?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":o!=null&&o.valueGetter&&i?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null}},renderingMode:{validate:o=>{const i=o.renderingMode,s=["default","legacy"];return i&&!s.includes(i)?`renderingMode must be one of [${s.join()}], currently it's ${i}`:null}}},t={};return hl.forEach(o=>{t[o]={expectedType:"boolean"}}),ul.forEach(o=>{t[o]={expectedType:"number"}}),de(t,e),t},ww=()=>({objectName:"gridOptions",allProperties:[...nn(),...Object.values(yi)],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:fw(),validations:mw()}),vw=0,Sw=0,bw=class extends x{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.gridInstanceId=Sw++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new Ze,this.globalEventHandlerFactory=e=>(t,o)=>{if(!this.isAlive())return;const i=po.has(t);if(i&&!e||!i&&e||!yw(t))return;const s=(n,r)=>{const a=yi[n],l=this.gridOptions[a];typeof l=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>l(r))};if(this.gridReadyFired)s(t,o);else if(t==="gridReady"){s(t,o),this.gridReadyFired=!0;for(const n of this.queueEvents)s(n.eventName,n.event);this.queueEvents=[]}else this.queueEvents.push({eventName:t,event:o})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getGridId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.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:"gridOptionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){return this.gridOptions[e]??Od[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return A(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(o=>e(this.addGridCommonParams(o)))}updateGridOptions({options:e,force:t,source:o="api"}){const i={id:vw++,properties:[]},s=[],{gridOptions:n,validation:r}=this;for(const a of Object.keys(e)){const l=e[a];r==null||r.warnOnInitialPropertyUpdate(o,a);const d=t||typeof l=="object"&&o==="api",c=n[a];if(d||c!==l){n[a]=l;const u={type:a,currentValue:l,previousValue:c,changeSet:i,source:o};s.push(u)}}this.validateGridOptions(this.gridOptions),i.properties=s.map(a=>a.type),s.forEach(a=>{Yt(this,`Updated property ${a.type} from`,a.previousValue," to ",a.currentValue),this.propEventSvc.dispatchEvent(a)})}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addGridCommonParams(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t){for(const o of Object.keys(e)){const i=e[o];if(i==null||i===!1)continue;let s=t[o];typeof s=="function"&&(s=s(e,this.gridOptions,this.beans)),s&&this.assertModuleRegistered(s,o)}}validateGridOptions(e){var t;this.validateOptions(e,Cw),(t=this.validation)==null||t.processGridOptions(e)}validateColDef(e,t,o){var i,s;(o||!((i=this.beans.dataTypeSvc)!=null&&i.isColPendingInference(t)))&&(this.validateOptions(e,sw),(s=this.validation)==null||s.validateColDef(e))}assertModuleRegistered(e,t){const o=Array.isArray(e)?e.some(i=>this.isModuleRegistered(i)):this.isModuleRegistered(e);return o||j(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),o}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:gs(),rowModelType:this.get("rowModelType"),isUmd:Uu()}}isModuleRegistered(e){return hs(e,this.gridId,this.get("rowModelType"))}};function yw(e){return!!yi[e]}function gl(e){const t={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:t},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:t},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:t},e?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var Rw=gl(!0),Ew=gl(!1),xw=class extends Y{constructor(){super(...arguments),this.eFilter=I,this.eFilterButton=I,this.eSortIndicator=I,this.eMenu=I,this.eLabel=I,this.eText=I,this.eSortOrder=I,this.eSortAsc=I,this.eSortDesc=I,this.eSortMixed=I,this.eSortNone=I,this.isLoadingInnerComponent=!1}refresh(e){var o,i,s;const t=this.params;if(this.params=e,this.workOutTemplate(e,!!((o=this.beans)!=null&&o.sortSvc))!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){const n={...e};de(n,e.innerHeaderComponentParams),(s=(i=this.innerHeaderComponent).refresh)==null||s.call(i,n)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){const o=e.template;return o?o!=null&&o.trim?o.trim():o:t?Rw:Ew}init(e){this.params=e;const{sortSvc:t,touchSvc:o,rowNumbersSvc:i,userCompFactory:s}=this.beans,n=t==null?void 0:t.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!n),this.setTemplate(this.currentTemplate,n?[n]:void 0),o==null||o.setupForHeader(this),this.setMenu(),this.setupSort(),i==null||i.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(s,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const o=Pu(e,t,t);o&&(this.isLoadingInnerComponent=!0,o.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderComponent=i,this.eText&&this.eText.appendChild(i.getGui())):this.destroyBean(i))}))}setDisplayName(e){const{displayName:t}=e,o=this.currentDisplayName;this.currentDisplayName=t,!(!this.eText||o===t||this.innerHeaderComponent||this.isLoadingInnerComponent)&&(this.eText.textContent=Rt(t))}addInIcon(e,t,o){const i=Mt(e,this.beans,o);i&&t.appendChild(i)}workOutShowMenu(){var e;return this.params.enableMenu&&!!((e=this.beans.menuSvc)!=null&&e.isHeaderMenuButtonEnabled())}shouldSuppressMenuHide(){var e;return!!((e=this.beans.menuSvc)!=null&&e.isHeaderMenuButtonAlwaysShowEnabled())}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){ke(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:o}=this,i=No(e);this.addInIcon(i?"menu":"menuAlt",t,o.column),t.classList.toggle("ag-header-menu-icon",!i);const s=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=s,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(s)}toggleMenuAlwaysShow(e){var t;(t=this.eMenu)==null||t.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){const{currentSuppressMenuHide:t,params:o}=this;t||this.toggleMenuAlwaysShow(!0),o.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){var l;const{params:t,gos:o,beans:i,eMenu:s,eFilterButton:n}=this,r=t.column,a=No(o);if(e&&!a){if((l=i.menuSvc)!=null&&l.isFilterMenuInHeaderEnabled(r))return t.showFilter(n??s??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(s??n??this.getGui()),!0;return!1}setupSort(){const{sortSvc:e}=this.beans;if(!e)return;const{enableSorting:t,column:o}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));const{eSortIndicator:i,eSortOrder:s,eSortAsc:n,eSortDesc:r,eSortMixed:a,eSortNone:l}=this;i.attachCustomElements(s,n,r,a,l)}this.eSortIndicator.setupSort(o),this.currentSort&&e.setupHeader(this,o,this.eLabel)}setupFilterIcon(){const{eFilter:e,params:t}=this;if(!e)return;const o=()=>{const i=t.column.isFilterActive();X(e,i,{skipAriaHidden:!0})};this.configureFilter(t.enableFilterIcon,e,o,"filterActive")}setupFilterButton(){const{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0}configureFilter(e,t,o,i){if(!e)return ke(t),!1;const s=this.params.column;return this.addInIcon(i,t,s),this.addManagedListeners(s,{filterChanged:o}),o(),!0}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:o}=this;return e?t??o??this.getGui():o??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent&&(this.destroyBean(this.innerHeaderComponent),this.innerHeaderComponent=void 0)}},Dw={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"}]},Fw=class extends Y{constructor(){super(Dw),this.agOpened=I,this.agClosed=I,this.agLabel=I,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t,touchSvc:o}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),o==null||o.setupForHeaderGroup(this)}checkWarnings(){this.params.template&&M(89)}workOutInnerHeaderGroupComponent(e,t){const o=Iu(e,t,t);o&&(this.isLoadingInnerComponent=!0,o.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderGroupComponent=i,this.agLabel.appendChild(i.getGui())):this.destroyBean(i))}))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:o},beans:i}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const s=l=>{if(Ge(l))return;const d=!o.isExpanded();i.colGroupSvc.setColumnGroupOpened(o.getProvidedColumnGroup(),d,"uiColumnExpanded")};this.addTouchAndClickListeners(i,t,s),this.addTouchAndClickListeners(i,e,s);const n=l=>{yt(l)};this.addManagedElementListeners(t,{dblclick:n}),this.addManagedElementListeners(e,{dblclick:n}),this.addManagedElementListeners(this.getGui(),{dblclick:s}),this.updateIconVisibility();const r=o.getProvidedColumnGroup(),a=this.updateIconVisibility.bind(this);this.addManagedListeners(r,{expandedChanged:a,expandableChanged:a})}addTouchAndClickListeners(e,t,o){var i;(i=e.touchSvc)==null||i.setupForHeaderGroupElement(this,t,o),this.addManagedElementListeners(t,{click:o})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:o}}=this;if(o.isExpandable()){const i=o.isExpanded();X(e,i),X(t,!i)}else X(e,!1),X(t,!1)}addInIcon(e,t){const o=Mt(e,this.beans,null);o&&t.appendChild(o)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:o}=this;X(t,!1),X(o,!1);return}}setupLabel(e){var s;const{displayName:t,columnGroup:o}=e,i=this.innerHeaderGroupComponent||this.isLoadingInnerComponent;A(t)&&!i&&(this.agLabel.textContent=Rt(t)),this.toggleCss("ag-sticky-label",!((s=o.getColGroupDef())!=null&&s.suppressStickyLabel))}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},Pw={moduleName:"ColumnHeaderComp",version:L,userComponents:{agColumnHeader:xw},icons:{menu:"menu",menuAlt:"menu-alt"}},Tw={moduleName:"ColumnGroupHeaderComp",version:L,userComponents:{agColumnGroupHeader:Fw},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},Iw=class extends x{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&&M(92)}createTask(e,t,o,i,s=!1){this.verify();let n=o;i&&this.batchFrameworkComps&&(n="f1");const r={task:e,index:t,createOrder:++this.taskCount,deferred:s};this.addTaskToList(this[n],r),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((o,i)=>o.deferred!==i.deferred?o.deferred?-1:1:o.index!==i.index?t*(i.index-o.index):i.createOrder-o.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){const{p1:t,p2:o,f1:i,destroyTasks:s,beans:n}=this,{ctrlsSvc:r,frameworkOverrides:a}=n,l=t.list,d=o.list,c=i.list,u=Date.now();let h=0;const g=e<=0,p=r.getScrollFeature();for(;g||h<e;){if(!p.scrollGridIfNeeded()){let C;if(l.length)this.sortTaskList(t),C=l.pop().task;else if(d.length)this.sortTaskList(o),C=d.pop().task;else if(c.length)a.wrapOutgoing(()=>{for(;(g||h<e)&&!p.scrollGridIfNeeded();){if(c.length)this.sortTaskList(i),C=c.pop().task,C();else break;h=Date.now()-u}}),C=()=>{};else if(s.length)C=s.pop();else break;C()}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);We(this.beans,e)}isQueueEmpty(){return!this.ticking}},Aw={moduleName:"AnimationFrame",version:L,beans:[Iw]},Mw=class extends x{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eBodyViewport,t)}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t)}mockRowContextMenu(e){if(!Ct())return;const t=(o,i,s)=>{var a;const{rowCtrl:n,cellCtrl:r}=e.getControlsForEventTarget((s==null?void 0:s.target)??null);r!=null&&r.column&&r.dispatchCellContextMenuEvent(s??null),(a=this.beans.contextMenuSvc)==null||a.handleContextMenuMouseEvent(void 0,s,n,r)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!Ct()||dr("dblclick"))return!1;const i=Date.now(),s=i-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=i,s})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){const{gos:t,sortSvc:o,menuSvc:i}=this.beans;if(t.get("suppressTouch"))return;const{params:s,eMenu:n,eFilterButton:r}=e,a=new ct(e.getGui(),!0),l=e.shouldSuppressMenuHide(),d=l&&A(n)&&s.enableMenu,c=d?new ct(n,!0):a;if(s.enableMenu||i!=null&&i.isHeaderContextMenuEnabled(s.column)){const u=d?"tap":"longTap",h=g=>s.showColumnMenuAfterMouseClick(g.touchStart);e.addManagedListeners(c,{[u]:h})}if(s.enableSorting){const u=h=>{const g=h.touchStart.target;l&&(n!=null&&n.contains(g)||r!=null&&r.contains(g))||o==null||o.progressSort(s.column,!1,"uiColumnSorted")};e.addManagedListeners(a,{tap:u})}if(s.enableFilterButton&&r){const u=new ct(r,!0);e.addManagedListeners(u,{tap:()=>s.showFilter(r)}),e.addDestroyFunc(()=>u.destroy())}e.addDestroyFunc(()=>a.destroy()),d&&e.addDestroyFunc(()=>c.destroy())}setupForHeaderGroup(e){var o;const t=e.params;if((o=this.beans.menuSvc)!=null&&o.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){const i=new ct(t.eGridHeader,!0),s=n=>t.showColumnMenuAfterMouseClick(n.touchStart);e.addManagedListeners(i,{longTap:s}),e.addDestroyFunc(()=>i.destroy())}}setupForHeaderGroupElement(e,t,o){const i=new ct(t,!0);e.addManagedListeners(i,{tap:o}),e.addDestroyFunc(()=>i.destroy())}mockContextMenu(e,t,o){if(!Ct())return;const i=new ct(t),s=n=>{so(this.gos,n.touchEvent)&&o(void 0,n.touchStart,n.touchEvent)};e.addManagedListeners(i,{longTap:s}),e.addDestroyFunc(()=>i.destroy())}},kw={moduleName:"Touch",version:L,beans:[Mw]},Lw=class extends x{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,o=!1){return o?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const o=e===y.UP,i=e===y.DOWN,s=e===y.LEFT;let n,r;const{pageBounds:a,gos:l,visibleCols:d,pinnedRowModel:c}=this.beans,{rowPinned:u}=t;if(o||i)u&&c?o?r=0:r=u==="top"?c.getPinnedTopRowCount()-1:c.getPinnedBottomRowCount()-1:r=o?a.getFirstRow():a.getLastRow(),n=t.column;else{const h=l.get("enableRtl");r=t.rowIndex,n=(s!==h?d.allCols:[...d.allCols].reverse()).find(p=>this.isCellGoodToFocusOn({rowIndex:r,rowPinned:null,column:p}))}return n?{rowIndex:r,rowPinned:u,column:n}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let o=t,i=!1;for(;!i;){switch(e){case y.UP:o=this.getCellAbove(o);break;case y.DOWN:o=this.getCellBelow(o);break;case y.RIGHT:o=this.gos.get("enableRtl")?this.getCellToLeft(o):this.getCellToRight(o);break;case y.LEFT:o=this.gos.get("enableRtl")?this.getCellToRight(o):this.getCellToLeft(o);break;default:o=null,M(8,{key:e});break}o?i=this.isCellGoodToFocusOn(o):i=!0}return o}isCellGoodToFocusOn(e){const t=e.column;let o;const{pinnedRowModel:i,rowModel:s}=this.beans;switch(e.rowPinned){case"top":o=i==null?void 0:i.getPinnedTopRow(e.rowIndex);break;case"bottom":o=i==null?void 0:i.getPinnedBottomRow(e.rowIndex);break;default:o=s.getRow(e.rowIndex);break}return o?!this.isSuppressNavigable(t,o):!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){var i;if(!e)return null;const t=((i=this.rowSpanSvc)==null?void 0:i.getCellEnd(e))??e,o=Vr(this.beans,t);return o?{rowIndex:o.rowIndex,column:e.column,rowPinned:o.rowPinned}:null}getCellAbove(e){var i;if(!e)return null;const t=((i=this.rowSpanSvc)==null?void 0:i.getCellStart(e))??e,o=Xo(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned});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:o}=this.beans,i=t.allCols;let s=e.rowIndex,n=e.rowPinned,r=t.getColAfter(e.column);if(!r){r=i[0];const a=Vr(this.beans,e);if(q(a)||!a.rowPinned&&!((o==null?void 0:o.isRowInPage(a.rowIndex))??!0))return null;s=a?a.rowIndex:null,n=a?a.rowPinned:null}return{rowIndex:s,column:r,rowPinned:n}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:o,pagination:i}=t,s=o.allCols;let n=e.rowIndex,r=e.rowPinned,a=o.getColBefore(e.column);if(!a){a=U(s);const l=Xo(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(q(l)||!l.rowPinned&&!((i==null?void 0:i.isRowInPage(l.rowIndex))??!0))return null;n=l?l.rowIndex:null,r=l?l.rowPinned:null}return{rowIndex:n,column:a,rowPinned:r}}isSuppressNavigable(e,t){const{suppressNavigable:o}=e.colDef;if(typeof o=="boolean")return o;if(typeof o=="function"){const i=e.createColumnFunctionCallbackParams(t);return o(i)}return!1}};function Gw(e){return e.focusSvc.getFocusedCell()}function Hw(e){return e.focusSvc.clearFocusedCell()}function Ow(e,t,o,i){e.focusSvc.setFocusedCell({rowIndex:t,column:o,rowPinned:i,forceBrowserFocus:!0})}function Bw(e,t){var o;return((o=e.navigation)==null?void 0:o.tabToNextCell(!1,t))??!1}function Vw(e,t){var o;return((o=e.navigation)==null?void 0:o.tabToNextCell(!0,t))??!1}function Nw(e,t,o=!1){var s;const i=(s=e.headerNavigation)==null?void 0:s.getHeaderPositionForColumn(t,o);i&&e.focusSvc.focusHeaderPosition({headerPosition:i})}var _w=class extends x{constructor(){super(),this.beanName="navigation",this.onPageDown=jn(this.onPageDown,100),this.onPageUp=jn(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const o=e.key,i=e.altKey,s=e.ctrlKey||e.metaKey,n=!!this.beans.rangeSvc&&e.shiftKey,r=Gh(this.gos,e);let a=!1;switch(o){case y.PAGE_HOME:case y.PAGE_END:!s&&!i&&(this.onHomeOrEndKey(o),a=!0);break;case y.LEFT:case y.RIGHT:case y.UP:case y.DOWN:if(!r)return!1;s&&!i&&!n&&(this.onCtrlUpDownLeftRight(o,r),a=!0);break;case y.PAGE_DOWN:case y.PAGE_UP:!s&&!i&&(a=this.handlePageUpDown(o,r,t));break}return a&&e.preventDefault(),a}handlePageUpDown(e,t,o){return o&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===y.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:o,focusIndex:i,focusColumn:s,isAsync:n,rowPinned:r}){const{scrollFeature:a}=this.gridBodyCon;A(o)&&!o.isPinned()&&a.ensureColumnVisible(o),A(e)&&a.ensureIndexVisible(e,t),n||a.ensureIndexVisible(i);const{focusSvc:l,rangeSvc:d}=this.beans;l.setFocusedCell({rowIndex:i,column:s,rowPinned:r,forceBrowserFocus:!0}),d==null||d.setRangeToCell({rowIndex:i,rowPinned:r,column:s})}onPageDown(e){const t=this.beans,o=rn(t),i=this.getViewportHeight(),{pageBounds:s,rowModel:n,rowAutoHeight:r}=t,a=s.getPixelOffset(),l=o.top+i,d=n.getRowIndexAtPixel(l+a);r!=null&&r.active?this.navigateToNextPageWithAutoHeight(e,d):this.navigateToNextPage(e,d)}onPageUp(e){const t=this.beans,o=rn(t),{pageBounds:i,rowModel:s,rowAutoHeight:n}=t,r=i.getPixelOffset(),a=o.top,l=s.getRowIndexAtPixel(a+r);n!=null&&n.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,o=!1){const{pageBounds:i,rowModel:s}=this.beans,n=this.getViewportHeight(),r=i.getFirstRow(),a=i.getLastRow(),l=i.getPixelOffset(),d=s.getRow(e.rowIndex),c=o?(d==null?void 0:d.rowHeight)-n-l:n-l,u=(d==null?void 0:d.rowTop)+c;let h=s.getRowIndexAtPixel(u+l);if(h===e.rowIndex){const p=o?-1:1;t=h=e.rowIndex+p}let g;o?(g="bottom",h<r&&(h=r),t<r&&(t=r)):(g="top",h>a&&(h=a),t>a&&(t=a)),this.isRowTallerThanView(s.getRow(h))&&(t=h,g="top"),this.navigateTo({scrollIndex:t,scrollType:g,scrollColumn:null,focusIndex:h,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,o=!1){this.navigateTo({scrollIndex:t,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const i=this.getNextFocusIndexForAutoHeight(e,o);this.navigateTo({scrollIndex:t,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:i,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const o=t?-1:1,i=this.getViewportHeight(),{pageBounds:s,rowModel:n}=this.beans,r=s.getLastRow();let a=0,l=e.rowIndex;for(;l>=0&&l<=r;){const d=n.getRow(l);if(d){const c=d.rowHeight??0;if(a+c>i)break;a+=c}l+=o}return Math.max(0,Math.min(l,r))}getViewportHeight(){const e=this.beans,t=rn(e),o=this.beans.scrollVisibleSvc.getScrollbarWidth();let i=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(i-=o),i}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const o=this.beans.cellNavigation.getNextCellToFocus(e,t,!0),{rowIndex:i,rowPinned:s}=o,n=o.column;this.navigateTo({scrollIndex:i,scrollType:null,scrollColumn:n,focusIndex:i,focusColumn:n,rowPinned:s})}onHomeOrEndKey(e){const t=e===y.PAGE_HOME,{visibleCols:o,pageBounds:i,rowModel:s}=this.beans,n=o.allCols,r=t?i.getFirstRow():i.getLastRow(),a=s.getRow(r);if(!a)return;const l=(t?n:[...n].reverse()).find(d=>!d.isSuppressNavigable(a));l&&this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:l,focusIndex:r,focusColumn:l})}onTabKeyDown(e,t){const o=t.shiftKey,i=this.tabToNextCellCommon(e,o,t),s=this.beans,{ctrlsSvc:n,pageBounds:r,focusSvc:a,gos:l}=s;if(i!==!1){i?t.preventDefault():i===null&&n.get("gridCtrl").allowFocusForNextCoreContainer(o);return}if(o){const{rowIndex:d,rowPinned:c}=e.getRowPosition();(c?d===0:d===r.getFirstRow())&&(l.get("headerHeight")===0||dt(s)?io(s,!0,!0):(t.preventDefault(),a.focusPreviousFromFirstCell(t)))}else e instanceof At&&e.focusCell(!0),(!o&&a.focusOverlay(!1)||io(s,o))&&t.preventDefault()}tabToNextCell(e,t){const o=this.beans,{focusSvc:i,rowRenderer:s}=o,n=i.getFocusedCell();if(!n)return!1;let r=Qo(o,n);return!r&&(r=s.getRowByPosition(n),!r||!r.isFullWidth())?!1:!!this.tabToNextCellCommon(r,e,t,"api")}tabToNextCellCommon(e,t,o,i="ui"){var l;const{editSvc:s,focusSvc:n}=this.beans;let r;const a=e instanceof At?e:(l=e.getAllCellCtrls())==null?void 0:l[0];return s!=null&&s.isEditing()?r=s==null?void 0:s.moveToNextCell(a,t,o,i):r=this.moveToNextCellNotEditing(e,t,o),r===null?r:r||!!n.focusedHeader}moveToNextCellNotEditing(e,t,o){const i=this.beans.visibleCols.allCols;let s;if(e instanceof ci){if(s={...e.getRowPosition(),column:t?i[0]:U(i)},this.gos.get("embedFullWidthRows")&&o){const r=e.findFullWidthInfoForEvent(o);r&&(s.column=r.column)}}else s=e.getFocusedCellPosition();const n=this.findNextCellToFocusOn(s,{backwards:t,startEditing:!1});if(n===!1)return null;if(n instanceof At)n.focusCell(!0);else if(n)return this.tryToFocusFullWidthRow(n,t);return A(n)}findNextCellToFocusOn(e,{backwards:t,startEditing:o,skipToNextEditableCell:i}){let s=e;const n=this.beans,{cellNavigation:r,gos:a,focusSvc:l,rowRenderer:d,rangeSvc:c}=n;for(;;){e!==s&&(e=s),t||(s=this.getLastCellOfColSpan(s)),s=r.getNextTabbedCell(s,t);const u=a.getCallback("tabToNextCell");if(A(u)){const f=u({backwards:t,editing:o,previousCellPosition:e,nextCellPosition:s||null});if(f===!0)s=e;else{if(f===!1)return!1;s={rowIndex:f.rowIndex,column:f.column,rowPinned:f.rowPinned}}}if(!s)return null;if(s.rowIndex<0){const p=De(n);return l.focusHeaderPosition({headerPosition:{headerRowIndex:p+s.rowIndex,column:s.column},fromCell:!0}),null}const h=a.get("editType")==="fullRow";if(o&&(!h||i)&&!this.isCellEditable(s))continue;this.ensureCellVisible(s);const g=Qo(n,s);if(!g){const p=d.getRowByPosition(s);if(!p||!p.isFullWidth()||o)continue;return{...p.getRowPosition(),column:s==null?void 0:s.column}}if(!r.isSuppressNavigable(g.column,g.rowNode))return g.setFocusedCellPosition(s),c==null||c.setRangeToCell(s),g}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:o,rowModel:i}=this.beans;return t==="top"?o==null?void 0:o.getPinnedTopRow(e):t==="bottom"?o==null?void 0:o.getPinnedBottomRow(e):i.getRow(e)}navigateToNextCell(e,t,o,i){let s=o,n=!1;const r=this.beans,{cellNavigation:a,focusSvc:l,gos:d}=r;for(;s&&(s===o||!this.isValidNavigateCell(s));)d.get("enableRtl")?t===y.LEFT&&(s=this.getLastCellOfColSpan(s)):t===y.RIGHT&&(s=this.getLastCellOfColSpan(s)),s=a.getNextCellToFocus(t,s),n=q(s);if(n&&e&&e.key===y.UP&&(s={rowIndex:-1,rowPinned:null,column:o.column}),i){const u=d.getCallback("navigateToNextCell");if(A(u)){const g=u({key:t,previousCellPosition:o,nextCellPosition:s||null,event:e});A(g)?s={rowPinned:g.rowPinned,rowIndex:g.rowIndex,column:g.column}:s=null}}if(!s)return;if(s.rowIndex<0){const u=De(r);l.focusHeaderPosition({headerPosition:{headerRowIndex:u+s.rowIndex,column:o.column},event:e||void 0,fromCell:!0});return}const c=this.getNormalisedPosition(s);c?this.focusPosition(c):this.tryToFocusFullWidthRow(s)}getNormalisedPosition(e){var i;if(!!((i=this.beans.spannedRowRenderer)!=null&&i.getCellByPosition(e)))return e;this.ensureCellVisible(e);const o=Qo(this.beans,e);return o?(e=o.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:o,rowRenderer:i,focusSvc:s,eventSvc:n}=this.beans,r=o.allCols,a=i.getRowByPosition(e);if(!a||!a.isFullWidth())return!1;const l=s.getFocusedCell(),d={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?U(r):r[0])};this.focusPosition(d);const c=t??(l!=null&&Ju(d,l));return n.dispatchEvent({type:"fullWidthRowFocused",rowIndex:d.rowIndex,rowPinned:d.rowPinned,column:d.column,isFullWidthCell:!0,fromBelow:c}),!0}focusPosition(e){const{focusSvc:t,rangeSvc:o}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),o==null||o.setRangeToCell(e)}isValidNavigateCell(e){return!!rt(this.beans,e)}getLastCellOfColSpan(e){const t=Qo(this.beans,e);if(!t)return e;const o=t.getColSpanningList();return o.length===1?e:{rowIndex:e.rowIndex,column:U(o),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=nr(this.gos),o=this.beans.rowModel.getRow(e.rowIndex),i=t&&(o==null?void 0:o.sticky),{scrollFeature:s}=this.gridBodyCon;!i&&q(e.rowPinned)&&s.ensureIndexVisible(e.rowIndex),e.column.isPinned()||s.ensureColumnVisible(e.column)}ensureColumnVisible(e){const t=this.gridBodyCon.scrollFeature;e.isPinned()||t.ensureColumnVisible(e)}ensureRowVisible(e){this.gridBodyCon.scrollFeature.ensureIndexVisible(e)}};function rn(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var Ww={moduleName:"KeyboardNavigation",version:L,beans:[_w,Lw,jm],apiFunctions:{getFocusedCell:Gw,clearFocusedCell:Hw,setFocusedCell:Ow,setFocusedHeader:Nw,tabToNextCell:Bw,tabToPreviousCell:Vw}},zw=class extends x{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==null?void 0:e.animate)??!1,newData:(e==null?void 0:e.newData)??!1,newPage:(e==null?void 0:e.newPage)??!1,newPageSize:(e==null?void 0:e.newPageSize)??!1,keepRenderedRows:(e==null?void 0:e.keepRenderedRows)??!1})}calculatePages(){const{pageBounds:e,pagination:t,rowModel:o}=this.beans;t?t.calculatePages():e.calculateBounds(0,o.getRowCount()-1)}},$w=class extends x{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){var e;return((e=this.topRowBounds)==null?void 0:e.rowIndex)??-1}getLastRow(){var e;return((e=this.bottomRowBounds)==null?void 0:e.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,o=(e==null?void 0:e.rowTop)??0,i=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:o,pageLastPixel:i}}calculateBounds(e,t){const{rowModel:o}=this.beans,i=o.getRowBounds(e);i&&(i.rowIndex=e),this.topRowBounds=i;const s=o.getRowBounds(t);s&&(s.rowIndex=t),this.bottomRowBounds=s,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){var t;const e=((t=this.topRowBounds)==null?void 0:t.rowTop)??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},Uw=".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}",Kw=class extends x{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 o of this.elements)o&&(X(o,t),_e(o,e))}},jw=class extends x{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const{gos:e,visibleCols:t,eventSvc:o}=this.beans,i=ie(e,"print"),s=i?0:t.getColsLeftWidth(),n=i?0:t.getDisplayedColumnsRightWidth();s!=this.leftWidth&&(this.leftWidth=s,o.dispatchEvent({type:"leftPinnedWidthChanged"})),n!=this.rightWidth&&(this.rightWidth=n,o.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const e=this.gridBodyCtrl.eBodyViewport,t=jt(e);if(t<=50)return;const o=this.getPinnedColumnsOverflowingViewport(t-50),i=this.gos.getCallback("processUnpinnedColumns"),{columns:s,hasLockedPinned:n}=o;let r=s;!r.length&&!n||(i&&(r=i({columns:r,viewportWidth:t})),!(!r||!r.length)&&(r=r.filter(a=>!nt(a)),this.setColsPinned(r,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new Kw(e,t)}setColsPinned(e,t,o){const{colModel:i,colAnimation:s,visibleCols:n,gos:r}=this.beans;if(!i.cols||!(e!=null&&e.length))return;if(ie(r,"print")){M(37);return}s==null||s.start();let a;t===!0||t==="left"?a="left":t==="right"?a="right":a=null;const l=[];e.forEach(d=>{if(!d)return;const c=i.getCol(d);c&&c.getPinned()!==a&&(this.setColPinned(c,a),l.push(c))}),l.length&&(n.refresh(o),Dr(this.eventSvc,l,o)),s==null||s.finish()}initCol(e){const{pinned:t,initialPinned:o}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,o)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){const{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;const o=e.pinned==="left",i=e.pinned==="right";e.hidden=!0;const s=()=>{const n=o?this.leftWidth:this.rightWidth;if(n==null)return;const r=n==0,a=e.hidden!==r,l=this.gos.get("enableRtl"),d=t.getScrollbarWidth(),u=t.verticalScrollShowing&&(l&&o||!l&&i)?n+d:n;e.comp.setPinnedContainerWidth(`${u}px`),e.comp.setDisplayed(!r),a&&(e.hidden=r,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:s,rightPinnedWidthChanged:s,scrollVisibilityChanged:s,scrollbarWidthChanged:s})}getHeaderResizeDiff(e,t){if(t.getPinned()){const{leftWidth:i,rightWidth:s}=this,n=jt(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(i+s+e>n)if(n>i+s)e=n-i-s;else return 0}return e}getPinnedColumnsOverflowingViewport(e){const t=this.rightWidth??0,o=this.leftWidth??0,i=t+o;let s=!1;if(i<e)return{columns:[],hasLockedPinned:s};const{visibleCols:n}=this.beans,r=[...n.leftCols],a=[...n.rightCols];let l=0,d=0;const c=0,u=[];let h=i-c-e;for(;(d<r.length||l<a.length)&&h>0;){if(l<a.length){const g=a[l++];if(g.colDef.lockPinned){s=!0;continue}h-=g.getActualWidth(),u.push(g)}if(d<r.length&&h>0){const g=r[d++];if(g.colDef.lockPinned){s=!0;continue}h-=g.getActualWidth(),u.push(g)}}return{columns:u,hasLockedPinned:s}}},qw={moduleName:"PinnedColumn",version:L,beans:[jw],css:[Uw]},Yw=class extends x{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=fe(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=te(e),o=this.descriptionContainer=t.createElement("div");o.classList.add("ag-aria-description-container"),Fn(o,"polite"),_d(o,"additions text"),Nd(o,!0),e.eGridDiv.appendChild(o)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{this.handleAnnouncementUpdate(e)},50)}handleAnnouncementUpdate(e){if(!this.isAlive()||!this.descriptionContainer)return;let t=e;if(t==null||t.replace(/[ .]/g,"")==""){this.lastAnnouncement="";return}this.lastAnnouncement===t&&(t=`${t}`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}destroy(){var t;super.destroy();const{descriptionContainer:e}=this;e&&(pe(e),(t=e.parentElement)==null||t.removeChild(e)),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},Zw={moduleName:"Aria",version:L,beans:[Yw]};function Qw(e){var t;(t=e.overlays)==null||t.showLoadingOverlay()}function Xw(e){var t;(t=e.overlays)==null||t.showNoRowsOverlay()}function Jw(e){var t;(t=e.overlays)==null||t.hideOverlay()}var ev=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}",tv={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"}]}]},pl=class extends Y{constructor(){super(tv),this.eOverlayWrapper=I,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeCssClass=null,this.elToFocusAfter=null,this.registerCSS(ev)}handleKeyDown(e){if(e.key!==y.TAB||e.defaultPrevented||Ge(e))return;const t=this.beans;if(si(t,this.eOverlayWrapper,!1,e.shiftKey))return;let i=!1;e.shiftKey?i=t.focusSvc.focusGridView({column:U(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):i=io(t,!1),i&&e.preventDefault()}updateLayoutClasses(e,t){const o=this.eOverlayWrapper.classList,{AUTO_HEIGHT:i,NORMAL:s,PRINT:n}=ye;o.toggle(i,t.autoHeight),o.toggle(s,t.normal),o.toggle(n,t.print)}postConstruct(){this.createManagedBean(new ys(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setOverlayWrapperComp(this),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper.classList;this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,o,i){if(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,!!e){if(this.setDisplayed(!0,{skipAriaHidden:!0}),o&&this.isGridFocused()){const s=Q(this.beans);s&&!sr(this.beans)&&(this.elToFocusAfter=s)}e.then(s=>{if(this.activePromise!==e){this.activeOverlay!==s&&(this.destroyBean(s),s=null);return}if(this.activePromise=null,!!s){if(this.activeOverlay!==s&&(this.eOverlayWrapper.appendChild(s.getGui()),this.activeOverlay=s,i)){const n=s;this.updateListenerDestroyFunc=this.addManagedPropertyListener(i,({currentValue:r})=>{var a;(a=n.refresh)==null||a.call(n,_(this.gos,{...r??{}}))})}o&&this.isGridFocused()&&ii(this.eOverlayWrapper)}})}}updateOverlayWrapperPaddingTop(e){this.eOverlayWrapper.style.setProperty("padding-top",`${e}px`)}destroyActiveOverlay(){var i;this.activePromise=null;const e=this.activeOverlay;if(!e)return;let t=this.elToFocusAfter;this.activeOverlay=null,this.elToFocusAfter=null,t&&!this.isGridFocused()&&(t=null);const o=this.updateListenerDestroyFunc;o&&(o(),this.updateListenerDestroyFunc=null),this.destroyBean(e),pe(this.eOverlayWrapper),(i=t==null?void 0:t.focus)==null||i.call(t,{preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=Q(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setOverlayWrapperComp(void 0),super.destroy()}},ov={selector:"AG-OVERLAY-WRAPPER",component:pl},iv=class extends x{constructor(){super(...arguments),this.beanName="overlays",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}postConstruct(){this.isClientSide=ne(this.gos),this.isServerSide=!this.isClientSide&&Lo(this.gos);const e=()=>this.updateOverlayVisibility();this.addManagedEventListeners({newColumnsLoaded:e,rowDataUpdated:e,gridSizeChanged:this.refreshWrapperPadding.bind(this),rowCountReady:()=>{this.showInitialOverlay=!1,this.updateOverlayVisibility()}}),this.addManagedPropertyListener("loading",e)}setOverlayWrapperComp(e){this.eWrapper=e,this.updateOverlayVisibility()}isVisible(){return this.state!==0&&!!this.eWrapper}isExclusive(){return this.state===1&&!!this.eWrapper}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos,t=e.get("loading");!t&&(t!==void 0||e.get("suppressLoadingOverlay"))||this.doShowLoadingOverlay()}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;e.get("loading")||e.get("suppressNoRowsOverlay")||this.doShowNoRowsOverlay()}hideOverlay(){if(this.showInitialOverlay=!1,this.gos.get("loading")){M(99);return}this.doHideOverlay()}getOverlayWrapperSelector(){return ov}getOverlayWrapperCompClass(){return pl}updateOverlayVisibility(){if(!this.eWrapper){this.state=0;return}const{state:e,isClientSide:t,isServerSide:o,beans:{gos:i,colModel:s,rowModel:n}}=this;let r=this.gos.get("loading");r!==void 0&&(this.showInitialOverlay=!1),this.showInitialOverlay&&r===void 0&&!i.get("suppressLoadingOverlay")&&(r=!i.get("columnDefs")||!s.ready||!i.get("rowData")&&t),r?e!==1&&this.doShowLoadingOverlay():(this.showInitialOverlay=!1,t&&n.isEmpty()&&!i.get("suppressNoRowsOverlay")?e!==2&&this.doShowNoRowsOverlay():(e===1||!o&&e!==0)&&this.doHideOverlay())}doShowLoadingOverlay(){this.eWrapper&&(this.state=1,this.showOverlay(Gu(this.beans.userCompFactory,_(this.gos,{})),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){this.eWrapper&&(this.state=2,this.showOverlay(Hu(this.beans.userCompFactory,_(this.gos,{})),"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams"),this.updateExclusive())}doHideOverlay(){this.eWrapper&&(this.state=0,this.eWrapper.hideOverlay(),this.updateExclusive())}showOverlay(e,t,o){var s;const i=(e==null?void 0:e.newAgStackInstance())??null;(s=this.eWrapper)==null||s.showOverlay(i,t,this.isExclusive(),o),this.refreshWrapperPadding()}updateExclusive(){const e=this.exclusive;this.exclusive=this.isExclusive(),this.exclusive!==e&&this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"})}refreshWrapperPadding(){const e=this.eWrapper;if(!e)return;let t=0;if(this.state===2){const o=this.beans.ctrlsSvc.get("gridHeaderCtrl");t=(o==null?void 0:o.headerHeight)||0}else this.wrapperPadding!==0&&(t=0);this.wrapperPadding!==t&&(this.wrapperPadding=t,e.updateOverlayWrapperPaddingTop(t))}},sv={moduleName:"Overlay",version:L,userComponents:{agLoadingOverlay:Wg,agNoRowsOverlay:$g},apiFunctions:{showLoadingOverlay:Qw,showNoRowsOverlay:Xw,hideOverlay:Jw},beans:[iv]},nv=class extends x{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=ec(),Yt(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;Yt(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),o=e/t;return this.maxScrollY*o}},rv=400,av=class extends x{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{this.getAllCellCtrls().forEach(n=>n.onCellSelectionChanged())},t=()=>{this.getAllCellCtrls().forEach(n=>n.updateRangeBordersIfRangeCount())},o=()=>{this.eventSvc.addEventListener("cellSelectionChanged",e),this.eventSvc.addEventListener("columnMoved",t),this.eventSvc.addEventListener("columnPinned",t),this.eventSvc.addEventListener("columnVisible",t)},i=()=>{this.eventSvc.removeEventListener("cellSelectionChanged",e),this.eventSvc.removeEventListener("columnMoved",t),this.eventSvc.removeEventListener("columnPinned",t),this.eventSvc.removeEventListener("columnVisible",t)};this.addDestroyFunc(()=>i()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{ot(this.gos)?o():i()}),ot(this.gos)&&o()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc,this.editSvc=e.editSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",i=>this.onSuppressCellFocusChanged(i.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:i,previousValue:s})=>{(!s&&i||s&&!i)&&this.redrawRows()});const{stickyRowSvc:e,gos:t,showRowGroupCols:o}=this.beans;if(o&&this.addManagedPropertyListener("showOpenedGroup",()=>{const i=o.getShowRowGroupCols();i.length&&this.refreshCells({columns:i,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const i=this.gridBodyCtrl;i.setStickyTopHeight(0),i.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=ie(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 lv(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){var e;return((e=this.stickyRowFeature)==null?void 0:e.stickyTopRowCtrls)??[]}getStickyBottomRowCtrls(){var e;return((e=this.stickyRowFeature)==null?void 0:e.stickyBottomRowCtrls)??[]}updateAllRowCtrls(){var i;const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),o=((i=this.cachedRowCtrls)==null?void 0:i.getEntries())??[];t.length>0||o.length>0?this.allRowCtrls=[...e,...t,...o]:this.allRowCtrls=e}isCellBeingRendered(e,t){var s;const o=this.rowCtrlsByRowIndex[e];return!t||!o?!!o:o.isFullWidth()?!0:!!((s=this.beans.spannedRowRenderer)==null?void 0:s.getCellByPosition({rowIndex:e,column:t,rowPinned:null}))||!!o.getCellCtrl(t)||!o.isRowRendered()}updateCellFocus(e){this.getAllCellCtrls().forEach(t=>t.onCellFocused(e)),this.getFullWidthRowCtrls().forEach(t=>t.onFullWidthRowFocused(e))}onCellFocusChanged(e){if(e&&e.rowIndex!=null&&!e.rowPinned){const t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onSuppressCellFocusChanged(e)),this.getFullWidthRowCtrls().forEach(t=>t.onSuppressCellFocusChanged(e))}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;t&&this.getAllCellCtrls().forEach(o=>t.onFlashCells(o,e))},columnHoverChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onColumnHover())},displayedColumnsChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onDisplayedColumnsChanged())},displayedColumnsWidthChanged:()=>{this.printLayout&&this.getAllCellCtrls().forEach(e=>e.onLeftChanged())}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach(e=>e()),this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners(),this.colModel.getCols().forEach(t=>{const o=l=>{this.getAllCellCtrls().forEach(d=>{d.column===t&&l(d)})},i=()=>{o(l=>l.onLeftChanged())},s=()=>{o(l=>l.onWidthChanged())},n=()=>{o(l=>l.onFirstRightPinnedChanged())},r=()=>{o(l=>l.onLastLeftPinnedChanged())},a=()=>{o(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",i),t.__addEventListener("widthChanged",s),t.__addEventListener("firstRightPinnedChanged",n),t.__addEventListener("lastLeftPinnedChanged",r),t.__addEventListener("colDefChanged",a),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",i),t.__removeEventListener("widthChanged",s),t.__removeEventListener("firstRightPinnedChanged",n),t.__removeEventListener("lastLeftPinnedChanged",r),t.__removeEventListener("colDefChanged",a)})})}onDomLayoutChanged(){const e=ie(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),o=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,o&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){const t=[];return this.getAllRowCtrls().forEach(o=>{var s;const i=(s=o.getCellCtrl(e,!0))==null?void 0:s.eGui;i&&t.push(i)}),t}refreshFloatingRowComps(e=!0){this.refreshFloatingRows(this.topRowCtrls,"top",e),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",e)}refreshFloatingRows(e,t,o){const{pinnedRowModel:i,beans:s,printLayout:n}=this,r=Object.fromEntries(e.map(l=>[l.rowNode.id,l]));i==null||i.forEachPinnedRow(t,(l,d)=>{const c=e[d];c&&i.getPinnedRowById(c.rowNode.id,t)===void 0&&(c.destroyFirstPass(),c.destroySecondPass()),l.id in r&&o?(e[d]=r[l.id],delete r[l.id]):e[d]=new ci(l,s,!1,!1,n)});const a=(t==="top"?i==null?void 0:i.getPinnedTopRowCount():i==null?void 0:i.getPinnedBottomRowCount())??0;e.length=a}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){var o,i;if(e.sticky)(o=this.stickyRowFeature)==null||o.refreshStickyNode(e);else if((i=this.cachedRowCtrls)!=null&&i.has(e)){this.cachedRowCtrls.removeRow(e);return}else{const s=n=>{const r=n[e.rowIndex];r&&r.rowNode===e&&(r.destroyFirstPass(),r.destroySecondPass(),n[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":s(this.topRowCtrls);break;case"bottom":s(this.bottomRowCtrls);break;default:s(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){const{editSvc:t}=this.beans;if(t!=null&&t.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:"api"})),e!=null){e==null||e.forEach(i=>this.redrawRow(i,!0)),this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){var a;this.getLockOnRefresh();const t=(a=this.beans.focusSvc)==null?void 0:a.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const o=!e.domLayoutChanged&&!!e.recycleRows,i=e.animate&&St(this.gos),s=o?this.getRowsToRecycle():null;o||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:n,gos:r}=this;if(n){n.checkStickyRows();const l=n.extraTopHeight+n.extraBottomHeight;l&&this.updateContainerHeights(l)}this.recycleRows(s,i),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(r.get("enableRowPinning")?o:void 0),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){var i;const t=e.newData||e.newPage,o=this.gos.get("suppressScrollOnNewData");t&&!o&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),(i=this.stickyRowFeature)==null||i.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let o=this.pageBounds.getCurrentPageHeight();o===0&&(o=1),t.setModelHeight(o+e)}getLockOnRefresh(){var e,t;if(this.refreshInProgress)throw new Error(Ee(252));this.refreshInProgress=!0,(t=(e=this.beans.frameworkOverrides).getLockOnRefresh)==null||t.call(e)}releaseLockOnRefresh(){var e,t;this.refreshInProgress=!1,(t=(e=this.beans.frameworkOverrides).releaseLockOnRefresh)==null||t.call(e)}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;const t=this.beans.focusSvc,o=this.findPositionToFocus(e);if(!o){t.focusHeaderPosition({headerPosition:{headerRowIndex:De(this.beans)-1,column:e.column}});return}if(e.rowIndex!==o.rowIndex||e.rowPinned!=o.rowPinned){t.setFocusedCell({...o,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(_(this.gos,{...o,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){const{pagination:t,pageBounds:o}=this.beans;let i=e;for(i.rowPinned==null&&t&&o&&!t.isRowInPage(i.rowIndex)&&(i={rowPinned:null,rowIndex:o.getFirstRow()});i;){if(i.rowPinned==null&&o)if(i.rowIndex<o.getFirstRow()){if(i=Xo(this.beans,{rowPinned:null,rowIndex:0}),!i)return null}else i.rowIndex>o.getLastRow()&&(i={rowPinned:null,rowIndex:o.getLastRow()});const s=this.getRowByPosition(i);if(s!=null&&s.isAlive())return{...s.getRowPosition(),column:e.column};i=Xo(this.beans,i)}return null}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),o=t.length;for(let i=0;i<o;i++){const s=t[i].getAllCellCtrls(),n=s.length;for(let r=0;r<n;r++)e.push(s[r])}return e}getAllRowCtrls(){const{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),o=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...o,...(e==null?void 0:e.getCtrls("top"))??[],...(e==null?void 0:e.getCtrls("bottom"))??[],...(e==null?void 0:e.getCtrls("center"))??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,o){const i=this.rowCtrlsByRowIndex[t];i&&i.addEventListener(e,o)}refreshCells({rowNodes:e,columns:t,force:o,suppressFlash:i}={}){const s={force:o,newData:!1,suppressFlash:i};for(const n of this.getCellCtrls(e,t))n.refreshOrDestroyCell(s);this.refreshFullWidth(e)}refreshRows(e={}){this.getRowCtrls(e.rowNodes).forEach(t=>t.refreshRow(e)),this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=!1;for(const o of this.getRowCtrls(e)){if(!o.isFullWidth())continue;o.refreshFullWidth()||(t=!0,this.redrawRow(o.rowNode,!0))}t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){const t=an(e),o=this.getAllRowCtrls();return!e||!t?o:o.filter(i=>{const s=i.rowNode;return ln(s,t)})}getCellCtrls(e,t){let o;A(t)&&(o={},t.forEach(s=>{const n=this.colModel.getCol(s);A(n)&&(o[n.getId()]=!0)}));const i=[];return this.getRowCtrls(e).forEach(s=>{s.getAllCellCtrls().forEach(n=>{const r=n.column.getId();o&&!o[r]||i.push(n)})}),i}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){var o;const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),(o=this.stickyRowFeature)==null||o.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const o of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[o].rowNode.id==null&&e.push(o);this.removeRowCtrls(e);const t={};for(const o of Object.values(this.rowCtrlsByRowIndex)){const i=o.rowNode;t[i.id]=o}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){e.forEach(o=>{const i=this.rowCtrlsByRowIndex[o];i&&(i.destroyFirstPass(t),i.destroySecondPass()),delete this.rowCtrlsByRowIndex[o]})}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){const{focusSvc:t,animationFrameSvc:o}=this.beans,{afterScroll:i}=e;let s;const n=this.stickyRowFeature;n&&(s=(t==null?void 0:t.getFocusCellToUseAfterRefresh())||void 0);const r=this.firstRenderedRow,a=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let l=!1;if(n){l=n.checkStickyRows();const c=n.extraTopHeight+n.extraBottomHeight;c&&this.updateContainerHeights(c)}const d=this.firstRenderedRow!==r||this.lastRenderedRow!==a;if(!(i&&!l&&!d)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,i),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(i&&!l),s!=null)){const c=t==null?void 0:t.getFocusCellToUseAfterRefresh();s!=null&&c==null&&(o==null||o.flushAllFrames(),this.restoreFocusedCell(s))}}removeRowCompsNotToDraw(e,t){const o={};e.forEach(n=>o[n]=!0);const s=Object.keys(this.rowCtrlsByRowIndex).filter(n=>!o[n]);this.removeRowCtrls(s,t)}calculateIndexesToDraw(e){var r,a;const t=[];for(let l=this.firstRenderedRow;l<=this.lastRenderedRow;l++)t.push(l);const o=this.beans.pagination,i=(a=(r=this.beans.focusSvc)==null?void 0:r.getFocusedCell())==null?void 0:a.rowIndex;i!=null&&(i<this.firstRenderedRow||i>this.lastRenderedRow)&&(!o||o.isRowInPage(i))&&i<this.rowModel.getRowCount()&&t.push(i);const s=l=>{const d=l.rowNode.rowIndex;d==null||d===i||(d<this.firstRenderedRow||d>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(l)&&t.push(d)};for(const l of Object.values(this.rowCtrlsByRowIndex))s(l);if(e)for(const l of Object.values(e))s(l);t.sort((l,d)=>l-d);const n=[];for(let l=0;l<t.length;l++){const d=t[l],c=this.rowModel.getRow(d);c&&!c.sticky&&n.push(d)}return n}recycleRows(e,t=!1,o=!1){const i=this.calculateIndexesToDraw(e);if((this.printLayout||o)&&(t=!1),this.removeRowCompsNotToDraw(i,!t),i.forEach(s=>{this.createOrUpdateRowCtrl(s,e,t,o)}),e){const{animationFrameSvc:s}=this.beans;(s==null?void 0:s.active)&&o&&!this.printLayout?s.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){const{visibleCols:e}=this.beans,t=e.isPinningLeft(),o=e.isPinningRight();(this.pinningLeft!==t||o!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=o,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];this.getFullWidthRowCtrls().forEach(t=>{const o=t.rowNode.rowIndex;e.push(o.toString())}),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=an(e);return this.getAllRowCtrls().filter(o=>{if(!o.isFullWidth())return!1;const i=o.rowNode;return!(t!=null&&!ln(i,t))})}createOrUpdateRowCtrl(e,t,o,i){let s,n=this.rowCtrlsByRowIndex[e];if(n||(s=this.rowModel.getRow(e),A(s)&&A(t)&&t[s.id]&&s.alreadyRendered&&(n=t[s.id],t[s.id]=null)),!n)if(s||(s=this.rowModel.getRow(e)),A(s))n=this.createRowCon(s,o,i);else return;return s&&(s.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=n,n}destroyRowCtrls(e,t){const o=[];if(e){for(const i of Object.values(e))if(i){if(this.cachedRowCtrls&&i.isCacheable()){this.cachedRowCtrls.addRow(i);continue}if(i.destroyFirstPass(!t),t){const s=i.instanceId;this.zombieRowCtrls[s]=i,o.push(()=>{i.destroySecondPass(),delete this.zombieRowCtrls[s]})}else i.destroySecondPass()}}t&&(o.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),window.setTimeout(()=>o.forEach(i=>i()),rv))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=ns(this.beans);return e*t}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:o}=this;e.updateOffset();let i,s;if(!o.isRowsToRender())i=0,s=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),i=t.getFirstRow(),s=t.getLastRow();else{const c=this.getRowBufferInPixels(),u=this.ctrlsSvc.getScrollFeature(),h=this.gos.get("suppressRowVirtualisation");let g=!1,p,f;do{const v=t.getPixelOffset(),{pageFirstPixel:b,pageLastPixel:D}=t.getCurrentPagePixelRange(),T=e.divStretchOffset,G=u.getVScrollPosition(),F=G.top,P=G.bottom;h?(p=b+T,f=D+T):(p=Math.max(F+v-c,b)+T,f=Math.min(P+v+c,D)+T),this.firstVisibleVPixel=Math.max(F+v,b)+T,this.lastVisibleVPixel=Math.min(P+v,D)+T,g=this.ensureAllRowsInRangeHaveHeightsCalculated(p,f)}while(g);let C=o.getRowIndexAtPixel(p),m=o.getRowIndexAtPixel(f);const w=t.getFirstRow(),S=t.getLastRow();C<w&&(C=w),m>S&&(m=S),i=C,s=m}const n=ie(this.gos,"normal"),r=this.gos.get("suppressMaxRenderedRowRestriction"),a=Math.max(this.getRowBuffer(),500);n&&!r&&s-i>a&&(s=i+a);const l=i!==this.firstRenderedRow,d=s!==this.lastRenderedRow;(l||d)&&(this.firstRenderedRow=i,this.lastRenderedRow=s,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:i,lastRow:s}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,We(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){var a,l;const o=(a=this.pinnedRowModel)==null?void 0:a.ensureRowHeightsValid(),i=(l=this.stickyRowFeature)==null?void 0:l.ensureRowHeightsValid(),{pageBounds:s,rowModel:n}=this,r=n.ensureRowHeightsValid(e,t,s.getFirstRow(),s.getLastRow());return(r||i)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),i||r||o?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){var d;const i=e.rowNode,s=this.focusSvc.isRowFocused(i.rowIndex,i.rowPinned),n=(d=this.editSvc)==null?void 0:d.isEditing(e),r=i.detail;return s||n||r?!!this.isRowPresent(i):!1}isRowPresent(e){var t;return this.rowModel.isRowPresent(e)?((t=this.beans.pagination)==null?void 0:t.isRowInPage(e.rowIndex))??!0:!1}createRowCon(e,t,o){var r,a;const i=((r=this.cachedRowCtrls)==null?void 0:r.getRow(e))??null;if(i)return i;const s=o&&!this.printLayout&&!!((a=this.beans.animationFrameSvc)!=null&&a.active);return new ci(e,this.beans,t,s,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(i=>i.rowNode),t=this.getStickyTopRowCtrls().map(i=>i.rowNode),o=this.getStickyBottomRowCtrls().map(i=>i.rowNode);return[...t,...e,...o]}getRowByPosition(e){let t;const{rowIndex:o}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[o];break;case"bottom":t=this.bottomRowCtrls[o];break;default:t=this.rowCtrlsByRowIndex[o],t||(t=this.getStickyTopRowCtrls().find(i=>i.rowNode.rowIndex===o)||null,t||(t=this.getStickyBottomRowCtrls().find(i=>i.rowNode.rowIndex===o)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const i=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!i}},lv=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.rowNode.id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if(e==null||e.id==null)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){const t=e.id,o=this.entriesMap[t];delete this.entriesMap[t],Se(this.entriesList,o)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],Se(this.entriesList,e)}getEntries(){return this.entriesList}};function an(e){if(!e)return;const t={top:{},bottom:{},normal:{}};return e.forEach(o=>{const i=o.id;switch(o.rowPinned){case"top":t.top[i]=o;break;case"bottom":t.bottom[i]=o;break;default:t.normal[i]=o;break}}),t}function ln(e,t){const o=e.id;switch(e.rowPinned){case"top":return t.top[o]!=null;case"bottom":return t.bottom[o]!=null;default:return t.normal[o]!=null}}var dv=class extends x{constructor(){super(...arguments),this.beanName="rowNodeSorter"}postConstruct(){const{gos:e}=this;this.isAccentedSort=e.get("accentedSort"),this.primaryColumnsSortGroups=xe(e),this.addManagedPropertyListener("accentedSort",t=>this.isAccentedSort=t.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=xe(e))}doFullSort(e,t){const o=e.map((i,s)=>({currentPos:s,rowNode:i}));return o.sort(this.compareRowNodes.bind(this,t)),o.map(i=>i.rowNode)}compareRowNodes(e,t,o){const i=t.rowNode,s=o.rowNode;for(let n=0,r=e.length;n<r;n++){const a=e[n],l=a.sort==="desc",d=this.getValue(i,a.column),c=this.getValue(s,a.column);let u;const h=this.getComparator(a,i);if(h?u=h(d,c,i,s,l):u=Ld(d,c,this.isAccentedSort),!isNaN(u)&&u!==0)return a.sort==="asc"?u:u*-1}return t.currentPos-o.currentPos}getComparator(e,t){const o=e.column,i=o.getColDef().comparator;if(i!=null)return i;if(!o.getColDef().showRowGroup)return;const s=!t.group&&o.getColDef().field;if(!s)return;const n=this.beans.colModel.getColDefCol(s);if(n)return n.getColDef().comparator}getValue(e,t){var a,l;const{valueSvc:o,colModel:i,showRowGroupCols:s,gos:n}=this.beans;if(!this.primaryColumnsSortGroups)return o.getValue(t,e,!1);if(e.rowGroupColumn===t){if(ar(n,i.isPivotActive())){const u=(a=e.allLeafChildren)==null?void 0:a[0];return u?o.getValue(t,u,!1):void 0}const c=s==null?void 0:s.getShowRowGroupCol(t.getId());return c?(l=e.groupData)==null?void 0:l[c.getId()]:void 0}if(!(e.group&&t.getColDef().showRowGroup))return o.getValue(t,e,!1)}};function cv(e){var t;(t=e.sortSvc)==null||t.onSortChanged("api")}var fl={moduleName:"Sort",version:L,beans:[ow,dv],apiFunctions:{onSortChanged:cv},userComponents:{agSortIndicator:sn},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"}},uv=class extends x{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:o}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),o.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),Yt(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,Et(e.source))}}};function hv(e){var t;(t=e.valueCache)==null||t.expire()}function gv(e,t){const{colKey:o,rowNode:i,useFormatter:s}=t,n=e.colModel.getColDefCol(o)??e.colModel.getCol(o);if(q(n))return null;const r=e.valueSvc.getValueForDisplay(n,i,s);return s?r.valueFormatted??Rt(r.value):r.value}var pv="paste",fv=class extends x{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.clientSideRowModel=null}postConstruct(){const{gos:e,rowModel:t}=this.beans;ne(e)&&(this.clientSideRowModel=t),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){const{gos:t,rowRenderer:o}=this.beans;if(e.source===pv||t.get("suppressChangeDetection"))return;const i=e.node,s=[i],n=this.clientSideRowModel,r=n==null?void 0:n.rootNode;if(r&&!i.isRowPinned()){const a=t.get("aggregateOnlyChangedColumns"),l=new wi(a,r);l.addParentNode(i.parent,[e.column]),n.doAggregate(l),l.forEachChangedNodeDepthFirst(d=>{s.push(d),d.sibling&&s.push(d.sibling)})}o.refreshCells({rowNodes:s})}},Cv=class extends x{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);j(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(o){return j(16,{expression:e,params:t,e:o}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const o=this.createFunctionBody(e),i=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",o);return t[e]=i,i}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";"}},mv=class extends x{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){const e=this.gos;this.active=e.get("valueCache"),this.neverExpires=e.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,o){if(this.active){const i=this.cacheVersion;e.__cacheVersion!==i&&(e.__cacheVersion=i,e.__cacheData={}),e.__cacheData[t]=o}}getValue(e,t){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[t]}},wv={moduleName:"ValueCache",version:L,beans:[mv],apiFunctions:{expireValueCache:hv}},vv={moduleName:"Expression",version:L,beans:[Cv]},Sv={moduleName:"ChangeDetection",version:L,beans:[fv]},bv={moduleName:"CellApi",version:L,apiFunctions:{getCellValue:gv}},Ri={checkSiblings:!0},yv=class extends x{constructor(){super(...arguments),this.beanName="valueSvc",this.hasEdit=!1,this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc,this.editSvc=e.editSvc,this.hasEdit=!!e.editSvc}postConstruct(){this.initialised||this.init()}init(){this.executeValueGetter=this.valueCache?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=Lo(this.gos),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;const e=t=>this.callColumnCellValueChangedHandler(t);this.eventSvc.addEventListener("cellValueChanged",e,!0),this.addDestroyFunc(()=>this.eventSvc.removeEventListener("cellValueChanged",e,!0)),this.addManagedPropertyListener("treeData",t=>this.isTreeData=t.currentValue)}getValueForDisplay(e,t,o=!1,i=!1,s="ui"){const{showRowGroupColValueSvc:n}=this.beans,r=!e&&t.group,a=e==null?void 0:e.colDef.showRowGroup,l=!this.isTreeData||t.footer;if(n&&l&&(r||a)){const f=n.getGroupValue(t,e);if(f==null)return{value:null,valueFormatted:null};if(!o)return{value:f.value,valueFormatted:null};const C=n.formatAndPrefixGroupColValue(f,e,i);return{value:f.value,valueFormatted:C}}if(!e)return{value:t.key,valueFormatted:null};const d=t.leafGroup&&this.colModel.isPivotMode(),c=t.group&&t.expanded&&!t.footer&&!d,u=this.gos.get("groupSuppressBlankHeader")||!t.sibling,h=c&&!u,g=this.getValue(e,t,h,s),p=o&&!(i&&e.colDef.useValueFormatterForExport===!1);return{value:g,valueFormatted:p?this.formatValue(e,t,g):null}}getValue(e,t,o=!1,i="ui"){var f;if(this.initialised||this.init(),!t)return;const s=e.getColDef(),n=s.field,r=e.getColId();let a=t.data;if(this.hasEdit&&i==="ui"){const C=this.editSvc;if(C.isRowEditing(t,Ri)&&(a=C.getRowDataValue(t,Ri)),C.isEditing()){const m=C.getCellDataValue({rowNode:t,column:e},!0);if(m!==void 0)return m}}let l;const d=s.showRowGroup;if(typeof d=="string"&&(((f=this.beans.rowGroupColsSvc)==null?void 0:f.getColumnIndex(d))??-1)>t.level)return null;const c=typeof d!="string"||!t.group,u=t.groupData&&r in t.groupData,h=!o&&t.aggData&&t.aggData[r]!==void 0,g=this.isSsrm&&o&&!!s.aggFunc,p=this.isSsrm&&t.footer&&t.field&&(s.showRowGroup===!0||s.showRowGroup===t.field);if(this.isTreeData&&h)l=t.aggData[r];else if(this.isTreeData&&s.valueGetter)l=this.executeValueGetter(s.valueGetter,a,e,t);else if(this.isTreeData&&n&&a)l=$t(a,n,e.isFieldContainsDots());else if(u)l=t.groupData[r];else if(h)l=t.aggData[r];else if(s.valueGetter&&!g){if(!c)return l;l=this.executeValueGetter(s.valueGetter,a,e,t)}else if(p)l=$t(a,t.field,e.isFieldContainsDots());else if(n&&a&&!g){if(!c)return l;l=$t(a,n,e.isFieldContainsDots())}if(this.cellExpressions&&typeof l=="string"&&l.indexOf("=")===0){const C=l.substring(1);l=this.executeValueGetter(C,a,e,t)}return l}parseValue(e,t,o,i){var r;const s=e.getColDef(),n=s.valueParser;if(A(n)){const a=_(this.gos,{node:t,data:t==null?void 0:t.data,oldValue:i,newValue:o,colDef:s,column:e});return typeof n=="function"?n(a):(r=this.expressionSvc)==null?void 0:r.evaluate(n,a)}return o}getDeleteValue(e,t){return A(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay(e,t).value)??null:null}formatValue(e,t,o,i,s=!0){const{expressionSvc:n}=this.beans;let r=null,a;const l=e.getColDef();if(i?a=i:s&&(a=l.valueFormatter),a){let d=t?t.data:null;if(t){const u={rowNode:t};if(this.hasEdit){const h=this.editSvc;h.isEditing(u,Ri)&&(d=h.getRowDataValue(t,Ri))}}const c=_(this.gos,{value:o,node:t,data:d,colDef:l,column:e});typeof a=="function"?r=a(c):r=n?n.evaluate(a,c):null}else if(l.refData)return l.refData[o]||"";return r==null&&Array.isArray(o)&&(r=o.join(", ")),r}setValue(e,t,o,i){var c,u;const s=this.colModel.getColDefCol(t);if(!e||!s)return!1;q(e.data)&&(e.data={});const{field:n,valueSetter:r}=s.getColDef();if(q(n)&&q(r))return M(17),!1;if(this.dataTypeSvc&&!this.dataTypeSvc.checkType(s,o))return M(135),!1;const a=_(this.gos,{node:e,data:e.data,oldValue:this.getValue(s,e,void 0,i),newValue:o,colDef:s.getColDef(),column:s});a.newValue=o;let l;if(A(r)?typeof r=="function"?l=r(a):l=(c=this.expressionSvc)==null?void 0:c.evaluate(r,a):l=this.setValueUsingField(e.data,n,o,s.isFieldContainsDots()),l===void 0&&(l=!0),!l)return!1;e.resetQuickFilterAggregateText(),(u=this.valueCache)==null||u.onDataChanged();const d=this.getValue(s,e);return this.dispatchCellValueChangedEvent(e,a,d,i),e.pinnedSibling&&this.dispatchCellValueChangedEvent(e.pinnedSibling,a,d,i),!0}dispatchCellValueChangedEvent(e,t,o,i){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:o,value:o,source:i})}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,context:e.context})})}setValueUsingField(e,t,o,i){if(!t)return!1;let s=!1;if(!i)s=e[t]===o,s||(e[t]=o);else{const n=t.split(".");let r=e;for(;n.length>0&&r;){const a=n.shift();n.length===0?(s=r[a]===o,s||(r[a]=o)):r=r[a]}}return!s}executeValueGetterWithValueCache(e,t,o,i){const s=o.getColId(),n=this.valueCache.getValue(i,s);if(n!==void 0)return n;const r=this.executeValueGetterWithoutValueCache(e,t,o,i);return this.valueCache.setValue(i,s,r),r}executeValueGetterWithoutValueCache(e,t,o,i){var r;const s=_(this.gos,{data:t,node:i,column:o,colDef:o.getColDef(),getValue:this.getValueCallback.bind(this,i)});let n;return typeof e=="function"?n=e(s):n=(r=this.expressionSvc)==null?void 0:r.evaluate(e,s),n}getValueCallback(e,t){const o=this.colModel.getColDefCol(t);return o?this.getValue(o,e):null}getKeyForNode(e,t){const o=this.getValue(e,t),i=e.getColDef().keyCreator;let s=o;if(i){const n=_(this.gos,{value:o,colDef:e.getColDef(),column:e,node:t,data:t.data});s=i(n)}return typeof s=="string"||s==null||(s=String(s),s==="[object Object]"&&M(121)),s}},Rv={moduleName:"CommunityCore",version:L,beans:[Xm,Kp,OC,cu,nv,Yf,Km,bw,nu,$w,zw,av,yv,Zm,Um,Qm,VC,uv,MC,kC],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:jp,destroy:qp,isDestroyed:Yp,getGridOption:Zp,setGridOption:Qp,updateGridOptions:ka,isModuleRegistered:Xp},dependsOn:[TC,Ff,Lf,fl,Pw,Qf,Tw,sv,Sv,Aw,Ww,qw,Zw,kw,HC,IC,vv,tC]};function dn(e){const{inputValue:t,allSuggestions:o,hideIrrelevant:i,filterByPercentageOfBestMatch:s}=e;let n=(o??[]).map((l,d)=>({value:l,relevance:Ev(t,l),idx:d}));if(n.sort((l,d)=>l.relevance-d.relevance),i&&(n=n.filter(l=>l.relevance<Math.max(l.value.length,t.length))),n.length>0&&s&&s>0){const d=n[0].relevance*s;n=n.filter(c=>d-c.relevance<0)}const r=[],a=[];for(const l of n)r.push(l.value),a.push(l.idx);return{values:r,indices:a}}function Ev(e,t){e.length<t.length&&([e,t]=[t,e]);let o=[],i=[];const s=e.length,n=t.length;for(let a=0;a<=n;a++)o[a]=a;let r=0;for(let a=1;a<=s;a++){i[0]=a;for(let l=1;l<=n;l++){const d=e[a-1],c=t[l-1];if(d.toLocaleLowerCase()===c.toLocaleLowerCase())++r,d===c&&++r,a>1&&l>1&&e[a-2].toLocaleLowerCase()===t[l-2].toLocaleLowerCase()&&(++r,e[a-2]===t[l-2]&&++r),a<s/2-10&&++r,i[l]=o[l-1];else{const u=i[l-1],h=o[l],g=o[l-1];i[l]=1+Math.min(u,h,g)}}[o,i]=[i,o]}return o[n]/(r+1)}var Cl={AdvancedFilter:1,AllEnterprise:1,BatchEdit:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,NewFiltersToolPanel:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,TreeData:1,ViewportRowModel:1},cn=["TextFilter","NumberFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],xv={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:cn,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...cn,"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:[...cn,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},Dv={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function Fv(e,t){const o=[];return(Array.isArray(e)?e:[e]).forEach(i=>{const s=xv[i];s?s.forEach(n=>{const r=Dv[n];(!r||r===t)&&o.push(n)}):o.push(i)}),o}var ml=()=>`No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:
|
|
20
20
|
|
|
21
21
|
import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';
|
|
22
22
|
|
|
23
23
|
ModuleRegistry.registerModules([ AllCommunityModule ]);
|
|
24
|
-
`,
|
|
24
|
+
`,Pv=e=>{const t=e.map(i=>`import { ${mo(i)} } from '${Cl[i]?"ag-grid-enterprise":"ag-grid-community"}';`);return e.some(i=>i==="IntegratedCharts"||i==="Sparklines")&&t.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community';
|
|
25
25
|
${t.join(`
|
|
26
26
|
`)}
|
|
27
27
|
|
|
28
|
-
ModuleRegistry.registerModules([ ${e.map(i=>
|
|
28
|
+
ModuleRegistry.registerModules([ ${e.map(i=>mo(i,!0)).join(", ")} ]);
|
|
29
29
|
|
|
30
|
-
For more info see: ${
|
|
31
|
-
`:t.some(n=>
|
|
32
|
-
`),i}function
|
|
30
|
+
For more info see: ${vt}/modules/`};function mo(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function Tv(e,t){const o=t.filter(n=>n==="IntegratedCharts"||n==="Sparklines");let i="";return!(globalThis==null?void 0:globalThis.agCharts)&&o.length>0?i=`Unable to use ${e} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise.
|
|
31
|
+
`:t.some(n=>Cl[n])&&(i=i+`Unable to use ${e} as that requires the ag-grid-enterprise script to be included.
|
|
32
|
+
`),i}function wl({moduleName:e,rowModelType:t}){return`To use the ${e}Module you must set the gridOption "rowModelType='${t}'"`}var vl=({reasonOrId:e,moduleName:t,gridScoped:o,gridId:i,rowModelType:s,additionalText:n,isUmd:r})=>{const a=Fv(t,s),l=typeof e=="string"?e:kv[e];if(r)return Tv(l,a);const d=a.filter(h=>h==="IntegratedCharts"||h==="Sparklines"),c=d.length>0?`${d.map(h=>mo(h)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`${`Unable to use ${l} as ${a.length>1?"one of "+a.map(h=>mo(h)).join(", "):mo(a[0])} is not registered${o?" for gridId: "+i:""}. ${c} Check if you have registered the module:
|
|
33
33
|
`}
|
|
34
|
-
${
|
|
34
|
+
${Pv(a)}`+(n?`
|
|
35
35
|
|
|
36
|
-
${n}`:"")},
|
|
36
|
+
${n}`:"")},Sl=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.
|
|
37
37
|
|
|
38
38
|
import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
|
|
39
39
|
import { ModuleRegistry } from 'ag-grid-community';
|
|
40
40
|
import { ${e} } from 'ag-grid-enterprise';
|
|
41
41
|
|
|
42
42
|
ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);
|
|
43
|
-
`,
|
|
43
|
+
`,Iv=e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,Av={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==null?void 0:e.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e==null?void 0: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:o})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",o],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:
|
|
44
44
|
"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.
|
|
45
45
|
Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
|
|
46
46
|
To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${t}`,27:({fnName:e,module:t})=>`API function '${e}' not registered to module '${t}'`,28:()=>"setRowCount cannot be used while using row grouping.",29:()=>"tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",30:({toIndex:e})=>["tried to insert columns in invalid location, toIndex = ",e,"remember that you should not count the moving columns when calculating the new index"],31:()=>"infinite loop in resizeColumnSets",32:()=>"applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.",33:()=>"stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON.",34:({key:e})=>`the column type '${e}' is a default column type and cannot be overridden.`,35:()=>"Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type.",36:({t:e})=>"colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes",37:()=>"Changing the column pinning status is not allowed with domLayout='print'",38:({iconName:e})=>`provided icon '${e}' needs to be a string or a function`,39:()=>"Applying column order broke a group where columns should be married together. Applying new order has been discarded.",40:({e,method:t})=>`${e}
|
|
47
|
-
${
|
|
47
|
+
${Iv(t)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support document.execCommand('copy') for clipboard operations",43:({iconName:e})=>`As of v33, icon '${e}' is deprecated. Use the icon CSS name instead.`,44:()=>'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',45:({parentCellDataType:e})=>`The data type definition ${e} does not exist.`,46:()=>'The "baseDataType" property of a data type definition must match that of its parent.',47:({cellDataType:e})=>`Missing data type definition - "${e}"`,48:({property:e})=>`Cell data type is "object" but no Value ${e} has been provided. Please either provide an object data type definition with a Value ${e}, or set "colDef.value${e}"`,49:({methodName:e})=>`Framework component is missing the method ${e}()`,50:({compName:e})=>`Could not find component ${e}, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"addRowDropZone - A container target needs to be provided",56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`setFilterModel() - no column found for colId: ${e}`,63:({colId:e})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>"filter missing setModel method, which is needed for setFilterModel",66:()=>"filter API missing getModel method, which is needed for getFilterModel",67:()=>"Filter is missing isFilterActive() method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:e})=>`getGui method from filter returned ${e}; it should be a DOM element.`,70:({newFilter:e})=>`Grid option quickFilterText only supports string inputs, received: ${typeof e}`,71:()=>"debounceMs is ignored when apply button is present",72:({keys:e})=>["ignoring FilterOptionDef as it doesn't contain one of ",e],73:()=>"invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:e})=>['Unexpected type of filter "',e,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing 'conditions'",78:()=>'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',79:()=>'"filterParams.maxNumConditions" must be greater than or equal to zero.',80:()=>'"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',81:()=>'"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',82:({param:e})=>`DateFilter ${e} is not a number`,83:()=>"DateFilter minValidYear should be <= maxValidYear",84:()=>"DateFilter minValidDate should be <= maxValidDate",85:()=>"DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",86:()=>"DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",87:()=>"DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",88:({index:e})=>`Invalid row index for ensureIndexVisible: ${e}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing getRows method",91:()=>"Filter is missing method doesFilterPass",92:()=>"AnimationFrameService called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:o,pageSizeOptions:i})=>`'paginationPageSize=${e}'${t?"":" (default value)"}, but ${e} is not included in${o?"":" the default"} paginationPageSizeSelector=[${i==null?void 0:i.join(", ")}].`,95:({paginationPageSizeOption:e,paginationPageSizeSelector:t})=>`Either set '${t}' to an array that includes ${e} or to 'false' to disable the page size selector.`,96:({id:e,data:t})=>["Duplicate ID",e,"found for pinned row with data",t,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:e})=>`cellEditor for column ${e} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",101:({propertyName:e,componentName:t,agGridDefaults:o,jsComps:i})=>{const s=[],n=[...Object.keys(o??[]).filter(a=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(a)),...Object.keys(i??[]).filter(a=>!!i[a])],r=dn({inputValue:t,allSuggestions:n,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return s.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.
|
|
48
48
|
`),r.length>0&&s.push(` Did you mean: [${r.slice(0,3)}]?
|
|
49
|
-
`),s.push("If using a custom component check it has been registered correctly."),s},102:()=>"selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:e,param:t})=>`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`,105:({e})=>["chart rendering failed",e],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${
|
|
49
|
+
`),s.push("If using a custom component check it has been registered correctly."),s},102:()=>"selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:e,param:t})=>`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`,105:({e})=>["chart rendering failed",e],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${vt}/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 o=dn({inputValue:e,allSuggestions:t,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return[`Could not find '${e}' aggregate function. It was configured as "aggFunc: '${e}'" but it wasn't found in the list of registered aggregations.`,o.length>0?` Did you mean: [${o.slice(0,3)}]?`:"","If using a custom aggregation function check it has been registered correctly."].join(`
|
|
50
50
|
`)},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.
|
|
51
|
-
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:o})=>["duplicate group keys for row data, keys should be unique",e,t,...o??[]],187:({rowId:e,firstData:t,secondData:o})=>[`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",o],188:()=>"getRowId callback must be provided for Server Side Row Model 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:
|
|
51
|
+
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:o})=>["duplicate group keys for row data, keys should be unique",e,t,...o??[]],187:({rowId:e,firstData:t,secondData:o})=>[`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",o],188:()=>"getRowId callback must be provided for Server Side Row Model 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:vl,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 ${vt}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:e})=>`unable to lookup Tool Panel as invalid key supplied: ${e}`,215:({key:e,defaultByKey:t})=>`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(t??{}).join(",")}`,216:({name:e})=>`Missing component for '${e}'`,217:({invalidColIds:e})=>["unable to find grid columns for the supplied colDef(s):",e],218:({property:e,defaultOffset:t})=>`${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,219:({property:e})=>`Property ${e} does not exist on the target object.`,220:({lineDash:e})=>`'${e}' is not a valid 'lineDash' option.`,221:()=>"agAggregationComponent should only be used with the client and server side row model.",222:()=>"agFilteredRowCountComponent should only be used with the client side row model.",223:()=>"agSelectedRowCountComponent should only be used with the client and server side row model.",224:()=>"agTotalAndFilteredRowCountComponent should only be used with the client side row model.",225:()=>"agTotalRowCountComponent should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:e})=>`unrecognised menu item ${e}`,229:({index:e})=>["invalid row index for ensureIndexVisible: ",e],230:()=>"detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",232:()=>"Using both rowData and v-model. rowData will be ignored.",233:({methodName:e})=>`Framework component is missing the method ${e}()`,234:()=>'Group Column Filter does not work with the colDef property "field". This property will be ignored.',235:()=>'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',236:()=>'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"setRowCount can only accept a positive row count.",239:()=>'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',240:({theme:e})=>`theme grid option must be a Theming API theme object or the string "legacy", received: ${e}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>`Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule.
|
|
52
52
|
Please rebuild the selection state and reapply it.`,248:()=>"SetFloatingFilter expects SetFilter as its parent",249:()=>"Must supply a Value Formatter in Set Filter params when using a Key Creator",250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:e})=>`AG Grid: Unable to create chart as an invalid chartType = '${e}' was supplied.`,252:()=>`cannot get grid to draw rows when it is in the middle of drawing rows.
|
|
53
53
|
Your code probably called a grid API method while the grid was in the render stage.
|
|
54
54
|
To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0).
|
|
55
|
-
To see what part of your code that caused the refresh check this stacktrace.`,253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e==null?void 0:e.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>
|
|
56
|
-
See ${Qn(e,t)}`;return Array.isArray(i)?i.concat(n):[i,n]}var Mv={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},va=new WeakMap,ba=new WeakMap;function kv(e,t,o){if(!t)return U(11),{};const i=o;let s;if(!(i!=null&&i.setThemeOnGridDiv)){const r=X({tag:"div"});r.style.height="100%",e.appendChild(r),e=r,s=()=>e.remove()}return new Gv().create(e,t,r=>{const l=new zp(e);r.createBean(l)},void 0,o,s)}var Lv=1,Gv=class{create(e,t,o,i,s,n){const r=Li.applyGlobalGridOptions(t),l=r.gridId??String(Lv++),a=this.getRegisteredModules(s,l,r.rowModelType),d=this.createBeansList(r.rowModelType,a,l),c=this.createProvidedBeans(e,r,s);if(!d)return;const h={providedBeanInstances:c,beanClasses:d,gridId:l,beanInitComparator:Dp,beanDestroyComparator:Fp,derivedBeans:[Ep],destroyCallback:()=>{ba.delete(p),va.delete(e),n==null||n()}},g=new qu(h);this.registerModuleFeatures(g,a),o(g),g.getBean("syncSvc").start(),i==null||i(g);const p=g.getBean("gridApi");return va.set(e,p),ba.set(p,e),p}getRegisteredModules(e,t,o){var i;return Et(yv,void 0,!0),(i=e==null?void 0:e.modules)==null||i.forEach(s=>Et(s,t)),_u(t,Sa(o))}registerModuleFeatures(e,t){const o=e.getBean("registry"),i=e.getBean("apiFunctionSvc");t.forEach(s=>{o.registerModule(s);const n=s.apiFunctions;n&&Object.keys(n).forEach(l=>{i==null||i.addFunction(l,n[l])})})}createProvidedBeans(e,t,o){let i=o?o.frameworkOverrides:null;K(i)&&(i=new Fl);const s={gridOptions:t,eGridDiv:e,globalListener:o?o.globalListener:null,globalSyncListener:o?o.globalSyncListener:null,frameworkOverrides:i};return o&&o.providedBeanInstances&&Object.assign(s,o.providedBeanInstances),s}createBeansList(e,t,o){const i={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},s=Sa(e),n=i[s];if(!n){Yt(201,{rowModelType:s},`Unknown rowModelType ${s}.`);return}if(!zu()){Yt(272,void 0,fa());return}if(!e){const l=Object.entries(i).filter(([a,d])=>cs(d,o,a));if(l.length==1){const[a,d]=l[0];if(a!==s){const c={moduleName:d,rowModelType:a};Yt(275,c,Ca(c));return}}}if(!cs(n,o,s)){Yt(200,{reasonOrId:`rowModelType = '${s}'`,moduleName:n,gridScoped:us(),gridId:o,rowModelType:s},`Missing module ${n}Module for rowModelType ${s}.`);return}const r=new Set;return t.forEach(l=>{var a;return(a=l.beans)==null?void 0:a.forEach(d=>r.add(d))}),Array.from(r)}};function Sa(e){return e??"clientSide"}function Te(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function Hv(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var Ov=class extends x{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");if(t)return(i,s,n)=>t({key:i,defaultValue:s,variableValues:n});const o=e.get("localeText");return(i,s,n)=>{let r=o&&o[i];if(r&&n&&n.length){let l=0;for(;!(l>=n.length||r.indexOf("${variable}")===-1);)r=r.replace("${variable}",n[l++])}return r??s}}};function Bv(e,t=!1){const o=[],i=[],s=[],n=[],r=[],l=[],a=[],d=[],c=[];let u=0;for(let h=0;h<e.length;h++){const{colId:g,sort:p,sortIndex:f,rowGroup:C,rowGroupIndex:m,aggFunc:w,pivot:b,pivotIndex:v,pinned:S,hide:D,width:I,flex:O}=e[h];c.push(g),p&&(o[f??u++]={colId:g,sort:p}),C&&(i[m??0]=g),typeof w=="string"&&s.push({colId:g,aggFunc:w}),b&&(n[v??0]=g),S&&(S==="right"?l:r).push(g),D&&a.push(g),(O!=null||I)&&d.push({colId:g,flex:O??void 0,width:I})}return{sort:o.length?{sortModel:o}:void 0,rowGroup:i.length?{groupColIds:i}:void 0,aggregation:s.length?{aggregationModel:s}:void 0,pivot:n.length||t?{pivotMode:t,pivotColIds:n}:void 0,columnPinning:r.length||l.length?{leftColIds:r,rightColIds:l}:void 0,columnVisibility:a.length?{hiddenColIds:a}:void 0,columnSizing:d.length?{columnSizingModel:d}:void 0,columnOrder:c.length?{orderedColIds:c}:void 0}}function Vv(e){const t=[];return e.forEach(({groupId:o,open:i})=>{i&&t.push(o)}),t.length?{openColumnGroupIds:t}:void 0}var Nv=class{wrap(e,t,o,i){const s=this.createWrapper(e,i);return t==null||t.forEach(n=>{this.createMethod(s,n,!0)}),o==null||o.forEach(n=>{this.createMethod(s,n,!1)}),s}createMethod(e,t,o){e.addMethod(t,this.createMethodProxy(e,t,o))}createMethodProxy(e,t,o){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(o&&k(49,{methodName:t}),null)}}},_v={tag:"div",cls:"ag-tooltip"},Wv=class extends ks{constructor(){super(_v)}init(e){const{value:t}=e,o=this.getGui();o.textContent=bt(t);const i=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();o.classList.add(`ag-${i}-tooltip`)}},zv=1e3,$v=1e3,ya=100,Ra,yi=!1,Uv=class extends x{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc,this.userCompFactory=e.userCompFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){var t,o,i,s;return e==="show"?((o=(t=this.tooltipCtrl).getTooltipShowDelayOverride)==null?void 0:o.call(t))??this.getGridOptionsTooltipDelay("tooltipShowDelay"):((s=(i=this.tooltipCtrl).getTooltipHideDelayOverride)==null?void 0:s.call(i))??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!gt()&&(yi?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},ya):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){var s;const t=e.relatedTarget,o=this.tooltipCtrl.getGui(),i=(s=this.tooltipComp)==null?void 0:s.getGui();this.isInteractingWithTooltip||o.contains(t)||this.interactionEnabled&&(i!=null&&i.contains(t))||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||yi)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-Ra<zv}setToDoNothing(e){!e&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){var r,l,a,d,c,u,h;const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!M(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const o=(r=t.getRowNode)==null?void 0:r.call(t),i=_(this.gos,{location:((l=t.getLocation)==null?void 0:l.call(t))??"UNKNOWN",colDef:(a=t.getColDef)==null?void 0:a.call(t),column:(d=t.getColumn)==null?void 0:d.call(t),rowIndex:(c=t.getRowIndex)==null?void 0:c.call(t),node:o,data:o==null?void 0:o.data,value:e,valueFormatted:(u=t.getValueFormatted)==null?void 0:u.call(t),hideTooltipCallback:()=>this.hideTooltip(!0),...((h=t.getAdditionalParams)==null?void 0:h.call(t))??{}});this.state=2,this.tooltipInstanceCount++;const s=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount),n=Hu(this.userCompFactory,i);n==null||n.newAgStackInstance().then(s)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),Ra=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){var r;if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");const s=this.getLocaleTextFunc(),n=(r=this.popupSvc)==null?void 0:r.addPopup({eChild:i,ariaLabel:s("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const l=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:l,columnMoved:l})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(J(this.beans),{keydown:l=>{i.contains(l==null?void 0:l.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:i,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){var o;const e=(o=this.tooltipComp)==null?void 0:o.getGui(),t=Y(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){var t,o;const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?(t=this.popupSvc)==null||t.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):(o=this.popupSvc)==null||o.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,o=this.tooltipTrigger===0?$v:0;window.setTimeout(()=>{e(),this.destroyBean(t)},o),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(e=>{e&&e()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){yi=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},ya)}unlockService(){yi=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};function dn(e){return e.get("tooltipShowMode")==="whenTruncated"}var Kv=class extends x{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const o="title",i=this.ctrl.getGui();i&&(e!=null&&(e!=""||t)?i.setAttribute(o,e):i.removeAttribute(o))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){this.tooltipManager==null&&(this.tooltipManager=this.createBean(new Uv(this.ctrl,()=>this.tooltip),this.beans.context))}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(e){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(e?"":null,e),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},jv={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,renderingMode:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0,enableFilterHandlers:!0,filterHandlers:!0},ae="clientSide",ie="serverSide",Gt="infinite",qv={onGroupExpandedOrCollapsed:[ae],refreshClientSideRowModel:[ae],isRowDataEmpty:[ae],forEachLeafNode:[ae],forEachNodeAfterFilter:[ae],forEachNodeAfterFilterAndSort:[ae],resetRowHeights:[ae],applyTransaction:[ae],applyTransactionAsync:[ae],flushAsyncTransactions:[ae],getBestCostNodeSelection:[ae],getServerSideSelectionState:[ie],setServerSideSelectionState:[ie],applyServerSideTransaction:[ie],applyServerSideTransactionAsync:[ie],applyServerSideRowData:[ie],retryServerSideLoads:[ie],flushServerSideAsyncTransactions:[ie],refreshServerSide:[ie],getServerSideGroupLevelState:[ie],refreshInfiniteCache:[Gt],purgeInfiniteCache:[Gt],getInfiniteRowCount:[Gt],isLastRowIndexKnown:[Gt,ie],expandAll:[ae,ie],collapseAll:[ae,ie],onRowHeightChanged:[ae,ie],setRowCount:[Gt,ie],getCacheBlockState:[Gt,ie]},Yv={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 Zv(e,t,o){const i=Yv[e];if(i){const{version:n,new:r,old:l,message:a}=i,d=l??e;return(...c)=>{const u=r?`Please use ${r} instead. `:"";return qt(`Since ${n} api.${d} is deprecated. ${u}${a??""}`),t.apply(t,c)}}const s=qv[e];return s?(...n)=>{const r=o.rowModel.getType();if(!s.includes(r)){ft(`api.${e} can only be called when gridOptions.rowModelType is ${s.join(" or ")}`);return}return t.apply(t,n)}:t}var Qv={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",tooltipFeature:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},Xv={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,"filter-add":1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1,"column-arrow":1,"un-pin":1,"pinned-top":1,"pinned-bottom":1,"chevron-up":1,"chevron-down":1,"chevron-left":1,"chevron-right":1,edit:1},Jv={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterAdd:"NewFiltersToolPanel",filterCardCollapse:"NewFiltersToolPanel",filterCardExpand:"NewFiltersToolPanel",filterCardEditing:"NewFiltersToolPanel",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",ensureColumnVisible:["ColumnsToolPanel","ColumnMenu"],groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuValue:"MenuCore",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore",rowPin:"PinnedRow",rowUnpin:"PinnedRow",rowPinBottom:"PinnedRow",rowPinTop:"PinnedRow"},eb=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),tb=class extends x{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,ac(this)}warnOnInitialPropertyUpdate(e,t){e==="api"&&jv[t]&&k(22,{key:t})}processGridOptions(e){this.processOptions(e,mw())}validateApiFunction(e,t){return Zv(e,t,this.beans)}missingUserComponent(e,t,o,i){const s=Lt[t];s?this.gos.assertModuleRegistered(s,`AG Grid '${e}' component: ${t}`):k(101,{propertyName:e,componentName:t,agGridDefaults:o,jsComps:i})}missingDynamicBean(e){const t=Qv[e];return t?ye(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){ib.has(e)&&k(10,{eventType:e})}validateIcon(e){if(eb.has(e)&&k(43,{iconName:e}),Xv[e])return;const t=Jv[e];if(t){U(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:us(),gridId:this.beans.context.getGridId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}k(134,{iconName:e})}isProvidedUserComp(e){return!!Lt[e]}validateColDef(e){this.processOptions(e,lw())}processOptions(e,t){const{validations:o,deprecations:i,allProperties:s,propertyExceptions:n,objectName:r,docsUrl:l}=t;s&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...n??[],...Object.keys(i)],s,r,l);const a=new Set;Object.keys(e).forEach(c=>{const u=i[c];if(u){const{message:w,version:b}=u;a.add(`As of v${b}, ${String(c)} is deprecated. ${w??""}`)}const h=e[c];if(h==null||h===!1)return;const g=o[c];if(!g)return;const{dependencies:p,validate:f,supportedRowModels:C,expectedType:m}=g;if(m){const w=typeof h;if(w!==m){a.add(`${String(c)} should be of type '${m}' but received '${w}' (${h}).`);return}}if(C){const w=this.gridOptions.rowModelType??"clientSide";if(!C.includes(w)){a.add(`${String(c)} is not supported with the '${w}' row model. It is only valid with: ${C.join(", ")}.`);return}}if(p){const w=this.checkForRequiredDependencies(c,p,e);if(w){a.add(w);return}}if(f){const w=f(e,this.gridOptions,this.beans);if(w){a.add(w);return}}}),a.size>0&&a.forEach(c=>{qt(c)})}checkForRequiredDependencies(e,t,o){const s=Object.entries(t).filter(([n,r])=>{const l=o[n];return!r.required.includes(l)});return s.length===0?null:s.map(([n,r])=>`'${String(e)}' requires '${n}' to be one of [${r.required.map(l=>l===null?"null":l===void 0?"undefined":l).join(", ")}]. ${r.reason??""}`).join(`
|
|
57
|
-
`)}checkProperties(e,t,o,i,s){const n=["__ob__","__v_skip","__metadata__"],r=
|
|
58
|
-
If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),qt(c)}if(l.length>0&&s){const a=this.beans.frameworkOverrides.getDocLink(s);qt(`to see all the valid ${i} properties please check: ${a}`)}}getConsoleMessage(e,t){return Av(e,t)}};function ob(e,t,o){const i={},s=e.filter(n=>!t.some(r=>r===n));return s.length>0&&s.forEach(n=>i[n]=ln({inputValue:n,allSuggestions:o}).values),i}var ib=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),sb={moduleName:"Validation",version:G,beans:[tb]},Ri=0,nb=200,rb=class extends x{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:o,column:i,node:s,event:n}=e,r=t.getBoundingClientRect(),l=this.getParentRect();this.setAlignedTo(t,o);let a=!1;const d=()=>{const c=this.keepXYWithinBounds(o,r.top-l.top,0),u=o.clientWidth>0?o.clientWidth:200;a||(o.style.minWidth=`${u}px`,a=!0);const g=l.right-l.left-u;let p;return this.gos.get("enableRtl")?(p=C(),p<0&&(p=f(),this.setAlignedStyles(o,"left")),p>g&&(p=0,this.setAlignedStyles(o,"right"))):(p=f(),p>g&&(p=C(),this.setAlignedStyles(o,"right")),p<0&&(p=0,this.setAlignedStyles(o,"left"))),{x:p,y:c};function f(){return r.right-l.left-2}function C(){return r.left-l.left-u}};this.positionPopup({ePopup:o,keepWithinBounds:!0,updatePosition:d,postProcessCallback:()=>this.callPostProcessPopup("subMenu",o,t,n instanceof MouseEvent?n:void 0,i,s)})}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:o,nudgeY:i,skipObserver:s}=e;this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:!0,skipObserver:s,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,eventSource:n,alignSide:r="left",position:l="over",column:a,rowNode:d,type:c}=e,u=n.getBoundingClientRect(),h=this.getParentRect();this.setAlignedTo(n,t);const g=()=>{let p=u.left-h.left;r==="right"&&(p-=t.offsetWidth-u.width);let f;return l==="over"?(f=u.top-h.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,u,h,e.nudgeY||0)==="under"?f=u.top-h.top+u.height:f=u.top-t.offsetHeight-(i||0)*2-h.top),{x:p,y:f}};this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,updatePosition:g,postProcessCallback:()=>this.callPostProcessPopup(c,t,n,null,a,d)})}shouldRenderUnderOrAbove(e,t,o,i){const s=o.bottom-t.bottom,n=t.top-o.top,r=e.offsetHeight+i;return s>r?"under":n>r||n>s?"above":"under"}setAlignedStyles(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const i=this.popupList[o],{alignedToElement:s}=i;!s||(["right","left","over","above","under"].forEach(r=>{s.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`)}),!t)||(s.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const o=this.getPopupIndex(t);if(o!==-1){const i=this.popupList[o];i.alignedToElement=e}}callPostProcessPopup(e,t,o,i,s,n){const r=this.gos.getCallback("postProcessPopup");r&&r({column:s,rowNode:n,ePopup:t,type:e,eventSource:o,mouseEvent:i})}positionPopup(e){const{ePopup:t,keepWithinBounds:o,nudgeX:i,nudgeY:s,skipObserver:n,updatePosition:r}=e,l={width:0,height:0},a=(d=!1)=>{let{x:c,y:u}=r();d&&t.clientWidth===l.width&&t.clientHeight===l.height||(l.width=t.clientWidth,l.height=t.clientHeight,i&&(c+=i),s&&(u+=s),o&&(c=this.keepXYWithinBounds(t,c,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${c}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(a(),!n){const d=Ze(this.beans,t,()=>a(!0));setTimeout(()=>d(),nb)}}getActivePopups(){return this.popupList.map(e=>e.element)}getParentRect(){const e=J(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),Hn(t)}keepXYWithinBounds(e,t,o){const i=o===0,s=i?"clientHeight":"clientWidth",n=i?"top":"left",r=i?"height":"width",l=i?"scrollTop":"scrollLeft",a=J(this.beans),d=a.documentElement,c=this.getPopupParent(),u=e.getBoundingClientRect(),h=c.getBoundingClientRect(),g=a.documentElement.getBoundingClientRect(),p=c===a.body,f=Math.ceil(u[r]);let m=p?(i?ic:ji)(d)+d[l]:c[s];p&&(m-=Math.abs(g[n]-h[n]));const w=m-f;return Math.min(Math.max(t,0),Math.abs(w))}addPopup(e){const t=J(this.beans),{eChild:o,ariaLabel:i,ariaOwns:s,alwaysOnTop:n,positionCallback:r,anchorToElement:l}=e;if(!t)return k(122),{hideFunc:()=>{}};const a=this.getPopupIndex(o);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(o);const d=this.createPopupWrapper(o,!!n,i,s),c=this.addEventListenersToPopup({...e,wrapperEl:d});return r&&r(),this.addPopupToPopupList(o,d,c,l),{hideFunc:c}}initialisePopupPosition(e){const o=this.getPopupParent().getBoundingClientRect();M(e.style.top)||(e.style.top=`${o.top*-1}px`),M(e.style.left)||(e.style.left=`${o.left*-1}px`)}createPopupWrapper(e,t,o,i){const s=this.getPopupParent(),{environment:n,gos:r}=this.beans,l=X({tag:"div"});return n.applyThemeClasses(l),l.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Be(e,"dialog"),o?zt(e,o):i&&(e.id||(e.id=`popup-component-${Ri}`),Pn(i,e.id)),l.appendChild(e),s.appendChild(l),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),l}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const o of this.popupList)t.applyThemeClasses(o.wrapper)}}addEventListenersToPopup(e){const t=this.beans,o=J(t),i=this.getPopupParent(),{wrapperEl:s,eChild:n,closedCallback:r,afterGuiAttached:l,closeOnEsc:a,modal:d,ariaOwns:c}=e;let u=!1;const h=C=>{if(!s.contains(Y(t)))return;C.key===y.ESCAPE&&!ke(C)&&f({keyboardEvent:C})},g=C=>f({mouseEvent:C}),p=C=>f({touchEvent:C}),f=(C={})=>{const{mouseEvent:m,touchEvent:w,keyboardEvent:b,forceHide:v}=C;!v&&(this.isEventFromCurrentPopup({mouseEvent:m,touchEvent:w},n)||u)||(u=!0,i.removeChild(s),o.removeEventListener("keydown",h),o.removeEventListener("mousedown",g),o.removeEventListener("touchstart",p),o.removeEventListener("contextmenu",g),this.eventSvc.removeEventListener("dragStarted",g),r&&r(m||w||b),this.removePopupFromPopupList(n,c))};return l&&l({hidePopup:f}),window.setTimeout(()=>{a&&o.addEventListener("keydown",h),d&&(o.addEventListener("mousedown",g),this.eventSvc.addEventListener("dragStarted",g),o.addEventListener("touchstart",p),o.addEventListener("contextmenu",g))},0),f}addPopupToPopupList(e,t,o,i){this.popupList.push({element:e,wrapper:t,hideFunc:o,instanceId:Ri,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),Ri=Ri+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const i=this.popupList[o];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then(n=>n&&n()),i.stopAnchoringPromise=void 0,i.isAnchored=!1,!t)return;const s=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:i.hideFunc});return i.stopAnchoringPromise=s,i.isAnchored=!0,s}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&Pn(t,null),this.popupList=this.popupList.filter(o=>o.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),o=t.getBoundingClientRect(),{element:i,ePopup:s}=e,n=i.getBoundingClientRect(),r=u=>parseInt(u.substring(0,u.length-1),10),l=(u,h)=>{const g=o[u]-n[u],p=r(s.style[u]);return{initialDiff:g,lastDiff:g,initial:p,last:p,direction:h}},a=l("top",0),d=l("left",1),c=this.beans.frameworkOverrides;return new eo(u=>{c.wrapIncoming(()=>{c.setInterval(()=>{const h=t.getBoundingClientRect(),g=i.getBoundingClientRect();if(g.top==0&&g.left==0&&g.height==0&&g.width==0){e.hidePopup();return}const f=(C,m)=>{const w=r(s.style[m]);C.last!==w&&(C.initial=w,C.last=w);const b=h[m]-g[m];if(b!=C.lastDiff){const v=this.keepXYWithinBounds(s,C.initial+C.initialDiff-b,C.direction);s.style[m]=`${v}px`,C.last=v}C.lastDiff=b};f(a,"top"),f(d,"left")},200).then(h=>{u(()=>{h!=null&&window.clearInterval(h)})})},"popupPositioning")})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){const{mouseEvent:o,touchEvent:i}=e,s=o||i;if(!s)return!1;const n=this.getPopupIndex(t);if(n===-1)return!1;for(let r=n;r<this.popupList.length;r++){const l=this.popupList[r];if(Tc(l.element,s))return!0}return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){const t=J(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const o=this.getWrapper(e);o&&(o.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(o))}bringPopupToFront(e){const t=this.getPopupParent(),o=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),i=o.length,s=this.getWrapper(e);if(!s||i<=1||!t.contains(e))return;const n=[],r=[];for(const h of o)h!==s&&(h.classList.contains("ag-always-on-top")?r.push(h):n.push(h));const l=[],a=r.length,u=s.classList.contains("ag-always-on-top")||!a?[...n,...r,s]:[...n,s,...r];for(let h=0;h<=i;h++){const g=u[h];if(o[h]===u[h]||g===s)continue;g.querySelectorAll("div").forEach(f=>{f.scrollTop!==0&&l.push([f,f.scrollTop])}),h===0?t.insertAdjacentElement("afterbegin",g):u[h-1].insertAdjacentElement("afterend",g)}for(;l.length;){const h=l.pop();h[0].scrollTop=h[1]}}},Ea={moduleName:"Popup",version:G,beans:[rb]},lb=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",cn=(e,t,o)=>{var l,a,d;const{editModelSvc:i}=e,s=(a=(l=i==null?void 0:i.getCellValidationModel())==null?void 0:l.getCellValidation(t))==null?void 0:a.errorMessages,n=(d=i==null?void 0:i.getRowValidationModel().getRowValidation(t))==null?void 0:d.errorMessages,r=s||n;return r&&r.length?r.join(o("tooltipValidationErrorSeparator",". ")):void 0},ab=class extends x{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,o,i){e&&t.destroyBean(e);const s=dn(this.gos),{column:n,eGui:r}=t,l=n.getColDef();!i&&s&&!l.headerComponent&&(i=Po(()=>r.querySelector(".ag-header-cell-text")));const a={getColumn:()=>n,getColDef:()=>n.getColDef(),getGui:()=>r,getLocation:()=>"header",getTooltipValue:()=>o??n.getColDef().headerTooltip,shouldDisplayTooltip:i};let d=this.createTooltipFeature(a);return d&&(d=t.createBean(d),t.setRefreshFunction("tooltip",()=>d.refreshTooltip())),d}setupHeaderGroupTooltip(e,t,o,i){e&&t.destroyBean(e);const s=dn(this.gos),{column:n,eGui:r}=t,l=n.getColGroupDef();!i&&s&&!(l!=null&&l.headerGroupComponent)&&(i=Po(()=>r.querySelector(".ag-header-group-text")));const a={getColumn:()=>n,getGui:()=>r,getLocation:()=>"headerGroup",getTooltipValue:()=>o??(l&&l.headerTooltip),shouldDisplayTooltip:i};l&&(a.getColDef=()=>l);const d=this.createTooltipFeature(a);return d&&t.createBean(d)}enableCellTooltipFeature(e,t,o){const{beans:i}=this,{gos:s,editSvc:n}=i,{column:r,rowNode:l}=e;let a="cell";const d=()=>{const g=!!!(n!=null&&n.isEditing(e))&&cn(i,e,this.getLocaleTextFunc());if(g)return a="cellEditor",g;a="cell";const p=r.getColDef(),f=l.data;if(p.tooltipField&&M(f))return Wt(f,p.tooltipField,r.isTooltipFieldContainsDots());const C=p.tooltipValueGetter;return C?C(_(s,{location:"cell",colDef:r.getColDef(),column:r,rowIndex:e.cellPosition.rowIndex,node:l,data:l.data,value:e.value,valueFormatted:e.valueFormatted})):null},c=dn(s);o||(c&&!e.isCellRenderer()?o=()=>{const h=!!(n!=null&&n.isEditing(e));if(!h&&cn(i,e,this.getLocaleTextFunc()))return!0;if(!r.isTooltipEnabled())return!1;const f=Po(()=>{const C=e.eGui;return C.children.length===0?C:C.querySelector(".ag-cell-value")});return!h&&f()}:o=()=>!(n!=null&&n.isEditing(e)));const u={getColumn:()=>r,getColDef:()=>r.getColDef(),getRowIndex:()=>e.cellPosition.rowIndex,getRowNode:()=>l,getGui:()=>e.eGui,getLocation:()=>a,getTooltipValue:t!=null?()=>t:d,getValueFormatted:()=>e.valueFormatted,shouldDisplayTooltip:o};return this.createTooltipFeature(u,i)}setupFullWidthRowTooltip(e,t,o,i){const s={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>o,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},n=this.beans,r=n.context;e&&t.destroyBean(e,r);const l=this.createTooltipFeature(s,n);if(l)return t.createBean(l,r)}setupCellEditorTooltip(e,t){var l,a;const{beans:o}=this,{context:i}=o,s=((l=t.getValidationElement)==null?void 0:l.call(t,!0))||!((a=t.isPopup)!=null&&a.call(t))&&e.eGui;if(!s)return;const n={getGui:()=>s,getTooltipValue:()=>cn(o,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{var p,f;const{editModelSvc:d}=o,c=(p=d==null?void 0:d.getRowValidationModel())==null?void 0:p.getRowValidationMap(),u=(f=d==null?void 0:d.getCellValidationModel())==null?void 0:f.getCellValidationMap(),h=!!c&&c.size>0,g=!!u&&u.size>0;return h||g}},r=this.createTooltipFeature(n,o);if(r)return e.createBean(r,i)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=M(t.tooltipField)||M(t.tooltipValueGetter)||M(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},xa={moduleName:"Tooltip",version:G,beans:[ab],dynamicBeans:{tooltipFeature:Kv},userComponents:{agTooltipComponent:Wv},dependsOn:[Ea],css:[lb]},db=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}",cb={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},ub=class extends fi{constructor(){super(cb,[Gs]),this.eEditor=A}initialiseEditor(e){const t=e.value??void 0,o=this.eEditor;o.setValue(t),o.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(o,{fieldValueChanged:s=>this.setAriaLabel(s.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),o=Tn(t,e),i=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${i} (${o})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,o=this.getValue();return t?t({value:o,internalErrors:null,cellEditorParams:e}):null}},Ei=class extends fi{constructor(e){super(),this.cellEditorInput=e,this.eEditor=A}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:o}=this,{cellStartedEdit:i,eventKey:s,suppressPreventDefault:n}=e;o.getInputElement().setAttribute("title",""),t.init(o,e);let r,l=!0;i?(this.focusAfterAttached=!0,s===y.BACKSPACE||s===y.DELETE?r="":s&&s.length===1?n?l=!1:r=s:(r=t.getStartValue(),s!==y.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),l&&r!=null&&o.setStartValue(r),this.addGuiEventListener("keydown",a=>{const{key:d}=a;(d===y.PAGE_UP||d===y.PAGE_DOWN)&&a.preventDefault()})}afterGuiAttached(){var i,s;const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;ht()||t.getFocusableElement().focus();const o=t.getInputElement();this.highlightAllOnFocus?o.select():(s=(i=this.cellEditorInput).setCaret)==null||s.call(i)}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),o=e.getInputElement();t.focus(),o.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},hb={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},gb=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return hb}getAgComponents(){return[Dl]}init(e,t){var r,l;this.eEditor=e,this.params=t;const{min:o,max:i,step:s,colDef:n}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((l=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:l.call(r,n.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:o}=this,{min:i,max:s,getValidationErrors:n}=o;let r=[];const l=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){const a=i instanceof Date?i:new Date(i);if(t<a){const d=a.toLocaleDateString();r.push(l("minDateValidation",`Date must be after ${d}`,[d]))}}if(s){const a=s instanceof Date?s:new Date(s);if(t>a){const d=a.toLocaleDateString();r.push(l("maxDateValidation",`Date must be before ${d}`,[d]))}}}return r.length||(r=null),n?n({value:t,cellEditorParams:o,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,o=e.getDate();return!M(o)&&!M(t.value)?t.value:o??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return $e(e,this.includeTime??!1)}},pb=class extends Ei{constructor(){super(new gb(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},fb={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},Cb=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return fb}getAgComponents(){return[Dl]}init(e,t){var r,l;this.eEditor=e,this.params=t;const{min:o,max:i,step:s,colDef:n}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((l=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:l.call(r,n.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,o=e.getInputElement().value,i=this.formatDate(this.parseDate(o??void 0)),{min:s,max:n,getValidationErrors:r}=t;let l=[];if(i){const a=new Date(i),d=this.getLocaleTextFunc();if(s){const c=new Date(s);if(a<c){const u=c.toLocaleDateString();l.push(d("minDateValidation",`Date must be after ${u}`,[u]))}}if(n){const c=new Date(n);if(a>c){const u=c.toLocaleDateString();l.push(d("maxDateValidation",`Date must be before ${u}`,[u]))}}}return l.length||(l=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:l}):l}getValue(){const{params:e,eEditor:t}=this,o=this.formatDate(t.getDate());return!M(o)&&!M(e.value)?e.value:e.parseValue(o??"")}getStartValue(){return $e(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):no(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):$e(e??null,this.includeTime??!1)??void 0}},mb=class extends Ei{constructor(){super(new Cb(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},wb={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},vb=class extends fi{constructor(){super(wb,[cp]),this.eEditor=A}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:o,eventKey:i,value:s,maxLength:n,cols:r,rows:l}=e;this.focusAfterAttached=o,t.getInputElement().setAttribute("title",""),t.setMaxLength(n||200).setCols(r||60).setRows(l||10);let a;o?(this.focusAfterAttached=!0,i===y.BACKSPACE||i===y.DELETE?a="":i&&i.length===1?a=i:(a=s.toString(),i!==y.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=s.toString()),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}onKeyDown(e){const t=e.key;(t===y.LEFT||t===y.UP||t===y.RIGHT||t===y.DOWN||e.shiftKey&&t===y.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:o}=this,i=this.getLocaleTextFunc();e.setInputAriaLabel(i("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),o&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:o}=t,i=e.getValue();return!M(i)&&!M(o)?o:t.parseValue(i)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getLocaleTextFunc(),s=this.getValue();let n=[];return typeof s=="string"&&t!=null&&s.length>t&&n.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),o?o({value:s,internalErrors:n,cellEditorParams:e}):n}},bb={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},Sb=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return bb}getAgComponents(){return[hp]}init(e,t){this.eEditor=e,this.params=t;const{max:o,min:i,precision:s,step:n}=t;o!=null&&e.setMax(o),i!=null&&e.setMin(i),s!=null&&e.setPrecision(s),n!=null&&e.setStep(n);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:o,getValidationErrors:i}=e,n=this.eEditor.getInputElement().valueAsNumber,r=this.getLocaleTextFunc();let l=[];return typeof n=="number"&&(t!=null&&n<t&&l.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),o!=null&&n>o&&l.push(r("maxValueValidation",`Must be less than or equal to ${o}.`,[String(o)]))),l.length||(l=null),i?i({value:n,cellEditorParams:e,internalErrors:l}):l}preventStepping(e){(e.key===y.UP||e.key===y.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();if(!M(o)&&!M(t.value))return t.value;let i=t.parseValue(o);if(i==null)return i;if(typeof i=="string"){if(i==="")return null;i=Number(i)}return isNaN(i)?null:i}getStartValue(){return this.params.value}setCaret(){ht()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},yb=class extends Ei{constructor(){super(new Sb(()=>this.getLocaleTextFunc()))}},Rb={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},Eb=class extends fi{constructor(){super(Rb,[bp]),this.eEditor=A,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:o,gos:i}=this,{values:s,value:n,eventKey:r}=e;if(K(s)){k(58);return}this.startedByEnter=r!=null?r===y.ENTER:!1;let l=!1;s.forEach(u=>{const h={value:u},g=o.formatValue(e.column,null,u),p=g!=null;h.text=p?g:u,t.addOption(h),l=l||n===u}),l?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:a,valueListMaxWidth:d,valueListMaxHeight:c}=e;a!=null&&t.setPickerGap(a),c!=null&&t.setPickerMaxHeight(c),d!=null&&t.setPickerMaxWidth(d),i.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:o}=e,i=this.getValue();let s=[];if(t&&!t.includes(i)){const n=this.getLocaleTextFunc();s.push(n("invalidSelectionValidation","Invalid selection."))}else s=null;return o?o({value:i,internalErrors:s,cellEditorParams:e}):s}},xb={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},Db=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return xb}getAgComponents(){return[ap]}init(e,t){this.eEditor=e,this.params=t;const o=t.maxLength;o!=null&&e.setMaxLength(o)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getValue(),s=this.getLocaleTextFunc();let n=[];return t!=null&&typeof i=="string"&&i.length>t&&n.push(s("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),o?o({value:i,cellEditorParams:e,internalErrors:n}):n}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();return!M(o)&&!M(t.value)?t.value:t.parseValue(o)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){const e=this.eEditor,t=e.getValue(),o=M(t)&&t.length||0;o&&e.getInputElement().setSelectionRange(o,o)}},Da=class extends Ei{constructor(){super(new Db(()=>this.getLocaleTextFunc()))}};function Fb(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function Pb(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function Fa(e,t,o="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,o),"ensureVisible")}function Pa(e,t,o){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,o),"ensureVisible")}function Tb(e,t,o=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,o),"ensureVisible")}function Ib(e){var i;const t=(i=e.editModelSvc)==null?void 0:i.getEditMap(),o=[];return t==null||t.forEach((s,n)=>{const{rowIndex:r,rowPinned:l}=n;s.forEach((a,d)=>{const{editorValue:c,pendingValue:u,sourceValue:h,state:g}=a,p=ze(a);let f=c??u;f===pe&&(f=void 0);const C={newValue:f,oldValue:h,state:g,column:d,colId:d.getColId(),colKey:d.getColId(),rowIndex:r,rowPinned:l};(g==="editing"||g==="changed"&&p)&&o.push(C)})}),o}function Ab(e,t=!1){var i;const{editSvc:o}=e;o!=null&&o.isBatchEditing()?(t?(i=e.editModelSvc)==null||i.getEditPositions().forEach(s=>{s.state==="editing"&&o.revertSingleCellEdit(s)}):st(e,!0),Dt(e)):o==null||o.stopEditing(void 0,{cancel:t,source:"api"})}function Mb(e,t){var i;const o=q(e,t);return((i=e.editSvc)==null?void 0:i.isEditing(o))??!1}function kb(e,t){const{key:o,colKey:i,rowIndex:s,rowPinned:n}=t,{editSvc:r,colModel:l}=e,a=l.getCol(i);if(!a){k(12,{colKey:i});return}const c=it(e,{rowIndex:s,rowPinned:n||null});if(!c){k(290,{rowIndex:s,rowPinned:n});return}if(!a.isCellEditable(c))return;n==null&&Pa(e,s),Fa(e,i),r==null||r.startEditing({rowNode:c,column:a},{event:o?new KeyboardEvent("keydown",{key:o}):void 0,source:"api"})}function Lb(e){var t;return((t=e.editSvc)==null?void 0:t.validateEdit())||null}var Gb={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},Hb=class extends ks{constructor(e){super(Gb),this.params=e}postConstruct(){Xe(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,o=i=>{xs(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:o})}},xi=(e,t=!1)=>{if(e!==void 0)return ze(e)||t&&e.state==="editing"};function Ta(e,t,o=!1){var i;return xi((i=e.editModelSvc)==null?void 0:i.getEdit(t),o)}function Ia(e,t){const{editModelSvc:o}=e,{column:i,rowNode:s}=t;if(e.gos.get("groupTotalRow")&&!(s!=null&&s.footer))return!1;for(const n of(s==null?void 0:s.allLeafChildren)??[])if(xi(o==null?void 0:o.getEdit({rowNode:n,column:i}))||xi(o==null?void 0:o.getEdit({rowNode:n.pinnedSibling,column:i})))return!0}function Aa(e,{rowNode:t,column:o}){var i;if(t=t.pinnedSibling,!!t)return xi((i=e.editModelSvc)==null?void 0:i.getEdit({rowNode:t,column:o}))}var Ob=class extends x{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){var s;const{cellCtrl:e,editSvc:t,beans:o}=this;if(t!=null&&t.isBatchEditing()&&t.isEditing()){const n=Ta(o,e)||Ia(o,e)||Aa(o,e);this.applyBatchingStyle(n)}else this.applyBatchingStyle(!1);const i=!!((s=this.editModelSvc)!=null&&s.getCellValidationModel().hasCellValidation(this.cellCtrl));this.cellComp.toggleCss("ag-cell-editing-error",i)}applyBatchingStyle(e){var t;this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&((t=this.editSvc)==null?void 0:t.isBatchEditing()))??!1)}},Bb=class extends x{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){var r;const{rowCtrl:e,editModelSvc:t,beans:o}=this;let i=e.rowNode,s=t==null?void 0:t.getEditRow(i);const n=(r=this.editModelSvc)==null?void 0:r.getRowValidationModel().hasRowValidation({rowNode:i});if(!s&&i.pinnedSibling&&(i=i.pinnedSibling,s=t==null?void 0:t.getEditRow(i)),s){const l=Array.from(s.keys()).some(a=>{const d={rowNode:i,column:a};return Ta(o,d,!0)||Ia(o,d)||Aa(o,d)});this.applyStyle(n,l);return}this.applyStyle(n)}applyStyle(e=!1,t=!1){var s,n;const o=((s=this.editSvc)==null?void 0:s.isBatchEditing())??!1,i=this.gos.get("editType")==="fullRow";(n=this.rowCtrl)==null||n.forEachGui(void 0,({rowComp:r})=>{r.toggleCss("ag-row-editing",i&&t),r.toggleCss("ag-row-batch-edit",i&&t&&o),r.toggleCss("ag-row-inline-editing",t),r.toggleCss("ag-row-not-inline-editing",!t),r.toggleCss("ag-row-editing-invalid",i&&t&&e)})}},Vb=({rowModel:e,pinnedRowModel:t,editModelSvc:o},i)=>{const s=new Set;return e.forEachNode(n=>i.has(n)&&s.add(n)),t==null||t.forEachPinnedRow("top",n=>i.has(n)&&s.add(n)),t==null||t.forEachPinnedRow("bottom",n=>i.has(n)&&s.add(n)),i.forEach(n=>{s.has(n)||o.removeEdits({rowNode:n})}),s},Nb=({editModelSvc:e},t,o)=>{t.forEach(i=>{var s;return(s=e==null?void 0:e.getEditRow(i))==null?void 0:s.forEach((n,r)=>!o.has(r)&&e.removeEdits({rowNode:i,column:r}))})},_b=e=>()=>{const t=new Set(e.colModel.getCols()),o=e.editModelSvc.getEditMap(!0),i=new Set(o.keys());Nb(e,Vb(e,i),t)},Wb=new Set(["undo","redo"]),Ma={paste:"ui",rangeSvc:"ui",fillHandle:"api",cellClear:"api"},zb=new Set(Object.keys(Ma)),$b=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),Di={cancel:!0,source:"api"},Ub={cancel:!1,source:"api"},Ht={checkSiblings:!0},Co={force:!0,suppressFlash:!0},Kb=class extends x{constructor(){super(...arguments),this.beanName="editSvc",this.batch=!1}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:i})=>{this.stopEditing(void 0,Di),this.createStrategy(i)});const t=_b(e),o=()=>{const i=this.model.getCellValidationModel().getCellValidationMap().size>0,s=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||s?this.stopEditing(void 0,Di):this.isEditing()&&(this.isBatchEditing()?Dt(e,this.model.getEditPositions()):this.stopEditing(void 0,Ub)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowGroupOpened:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:o,filterChanged:o,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}setBatchEditing(e){e?(this.batch=!0,this.stopEditing(void 0,Di)):(this.stopEditing(void 0,Di),this.batch=!1)}createStrategy(e){const{beans:t,gos:o,strategy:i}=this,s=e??o.get("editType")??"singleCell";if(i){if(i.beanName===s)return i;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,o,i="ui"){var s;return this.strategy??(this.strategy=this.createStrategy()),((s=this.strategy)==null?void 0:s.shouldStart(e,t,o,i))??null}shouldStopEditing(e,t,o="ui"){var i;return((i=this.strategy)==null?void 0:i.shouldStop(e,t,o))??null}shouldCancelEditing(e,t,o="ui"){var i;return((i=this.strategy)==null?void 0:i.shouldCancel(e,t,o))??null}validateEdit(){return dh(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??Ht)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){var a;const{startedEdit:o=!0,event:i=null,source:s="ui",ignoreEventKey:n=!1}=t;if(this.strategy??(this.strategy=this.createStrategy()),!this.isCellEditable(e,"api"))return;const r=q(this.beans,e);if(r&&!r.comp){r.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const l=(a=this.shouldStartEditing)==null?void 0:a.call(this,e,i,o,s);if(l===!1&&s!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,s)&&this.stopEditing(void 0,{source:s}),l&&this.isBatchEditing()&&this.dispatchBatchEvent("batchEditingStarted",new Map),this.strategy.start(e,i,s,n)}stopEditing(e,t){var p,f,C;const{event:o,cancel:i,source:s="ui",suppressNavigateAfterEdit:n}=t||{},{beans:r,model:l}=this;if(zb.has(s))return this.isBatchEditing()?(this.bulkRefresh(e),!1):this.stopEditing(e,{...t,source:Ma[s]});if(!(this.isEditing(e)||this.isBatchEditing()&&l.hasEdits(e,Ht))||!this.strategy)return!1;const d=q(r,e);d&&(d.onEditorAttachedFuncs=[]);let c=l.getEditMap(!0),u=!1;const h=!i&&!!this.shouldStopEditing(e,o,s),g=i&&!!this.shouldCancelEditing(e,o,s);if(h||g){st(r,!0);const m=l.getEditMap();this.processEdits(m,i),(p=this.strategy)==null||p.stop(i,o),this.bulkRefresh(void 0,c),c=m,u||(u=h)}else if(o instanceof KeyboardEvent&&this.batch&&((f=this.strategy)!=null&&f.midBatchInputsAllowed(e))&&this.isEditing(e,{withOpenEditor:!0})){const m=o.key,w=m===y.ENTER,b=m===y.ESCAPE,v=m===y.TAB;(w||v||b)&&(w||v?st(r,!0):b&&this.revertSingleCellEdit(d),this.isBatchEditing()?(C=this.strategy)==null||C.cleanupEditors():Dt(r,l.getEditPositions(),{event:o}),o.preventDefault(),this.bulkRefresh(e,c,{suppressFlash:!0}),c=l.getEditMap())}else st(r,!0),c=l.getEditMap();return u&&e&&this.model.removeEdits(e),!n&&d&&this.navigateAfterEdit(o instanceof KeyboardEvent&&o.shiftKey,d.cellPosition),ps(r),this.model.hasEdits()||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap()),this.bulkRefresh(),g&&this.beans.rowRenderer.refreshRows({rowNodes:Array.from(c.keys())}),this.isBatchEditing()&&(this.beans.rowRenderer.refreshRows({suppressFlash:!0,force:!0}),u&&h&&this.dispatchBatchEvent("batchEditingStopped",c)),u}navigateAfterEdit(e,t){var i;if(this.gos.get("enterNavigatesVerticallyAfterEdit")){const s=e?y.UP:y.DOWN;(i=this.beans.navigation)==null||i.navigateToNextCell(null,s,t,!1)}}processEdits(e,t=!1){var r,l,a;const o=Array.from(e.keys()),{beans:i}=this,s=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,n=[];for(const d of o){const c=e.get(d);for(const u of c.keys()){const h=c.get(u),g={rowNode:d,column:u},p=q(i,g),f=ze(h),C=(a=(l=(r=p==null?void 0:p.comp)==null?void 0:r.getCellEditor())==null?void 0:l.isCancelAfterEnd)==null?void 0:a.call(l);!t&&!C&&f&&!s&&(this.setNodeDataValue(d,u,h.pendingValue)||n.push(g)),p==null||p.refreshCell(Co)}}n.forEach(d=>{this.model.clearEditValue(d)})}setNodeDataValue(e,t,o,i){const{beans:s}=this,n=q(s,{rowNode:e,column:t});n&&(n.suppressRefreshCell=!0);const r=e.setDataValue(t,o,"commit");return n&&(n.suppressRefreshCell=!1),i&&(n==null||n.refreshCell(Co)),r}setEditMap(e,t){var o;this.strategy??(this.strategy=this.createStrategy()),(o=this.strategy)==null||o.setEditMap(e,t),this.bulkRefresh(),this.beans.rowRenderer.refreshCells(Co)}dispatchEditValuesChanged({rowNode:e,column:t},o={}){if(!e||!t||!o)return;const{pendingValue:i,sourceValue:s}=o,{rowIndex:n,rowPinned:r,data:l}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:n,rowPinned:r,column:t,source:"api",data:l,newValue:i,oldValue:s,value:i,colDef:t.getColDef()})}bulkRefresh(e={},t,o={}){var l;const{beans:i,gos:s}=this,{editModelSvc:n,rowModel:r}=i;oe(s)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),o):t&&((l=n==null?void 0:n.getEditMap(!1))==null||l.forEach((a,d)=>{for(const c of a.keys())this.refCell({rowNode:d,column:c},a.get(c),o)})))}refCell({rowNode:e,column:t},o,i={}){var u;const{beans:s,gos:n}=this,r=new Set([e]),l=new Set,a=e.pinnedSibling;a&&r.add(a);const d=e.sibling;d&&l.add(d);let c=e.parent;for(;c;)(u=c.sibling)!=null&&u.footer&&n.get("groupTotalRow")||!c.parent&&c.sibling&&n.get("grandTotalRow")?l.add(c.sibling):l.add(c),c=c.parent;r.forEach(h=>this.dispatchEditValuesChanged({rowNode:h,column:t},o)),r.forEach(h=>{var g;return(g=q(s,{rowNode:h,column:t}))==null?void 0:g.refreshCell(i)}),l.forEach(h=>{var g;return(g=q(s,{rowNode:h,column:t}))==null?void 0:g.refreshCell(i)})}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){var i;const{rowNode:o}=e;if(o.group){if(this.gos.get("treeData")){if(!o.data&&!this.gos.get("enableGroupEdit"))return!1}else if(!this.gos.get("enableGroupEdit"))return!1}return this.strategy??(this.strategy=this.createStrategy()),((i=this.strategy)==null?void 0:i.isCellEditable(e,t))??!1}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,o=!0){var i,s,n,r;if(this.hasValidationErrors(e)){const l=q(this.beans,e);return this.cellEditingInvalidCommitBlocks()?((i=t==null?void 0:t.preventDefault)==null||i.call(t),o&&(!(l!=null&&l.hasBrowserFocus())&&(l==null||l.focusCell()),(r=(n=(s=l==null?void 0:l.comp)==null?void 0:s.getCellEditor())==null?void 0:n.focusIn)==null||r.call(n)),"block-stop"):(l&&this.revertSingleCellEdit(l),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){var i,s,n,r,l;const o=q(this.beans,e);(i=o==null?void 0:o.comp)!=null&&i.getCellEditor()&&(Dt(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),xt(this.beans,e,{silent:!0}),nt(this.beans),o==null||o.refreshCell(Co),(s=o.rowCtrl.rowEditStyleFeature)==null||s.applyRowStyles(),t&&(o==null||o.focusCell(),(l=(r=(n=o==null?void 0:o.comp)==null?void 0:n.getCellEditor())==null?void 0:r.focusIn)==null||l.call(r)))}hasValidationErrors(e){var i;nt(this.beans);const t=q(this.beans,e);t&&(t.refreshCell(Co),(i=t.rowCtrl.rowEditStyleFeature)==null||i.applyRowStyles());let o=!1;return e!=null&&e.rowNode?(o||(o=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(o||(o=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(o||(o=this.model.getCellValidationModel().getCellValidationMap().size>0),o||(o=this.model.getRowValidationModel().getRowValidationMap().size>0)),o}moveToNextCell(e,t,o,i="ui"){var l;let s;const n=this.isEditing(),r=n&&this.checkNavWithValidation(void 0,o)==="block-stop";return e instanceof Pt&&n&&(s=(l=this.strategy)==null?void 0:l.moveToNextEditingCell(e,t,o,i,r)),s===null||(s=s||!!this.beans.focusSvc.focusedHeader,s===!1&&!r&&this.stopEditing()),s}getCellDataValue({rowNode:e,column:t},o=!0){if(!e||!t)return;let i=this.model.getEdit({rowNode:e,column:t});const s=e.pinnedSibling;if(s){const r=this.model.getEdit({rowNode:s,column:t});r&&(i=r)}const n=o?(i==null?void 0:i.editorValue)??(i==null?void 0:i.pendingValue):i==null?void 0:i.pendingValue;return n===pe||!i?this.valueSvc.getValue(t,e,!0,"api"):n}getRowDataValue(e,t){return this.model.getEditRowDataValue(e,t)}addStopEditingWhenGridLosesFocus(e){ih(this,this.beans,e)}createPopupEditorWrapper(e){return new Hb(e)}setDataValue(e,t,o){var r;if((!this.isEditing()||o==="commit")&&!$b.has(o))return;const{beans:i}=this;this.strategy??(this.strategy=this.createStrategy());const s=this.isBatchEditing()?"ui":"api";if(!o||Wb.has(o))return Qo(i,e,!0,t),this.setNodeDataValue(e.rowNode,e.column,t,!0);const n=this.model.getEdit(e);if(n){if(n.pendingValue===t)return!1;if(n.sourceValue!==t)return Qo(i,e,!0,t),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0;if(n.sourceValue===t)return(r=i.editModelSvc)==null||r.removeEdits(e),this.dispatchEditValuesChanged(e,{...n,pendingValue:t}),!0}return Qo(i,e,!0,t),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0}handleColDefChanged(e){rh(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){if(!this.batch||!this.model.hasRowEdits(e.rowNode,Ht))return;const{rowNode:i,column:s}=e,{compDetails:n,valueToDisplay:r}=t;if(n){const{params:a}=n;return a.data=this.model.getEditRowDataValue(i,Ht),{compDetails:n}}const l=this.model.getEditRow(e.rowNode,Ht);if(r!==void 0&&(l!=null&&l.has(s)))return{valueToDisplay:this.valueSvc.getValue(s,i)}}cleanupEditors(){var e;(e=this.strategy)==null||e.cleanupEditors()}dispatchCellEvent(e,t,o,i){var s;(s=this.strategy)==null||s.dispatchCellEvent(e,t,o,i)}dispatchRowEvent(e,t){var o;(o=this.strategy)==null||o.dispatchRowEvent(e,t)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return _(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},o){var d,c;if(!o||o.length===0)return;const{beans:i,rangeSvc:s,valueSvc:n}=this;st(i,!0);const r=this.model.getEditMap(!0),l=(c=(d=r.get(e))==null?void 0:d.get(t))==null?void 0:c.pendingValue;this.batch||this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),o.forEach(u=>{if(s==null||s.forEachRowInRange(u,h=>{const g=it(i,h);if(g===void 0)return;const p=r.get(g)??new Map;for(const f of u.columns)if(f&&this.isCellEditable({rowNode:g,column:f},"api")){const C=n.getValue(f,g,!0,"api");let m=n.parseValue(f,g??null,l,C);Number.isNaN(m)&&(m=null),p.set(f,{editorValue:void 0,pendingValue:m,sourceValue:C,state:"changed"})}p.size>0&&r.set(g,p)}),this.setEditMap(r),this.batch){this.cleanupEditors(),ps(i),this.bulkRefresh();return}this.stopEditing(void 0,{source:"api"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(r)})}),this.bulkRefresh();const a=q(i,{rowNode:e,column:t});a&&a.focusCell(!0)}createCellStyleFeature(e,t){return new Ob(e,t)}createRowStyleFeature(e,t){return new Bb(e,t)}setEditingCells(e,t){const{beans:o}=this,{colModel:i,valueSvc:s}=o,n=new Map;e.forEach(({colId:r,column:l,colKey:a,rowIndex:d,rowPinned:c,newValue:u,state:h})=>{const g=r?i.getCol(r):a?i.getCol(a):l;if(!g)return;const p=it(o,{rowIndex:d,rowPinned:c});if(!p)return;const f=s.getValue(g,p,!0,"api");if(!ze({pendingValue:u,sourceValue:f})&&h!=="editing")return;let C=n.get(p);C||(C=new Map,n.set(p,C)),u===void 0&&(u=pe),C.set(g,{editorValue:void 0,pendingValue:u,sourceValue:f,state:h??"changed"})}),this.setEditMap(n,t)}onCellFocused(e){var n;const t=q(this.beans,e);if(!t||!this.isEditing(t,Ht))return;const o=this.model.getEdit(t);if(!o||!ze(o))return;const s=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");(n=this.beans.ariaAnnounce)==null||n.announceValue(s,"pendingChange")}allowedFocusTargetOnValidation(e){return q(this.beans,e)}},ka=class extends x{postConstruct(){var e,t;this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:(e=this.onCellFocusChanged)==null?void 0:e.bind(this),cellFocusCleared:(t=this.onCellFocusChanged)==null?void 0:t.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const o=e.previousParams,{editSvc:i,beans:s}=this,n=e.type==="cellFocused"?e.sourceEvent:null;o&&(t=q(s,o));const{gos:r,editModelSvc:l}=s,a=e.type==="cellFocusCleared";if(i.isEditing(void 0,{withOpenEditor:!0})){const{column:d,rowIndex:c,rowPinned:u}=e,h={column:d,rowNode:it(s,{rowIndex:c,rowPinned:u})},g=r.get("invalidEditValueMode")==="block";if(g)return;const p=!g,f=!!(l!=null&&l.getCellValidationModel().hasCellValidation(h)),C=p&&f;(o||a?i.stopEditing(void 0,{cancel:C,source:a&&p?"api":void 0,event:n}):!0)||(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"}))}t==null||t.refreshCell({suppressFlash:!0,force:!0})}isCellEditable({rowNode:e,column:t},o="ui"){return t.isColumnFunc(e,t.getColDef().editable)}stop(e,t){const o=this.model.getEditPositions(),i={all:[],pass:[],fail:[]};if(o.forEach(n=>{var l;i.all.push(n);const r=this.model.getCellValidationModel().getCellValidation(n);if((((l=r==null?void 0:r.errorMessages)==null?void 0:l.length)??0)>0){i.fail.push(n);return}i.pass.push(n)}),e)return o.forEach(n=>{Xo(this.beans,n),this.model.stop(n)}),!0;const s=this.processValidationResults(i);return s.destroy.length>0&&s.destroy.forEach(n=>{Xo(this.beans,n,{event:t}),this.model.stop(n)}),s.keep.length>0&&s.keep.forEach(n=>{var l;const r=q(this.beans,n);(l=this.editSvc)!=null&&l.cellEditingInvalidCommitBlocks()||r&&this.editSvc.revertSingleCellEdit(r)}),!0}cleanupEditors({rowNode:e}={},t){st(this.beans,!1);const o=this.model.getEditPositions(),i=[];e?o.forEach(s=>{!e||s.rowNode===e||i.push(s)}):o.forEach(s=>{i.push(s)}),Dt(this.beans,i),ps(this.beans,t)}setFocusOutOnEditor(e){var t,o,i;(i=(o=(t=e.comp)==null?void 0:t.getCellEditor())==null?void 0:o.focusOut)==null||i.call(o)}setFocusInOnEditor(e){const t=e.comp,o=t==null?void 0:t.getCellEditor();if(o!=null&&o.focusIn)o.focusIn();else{const i=this.beans.gos.get("editType")==="fullRow";e.focusCell(i),e.onEditorAttachedFuncs.push(()=>{var s,n;return(n=(s=t==null?void 0:t.getCellEditor())==null?void 0:s.focusIn)==null?void 0:n.call(s)})}}setupEditors(e=this.model.getEditPositions(),t,o,i,s=!1){const n=i instanceof KeyboardEvent&&!s&&i.key||void 0;nh(this.beans,e,t,n,i,o)}dispatchCellEvent(e,t,o,i){const s=q(this.beans,e);s&&this.eventSvc.dispatchEvent({...s.createEvent(t??null,o),...i})}dispatchRowEvent(e,t){const o=hs(this.beans,e);o&&this.eventSvc.dispatchEvent(o.createRowEvent(t))}shouldStart({column:e},t,o,i="ui"){var a;if(t instanceof KeyboardEvent&&(t.key===y.TAB||t.key===y.ENTER||t.key===y.F2||t.key===y.BACKSPACE&&o))return!0;if((t==null?void 0:t.shiftKey)&&((a=this.beans.rangeSvc)==null?void 0:a.getCellRanges().length)!=0)return!1;const n=e==null?void 0:e.getColDef(),r=this.deriveClickCount(n),l=t==null?void 0:t.type;return l==="click"&&(t==null?void 0:t.detail)===1&&r===1||l==="dblclick"&&(t==null?void 0:t.detail)===2&&r===2?!0:i==="api"?o??!1:!1}shouldStop(e,t,o="ui"){const i=this.editSvc.isBatchEditing();return i&&o==="api"?!0:i&&o==="ui"?!1:o==="api"?!0:t instanceof KeyboardEvent&&!i?t.key===y.ENTER:null}shouldCancel(e,t,o="ui"){const i=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!i&&t.key===y.ESCAPE||i&&o==="api"||o==="api")}setEditMap(e,t){var i;t!=null&&t.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const o=[];if(e.forEach((s,n)=>{s.forEach((r,l)=>{r.state==="editing"&&o.push({...r,rowNode:n,column:l})})}),t!=null&&t.update&&(e=new Map([...this.model.getEditMap(),...e])),(i=this.model)==null||i.setEditMap(e),o.length>0){const s=o.at(-1),n=s.pendingValue===pe?void 0:s.pendingValue;this.start(s,new KeyboardEvent("keydown",{key:n}),"api");const r=q(this.beans,s);r&&this.setFocusInOnEditor(r)}}deriveClickCount(e){const{gos:t}=this.beans;return t.get("suppressClickEdit")===!0?0:t.get("singleClickEdit")===!0||e!=null&&e.singleClickEdit?1:2}destroy(){this.cleanupEditors(),super.destroy()}},jb=class extends ka{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}isCellEditable(e,t="ui"){const o=super.isCellEditable(e,t);return o===!0||t==="ui"?o:this.beans.colModel.getCols().some(s=>super.isCellEditable({rowNode:e.rowNode,column:s},t))}shouldStop(e,t,o="ui"){const{rowNode:i}=e||{};if(!hs(this.beans,{rowNode:this.rowNode}))return!0;const n=super.shouldStop({rowNode:this.rowNode},t,o);return n!==null?n:this.rowNode?i!==this.rowNode:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e,t,o="ui",i){const{rowNode:s}=e;this.rowNode!==s&&super.cleanupEditors(e),this.dispatchRowEvent({rowNode:s},"rowEditingStarted"),this.startedRows.push(s);const n=this.beans.visibleCols.allCols,r=[];n.forEach(l=>{if(!l.isCellEditable(s))return;const a={rowNode:s,column:l};r.push(a),this.model.hasEdits(a)||this.model.start(a)}),this.rowNode=s,this.setupEditors(r,e,!0,t,i)}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){var s;const{rowNode:o}=this;if(o&&!this.model.hasRowEdits(o))return!1;const i=[];return e||this.model.getEditMap().forEach((n,r)=>{if(!(!n||n.size===0)){for(const l of n.values())if(ze(l)){i.push(r);break}}}),nt(this.beans),!e&&((s=this.editSvc)==null?void 0:s.checkNavWithValidation({rowNode:o}))==="block-stop"?!1:(super.stop(e,t),i.forEach(n=>this.dispatchRowEvent({rowNode:n},"rowValueChanged")),this.cleanupEditors({rowNode:o},!0),this.rowNode=void 0,!0)}onCellFocusChanged(e){const{rowIndex:t}=e,o=e.previousParams;if((o==null?void 0:o.rowIndex)===t||e.sourceEvent instanceof KeyboardEvent)return;const i=q(this.beans,o);this.gos.get("invalidEditValueMode")==="block"&&i&&(this.model.getCellValidationModel().getCellValidation(i)||this.model.getRowValidationModel().getRowValidation(i))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t),this.startedRows.forEach(o=>this.dispatchRowEvent({rowNode:o},"rowEditingStopped")),this.startedRows.length=0}moveToNextEditingCell(e,t,o,i="ui",s=!1){var h,g,p;const n=e.cellPosition;let r;this.model.suspend(!0);try{r=(h=this.beans.navigation)==null?void 0:h.findNextCellToFocusOn(n,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const l=r.cellPosition,a=e.isCellEditable(),d=r.isCellEditable(),c=l&&n.rowIndex===l.rowIndex&&n.rowPinned===l.rowPinned;a&&this.setFocusOutOnEditor(e),this.restoreEditors();const u=this.gos.get("suppressStartEditOnTab");return d&&!s?u?r.focusCell(!0,o):((g=r.comp)!=null&&g.getCellEditor()||xt(this.beans,r,{event:o,cellStartedEdit:!0}),this.setFocusInOnEditor(r),r.focusCell(!1,o)):(d&&s&&this.setFocusInOnEditor(r),r.focusCell(!0,o)),!c&&!s&&(this.cleanupEditors(r,!0),u?r.focusCell(!0,o):this.editSvc.startEditing(r,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0})),(p=e.rowCtrl)==null||p.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach((e,t)=>e.forEach(({state:o},i)=>{var n;if(o!=="editing")return;const s=q(this.beans,{rowNode:t,column:i});s&&!((n=s.comp)!=null&&n.getCellEditor())&&xt(this.beans,s,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}},qb=class extends ka{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,o="ui"){const i=super.shouldStop(e,t,o);if(i!==null)return i;const{rowNode:s,column:n}=e||{};return(!this.rowNode||!this.column)&&s&&n?null:this.rowNode!==s||this.column!==n}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e,t,o="ui",i){(this.rowNode!==e.rowNode||this.column!==e.column)&&super.cleanupEditors(),this.rowNode=e.rowNode,this.column=e.column,this.model.start(e),this.setupEditors([e],e,!0,t,i)}dispatchRowEvent(e,t){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){return super.stop(e,t),this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:o}=this.beans,{rowIndex:i,column:s,rowPinned:n}=e,r=it(this.beans,{rowIndex:i,rowPinned:n}),l=gs(s),a=t.getCol(l),d=e.previousParams;if(d){const c=gs(d.column);if((d==null?void 0:d.rowIndex)===i&&c===l&&(d==null?void 0:d.rowPinned)===n)return}o!=null&&o.isEditing({rowNode:r,column:a},{withOpenEditor:!0})&&e.type==="cellFocused"||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,o,i="ui",s=!1){var g,p,f,C,m;const n=e.cellPosition;let r;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),s||(e.eGui.focus(),(p=this.editSvc)==null||p.stopEditing(e,{source:(g=this.editSvc)!=null&&g.isBatchEditing()?"ui":"api",event:o}));try{r=(f=this.beans.navigation)==null?void 0:f.findNextCellToFocusOn(n,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const a=r.cellPosition,d=e.isCellEditable(),c=r.isCellEditable(),u=a&&n.rowIndex===a.rowIndex&&n.rowPinned===a.rowPinned;d&&!s&&this.setFocusOutOnEditor(e);const h=this.gos.get("suppressStartEditOnTab");return!u&&!s&&(super.cleanupEditors(r,!0),h?r.focusCell(!0,o):this.editSvc.startEditing(r,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0})),c&&!s?(r.focusCell(!1,o),h?r.focusCell(!0,o):(C=r.comp)!=null&&C.getCellEditor()||(xt(this.beans,r,{event:o,cellStartedEdit:!0}),this.setFocusInOnEditor(r))):(c&&s&&this.setFocusInOnEditor(r),r.focusCell(!0,o)),(m=e.rowCtrl)==null||m.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},dt={moduleName:"EditCore",version:G,beans:[Yu,Kb],apiFunctions:{getEditingCells:Ib,getCellEditorInstances:sh,startEditingCell:kb,stopEditing:Ab,isEditing:Mb,validateEdit:Lb},dynamicBeans:{singleCell:qb,fullRow:jb},dependsOn:[Ea,xa],css:[db]},Yb={moduleName:"TextEditor",version:G,userComponents:{agCellEditor:Da,agTextCellEditor:Da},dependsOn:[dt]},Zb={moduleName:"NumberEditor",version:G,userComponents:{agNumberCellEditor:{classImp:yb}},dependsOn:[dt]},Qb={moduleName:"DateEditor",version:G,userComponents:{agDateCellEditor:pb,agDateStringCellEditor:mb},dependsOn:[dt]},Xb={moduleName:"CheckboxEditor",version:G,userComponents:{agCheckboxCellEditor:ub},dependsOn:[dt]},Jb={moduleName:"SelectEditor",version:G,userComponents:{agSelectCellEditor:Eb},dependsOn:[dt]},eS={moduleName:"LargeTextEditor",version:G,userComponents:{agLargeTextCellEditor:vb},dependsOn:[dt]},tS={moduleName:"CustomEditor",version:G,dependsOn:[dt]};function oS(e){var t;(t=e.expansionSvc)==null||t.expandAll(!0)}function iS(e){var t;(t=e.expansionSvc)==null||t.expandAll(!1)}function sS(e){const t=Te(e),o=Hv(e);t?t.onRowHeightChanged():o&&o.onRowHeightChanged()}var nS={moduleName:"CsrmSsrmSharedApi",version:G,apiFunctions:{expandAll:oS,collapseAll:iS,onRowHeightChanged:sS}},rS=class extends x{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(i=>{var n;if(!i){U(18),t||U(20);return}if(this.isGridApi(i))return i;const s=i;return"current"in s?(n=s.current)==null?void 0:n.api:(s.api||U(19),s.api)}).filter(i=>!!i&&!i.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){this.consuming||this.getAlignedGridApis().forEach(t=>{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 o=[];return e.columns?e.columns.forEach(i=>{o.push(t(i))}):e.column&&o.push(t(e.column)),o}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":k(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;t&&e.columnGroups.forEach(o=>{let i=null;o&&(i=t.getProvidedColGroup(o.getGroupId())),!(o&&!i)&&t.setColumnGroupOpened(i,o.isExpanded(),"alignedGridChanged")})}processColumnEvent(e){var c;const t=e.column;let o=null;const i=this.beans,{colResize:s,ctrlsSvc:n,colModel:r}=i;if(t&&(o=r.getColDefCol(t.getColId())),t&&!o)return;const l=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const h=e.api.getColumnState().map(g=>({colId:g.colId}));ve(i,{state:h,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const h=e.api.getColumnState().map(g=>({colId:g.colId,hide:g.hide}));ve(i,{state:h},"alignedGridChanged")}break;case"columnPinned":{const h=e.api.getColumnState().map(g=>({colId:g.colId,pinned:g.pinned}));ve(i,{state:h},"alignedGridChanged")}break;case"columnResized":{const u=e,h={};l.forEach(g=>{h[g.getId()]={key:g.getColId(),newWidth:g.getActualWidth()}}),(c=u.flexColumns)==null||c.forEach(g=>{h[g.getId()]&&delete h[g.getId()]}),s==null||s.setColumnWidths(Object.values(h),!1,u.finished,"alignedGridChanged");break}}const d=n.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(u=>{u.setGridOption("alwaysShowVerticalScroll",d)})}},lS={moduleName:"AlignedGrids",version:G,beans:[rS],dependsOn:[_l]},aS="↑",dS="↓",cS={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},uS=class extends j{constructor(){super(cS),this.eValue=A,this.eDelta=A,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const o=Math.abs(t),i=e.formatValue(o),s=M(i)?i:o,n=t>=0,r=this.eDelta;n?r.textContent=aS+s:r.textContent=dS+s,r.classList.toggle("ag-value-change-delta-up",n),r.classList.toggle("ag-value-change-delta-down",!n)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),he(this.eDelta)}refresh(e,t=!1){var d;const{value:o,valueFormatted:i}=e,{eValue:s,lastValue:n,beans:r}=this;if(o===n||(M(i)?s.textContent=i:M(o)?s.textContent=o:he(s),(d=r.filterManager)!=null&&d.isSuppressFlashingCellsBecauseFiltering()))return!1;const l=o&&typeof o=="object"&&"toNumber"in o?o.toNumber():o,a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n;if(l===a)return!1;if(typeof l=="number"&&typeof a=="number"){const c=l-a;this.showDelta(e,c)}return n&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=o,!0}},hS=".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}",gS={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},pS=class extends j{constructor(){super(gS),this.eCurrent=A,this.refreshCount=0,this.registerCSS(hS)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious);const{beans:t,eCurrent:o}=this,i=X({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=i,i.textContent=o.textContent,this.getGui().insertBefore(i,o),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.getGui().removeChild(this.ePrevious),this.ePrevious=null)},3e3)})}refresh(e,t=!1){var s;let o=e.value;if(K(o)&&(o=""),o===this.lastValue||(s=this.beans.filterManager)!=null&&s.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=o;const i=this.eCurrent;return M(e.valueFormatted)?i.textContent=e.valueFormatted:M(e.value)?i.textContent=o:he(i),!0}},fS=class extends x{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,o=this.beans.gos.get("cellFlashDuration"),i=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];s.delete(e);const n=Date.now(),r=n+o,l=n+o+i,a={phase:"flash",flashEndTime:r,fadeEndTime:l};s.set(e,a);const d=`ag-cell-${t}`,c=`${d}-animation`,{comp:u,eGui:{style:h}}=e;u.toggleCss(d,!0),u.toggleCss(c,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),o)}),this.nextAnimationTime=r)}advanceAnimations(){const e=Date.now();let t=null;for(const o of Object.keys(this.animations)){const i=this.animations[o],s=`ag-cell-${o}`,n=`${s}-animation`;for(const[r,l]of i){if(!r.isAlive()||!r.comp){i.delete(r);continue}const{phase:a,flashEndTime:d,fadeEndTime:c}=l,u=a==="flash"?d:c;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:g,eGui:{style:p}}=r;switch(a){case"flash":g.toggleCss(s,!1),g.toggleCss(n,!0),p.transition=`background-color ${c-d}ms`,p.transitionDelay=`${d-e}ms`,t=Math.min(c,t??1/0),l.phase="fade";break;case"fade":g.toggleCss(s,!1),g.toggleCss(n,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),i.delete(r);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 o=Zu(e.cellPosition);t.cells[o]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t==null?void 0:t.flashDuration,t==null?void 0:t.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function CS(e,t={}){const{cellFlashSvc:o}=e;o&&e.frameworkOverrides.wrapIncoming(()=>{e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(i=>o.flashCell(i,t))})}var mS={moduleName:"HighlightChanges",version:G,beans:[fS],userComponents:{agAnimateShowChangeCellRenderer:uS,agAnimateSlideCellRenderer:pS},apiFunctions:{flashCells:CS}};function wS(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function vS(e,t,o){var i;return(i=e.stateSvc)==null?void 0:i.setState(t,o)}function La(e){switch(e={...e},e.version||(e.version="32.1.0"),e.version){case"32.1.0":e=bS(e)}return e.version=G,e}function bS(e){return e.cellSelection=SS(e,"rangeSelection"),e}function SS(e,t){if(e&&typeof e=="object")return e[t]}var yS=class extends x{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=ge(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=ge(this,()=>{this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())},0),this.onRowSelectedDebounced=ge(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){this.isClientSideRowModel=oe(this.gos);const e=La(this.gos.get("initialState")??{}),t=e.partialColumnState;delete e.partialColumnState,this.cachedState=e;const o=this.suppressEventsAndDispatchInitEvent.bind(this);this.beans.ctrlsSvc.whenReady(this,()=>o(()=>this.setupStateOnGridReady(e)));const[i,s,n]=this.addManagedEventListeners({newColumnsLoaded:({source:r})=>{r==="gridInitializing"&&(i(),o(()=>this.setupStateOnColumnsInitialised(e,!!t)))},rowCountReady:()=>{s==null||s(),o(()=>this.setupStateOnRowCountReady(e))},firstDataRendered:()=>{n==null||n(),o(()=>this.setupStateOnFirstDataRendered(e))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const o=La(e);delete o.partialColumnState,this.cachedState=o,this.startSuppressEvents();const i="api",s=t?new Set(t):void 0;this.setGridReadyState(o,i,s),this.setColumnsInitialisedState(o,i,!1,s),this.setRowCountState(o,i,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(o,i,s),this.stopSuppressEvents(i)})}setGridReadyState(e,t,o){var i,s;t==="api"&&!(o!=null&&o.has("sideBar"))&&((s=(i=this.beans.sideBar)==null?void 0:i.comp)==null||s.setState(e.sideBar)),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,o,i){this.setColumnState(e,t,o,i),this.setColumnGroupState(e,t,i),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const o=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:o("aggregation"),columnMoved:o("columnOrder"),columnPinned:o("columnPinning"),columnResized:o("columnSizing"),columnVisible:o("columnVisibility"),columnPivotChanged:o("pivot"),columnPivotModeChanged:o("pivot"),columnRowGroupChanged:o("rowGroup"),sortChanged:o("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,o){const{filter:i,rowGroupExpansion:s,rowSelection:n,pagination:r}=e,l=(d,c)=>!(o!=null&&o.has(d))&&(c||t==="api");l("filter",i)&&this.setFilterState(i),l("rowGroupExpansion",s)&&this.setRowGroupExpansionState(s,t),l("rowSelection",n)&&this.setRowSelectionState(n,t),l("pagination",r)&&this.setPaginationState(r,t);const a=this.updateCachedState.bind(this);a("filter",this.getFilterState()),a("rowGroupExpansion",this.getRowGroupExpansionState()),a("rowSelection",this.getRowSelectionState()),a("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),o=()=>{this.updateRowGroupExpansionStateTimer=0,t("rowGroupExpansion",this.getRowGroupExpansionState())},i=()=>t("filter",this.getFilterState()),{gos:s,colFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:i,rowGroupOpened:()=>this.onRowGroupOpenedDebounced(),expandOrCollapseAll:o,columnRowGroupChanged:o,rowDataUpdated:()=>{(s.get("groupDefaultExpanded")!==0||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(o)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:r=>{(r.newPage||r.newPageSize)&&t("pagination",this.getPaginationState())}}),n&&this.addManagedListeners(n,{filterStateChanged:i})}setFirstDataRenderedState(e,t,o){const{scroll:i,cellSelection:s,focusedCell:n,columnOrder:r,rowPinning:l}=e,a=(u,h)=>!(o!=null&&o.has(u))&&(h||t==="api");a("focusedCell",n)&&this.setFocusedCellState(n),a("cellSelection",s)&&this.setCellSelectionState(s),a("scroll",i)&&this.setScrollState(i),a("rowPinning",l)&&this.setRowPinningState(l),this.setColumnPivotState(!!(r!=null&&r.orderedColIds),t);const d=this.updateCachedState.bind(this);d("sideBar",this.getSideBarState()),d("focusedCell",this.getFocusedCellState());const c=this.getRangeSelectionState();d("rangeSelection",c),d("cellSelection",c),d("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this);this.addManagedEventListeners({cellFocused:()=>t("focusedCell",this.getFocusedCellState()),cellSelectionChanged:o=>{if(o.finished){const i=this.getRangeSelectionState();t("rangeSelection",i),t("cellSelection",i)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return Bv(Uo(e),e.colModel.isPivotMode())}setColumnState(e,t,o,i){const{sort:s,rowGroup:n,aggregation:r,pivot:l,columnPinning:a,columnVisibility:d,columnSizing:c,columnOrder:u}=e,h=(P,T)=>!(i!=null&&i.has(P))&&(T||t==="api"),g={},p=P=>{let T=g[P];return T||(T={colId:P},g[P]=T,T)},f={},C=h("sort",s);C&&(s==null||s.sortModel.forEach(({colId:P,sort:T},V)=>{const B=p(P);B.sort=T,B.sortIndex=V})),(C||!o)&&(f.sort=null,f.sortIndex=null);const m=h("rowGroup",n);m&&(n==null||n.groupColIds.forEach((P,T)=>{const V=p(P);V.rowGroup=!0,V.rowGroupIndex=T})),(m||!o)&&(f.rowGroup=null,f.rowGroupIndex=null);const w=h("aggregation",r);w&&(r==null||r.aggregationModel.forEach(({colId:P,aggFunc:T})=>{p(P).aggFunc=T})),(w||!o)&&(f.aggFunc=null);const b=h("pivot",l);b&&(l==null||l.pivotColIds.forEach((P,T)=>{const V=p(P);V.pivot=!0,V.pivotIndex=T}),this.gos.updateGridOptions({options:{pivotMode:!!(l!=null&&l.pivotMode)},source:t})),(b||!o)&&(f.pivot=null,f.pivotIndex=null);const v=h("columnPinning",a);v&&(a==null||a.leftColIds.forEach(P=>{p(P).pinned="left"}),a==null||a.rightColIds.forEach(P=>{p(P).pinned="right"})),(v||!o)&&(f.pinned=null);const S=h("columnVisibility",d);S&&(d==null||d.hiddenColIds.forEach(P=>{p(P).hide=!0})),(S||!o)&&(f.hide=null);const D=h("columnSizing",c);D&&(c==null||c.columnSizingModel.forEach(({colId:P,flex:T,width:V})=>{const B=p(P);B.flex=T??null,B.width=V})),(D||!o)&&(f.flex=null);const I=u==null?void 0:u.orderedColIds,O=!!(I!=null&&I.length)&&!(i!=null&&i.has("columnOrder")),F=O?I.map(P=>p(P)):Object.values(g);F.length&&(this.columnStates=F,ve(this.beans,{state:F,applyOrder:O,defaultState:f},t))}setColumnPivotState(e,t){const o=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:n,colGroupSvc:r}=s;if(n!=null&&n.isPivotResultColsPresent()){if(o){const l=[];for(const a of o)n.getPivotResultCol(a.colId)&&l.push(a);ve(s,{state:l,applyOrder:e},t)}i&&(r==null||r.setColumnGroupState(i,t))}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return Vv(t)}setColumnGroupState(e,t,o){var l;const i=this.beans.colGroupSvc;if(!i||o!=null&&o.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const s=new Set((l=e.columnGroup)==null?void 0:l.openColumnGroupIds),r=i.getColumnGroupState().map(({groupId:a})=>{const d=s.has(a);return d&&s.delete(a),{groupId:a,open:d}});s.forEach(a=>{r.push({groupId:a,open:!0})}),r.length&&(this.columnGroupStates=r),i.setColumnGroupState(r,t)}getFilterState(){const e=this.beans.filterManager;let t=e==null?void 0:e.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const o=e==null?void 0:e.getFilterState(),i=(e==null?void 0:e.getAdvFilterModel())??void 0;return t||i||o?{filterModel:t,columnFilterState:o,advancedFilterModel:i}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:o,columnFilterState:i,advancedFilterModel:s}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(o!==void 0||i!==void 0)&&(t==null||t.setFilterState(o??null,i??null,"columnFilter")),s!==void 0&&(t==null||t.setAdvFilterModel(s??null,"advancedFilter"))}getRangeSelectionState(){var t;const e=(t=this.beans.rangeSvc)==null?void 0:t.getCellRanges().map(o=>{const{id:i,type:s,startRow:n,endRow:r,columns:l,startColumn:a}=o;return{id:i,type:s,startRow:n,endRow:r,colIds:l.map(d=>d.getColId()),startColId:a.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:o,colModel:i,visibleCols:s}=this.beans;if(!Je(t)||!o)return;const n=[];e==null||e.cellRanges.forEach(r=>{const l=[];if(r.colIds.forEach(d=>{const c=i.getCol(d);c&&l.push(c)}),!l.length)return;let a=i.getCol(r.startColId);if(!a){const d=s.allCols,c=new Set(l);a=d.find(u=>c.has(u))}n.push({...r,columns:l,startColumn:a})}),o.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=(e==null?void 0:e.getHScrollPosition())??{left:0},{top:o}=(e==null?void 0:e.getVScrollPosition())??{top:0};return o||t?{top:o,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:o}=e??{top:0,left:0},{frameworkOverrides:i,rowRenderer:s,animationFrameSvc:n,ctrlsSvc:r}=this.beans;i.wrapIncoming(()=>{var l;r.get("center").setCenterViewportScrollLeft(o),(l=r.getScrollFeature())==null||l.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),n==null||n.flushAllFrames()})}getSideBarState(){var e,t;return(t=(e=this.beans.sideBar)==null?void 0:e.comp)==null?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:o,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:o,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:o}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:i,rowIndex:s,rowPinned:n}=e;t.setFocusedCell({column:o.getCol(i),rowIndex:s,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const o=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!o&&!i))return{page:o,pageSize:i}}setPaginationState(e,t){const{pagination:o,gos:i}=this.beans;if(!o)return;const{pageSize:s,page:n}=e??{page:0,pageSize:i.get("paginationPageSize")},r=t==="gridInitializing";s&&!i.get("paginationAutoPageSize")&&o.setPageSize(s,r?"initialState":"pageSizeSelector"),typeof n=="number"&&(r?o.setPage(n):o.goToPage(n))}getRowSelectionState(){var i;const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((i=t==null?void 0:t.toggledNodes)!=null&&i.length)?void 0:t}setRowSelectionState(e,t){var o;(o=this.beans.selectionSvc)==null||o.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e,rowModel:t}=this.beans;if(!e)return;const o=[];return t.forEachNode(({expanded:i,id:s})=>{i&&s&&o.push(s)}),o.length?{expandedRowGroupIds:o}:void 0}getRowPinningState(){var e;return(e=this.beans.pinnedRowModel)==null?void 0:e.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t==null||t.setPinnedState(e):t==null||t.reset()}setRowGroupExpansionState(e,t){var n;const o=this.beans.expansionSvc;if(!o)return;const i=(e==null?void 0:e.expandedRowGroupIds)??[];let s;if(t==="api"){const r=(n=this.getRowGroupExpansionState())==null?void 0:n.expandedRowGroupIds;if(r!=null&&r.length){const l=new Set(r);for(const a of i)l.delete(a);s=Array.from(l)}}o.expandRows(i,s)}updateColumnState(e){const t=this.getColumnState();let o=!1;const i=this.cachedState;for(const s of Object.keys(t)){const n=t[s];bn(n,i[s])||(o=!0)}this.cachedState={...i,...t},o&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const o=this.cachedState[e];this.setCachedStateValue(e,t),bn(t,o)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;e.forEach(t=>{switch(t){case"rowSelection":this.setCachedStateValue(t,this.getRowSelectionState());break}}),e.clear()}dispatchStateUpdateEvent(e){this.suppressEvents||(e.forEach(t=>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(){var e;this.suppressEvents=!0,(e=this.beans.colAnimation)==null||e.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{var t;this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&((t=this.beans.colAnimation)==null||t.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},RS={moduleName:"GridState",version:G,beans:[yS],apiFunctions:{getState:wS,setState:vS}};function ES(e,t={}){const o=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(o))}function Ga(e,t,o,i,s){t&&(i&&t.parent&&t.parent.level!==-1&&Ga(e,t.parent,o,i,s),t.setExpanded(o,void 0,s))}function xS(e,t){return e.rowModel.getRowNode(t)}function DS(e,t,o,i){e.rowRenderer.addRenderedRowListener(t,o,i)}function FS(e){return e.rowRenderer.getRenderedNodes()}function PS(e,t,o){e.rowModel.forEachNode(t,o)}function TS(e){return e.rowRenderer.firstRenderedRow}function IS(e){return e.rowRenderer.lastRenderedRow}function AS(e,t){return e.rowModel.getRow(t)}function MS(e){return e.rowModel.getRowCount()}var Ha={moduleName:"RowApi",version:G,apiFunctions:{redrawRows:ES,setRowNodeExpanded:Ga,getRowNode:xS,addRenderedRowListener:DS,getRenderedNodes:FS,forEachNode:PS,getFirstDisplayedRowIndex:TS,getLastDisplayedRowIndex:IS,getDisplayedRowAtIndex:AS,getDisplayedRowCount:MS}},kS={moduleName:"ScrollApi",version:G,apiFunctions:{getVerticalPixelRange:Fb,getHorizontalPixelRange:Pb,ensureColumnVisible:Fa,ensureIndexVisible:Pa,ensureNodeVisible:Tb}};function LS(e,t,o){if(!t)return;const i=e.ctrlsSvc.getGridBodyCtrl().eGridBody,s=`aria-${t}`;o===null?i.removeAttribute(s):i.setAttribute(s,o)}function GS(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function HS(e){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getHeaderRowContainerCtrls().forEach(t=>t.refresh()))}function OS(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function BS(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function VS(e){return{rowHeight:is(e),headerHeight:lo(e)}}function NS(e,t={}){var n;const o=[];if(e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(r=>{const l=r.getCellRenderer();l!=null&&o.push(ds(l))}),(n=t.columns)!=null&&n.length)return o;const i=[],s=nn(t.rowNodes);return e.rowRenderer.getAllRowCtrls().forEach(r=>{if(s&&!rn(r.rowNode,s)||!r.isFullWidth())return;const l=r.getFullWidthCellRenderers();for(let a=0;a<l.length;a++){const d=l[a];d!=null&&i.push(ds(d))}}),[...i,...o]}var _S={moduleName:"RenderApi",version:G,apiFunctions:{setGridAriaProperty:LS,refreshCells:GS,refreshHeader:HS,isAnimationFrameQueueEmpty:OS,flushAllAnimationFrames:BS,getSizesForCurrentTheme:VS,getCellRendererInstances:NS}};function WS(e,t){var o,i;typeof t=="number"?(o=e.colAutosize)==null||o.sizeColumnsToFit(t,"api"):(i=e.colAutosize)==null||i.sizeColumnsToFitGridBody(t)}function Oa({colAutosize:e,visibleCols:t},o,i){Array.isArray(o)?e==null||e.autoSizeCols({colKeys:o,skipHeader:i,source:"api"}):e==null||e.autoSizeCols({colKeys:o.colIds??t.allCols,skipHeader:o.skipHeader,defaultMaxWidth:o.defaultMaxWidth,defaultMinWidth:o.defaultMinWidth,columnLimits:o.columnLimits,source:"api"})}function zS(e,t){var o;t&&typeof t=="object"?Oa(e,t):(o=e.colAutosize)==null||o.autoSizeAllColumns({source:"api",skipHeader:t})}var $S=class extends x{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}autoSizeCols(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeCols(e));return}const{colKeys:t,skipHeader:o,skipHeaderGroups:i,stopAtGroup:s,defaultMaxWidth:n,defaultMinWidth:r,columnLimits:l=[],source:a="api"}=e,{animationFrameSvc:d,renderStatus:c,colModel:u,autoWidthCalc:h,visibleCols:g}=this.beans;if(d==null||d.flushAllFrames(),this.timesDelayed<5&&c&&!c.areHeaderCellsRendered()){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.autoSizeCols(e)});return}this.timesDelayed=0;const p=[];let f=-1;const C=Object.fromEntries(l.map(({colId:b,maxWidth:v,minWidth:S})=>[b,{maxWidth:v,minWidth:S}])),m=o??this.gos.get("skipHeaderOnAutoSize"),w=i??m;for(;f!==0;){f=0;const b=[];t.forEach(v=>{if(!v||Nc(v))return;const S=u.getCol(v);if(!S||p.indexOf(S)>=0)return;const D=h.getPreferredWidthForColumn(S,m);if(D>0){const I=C[S.colId]??{};I.minWidth??(I.minWidth=r),I.maxWidth??(I.maxWidth=n);const O=US(S,D,I);S.setActualWidth(O,a),p.push(S),f++}b.push(S)}),b.length&&g.refresh(a)}w||this.autoSizeColumnGroupsByColumns(t,a,s),yt(this.eventSvc,p,!0,"autosizeColumns")}autoSizeColumn(e,t,o){e&&this.autoSizeCols({colKeys:[e],skipHeader:o,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,o){const{colModel:i,ctrlsSvc:s}=this.beans,n=new Set;i.getColsForKeys(e).forEach(d=>{let c=d.getParent();for(;c&&c!=o;)c.isPadding()||n.add(c),c=c.getParent()});let l;const a=[];for(const d of n){for(const c of s.getHeaderRowContainerCtrls())if(l=c.getHeaderCtrlForColumn(d),l)break;l&&l.resizeLeafColumnsToFit(t)}return a}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}const t=this.beans.visibleCols.allCols;this.autoSizeCols({colKeys:t,...e})}addColumnAutosize(e,t){const o=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.autoSizeColumn(t,"uiColumnResized",o)};e.addEventListener("dblclick",i);const s=new lt(e);return s.addEventListener("doubleTap",i),()=>{e.removeEventListener("dblclick",i),s.removeEventListener("doubleTap",i),s.destroy()}}addColumnGroupResize(e,t,o){const i=this.gos.get("skipHeaderOnAutoSize"),s=()=>{const n=[];t.getDisplayedLeafColumns().forEach(l=>{l.getColDef().suppressAutoSize||n.push(l.getColId())}),n.length>0&&this.autoSizeCols({colKeys:n,skipHeader:i,stopAtGroup:t,source:"uiColumnResized"}),o()};return e.addEventListener("dblclick",s),()=>e.removeEventListener("dblclick",s)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const{ctrlsSvc:o,scrollVisibleSvc:i}=this.beans,s=o.getGridBodyCtrl(),r=s.isVerticalScrollShowing()?i.getScrollbarWidth():0,a=Ut(s.eGridBody)-r;if(a>0){this.sizeColumnsToFit(a,"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):k(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",o,i){var g;if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,o,i));return}const s={};i&&((g=i==null?void 0:i.columnLimits)==null||g.forEach(({key:p,...f})=>{s[typeof p=="string"?p:p.getColId()]=f}));const n=this.beans.visibleCols.allCols;if(e<=0||!n.length||e===Le(n)&&n.every(f=>{if(f.colDef.suppressSizeToFit)return!0;const C=s==null?void 0:s[f.getId()],m=(C==null?void 0:C.minWidth)??(i==null?void 0:i.defaultMinWidth),w=(C==null?void 0:C.maxWidth)??(i==null?void 0:i.defaultMaxWidth),b=f.getActualWidth();return(m==null||b>=m)&&(w==null||b<=w)}))return;const l=[],a=[];n.forEach(p=>{p.getColDef().suppressSizeToFit===!0?a.push(p):l.push(p)});const d=l.slice(0);let c=!1;const u=p=>{we(l,p),a.push(p)};for(l.forEach(p=>{p.resetActualWidth(t);const f=s==null?void 0:s[p.getId()],C=(f==null?void 0:f.minWidth)??(i==null?void 0:i.defaultMinWidth),m=(f==null?void 0:f.maxWidth)??(i==null?void 0:i.defaultMaxWidth),w=p.getActualWidth();typeof C=="number"&&w<C?p.setActualWidth(C,t,!0):typeof m=="number"&&w>m&&p.setActualWidth(m,t,!0)});!c;){c=!0;const p=e-Le(a);if(p<=0)l.forEach(f=>{var m;const C=((m=s==null?void 0:s[f.getId()])==null?void 0:m.minWidth)??(i==null?void 0:i.defaultMinWidth);if(typeof C=="number"){f.setActualWidth(C,t,!0);return}f.setActualWidth(f.minWidth,t)});else{const f=p/Le(l);let C=p;for(let m=l.length-1;m>=0;m--){const w=l[m],b=s==null?void 0:s[w.getId()],v=(b==null?void 0:b.minWidth)??(i==null?void 0:i.defaultMinWidth),S=(b==null?void 0:b.maxWidth)??(i==null?void 0:i.defaultMaxWidth),D=w.getMinWidth(),I=w.getMaxWidth(),O=typeof v=="number"&&v>D?v:D,F=typeof S=="number"&&S<I?S:I;let P=Math.round(w.getActualWidth()*f);P<O?(P=O,u(w),c=!1):P>F?(P=F,u(w),c=!1):m===0&&(P=C),w.setActualWidth(P,t,!0),C-=P}}}d.forEach(p=>{p.fireColumnWidthChangedEvent(t)});const h=this.beans.visibleCols;h.setLeftValues(t),h.updateBodyWidths(),!o&&yt(this.eventSvc,d,!0,t)}applyAutosizeStrategy(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout(()=>{if(t==="fitGridWidth"){const{columnLimits:o,defaultMinWidth:i,defaultMaxWidth:s}=e,n=o==null?void 0:o.map(({colId:r,minWidth:l,maxWidth:a})=>({key:r,minWidth:l,maxWidth:a}));this.sizeColumnsToFitGridBody({defaultMinWidth:i,defaultMaxWidth:s,columnLimits:n})}else t==="fitProvidedWidth"&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if((e==null?void 0:e.type)!=="fitCellContents")return;const{colIds:t,skipHeader:o,defaultMaxWidth:i,defaultMinWidth:s,columnLimits:n}=e;setTimeout(()=>{const r={skipHeader:o,source:"autosizeColumns",defaultMaxWidth:i,defaultMinWidth:s,columnLimits:n};t?this.autoSizeCols({colKeys:t,...r}):this.autoSizeAllColumns(r)})}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function US(e,t,o={}){const i=o.minWidth??e.getMinWidth();t<i&&(t=i);const s=o.maxWidth??e.getMaxWidth();return t>s&&(t=s),t}var KS={moduleName:"ColumnAutoSize",version:G,beans:[$S],apiFunctions:{sizeColumnsToFit:WS,autoSizeColumns:Oa,autoSizeAllColumns:zS},dependsOn:[Ol]},jS=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function qS(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function YS(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function ZS(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedTopRow(t)}function QS(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedBottomRow(t)}function XS(e,t,o){var i;return(i=e.pinnedRowModel)==null?void 0:i.forEachPinnedRow(t,o)}var JS={moduleName:"PinnedRow",version:G,beans:[lp],css:[jS],apiFunctions:{getPinnedTopRowCount:qS,getPinnedBottomRowCount:YS,getPinnedTopRow:ZS,getPinnedBottomRow:QS,forEachPinnedRow:XS},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},ey=class extends Pt{constructor(e,t,o){super(e.col,e.firstNode,o,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,o,i,s,n,r){this.eWrapper=o,super.setComp(e,t,o,i,s,n,r),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){this.rowNode.rowIndex!=null&&xo(this.eGui,this.rowNode.rowIndex)}setAriaRowSpan(){Kd(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(ii(t)){this.focusedCellPosition=void 0;return}const o=this.isCellFocused();o||(this.focusedCellPosition=void 0),e&&o&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},ty=class extends ai{onRowIndexChanged(){super.onRowIndexChanged(),this.getAllCellCtrls().forEach(e=>e.refreshAriaRowIndex())}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){var i;const t=(i=this.beans.rowSpanSvc)==null?void 0:i.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new ey(t,this,this.beans)}isCorrectCtrlForSpan(e){var i;const t=(i=this.beans.rowSpanSvc)==null?void 0:i.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},oy=class extends x{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,o=`${e}Ctrls`,i=this[o],s=i.size,n=this.getAllRelevantRowControls(e),r=new Map;let l=!1;for(const d of n)d.isAlive()&&(t==null||t.forEachSpannedColumn(d.rowNode,(c,u)=>{if(r.has(u.firstNode))return;const h=i.get(u.firstNode);if(h){r.set(u.firstNode,h),i.delete(u.firstNode);return}l=!0;const g=new ty(u.firstNode,this.beans,!1,!1,!1);r.set(u.firstNode,g)}));this[o]=r;const a=r.size===s;if(!(!l&&a)){for(const d of i.values())d.destroyFirstPass(!0),d.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,o=t==null?void 0:t.getCellSpanByPosition(e);if(!o)return;const i=`${Ba(e.rowPinned)}Ctrls`,s=this[i].get(o.firstNode);if(s)return s.getAllCellCtrls().find(n=>n.column===e.column)}getCtrls(e){const t=`${e}Ctrls`;return[...this[t].values()]}destroyRowCtrls(e){const t=`${e}Ctrls`;for(const o of this[t].values())o.destroyFirstPass(!0),o.destroySecondPass();this[t]=new Map}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},Ba=e=>e??"center",iy=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(){var o;const e=(o=this.firstNode.__autoHeights)==null?void 0:o[this.col.getColId()];if(e==null)return;let t=0;return this.spannedNodes.forEach(i=>{i!==this.lastNode&&(t+=i.rowHeight)}),e-t}},sy=class extends x{constructor(e){super(),this.column=e}buildCache(e){var b;const{column:t,beans:{gos:o,pinnedRowModel:i,rowModel:s,valueSvc:n,pagination:r}}=this,{colDef:l}=t,a=this[`${e}ValueNodeMap`],d=new Map,c=o.getCallback("isFullWidthRow"),u=l.equals,h=l.spanRows,g=typeof h=="function";let p=null,f=null,C;const m=(v,S)=>{p=v,f=null,C=S},w=v=>{const S=!v.isExpandable()&&!v.group&&!v.detail&&(c?!c({rowNode:v}):!0);if(v.rowIndex==null||!S){m(null,null);return}if(p==null||v.level!==p.level||v.footer||f&&v.rowIndex-1!==(f==null?void 0:f.getLastNode().rowIndex)){m(v,n.getValue(t,v));return}const D=n.getValue(t,v);if(g){const I=_(o,{valueA:C,nodeA:p,valueB:D,nodeB:v,column:t,colDef:l});if(!h(I)){m(v,D);return}}else if(u?!u(C,D):C!==D){m(v,D);return}if(!f){const I=a==null?void 0:a.get(p);(I==null?void 0:I.firstNode)===p?(I.reset(),f=I):f=new iy(t,p),d.set(p,f)}f.addSpannedNode(v),d.set(v,f)};switch(e){case"center":(b=s.forEachDisplayedNode)==null||b.call(s,v=>{(!r||r.isRowInPage(v.rowIndex))&&w(v)});break;case"top":i==null||i.forEachPinnedRow("top",w);break;case"bottom":i==null||i.forEachPinnedRow("bottom",w);break}this[`${e}ValueNodeMap`]=d}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this[`${Ba(e.rowPinned)}ValueNodeMap`].get(e)}},ny=class extends x{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=ge(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=ge(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const o=this.createManagedBean(new sy(e));this.spanningColumns.set(e,o),o.buildCache("top"),o.buildCache("bottom"),o.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t==null||t.createCtrls("top"),t==null||t.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t==null||t.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const o=this.spanningColumns.get(e);return o?o.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:o}=this.beans,i=e.column,s=e.rowIndex,n=this.spanningColumns.get(i);if(!n)return;let r;switch(e.rowPinned){case"top":r=t==null?void 0:t.getPinnedTopRow(s);break;case"bottom":r=t==null?void 0:t.getPinnedBottomRow(s);break;default:r=o.getRow(s)}if(r)return n.getCellSpan(r)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const o=this.spanningColumns.get(e);if(o)return o.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[o,i]of this.spanningColumns)if(i.isCellSpanning(e)){const s=i.getCellSpan(e);t(o,s)}}destroy(){super.destroy(),this.spanningColumns.clear()}},ry={moduleName:"CellSpan",version:G,beans:[ny,oy]},ly=class extends x{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,o=e.colDef,i=o.cellClassRules,s=this.getCellClassParams(e,o);Es(this.beans.expressionSvc,i===this.cellClassRules?void 0:this.cellClassRules,i,s,n=>t.toggleCss(n,!0),n=>t.toggleCss(n,!1)),this.cellClassRules=i}applyUserStyles(){const e=this.column,t=e.colDef,o=t.cellStyle;if(!o)return;let i;if(typeof o=="function"){const s=this.getCellClassParams(e,t);i=o(s)}else i=o;i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,o=e.colDef,i=this.getCellClassParams(e,o);this.staticClasses.forEach(n=>t.toggleCss(n,!1));const s=this.beans.cellStyles.getStaticCellClasses(o,i);this.staticClasses=s,s.forEach(n=>t.toggleCss(n,!0))}getCellClassParams(e,t){const{value:o,rowNode:i}=this.cellCtrl;return _(this.beans.gos,{value:o,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},ay=class extends x{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,o,i){Es(this.beans.expressionSvc,void 0,e.cellClassRules,t,o,i),this.processStaticCellClasses(e,t,o)}getStaticCellClasses(e,t){const{cellClass:o}=e;if(!o)return[];let i;return typeof o=="function"?i=o(t):i=o,typeof i=="string"&&(i=[i]),i||[]}createCellCustomStyleFeature(e,t){return new ly(e,t)}processStaticCellClasses(e,t,o){this.getStaticCellClasses(e,t).forEach(s=>{o(s)})}},dy={moduleName:"CellStyle",version:G,beans:[ay]},cy={moduleName:"RowStyle",version:G,beans:[jh]};function uy(e,t){var o;return!!((o=e.colHover)!=null&&o.isHovered(t))}var hy=class extends x{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=o=>{const{beans:i,gos:s,element:n,columns:r}=this,l=i.colHover;o??!!s.get("columnHoverHighlight")?this.destroyManagedListeners=this.addManagedElementListeners(n,{mouseover:l.setMouseOver.bind(l,r),mouseout:l.clearMouseOver.bind(l)}):(this.destroyManagedListeners.forEach(d=>d()),this.destroyManagedListeners=[])}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},gy="ag-column-hover",py=class extends x{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,o){const i=()=>{const s=this.isHovered(o);t.toggleCss("ag-column-hover",s)};e.addManagedEventListeners({columnHoverChanged:i}),i()}onCellColumnHover(e,t){if(!t)return;const o=this.isHovered(e);t.toggleCss(gy,o)}addHeaderFilterColumnHoverListener(e,t,o,i){this.createHoverFeature(e,[o],i);const s=()=>{const n=this.isHovered(o);t.toggleCss("ag-column-hover",n)};e.addManagedEventListeners({columnHoverChanged:s}),s()}createHoverFeature(e,t,o){e.createManagedBean(new hy(t,o))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},fy={moduleName:"ColumnHover",version:G,beans:[py],apiFunctions:{isColumnHovered:uy}},Cy=class extends x{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){var e,t;this.wrapSvc=(t=(e=this.beans.frameworkOverrides).createGlobalEventListenerWrapper)==null?void 0:t.call(e)}addEventListener(e,t){var n;const o=((n=this.wrapSvc)==null?void 0:n.wrap(e,t))??t,i=!ho.has(e),s=i?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(o),this.eventSvc.addEventListener(e,o,i)}removeEventListener(e,t){var n,r;const o=((n=this.wrapSvc)==null?void 0:n.unwrap(e,t))??t,i=this.asyncListeners.get(e),s=!!(i!=null&&i.delete(o));s||(r=this.syncListeners.get(e))==null||r.delete(o),this.eventSvc.removeEventListener(e,o,s)}addGlobalListener(e){var n;const t=((n=this.wrapSvc)==null?void 0:n.wrapGlobal(e))??e,o=(r,l)=>{ho.has(r)&&t(r,l)},i=(r,l)=>{ho.has(r)||t(r,l)};this.globalListenerPairs.set(e,{syncListener:o,asyncListener:i});const s=this.eventSvc;s.addGlobalListener(o,!1),s.addGlobalListener(i,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:o,globalListenerPairs:i}=this,s=(o==null?void 0:o.unwrapGlobal(e))??e;if(i.has(s)){const{syncListener:r,asyncListener:l}=i.get(s);t.removeGlobalListener(r,!1),t.removeGlobalListener(l,!0),i.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((o,i)=>{o.forEach(s=>this.eventSvc.removeEventListener(i,s,t)),o.clear()}),e.clear()}destroyGlobalListeners(e,t){e.forEach(o=>this.eventSvc.removeGlobalListener(o,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:o,asyncListener:i})=>{t.removeGlobalListener(o,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function my(e,t,o){var i;(i=e.apiEventSvc)==null||i.addEventListener(t,o)}function wy(e,t,o){var i;(i=e.apiEventSvc)==null||i.removeEventListener(t,o)}function vy(e,t){var o;(o=e.apiEventSvc)==null||o.addGlobalListener(t)}function by(e,t){var o;(o=e.apiEventSvc)==null||o.removeGlobalListener(t)}var Sy={moduleName:"EventApi",version:G,apiFunctions:{addEventListener:my,addGlobalListener:vy,removeEventListener:wy,removeGlobalListener:by},beans:[Cy]},yy={moduleName:"Locale",version:G,beans:[Ov]},Ry=class extends x{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=ge(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){var l,a,d,c;const{visibleCols:e,rowModel:t,rowSpanSvc:o,pinnedRowModel:i}=this.beans,s=e.autoHeightCols;let n=!1;const r=u=>{var p;const h=u.__autoHeights;let g=_e(this.beans,u).height;for(const f of s){let C=h==null?void 0:h[f.getColId()];const m=o==null?void 0:o.getCellSpan(f,u);if(m){if(m.getLastNode()!==u)continue;if(C=(p=o==null?void 0:o.getCellSpan(f,u))==null?void 0:p.getLastNodeAutoHeight(),!C)return}if(C==null){if(this.colSpanSkipCell(f,u))continue;return}g=Math.max(C,g)}g!==u.rowHeight&&(u.setRowHeight(g),n=!0)};(l=i==null?void 0:i.forEachPinnedRow)==null||l.call(i,"top",r),(a=i==null?void 0:i.forEachPinnedRow)==null||a.call(i,"bottom",r),(d=t.forEachDisplayedNode)==null||d.call(t,r),n&&((c=t.onRowHeightChanged)==null||c.call(t))}setRowAutoHeight(e,t,o){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[o.getId()];return}const i=e.__autoHeights[o.getId()];e.__autoHeights[o.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:o,colViewport:i,visibleCols:s}=this.beans;if(!o.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=s.getLeftColsForRow(t);break;case"right":n=s.getRightColsForRow(t);break;case null:n=i.getColsWithinViewport(t);break}return!n.includes(e)}setupCellAutoHeight(e,t,o){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const i=t.parentElement,{rowNode:s,column:n}=e,r=this.beans,l=c=>{var w;if((w=this.beans.editSvc)!=null&&w.isEditing(e)||!e.isAlive()||!o.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:g,borderTopWidth:p}=Ye(i),f=u+h+g+p,m=t.offsetHeight+f;if(c<5){const b=J(r),v=!b||!b.contains(t),S=m==0;if(v||S){window.setTimeout(()=>l(c+1),0);return}}this.setRowAutoHeight(s,m,n)},a=()=>l(0);a();const d=Ze(r,t,a);return o.addDestroyFunc(()=>{d(),this.setRowAutoHeight(s,void 0,n)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:o}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(o).filter(s=>s.isAutoHeight())),t.length!==0){if(!o.__autoHeights)return!1;for(const i of t){const s=o.__autoHeights[i.getColId()];if(!s||o.rowHeight<s)return!1}}return!0}},Ey={moduleName:"RowAutoHeight",version:G,beans:[Ry]};const ct=Symbol("grid-context"),un=e=>{const t=e.getColumnState().filter(i=>i.sort!=null),o={};return t.forEach((i,s)=>o[i.colId]=s),t.sort((i,s)=>{const n=i.sortIndex,r=s.sortIndex;if(n!=null&&r!=null)return n-r;if(n==null&&r==null){const l=o[i.colId],a=o[s.colId];return l>a?1:-1}else return r==null?-1:1}),t},Va=e=>{const t=un(e),o=new Map;return t.forEach((i,s)=>{o.set(i.colId,s)}),o},Na=(e,t)=>Va(e).get(t)??-1,xy=e=>!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function";class _a{constructor(t,o){R(this,"loading",!1);R(this,"dataGetter");R(this,"cache");R(this,"_api");R(this,"loadingDelay");R(this,"getSorts",()=>un(this.api).map(t=>({colId:t.colId,sort:t.sort})));this.dataGetter=t,this.cache=o}set api(t){this._api=t}get api(){return this._api}destroy(){this.loading=!1}loadData(){const t=this.cache.getRows().map((o,i)=>(o.__setIndex(i),o)).flatMap(o=>o.flat());this.api.setGridOption("rowData",t),this.api.redrawRows(),this.loading=!1}getRows(t){var o,i,s,n,r,l,a,d;if(this.loading||!this._api){(i=(o=t.context)==null?void 0:o.resolve)==null||i.call(o);return}if(this.cache.isFinished&&t.pageNum!==1){(n=(s=t.context)==null?void 0:s.resolve)==null||n.call(s);return}if(this.loading=!0,H.isFunction(this.dataGetter)){const c=this.dataGetter({startRow:t.startRow,endRow:t.endRow,pageNum:t.pageNum,pageSize:t.pageSize,params:t.filterModel,sorts:this.getSorts()});xy(c)&&(this.loadingDelay=setTimeout(()=>{this.api.setGridOption("loading",!0)},500),c.then(u=>{var h,g;t.successCallback(u,u.length),(g=(h=t.context)==null?void 0:h.resolve)==null||g.call(h)}).catch(u=>{var h,g;t.failCallback(),(g=(h=t.context)==null?void 0:h.reject)==null||g.call(h,u)}).finally(()=>{clearTimeout(this.loadingDelay),this.api.setGridOption("loading",!1),this.loadData()})),H.isArray(c)&&(t.successCallback(c,c.length),this.loadData(),(l=(r=t.context)==null?void 0:r.resolve)==null||l.call(r))}else t.successCallback(this.dataGetter,this.dataGetter.length),this.loadData(),(d=(a=t.context)==null?void 0:a.resolve)==null||d.call(a)}}class hn{constructor(t,o,i){R(this,"spanMatrix");R(this,"rootId");R(this,"rowIdToNestingIdx");this.spanMatrix=o,this.rootId=i,this.rowIdToNestingIdx=new Map;for(let s=0;s<t.length;s++)this.rowIdToNestingIdx.set(t[s].id,s)}get(t,o){const i=o.getColId(),s=this.rowIdToNestingIdx.get(t);return s===void 0?0:this.spanMatrix.getCellSpan(this.rootId,s,i)}set(t,o,i){}}class Ot{constructor(t,o,i=[]){R(this,"actualRow");R(this,"id");R(this,"nestingIndexes");this.actualRow=o,this.id=t,this.nestingIndexes=i}delete(){this.actualRow.delete()}redraw(){this.actualRow.redraw()}getActualRow(){return this.actualRow}isCellEditing(t){return this.actualRow.isCellEditing(this.id,t)}startEditing(t){t!==null&&this.actualRow.isEditing()&&(this.actualRow=this.actualRow.stopEditing(!0)),this.actualRow.isEditing(t)||(t==null?this.actualRow.startEditing(!0):this.actualRow.startEditingCell(this.id,t,!0))}getDataIndex(){return this.actualRow.getDataIndex()}getRowSpans(){return this.actualRow.getRowSpans()}isEditing(){return this.actualRow.isEditing()}getValue(t){var o;return(o=this.actualRow.getCell(t,this.getNestingIndexes()))==null?void 0:o.value}getRowSpan(t){return this.actualRow.getRowSpans().get(this.id,t)}getData(){return this.actualRow.getData()}isColumnValueChanged(t,o){return this.actualRow.isEditing()&&this.actualRow.getValue(o,this.getNestingIndexes())!==t}getNestingIndexes(){return this.nestingIndexes}getSignature(){return this.actualRow.getSignature()}getId(){return this.actualRow.getId()}getCell(t){return this.actualRow.getCell(t,this.getNestingIndexes())}isTransient(){return this.actualRow.isTransient()}setData(t){this.actualRow.setData(t)}buildSpan(){this.actualRow.buildSpan()}scrollIntoView(){this.actualRow.scrollIntoView()}match(t){return t.data.getId()===this.actualRow.getId()}getHostObject(t){var r;const o=this.getCell(t.column);if(!o)return{hostObject:this.getData()};if(!o.parent||o.parent.field==="$")return{hostObject:this.getData()};let i=o.isArrayElement()?o.path:o.parent.path;((r=t.colDef)==null?void 0:r.cellDataType)==="array"&&(i=o.path);const s=H.get(this.getData(),i),n=i.endsWith("]")?H.get(this.getData(),i.substring(0,i.lastIndexOf("["))):void 0;return{hostObject:s,hostArray:n}}}class Wa{constructor(t,o,i){R(this,"actualRow");R(this,"idMapper");R(this,"draft");this.actualRow=t,this.idMapper=i,this.draft=E.reactive(H.cloneDeep(o))}getSourceRow(){return this.actualRow}getDataIndex(){return this.actualRow.getDataIndex()}getSignature(){return this.actualRow.signature}getValue(t,o){var i;return(i=this.getCell(t,o))==null?void 0:i.value}getCell(t,o){return this.actualRow.getCell(t,o)}getId(){return this.actualRow.id}getRowSpans(){return this.actualRow.getRowSpans()}match(t){return this.actualRow.match(t)}__setIndex(t){this.actualRow.__setIndex(t)}getData(){return this.draft}getDraft(){return this.draft}setData(t){this.draft=E.reactive(t)}buildSpan(){this.actualRow.update(this.actualRow.id,E.toRaw(this.draft))}flat(){return this.actualRow.leafCells.map(t=>new Ot(t.id,this,t.nestingIndexes))}scrollIntoView(){this.actualRow.scrollIntoView()}_stopEditingImpl(t=!1){const o=E.toRaw(this.draft),i=this.idMapper(o);return this.actualRow.update(i,o),t&&this.redraw(),this.actualRow.dataCache.replace(this.actualRow),this.actualRow}get expand(){return this.actualRow.expand===!0}set expand(t){var o,i;this.actualRow.expand=t===!0,(i=(o=this.actualRow.bridge)==null?void 0:o.refreshModel)==null||i.call(o,{step:"map"})}get detailCardData(){return this.actualRow.detailCardData}set detailCardData(t){this.actualRow.detailCardData=t}isExpanded(){return this.actualRow.isExpanded()}setExpanded(t,o){this.actualRow.setExpanded(t,o)}toggleExpanded(){this.actualRow.toggleExpanded()}isEditing(t){return!!this.draft}isCellEditing(t,o){return!!this.draft}stopEditing(t=!1){return this._stopEditingImpl(t)}}class Fi extends Wa{constructor(o,i,s=!1){super(o,H.cloneDeep(o.data),i);R(this,"transient");this.transient=s}redraw(){this.actualRow.redraw()}delete(){this.actualRow.delete()}isTransient(){return this.transient}async persistent(o){const i=await o(H.cloneDeep(this.draft));return this.actualRow.update(this.idMapper(i),i),this.draft=E.reactive(i),this.transient=!1,this}}class Pi extends Wa{constructor(o,i,s,n){super(o,o.data,n);R(this,"editingColumn");R(this,"rowId");this.rowId=i,this.editingColumn=s}getEditingColumn(){return this.editingColumn}getRowId(){return this.rowId}delete(){throw new Error("CellEditableRow 不允许删除")}redraw(){this.actualRow.redrawCell(this.rowId,this.editingColumn)}isCellEditing(o,i){return!!this.draft&&this.editingColumn.getColId()===i.getColId()&&this.rowId===o}isTransient(){return!1}}class Bt{constructor(t,o,i,s,n){R(this,"id");R(this,"field");R(this,"value");R(this,"index");R(this,"properties",new Map);R(this,"parent");R(this,"spanRow",1);R(this,"path");this.id=t,this.field=o,this.value=i,this.index=s,this.parent=n,this.path=this.getReadPath()}getRoot(){let t=this.parent;for(;;){if(t.field==="$")return t;t=t==null?void 0:t.parent}}pretreatmentValue(t,o,i){const s=this.properties.get(t);if(s)return s;const n=H.get(this.value,t);let r;if(H.isArray(n)&&i.cellDataType!=="native"){r=new Array(n.length);for(let l=0;l<n.length;l++)r[l]=new Bt(`${this.id}_${l}`,t,n[l],l,o)}else r=new Bt(this.id,t,n,void 0,o);return this.properties.set(t,r),r}isNeedSpan(){return Array.from(this.properties.values()).some(t=>H.isArray(t))}get(t){return this.properties.get(t)}calcSpan(){if(this.isNeedSpan()){let t=1,o=!1;for(const i of this.properties.values())if(H.isArray(i)){o=!0;let s=0;for(const n of i)s+=n.calcSpan();t=Math.max(t,s)}if(o&&t>1)for(const i of this.properties.values())H.isArray(i)||i.setRowSpan(t);return this.spanRow=t,this.spanRow}return this.spanRow}setRowSpan(t){this.spanRow=t;for(const o of this.properties.values())H.isArray(o)||o.setRowSpan(this.spanRow)}getPath(){const t=[];let o=this;for(;o;)t.push(o.field),o=o.parent;return t.reverse().slice(1).join(".")}getReadPath(){const t=[];let o=this;for(;o;)t.push(`${o.field}${H.isNumber(o.index)?`[${o.index}]`:""}`),o=o.parent;return t.reverse().slice(1).join(".")}isArrayElement(){return this.path.endsWith("]")}}class za{constructor(){R(this,"trees",new Map);R(this,"arrayParents",new Map);R(this,"cellSpanCaches",new Map);R(this,"columns",new Map);R(this,"dirtyRoots",new Set)}setRow(t,o,i){this.columns.clear();for(const c of i.columns)this.columns.set(c.colId,c);const s=this._computeExpandPaths(o,i.columns),n=new Map;this.arrayParents.set(t,n);const r=this.buildTree(t,o,n,s);this.computeSpans(r),this.trees.set(t,r);const l=new Map,a=new Set,d=this.collectLeaves(r);for(const c of d)this._walkUpAndRecord(c,l,a,t);if(d.length>0){const c=new Set;for(const g of d)for(const p of l.keys())if(p.startsWith(`${g.id}|`)){const f=p.substring(g.id.length+1);c.add(f)}const u=d[0],h=r.spanRow;for(const g of this.columns.keys())c.has(g)||l.set(`${u.id}|${g}`,h)}this.cellSpanCaches.set(t,l),this.dirtyRoots.add(t)}_computeExpandPaths(t,o){const i=new Set;for(const s of o){const n=s.colId.split(".");let r=t,l="";const a=s.cellDataType==="native"&&r!=null&&Array.isArray(r[n[0]]);for(let d=0;d<n.length&&r!=null;d++){const c=n[d];l=l?`${l}.${c}`:c;const u=r[c];if(Array.isArray(u)){if(d===0&&a)break;i.add(l),r=u[0]}else r=u}}return i}setArrayLength(t,o,i){var g,p;const s=this.trees.get(t);if(!s)return;const n=(g=this.arrayParents.get(t))==null?void 0:g.get(o);if(!n){this.dirtyRoots.add(t);return}const r=n.children.filter(f=>f.isArrayElement&&f.path===o),l=r.length,a=((p=r[0])==null?void 0:p.field)??o.split(".").pop();if(l===i){this.dirtyRoots.add(t);return}if(i<l)n.children=n.children.filter(f=>!(f.isArrayElement&&f.path===o)||f.index<i);else{n.children=n.children.filter(f=>!(f.path===o&&Array.isArray(f.value)&&f.value.length===0));for(let f=l;f<i;f++){const C=n.children.filter(w=>w.isArrayElement&&w.path===o),m=C.length>0?C[0].nestingIndexes.slice(0,-1):n.nestingIndexes;n.children.push({id:`${n.id}_${a}_${f}`,field:a,value:void 0,index:f,isArrayElement:!0,parent:n,children:[],spanRow:1,path:o,readPath:`${o}[${f}]`,nestingIndexes:[...m,f]})}}let d=n;for(;d;)this.computeSpans(d),d=d.parent;const c=new Map,u=new Set,h=this.collectLeaves(s);for(const f of h)this._walkUpAndRecord(f,c,u,t);if(h.length>0){const f=new Set;for(const w of h)for(const b of c.keys())if(b.startsWith(`${w.id}|`)){const v=b.substring(w.id.length+1);f.add(v)}const C=h[0],m=s.spanRow;for(const w of this.columns.keys())f.has(w)||c.set(`${C.id}|${w}`,m)}this.cellSpanCaches.set(t,c),this.dirtyRoots.add(t)}getCellSpan(t,o,i){if(!this.columns.has(i))return 0;const s=this.cellSpanCaches.get(t);if(!s)return 0;const n=this.trees.get(t);if(!n)return 0;const r=this.collectLeaves(n);if(o<0||o>=r.length)return 0;const l=r[o];return s.get(`${l.id}|${i}`)??0}getCellPath(t,o){if(!this.columns.has(t))return null;const i=this.firstArrayPaths();if(!i)return null;const s=t.split("."),n=[];let r=0;for(let l=0;l<s.length;l++){let a=s[l];if(l<s.length-1){const d=s.slice(0,l+1).join(".");i.has(d)&&r<o.length&&(a+=`[${o[r]}]`,r++)}n.push(a)}return n.join(".")}getMaxArrayLength(t){const o=this.trees.get(t);return o?o.spanRow:1}getLeaves(t){const o=this.trees.get(t);return o?this.collectLeaves(o):[]}getDirtyRoots(){return this.dirtyRoots}clearDirty(){this.dirtyRoots.clear()}buildTree(t,o,i,s){const n={id:t,field:"$",value:o,isArrayElement:!1,children:[],spanRow:1,path:"",readPath:"",nestingIndexes:[]};return this.expandChildren(n,o,i,s),n}expandChildren(t,o,i,s){if(Array.isArray(o)){if(s.has(t.path)){i.set(t.path,t);for(let n=0;n<o.length;n++){const r=this.createNode(`${t.id}_${t.field}_${n}`,t.field,o[n],n,t,t.path,[...t.nestingIndexes,n]);t.children.push(r),this.expandChildren(r,o[n],i,s)}}else{const n=this.createNode(t.id,t.field,o,void 0,t,t.path,t.nestingIndexes);t.children.push(n)}return}if(this.isPlainObject(o))for(const[n,r]of Object.entries(o)){const l=t.path?`${t.path}.${n}`:n;if(Array.isArray(r))if(s.has(l)){i.set(l,t);for(let a=0;a<r.length;a++){const d=this.createNode(`${t.id}_${n}_${a}`,n,r[a],a,t,l,[...t.nestingIndexes,a]);t.children.push(d),this.expandChildren(d,r[a],i,s)}if(r.length===0){const a=this.createNode(`${t.id}_${n}_empty`,n,r,void 0,t,l,t.nestingIndexes);t.children.push(a)}}else{const a=this.createNode(t.id,n,r,void 0,t,l,t.nestingIndexes);t.children.push(a)}else{const a=this.createNode(t.id,n,r,void 0,t,l,t.nestingIndexes);t.children.push(a),this.expandChildren(a,r,i,s)}}}createNode(t,o,i,s,n,r,l){return{id:t,field:o,value:i,index:s,isArrayElement:s!==void 0,parent:n,children:[],spanRow:1,path:r,readPath:s!==void 0?`${r}[${s}]`:r,nestingIndexes:l}}isPlainObject(t){return t!=null&&typeof t=="object"&&!Array.isArray(t)}computeSpans(t){if(t.children.length===0)return t.spanRow=1,1;const o=[],i=[];for(const s of t.children)this.computeSpans(s),s.isArrayElement?o.push(s):i.push(s);if(o.length>0){const s=new Map;for(const r of o){const l=r.path;s.set(l,(s.get(l)??0)+r.spanRow)}let n=1;for(const r of s.values())r>n&&(n=r);if(t.spanRow=n,n>1)for(const r of i)this.propagateSpan(r,n)}else{let s=1;for(const n of i)n.spanRow>s&&(s=n.spanRow);t.spanRow=s}return t.spanRow}propagateSpan(t,o){t.spanRow=o;for(const i of t.children)i.isArrayElement||this.propagateSpan(i,o)}collectLeaves(t){const o=[];return this._collectLeaves(t,o),o.length===0&&o.push(t),o}_collectLeaves(t,o){for(const i of t.children)i.isArrayElement?this._hasArrayDescendant(i)?this._collectLeaves(i,o):o.push(i):this._collectLeaves(i,o)}_hasArrayDescendant(t){for(const o of t.children)if(o.isArrayElement||this._hasArrayDescendant(o))return!0;return!1}findSpanByPath(t,o){let i=t;for(;i;){if(i.path===o)return i.spanRow;const s=this.searchInNonArrayChildren(i,o);if(s!==null)return s;i=i.parent}return 0}searchInNonArrayChildren(t,o){for(const i of t.children){if(i.isArrayElement)continue;if(i.path===o)return i.spanRow;const s=this.searchInNonArrayChildren(i,o);if(s!==null)return s}return null}_walkUpAndRecord(t,o,i,s){let n=t;for(;n;){if(i.has(n))return;i.add(n),Array.from(this.columns.keys()),o.set(`${t.id}|${n.path}`,n.spanRow);for(const r of n.children)r.isArrayElement?Array.isArray(r.value)&&r.value.length===0&&this._recordEmptyArrayColumns(t,n,r.field,o):(o.set(`${t.id}|${r.path}`,r.spanRow),this._processDeep(t,r,o,i),Array.isArray(r.value)&&r.value.length===0&&this._recordEmptyArrayColumns(t,n,r.field,o));n=n.parent}}_processDeep(t,o,i,s){if(!s.has(o)){s.add(o);for(const n of o.children)n.isArrayElement||(i.set(`${t.id}|${n.path}`,n.spanRow),this._processDeep(t,n,i,s))}}_recordEmptyArrayColumns(t,o,i,s){const n=o.path?`${o.path}.${i}`:i;for(const r of this.columns.keys())r.startsWith(n)&&s.set(`${t.id}|${r}`,o.spanRow)}_collectArrayPaths(t,o){for(const i of t.children)i.isArrayElement&&o.add(i.path),this._collectArrayPaths(i,o)}collectArrayPaths(t){const o=new Set;return this._collectArrayPaths(t,o),o}firstArrayPaths(){const t=this.trees.values().next().value;return t?this.collectArrayPaths(t):null}}class Dy{constructor(t,o,i){R(this,"id");R(this,"rootValue");R(this,"spanMatrix");R(this,"leafCells");R(this,"columns");R(this,"data");this.id=t,this.data=o,this.columns=i,this.rootValue=new Bt(this.id,"$",this.data),this._buildPathCells(i),this.rootValue.calcSpan(),this.spanMatrix=new za,this.spanMatrix.setRow(this.id,this.data,{columns:i}),this.leafCells=this.spanMatrix.getLeaves(this.id)}_buildPathCells(t){for(const o of t){const i=o.colId.split(".");let s=this.rootValue;for(let n=0;n<i.length;n++){const r=i[n];if(!H.isArray(s))s=s.pretreatmentValue(r,s,o);else{const l=[];for(const a of s){const d=a.pretreatmentValue(r,a,o);H.isArray(d)?l.push(...d):l.push(d)}s=l}}}}getMaxArrayLength(){return this.spanMatrix.getMaxArrayLength(this.id)}getCell(t,o){const i=t.getColId().split(".");let s=this.rootValue.properties.get(i.shift());if(!s)return;let n=0;H.isArray(s)&&(s=s[o[n]],n++);let r=s;for(const l of i){if(!r)break;if(!H.isArray(r)){const a=r.get(l);H.isArray(a)?(r=a[o[n]],n=n+1):r=a}}return r}getValue(t,o){const i=this.getCell(t,o);if(i)return H.get(this.data,i.path)}setArrayLength(t,o){this.spanMatrix.setArrayLength(this.id,t,o),this.leafCells=this.spanMatrix.getLeaves(this.id)}rebuild(t,o){const i=o??this.columns;this.data=t,this.spanMatrix.setRow(this.id,t,{columns:i}),this.leafCells=this.spanMatrix.getLeaves(this.id);const s=new Bt(this.id,"$",t);for(const n of i){const r=n.colId.split(".");let l=s;for(let a=0;a<r.length;a++){const d=r[a];if(!H.isArray(l))l=l.pretreatmentValue(d,l,n);else{const c=[];for(const u of l){const h=u.pretreatmentValue(d,u,n);H.isArray(h)?c.push(...h):c.push(h)}l=c}}}s.calcSpan(),this.rootValue=s,o&&(this.columns=i)}getSpanMatrix(){return this.spanMatrix}}class mo{constructor(t,o,i,s,n,r){R(this,"id");R(this,"data");R(this,"signature");R(this,"dataModel");R(this,"spanCache");R(this,"columns");R(this,"bridge");R(this,"idMapper");R(this,"dataCache");R(this,"index");R(this,"expand",!1);R(this,"detailCardData",null);this.index=r,this.dataCache=s,this.idMapper=i,this.columns=o,this.bridge=n,this.id=i(t),this.data=t,this.signature=Oe(JSON.stringify(t)),this.buildSpan()}get pathCells(){return this.dataModel.rootValue.properties}get leafCells(){return this.dataModel.leafCells}get spanMatrix(){return this.dataModel.spanMatrix}buildSpan(){this.dataModel=new Dy(this.id,this.data,this.columns),this.spanCache=new hn(this.dataModel.leafCells,this.dataModel.spanMatrix,this.id)}getMaxArrayLength(){return this.dataModel.getMaxArrayLength()}getCell(t,o){return this.dataModel.getCell(t,o)}getValue(t,o){return this.dataModel.getValue(t,o)}getSpanMatrix(){return this.dataModel.getSpanMatrix()}setArrayLength(t,o){this.dataModel.setArrayLength(t,o)}delete(){this.dataCache.remove([this])}redraw(){var t;(t=this.bridge)==null||t.redraw(this)}redrawCell(t,o){var i;(i=this.bridge)==null||i.redrawCell(this,t,o)}getSourceRow(){return this}isExpanded(){return this.expand===!0}setExpanded(t,o){var s,n;const i=t===!0;this.expand!==i&&(this.expand=i,(n=(s=this.bridge)==null?void 0:s.refreshModel)==null||n.call(s,{step:"map"}))}toggleExpanded(){this.setExpanded(!this.expand)}getDataIndex(){if(this.index===void 0)throw new Error(`row[${this.id}] not ready`);return this.index}getRowSpans(){return this.spanCache}isCellEditing(t,o){return!1}getSignature(){return this.signature}startEditing(t=!1){const o=new Fi(this,this.idMapper,!1);return this.dataCache.replace(o),t&&this.redraw(),o}startEditingCell(t,o,i=!1){const s=new Pi(this,t,o,this.idMapper);return this.dataCache.replace(s),i&&this.redrawCell(t,o),s}__setIndex(t){this.index=t}update(t,o){this.id=t,this.data=o,this.signature=Oe(JSON.stringify(o)),this.dataModel.rebuild(o),this.spanCache=new hn(this.dataModel.leafCells,this.dataModel.spanMatrix,this.id)}isTransient(){return!1}getId(){return this.id}isEditing(){return!1}getData(){return this.data}scrollIntoView(){var o;const t=this.leafCells[this.leafCells.length-1];t&&((o=this.bridge)==null||o.ensureNodeVisible(t.id))}flat(){return this.dataModel.leafCells.map(t=>new Ot(t.id,this,t.nestingIndexes))}setData(t){this.update(this.idMapper(t),t)}match(t){return this.getId()===t.data.getId()}}class $a{constructor(t){R(this,"rows");R(this,"pageNum",1);R(this,"pageSize",100);R(this,"isFinished",!1);R(this,"idMapper");R(this,"idMap",new Map);R(this,"bridge");this.rows=[],this.idMapper=t}createRow(t){var o;return new mo(t,((o=this.bridge)==null?void 0:o.getColumns())??[],this.idMapper,this,this.bridge)}rebuildIdMap(){this.idMap.clear(),this.rows.forEach((t,o)=>this.idMap.set(t.getId(),o))}setRows(t){return this.rows=t,this.rebuildIdMap(),this}replace(t){this.rows[t.getDataIndex()]=t,this.rebuildIdMap()}remove(t){var i;const o=new Set(t.map(s=>s.getId()));this.rows=this.rows.filter(s=>!o.has(s.getId())),this.rebuildIdMap(),(i=this.bridge)==null||i.reload()}getRows(){return this.rows??[]}appendRows(t){if(!this.rows){this.setRows(t);return}for(const o of t){const i=o.getId(),s=this.idMap.get(i);s!==void 0?(this.rows[s]=o,this.idMap.set(i,s)):(this.rows.push(o),this.idMap.set(i,this.rows.length-1))}}insertRows(t,o=0){if(!this.rows){this.setRows(t);return}const i=new Set(t.map(s=>s.getId()));this.rows=this.rows.filter(s=>!i.has(s.getId())),this.rows.splice(o,0,...t),this.rebuildIdMap()}deleteRows(t){const o=new Set(t.map(i=>H.isString(i)?i:i.getId()));this.rows=this.rows.filter(i=>!o.has(i.getId())),this.rebuildIdMap()}}const Ua={getContextMenuItems:void 0},Fy=e=>e instanceof mo||e instanceof Ot?!0:e instanceof Fi,Py=e=>e instanceof mo,Ti="_",Ka=1;class ja{static createRowNode(t,o,i={}){return{...t,__id:o(t),...i}}static generateId(t){if(t.length===0)throw new Error("传入标识数组为空无法生成ID");return t.join(Ti)}static getId(t){return t.__id?t.__id.split(Ti)[0]:t.id}static getSignature(t){return t.__signature}static getFlatIndex(t,o=Ka){if(!t.__id)throw new Error("不包含有效的ID信息");const i=t.__id.split(Ti);if(i.length===1)throw new Error(`${i} 不包含索引信息`);const s=i[o];if(!s)throw new Error(`${i} deep[${o}] 不包含索引信息`);const n=Number.parseInt(s);if(!Number.isFinite(n))throw new TypeError(`${s} 不是一个正确的数组索引`);return n}static ValueGetter(t){return console.warn("deprecated GridUtils.ValueGetter 现在只需要正常使用valueGetter了"),o=>{if(!(o.data.id&&typeof o.data.id=="string"&&o.data.id.includes("footer-")))return t(o)}}static spanRow(t,o,i){const s=t[o];return!s||s.length===0?t:s.map((n,r)=>({...t,__id:`${i??t.id}_${r}`,rowSpan:r===0?s.length:0}))}static isGroupColDef(t){return!!t.children}}const qa=(e,t,o,i,s)=>{const n=E.ref(t),r=E.ref(),l=E.ref(!1),a=(g,p)=>{if(n.value)return n.value;const f=p??[];if(!g){const w=Oe(f.join(","));return n.value=w,w}const C=e.getInstanceName(g);C&&f.push(C);const m=e.getParentInstance(g);return a(m,f)},d=g=>{const p=localStorage.getItem(g);if(!(!p||p==="undefined"))return JSON.parse(p)},c=H.debounce(()=>{const g=a(s);localStorage.setItem(g,JSON.stringify(o.value.getColumnState()))},200),u=async()=>{const g=a(s),p=d(g);if(p&&p.length>0){const f=p.filter(C=>{var m;return!((m=C.colId)!=null&&m.includes("ag-Grid-SelectionColumn"))});o.value.applyColumnState({state:f,applyOrder:!0}),l.value=!0}},h=()=>H.sumBy(o.value.getAllDisplayedVirtualColumns().map(g=>g.getActualWidth()));return{storeGridState:c,restoreGridState:u,resetGridState:()=>{o.value.applyColumnState({state:r.value,applyOrder:!0})},initGridState:()=>{const g=a(s);if(r.value=o.value.getColumnState(),!localStorage.getItem(`${g}-initial`)){const p=h();i.value>p&&o.value.sizeColumnsToFit()}},isStateInitialized:l}},wo=e=>{if(e.id)return`${e.id}`.split("_")[0]},Ya=e=>{const{options:t,elRef:o,editable:i,onRowChange:s,onMessageError:n,findOtherEditingCell:r,isCellEditable:l}=e;let a;const d=h=>{o.value&&o.value.querySelectorAll(`.row_${h}`).forEach(g=>{g.classList.add("row-hover")})},c=h=>{o.value&&o.value.querySelectorAll(`.row_${h}`).forEach(g=>{g.classList.remove("row-hover")})},u=(h,g)=>{var C;if(!h||!o.value)return!1;const p=h;if(!p||typeof p.contains!="function")return!1;const f=o.value.querySelectorAll(`.row_${g}`);for(let m=0;m<f.length;m++){const w=f[m];if(w===p||(C=w.contains)!=null&&C.call(w,p))return!0}return!1};return{...t,onCellMouseOver(h){var p,f,C;const g=wo(h.node);if(!g){(p=t.onCellMouseOver)==null||p.call(t,h);return}u((f=h.event)==null?void 0:f.relatedTarget,g)||(a&&a!==g&&c(a),a=g,d(g),(C=t.onCellMouseOver)==null||C.call(t,h))},onCellMouseOut(h){var p;const g=wo(h.node);g&&(u((p=h.event)==null?void 0:p.relatedTarget,g)||a===g&&(c(g),a=void 0))},onCellClicked(h){if(i==="cell"&&h.data instanceof Ot){if(l&&!l(h.column,h.node))return;const g=h.data.getActualRow(),p=r==null?void 0:r(h.node.id);if(g instanceof Pi){const f=g.getEditingColumn(),C=g.getRowId();if(s==null)throw new Error("可编辑单元格必须配置保存能力");if(f.getId()==h.column.getId()&&C===h.node.id)return;s(g).then(()=>{g.stopEditing(!0);const m=g.getSourceRow();m.setData(g.getData()),m.startEditingCell(h.node.id,h.column,!0)}).catch(m=>{n==null||n(`单元格[${h.column.getColDef().headerName}]保存失败: `+m.message)})}else if(g instanceof mo)if(p){if(s==null)throw new Error("可编辑单元格必须配置保存能力");s(p).then(()=>{p.stopEditing(!0),p.getSourceRow().setData(p.getData()),g.startEditingCell(h.node.id,h.column,!0)}).catch(f=>{n==null||n(`单元格[${h.column.getColDef().headerName}]保存失败: `+f.message)})}else g.startEditingCell(h.node.id,h.column,!0)}},onRowSelected(h){var C;const g=wo(h.node),p=h.api.getRenderedNodes().filter(m=>wo(m)===g),f=h.node.isSelected();p.forEach(m=>{m.setSelected(!!f,!1,"api")}),(C=t==null?void 0:t.onRowSelected)==null||C.call(t,h)},getRowClass(h){var m,w;const g=(m=t==null?void 0:t.getRowClass)==null?void 0:m.call(t,h),p=[];g&&(H.isArray(g)?p.push(...g):p.push(g)),p.push(`row_${wo(h.node)}`);const f=h.node.data,C=((w=(f==null?void 0:f.actualRow)??f)==null?void 0:w.index)??h.node.rowIndex??0;return p.push(`row-zebra-${C%2}`),p},onRowDoubleClicked(h){i==="row"&&(h.data.isEditing()||h.data.startEditing())}}},Za={"cell-span":({data:e,column:t})=>e.getRowSpan(t)>0,"cell-span-hide":({data:e,column:t})=>e.getRowSpan(t)===0},Qa={"cell-span":({data:e,column:t})=>e.getRowSpan(t)>0,"cell-span-hide":({data:e,column:t})=>e.getRowSpan(t)===0},gn=(e,t)=>({...e,...t??{}});class Vt{constructor(t,o,i,s=[],n){R(this,"context");R(this,"endRow");R(this,"filterModel");R(this,"sortModel");R(this,"startRow");R(this,"dataCache");R(this,"pageNum");R(this,"pageSize");R(this,"onError");R(this,"onFirstPageLoaded");this.pageNum=t,this.pageSize=o,this.sortModel=s,this.startRow=(t-1)*o,this.endRow=this.startRow+this.pageSize,this.dataCache=i,this.onError=n}static from(t,o,i,s){const n=o??i.pageSize;return new Vt(t,n,i,[],s)}static nextPage(t,o){return new Vt(t.pageNum+1,t.pageSize,t,[],o)}failCallback(){var t;(t=this.onError)==null||t.call(this,"表格数据加载失败,请重试")}successCallback(t){var o;(H.isEmpty(t)||t.length<this.pageSize)&&(this.dataCache.isFinished=!0),this.pageNum===1?this.dataCache.setRows((t??[]).map(i=>this.dataCache.createRow(i))):this.dataCache.appendRows((t??[]).map(i=>this.dataCache.createRow(i))),this.dataCache.pageNum=this.pageNum,this.pageNum===1&&((o=this.onFirstPageLoaded)==null||o.call(this,t??[]))}}const Xa=e=>{const t=s=>{const n=s.getLastDisplayedRowIndex();return s.getDisplayedRowCount()-1===n},o=({direction:s,api:n})=>{s==="vertical"&&t(n)&&i()},i=()=>{var s;(s=e==null?void 0:e.onVScrollEnd)==null||s.call(e)};return{onBodyScrollEnd:o}};class Ty{constructor(t){R(this,"gridApi");this.gridApi=t}reload(){this.gridApi.getGridOption("context").reload()}redraw(t){const o=this.gridApi.getRenderedNodes().filter(i=>{var s;return((s=i.data)==null?void 0:s.getId())===t.getId()});this.gridApi.getGridOption("context").reload(),this.gridApi.redrawRows({rowNodes:o})}redrawCell(t,o,i){const s=this.gridApi.getRenderedNodes().filter(n=>{var r;return((r=n.data)==null?void 0:r.getId())===o});this.gridApi.getGridOption("context").reload(),this.gridApi.refreshCells({rowNodes:s,columns:[i],force:!0,suppressFlash:!0})}ensureNodeVisible(t){const o=this.gridApi.getRowNode(t);o&&this.gridApi.ensureNodeVisible(o)}refreshModel(t){var i,s,n,r;const o=this.gridApi.getGridOption("rowModelType")==="clientSide"?this.gridApi.rowModel:null;o!=null&&o.refreshModel?o.refreshModel(t):t.step==="everything"?(s=(i=this.gridApi).refreshClientSideRowModel)==null||s.call(i):(r=(n=this.gridApi).refreshClientSideRowModel)==null||r.call(n,{step:"map"})}getColumns(){return this.gridApi.getAllGridColumns().map(t=>{var i,s;const o=(s=(i=t.getColDef)==null?void 0:i.call(t))==null?void 0:s.cellDataType;return{colId:t.getColId(),cellDataType:typeof o=="string"?o:void 0}})}}const Ja=(e,t)=>{if(t.length===0)return[];const o=new Set(t),i=[];return e.forEachNode(s=>{const n=s.data;n&&typeof n.getId=="function"&&o.has(n.getId())&&i.push(s)}),i},Iy=(e,t,o)=>{!e||t.length===0||e.setNodesSelected({nodes:Ja(e,t),newValue:!0,source:o})},Ay=(e,t,o)=>{!e||t.length===0||e.setNodesSelected({nodes:Ja(e,t),newValue:!1,source:o})},My=e=>{if(!e)return[];const t=new Set,o=[];return e.forEachNode(i=>{if(!i.isSelected()||!i.data)return;const s=i.data,n=s!=null&&s.getActualRow?s.getActualRow():i.data;t.has(n)||(t.add(n),o.push(n))}),o},ed=(e,t)=>{var P;const o=E.ref(),i=E.ref(),s=E.ref({height:`calc(100% - ${e.footerHeight??0}px)`,width:"100%"}),n=new Set(["columnSizing","columnVisibility","columnPinning","columnOrder"]),r=E.ref(0),l=E.ref(),{onBodyScrollEnd:a}=Xa({onVScrollEnd(){u.value.getRows(Vt.nextPage(c.value,e.onError))}}),d=({data:T})=>T.id,c=E.ref(new $a(e.rowIdMapper)),u=E.ref(new _a(e.rowData,c.value)),{initGridState:h,resetGridState:g,storeGridState:p,restoreGridState:f}=qa(e.instanceCtx,e.id,o,l,e.currentInstance),C=async T=>{D(),c.value.pageSize=e.pageSize,c.value.bridge=new Ty(T.api),u.value.api=T.api,T.api.getAllGridColumns(),o.value=T.api,h(),await f(),await I(),T.api.setGridOption("popupParent",document.querySelector("body"))},m=()=>{u.value.loadData()},w=async(T,V=0)=>{c.value.insertRows(T,V),m()},b=T=>c.value.getRows().some(V=>V.getId()===T.getId()),v=()=>c.value.getRows(),S=()=>{var z,de;const T=i.value.querySelector(".ag-body-viewport"),V=Number.parseFloat(T.querySelector(".ag-center-cols-container").style.height),B=i.value.querySelector(".ag-header").offsetHeight,W=(de=(z=i.value.querySelector(".ag-overlay-no-rows-wrapper"))==null?void 0:z.querySelector(".el-empty"))==null?void 0:de.offsetHeight;V<r.value?s.value.height=`${B+(W||V)+(e.footerHeight?2:11)}px`:s.value.height.includes("100%")||(s.value.height=`calc(100% - ${e.footerHeight??0}px)`)},D=()=>{const T=i.value.querySelector(".ag-body-viewport");l.value=T.offsetWidth,r.value=T.offsetHeight},I=()=>new Promise((T,V)=>{c.value.isFinished=!1;const B=Vt.from(1,c.value.pageSize,c.value,e.onError);B.onFirstPageLoaded=W=>{E.nextTick(()=>{var z;return(z=e.onFirstPageLoaded)==null?void 0:z.call(e,W)})},B.context={resolve:T,reject:V},u.value.getRows(B),u.value.api.getDisplayedRowCount()>0&&u.value.api.ensureIndexVisible(0)}),O=E.computed(()=>{var T,V;return{onGridReady:C,onBodyScrollEnd:a,scrollbarWidth:8,getRowId:d,columnDefs:e.columns,preventDefaultOnContextMenu:!0,suppressRowTransform:!0,suppressRowHoverHighlight:!0,selectionColumnDef:{pinned:"left",rowSpan:({data:B,column:W})=>B.getRowSpan(W),cellClassRules:gn(Za,(T=e.gridOptions)==null?void 0:T.rowClassRules)},defaultColGroupDef:{marryChildren:!0},onStateUpdated(B){B.sources.some(W=>n.has(W))&&p()},onSortChanged(B){B.source==="uiColumnSorted"&&p()},context:{refresh:I,reload:m},onRowDataUpdated(){E.nextTick(()=>{S()})},defaultColDef:{rowSpan({column:B,data:W}){return W.getRowSpan(B)},cellClassRules:gn(Qa,(V=e.gridOptions)==null?void 0:V.rowClassRules),suppressFloatingFilterButton:!0,enableCellChangeFlash:!0,tooltipValueGetter(B){return B.valueFormatted},resizable:!0,sortable:!1,headerComponent:"HeaderRenderer",cellRenderer:"CellRenderer",valueGetter({column:B,data:W}){return W.getValue(B)},valueFormatter({value:B}){return B}},...Ya({options:e.gridOptions??{},elRef:i,editable:e.editable,onRowChange:e.onRowChange,onMessageError:e.onError,findOtherEditingCell:B=>c.value.getRows().find(W=>W instanceof Pi&&W.getRowId()!==B),isCellEditable:(B,W)=>{var de;const z=(de=B.getColDef)==null?void 0:de.call(B);return typeof(z==null?void 0:z.editable)=="function"?z.editable({column:B,colDef:z,node:W,data:W.data}):(z==null?void 0:z.editable)!==!1}}),onBodyScroll(B){F.left=B.left,F.top=B.top},...Ua}}),F={left:0,top:0};return(P=t==null?void 0:t.onActivated)==null||P.call(t,()=>{}),{gridOptions:O,datasource:u,gridStyles:s,dataCache:c,gridApi:o,gridElRef:i,resetGridState:g,reload:m,insertRows:w,existRow:b,getRows:v,refresh:I,selectByIds:(T,V)=>Iy(o.value,T,V),deselectByIds:(T,V)=>Ay(o.value,T,V),getSelectedRows:()=>My(o.value)}},td=(e,t,o)=>{const i=E.ref(),s=E.ref([{}]),n=E.computed(()=>e.footerHeight?{height:`${e.footerHeight+10}px`}:{});E.watch(()=>[s.value,i.value],()=>{var d;s.value&&i.value&&((d=i.value)==null||d.setGridOption("rowData",s.value.map((c,u)=>({id:`footer-${u}`,...c}))))});const r=d=>!!d.children,l=d=>{var c;return r(d)?{headerName:d.headerName,groupId:d.groupId,children:[...d.children.map(u=>l(u))]}:{width:d.width,headerName:d.headerName,field:d.field,cellRendererParams:{render:(c=d.cellRendererParams)==null?void 0:c.footerRender}}},a=E.computed(()=>{var d;return{scrollbarWidth:8,suppressRowTransform:!0,suppressRowHoverHighlight:!0,columnDefs:e.columns.map(c=>l(c)),defaultColGroupDef:{marryChildren:!0},rowSelection:(d=e.gridOptions)!=null&&d.rowSelection?{mode:"singleRow",isRowSelectable:()=>!1,hideDisabledCheckboxes:!0}:void 0,rowHeight:e.footerHeight,headerHeight:0,alwaysShowVerticalScroll:o.value.height.includes("100%"),defaultColDef:{suppressFloatingFilterButton:!0,cellRenderer:"FooterCellRender",enableCellChangeFlash:!0,tooltipValueGetter(c){return c.value}},onGridReady(c){i.value=c.api,c.api.setGridOption("popupParent",document.querySelector("body"))},alignedGrids:()=>{const c=t.value;if(!c)return[];const u=c.api??(typeof c.addEventListener=="function"?c:void 0);return u?[u]:[]}}});return{setFooterData:d=>{s.value=d},footerGridApi:i,footerData:s,footerStyles:n,footerGridOptions:a}};class ky extends x{constructor(){super(...arguments);R(this,"beanName","selectionColSvc");R(this,"columns")}postConstruct(){this.addManagedPropertyListener("rowSelection",o=>{this.onSelectionOptionsChanged(o.currentValue,o.previousValue,St(o.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(o){const i=this.columns;i!=null&&(o.list=i.list.concat(o.list),o.tree=i.tree.concat(o.tree),Wc(o))}createColumns(o,i){var u,h;const s=()=>{var g;zo(this.beans,(g=this.columns)==null?void 0:g.tree),this.columns=null},n=o.treeDepth,r=(((u=this.columns)==null?void 0:u.treeDepth)??-1)==n,l=this.generateSelectionCols();if(_c(l,((h=this.columns)==null?void 0:h.list)??[])&&r)return;s();const{colGroupSvc:a}=this.beans,d=(a==null?void 0:a.findDepth(o.tree))??0,c=(a==null?void 0:a.balanceTreeForAutoCols(l,d))??[];this.columns={list:l,tree:c,treeDepth:d,map:{}},i(g=>{if(!g)return null;const p=g.filter(f=>!tt(f));return[...l,...p]})}updateColumns(o){var s;const i=St(o.source);(s=this.columns)==null||s.list.forEach(n=>{const r=this.createSelectionColDef(o.currentValue);n.setColDef(r,null,i),ve(this.beans,{state:[{...r,colId:n.getColId()}]},i)})}getColumn(o){var i;return((i=this.columns)==null?void 0:i.list.find(s=>wr(s,o)))??null}getColumns(){var o;return((o=this.columns)==null?void 0:o.list)??null}isSelectionColumnEnabled(){var a,d;const{gos:o,beans:i}=this,s=o.get("rowSelection");if(typeof s!="object"||!Qe(o))return!1;const n=(((d=(a=i.autoColSvc)==null?void 0:a.getColumns())==null?void 0:d.length)??0)>0;if(s.checkboxLocation==="autoGroupColumn"&&n)return!1;const r=!!wt(s),l=Lo(s);return r||l}createSelectionColDef(o){const{gos:i}=this,s=o??i.get("selectionColumnDef"),n=i.get("enableRtl"),{rowSpan:r,spanRows:l,...a}=s??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:n?"right":"left",comparator(d,c,u,h){const g=u.isSelected(),p=h.isSelected();return g===p?0:g?1:-1},editable:!1,suppressFillHandle:!0,pinned:"left",rowSpan:r,...a,colId:pr,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const o=this.createSelectionColDef(),i=o.colId;this.gos.validateColDef(o,i,!0);const s=new We(o,null,i,!1);return this.createBean(s),[s]}onSelectionOptionsChanged(o,i,s){const n=i&&typeof i!="string"?wt(i):void 0,r=o&&typeof o!="string"?wt(o):void 0,l=n!==r,a=i&&typeof i!="string"?Lo(i):void 0,d=o&&typeof o!="string"?Lo(o):void 0,c=a!==d,u=Go(o),h=Go(i);(l||c||u!==h)&&this.beans.colModel.refreshAll(s)}destroy(){var o;zo(this.beans,(o=this.columns)==null?void 0:o.tree),super.destroy()}refreshVisibility(o,i,s){var a,d;if(!((a=this.columns)!=null&&a.list.length))return;const n=o.length+i.length+s.length;if(n===0)return;const r=this.columns.list[0];if(!r.isVisible())return;const l=()=>{let c;switch(r.pinned){case"left":case!0:c=o;break;case"right":c=s;break;default:c=i}c&&we(c,r)};((d=this.beans.rowNumbersSvc)!=null&&d.getColumn(fr)?2:1)===n&&l()}}const Ii="34.1.1";function od(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function Ai(e){return!!(e.rowPinned&&e.pinnedSibling)}function Ly(e,t=!0){const o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function id(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}function me(e,t,o,i){const s=t==="top";if(!o)return me(e,t,s?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),i);if(!i){const a=s?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return me(e,t,o,s?e.getPinnedTopRow(a-1):e.getPinnedBottomRow(a-1))}let n=!1,r=!1;const l=[];return e.forEachPinnedRow(t,a=>{if(a===o&&!n){n=!0,l.push(a);return}if(n&&a===i){r=!0,l.push(a);return}n&&!r&&l.push(a)}),l}function pn(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function sd(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const o=e.get("suppressRowClickSelection"),i=e.get("suppressRowDeselection");return o&&i?!1:o?"enableDeselection":i?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function Gy(e){const t=sd(e);return t===!0||t==="enableDeselection"}function Hy(e){const t=sd(e);return t===!0||t==="enableSelection"}function Oy(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function By(e,t){var n;if(!t.nodes.every(r=>r.rowPinned&&!Ai(r)?(k(59),!1):r.id===void 0?(k(60),!1):!0))return;const{nodes:o,source:i,newValue:s}=t;(n=e.selectionSvc)==null||n.setNodesSelected({nodes:o,source:i??"api",newValue:s})}function Vy(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.selectAllRowNodes({source:o,selectAll:t})}function Ny(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.deselectAllRowNodes({source:o,selectAll:t})}function _y(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedNodes())??[]}function Wy(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedRows())??[]}const zy={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]};class $y extends j{constructor(){super(zy,[Gs]);R(this,"eCheckbox",A);R(this,"rowNode");R(this,"column");R(this,"overrides")}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const o=this.getLocaleTextFunc(),{rowNode:i,eCheckbox:s}=this,n=i.isSelected(),r=id(o,n),[l,a]=i.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],d=o(l,a);s.setValue(n,!0),s.setInputAriaLabel(`${d} (${r})`)}init(o){if(this.rowNode=o.rowNode,this.column=o.column,this.overrides=o.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:vt,click:i=>{var s;vt(i),(s=this.beans.selectionSvc)==null||s.handleSelectionEvent(i,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:s})=>{const n=typeof i=="object"?pn(i):void 0,r=typeof s=="object"?pn(s):void 0;n!==r&&this.onSelectableChanged()}),rs(this.gos)||typeof this.getIsVisible()=="function"){const i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:o,rowNode:i,overrides:s,gos:n}=this,r=i.selectable,l=this.getIsVisible();let a;if(typeof l=="function"){const g=s==null?void 0:s.callbackParams;if(!o)a=l({...g,node:i,data:i.data});else{const p=o.createColumnFunctionCallbackParams(i);a=l({...g,...p})}}else a=l??!1;const d=r&&!a||!r&&a,c=r||a,u=n.get("rowSelection"),h=u&&typeof u!="string"?!pn(u):!!(o!=null&&o.getColDef().showDisabledCheckboxes);if(this.setVisible(c&&(d?h:!0)),this.setDisplayed(c&&(d?h:!0)),c&&this.eCheckbox.setDisabled(d),s==null?void 0:s.removeHidden){this.setDisplayed(c);return}}getIsVisible(){var s,n;const o=this.overrides;if(o)return o.isVisible;const i=this.gos.get("rowSelection");return i&&typeof i!="string"?wt(i):(n=(s=this.column)==null?void 0:s.getColDef())==null?void 0:n.checkboxSelection}}class Uy{constructor(t,o){R(this,"rowModel");R(this,"pinnedRowModel");R(this,"selectAll",!1);R(this,"rootId",null);R(this,"endId",null);R(this,"cachedRange",[]);this.rowModel=t,this.pinnedRowModel=o}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(t){this.rootId=t.id,this.endId=null,this.cachedRange.length=0}setEndRange(t){this.endId=t.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const t=this.getRoot(),o=this.getEnd();if(t==null||o==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(t,o)??[]}return this.cachedRange}isInRange(t){return this.rootId===null?!1:this.getRange().some(o=>o.id===t.id)}getRoot(t){if(this.rootId)return this.getRowNode(this.rootId);if(t)return this.setRoot(t),t}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(t){let o;const{rowModel:i,pinnedRowModel:s}=this;return o??(o=i.getRowNode(t)),s!=null&&s.isManual()&&(o??(o=s.getPinnedRowById(t,"top")),o??(o=s.getPinnedRowById(t,"bottom"))),o}truncate(t){const o=this.getRange();if(o.length===0)return{keep:[],discard:[]};const i=o[0].id===this.rootId,s=o.findIndex(n=>n.id===t.id);if(s>-1){const n=o.slice(0,s),r=o.slice(s+1);return this.setEndRange(t),i?{keep:n,discard:r}:{keep:r,discard:n}}else return{keep:o,discard:[]}}extend(t,o=!1){const i=this.getRoot();if(i==null){const n=this.getRange().slice();return o&&t.depthFirstSearch(r=>!r.group&&n.push(r)),n.push(t),this.setRoot(t),{keep:n,discard:[]}}const s=this.getNodesInRange(i,t);if(!s)return this.setRoot(t),{keep:[t],discard:[]};if(s.find(n=>n.id===this.endId))return this.setEndRange(t),{keep:this.getRange(),discard:[]};{const n=this.getRange().slice();return this.setEndRange(t),{keep:this.getRange(),discard:n}}}getNodesInRange(t,o){const{pinnedRowModel:i,rowModel:s}=this;if(!(i!=null&&i.isManual()))return s.getNodesInRangeForSelection(t,o);if(t.rowPinned==="top"&&!o.rowPinned)return me(i,"top",t,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),o)??[]);if(t.rowPinned==="bottom"&&!o.rowPinned){const n=me(i,"bottom",void 0,t),r=s.getRowCount(),l=s.getRow(r-1);return(s.getNodesInRangeForSelection(o,l)??[]).concat(n)}if(!t.rowPinned&&!o.rowPinned)return s.getNodesInRangeForSelection(t,o);if(t.rowPinned==="top"&&o.rowPinned==="top")return me(i,"top",t,o);if(t.rowPinned==="bottom"&&o.rowPinned==="top"){const n=me(i,"top",o,void 0),r=me(i,"bottom",void 0,t),l=s.getRow(0),a=s.getRow(s.getRowCount()-1);return n.concat(s.getNodesInRangeForSelection(l,a)??[]).concat(r)}if(!t.rowPinned&&o.rowPinned==="top")return me(i,"top",o,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),t)??[]);if(t.rowPinned==="top"&&o.rowPinned==="bottom"){const n=me(i,"top",t,void 0),r=me(i,"bottom",void 0,o),l=s.getRow(0),a=s.getRow(s.getRowCount()-1);return n.concat(s.getNodesInRangeForSelection(l,a)??[]).concat(r)}if(t.rowPinned==="bottom"&&o.rowPinned==="bottom")return me(i,"bottom",t,o);if(!t.rowPinned&&o.rowPinned==="bottom"){const n=me(i,"bottom",void 0,o),r=s.getRow(s.getRowCount());return(s.getNodesInRangeForSelection(t,r)??[]).concat(n)}return null}}class Ky extends x{constructor(o){super();R(this,"column");R(this,"cbSelectAllVisible",!1);R(this,"processingEventFromCheckbox",!1);R(this,"headerCellCtrl");R(this,"cbSelectAll");this.column=o}onSpaceKeyDown(o){const i=this.cbSelectAll;i.isDisplayed()&&!i.getGui().contains(Y(this.beans))&&(o.preventDefault(),i.setValue(!i.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(o){this.headerCellCtrl=o;const i=this.createManagedBean(new wl);this.cbSelectAll=i,i.addCss("ag-header-select-all"),Be(i.getGui(),"presentation"),this.showOrHideSelectAll();const s=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:s,paginationChanged:s,modelUpdated:s}),this.addManagedPropertyListener("rowSelection",({currentValue:n,previousValue:r})=>{const l=a=>typeof a=="string"||!a||a.mode==="singleRow"?void 0:a.selectAll;l(n)!==l(r)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(i,{fieldValueChanged:this.onCbSelectAll.bind(this)}),i.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(o){this.isAlive()&&this.showOrHideSelectAll(o.source==="uiColumnMoved")}showOrHideSelectAll(o=!1){const i=this.isCheckboxSelection();this.cbSelectAllVisible=i,this.cbSelectAll.setDisplayed(i),i&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(o)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const o=this.getSelectAllMode(),i=this.beans.selectionSvc,s=this.cbSelectAll,n=i.getSelectAllState(o);s.setValue(n);const r=i.hasNodesToSelect(o);s.setDisabled(!r),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(o=!1){const i=this.getLocaleTextFunc(),{headerCellCtrl:s,cbSelectAll:n,cbSelectAllVisible:r}=this,l=n.getValue(),a=id(i,l),d=i("ariaRowSelectAll","Press Space to toggle all rows selection");s.setAriaDescriptionProperty("selectAll",r?`${d} (${a})`:null),n.setInputAriaLabel(i("ariaHeaderSelection","Column with Header Selection")),o||s.announceAriaDescription()}checkSelectionType(o){return Qt(this.gos)?!0:(k(128,{feature:o}),!1)}checkRightRowModelType(o){const{gos:i,rowModel:s}=this.beans;return oe(i)||Mo(i)?!0:(k(129,{feature:o,rowModel:s.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const o=this.cbSelectAll.getValue(),i=this.getSelectAllMode();let s="uiSelectAll";i==="currentPage"?s="uiSelectAllCurrentPage":i==="filtered"&&(s="uiSelectAllFiltered");const n={source:s,selectAll:i},r=this.beans.selectionSvc;o?r.selectAllRowNodes(n):r.deselectAllRowNodes(n)}isCheckboxSelection(){const{column:o,gos:i,beans:s}=this,n=typeof i.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return nd(s,o)&&this.checkRightRowModelType(n)&&this.checkSelectionType(n)}getSelectAllMode(){const o=Ly(this.gos,!1);if(o)return o;const{headerCheckboxSelectionCurrentPageOnly:i,headerCheckboxSelectionFilteredOnly:s}=this.column.getColDef();return i?"currentPage":s?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}}function nd({gos:e,selectionColSvc:t},o){const i=e.get("rowSelection"),s=o.getColDef(),{headerCheckboxSelection:n}=s;let r=!1;if(typeof i=="object"){const l=tt(o),a=mr(o);(Go(i)==="autoGroupColumn"&&a||l&&(t!=null&&t.isSelectionColumnEnabled()))&&(r=Lo(i))}else typeof n=="function"?r=n(_(e,{column:o,colDef:s})):r=!!n;return r}class jy extends x{constructor(){super(...arguments);R(this,"isRowSelectable");R(this,"selectionCtx")}postConstruct(){const{gos:o,beans:i}=this;this.selectionCtx=new Uy(i.rowModel,i.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const s=rs(o);s!==this.isRowSelectable&&(this.isRowSelectable=s,this.updateSelectable())}),this.isRowSelectable=rs(o),this.addManagedEventListeners({cellValueChanged:s=>this.updateRowSelectable(s.node),rowNodeDataChanged:s=>this.updateRowSelectable(s.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new $y}createSelectAllFeature(o){if(nd(this.beans,o))return new Ky(o)}isMultiSelect(){return Qt(this.gos)}onRowCtrlSelected(o,i,s){const n=!!o.rowNode.isSelected();o.forEachGui(s,r=>{r.rowComp.toggleCss("ag-row-selected",n);const l=r.element;Hi(l,n),l.contains(Y(this.beans))&&i(r)})}announceAriaRowSelection(o){var n;if(this.isRowSelectionBlocked(o))return;const i=o.isSelected();if(!o.selectable)return;const s=this.getLocaleTextFunc()(i?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${i?"deselect":"select"} this row`);(n=this.beans.ariaAnnounce)==null||n.announceValue(s,"rowSelection")}isRowSelectionBlocked(o){return!o.selectable||o.rowPinned&&!Ai(o)||!Qe(this.gos)}updateRowSelectable(o,i){var n;const s=o.rowPinned&&o.pinnedSibling?o.pinnedSibling.selectable:((n=this.isRowSelectable)==null?void 0:n.call(this,o))??!0;return this.setRowSelectable(o,s,i),s}setRowSelectable(o,i,s){if(o.selectable!==i){if(o.selectable=i,o.dispatchRowEvent("selectableChanged"),s)return;if(Xt(this.gos)){const n=this.calculateSelectedFromChildren(o);this.setNodesSelected({nodes:[o],newValue:n??!1,source:"selectableChanged"});return}o.isSelected()&&!o.selectable&&this.setNodesSelected({nodes:[o],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(o){var n;let i=!1,s=!1;if(!((n=o.childrenAfterGroup)!=null&&n.length))return o.selectable?o.__selected:null;for(let r=0;r<o.childrenAfterGroup.length;r++){const l=o.childrenAfterGroup[r];let a=l.isSelected();if(!l.selectable){const d=this.calculateSelectedFromChildren(l);if(d===null)continue;a=d}switch(a){case!0:i=!0;break;case!1:s=!0;break;default:return}}if(!(i&&s))return i?!0:s?!1:o.selectable?o.__selected:null}selectRowNode(o,i,s,n="api"){const r=!o.selectable&&i,l=o.__selected===i;if(r||l)return!1;o.__selected=i,o.dispatchRowEvent("rowSelected");const a=o.sibling;a&&a.footer&&a.__localEventService&&a.dispatchRowEvent("rowSelected");const d=o.pinnedSibling;return d&&d.rowPinned&&d.__localEventService&&d.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...Bh(o,this.gos,"rowSelected"),event:s||null,source:n}),!0}isCellCheckboxSelection(o,i){const s=this.gos.get("rowSelection");if(s&&typeof s!="string"){const n=tt(o)&&wt(s);return o.isColumnFunc(i,n)}else return o.isColumnFunc(i,o.colDef.checkboxSelection)}inferNodeSelections(o,i,s,n){const{gos:r,selectionCtx:l}=this,a=o.isSelected(),d=Xt(r),c=Hy(r),u=Gy(r),h=this.isMultiSelect(),g=n==="rowClicked";if(g&&!(c||u))return null;if(i&&s&&h){const p=l.getRoot();if(p)if(p.isSelected()){const f=l.isInRange(o)?l.truncate(o):l.extend(o,d);return{deselect:f.discard,select:f.keep,reset:!1}}else{const f=l.extend(o,d);return{select:[],deselect:f.keep,reset:!1}}else return null}else if(i&&h){const p=l.selectAll?this.beans.rowModel.getRow(0):void 0,f=l.getRoot(p),C=l.isInRange(o)?l.truncate(o):l.extend(o,d);return{select:C.keep,deselect:C.discard,reset:l.selectAll||!!(f&&!f.isSelected())}}else if(s){if(g){const p=!a;return p&&!c||!p&&!u?null:(l.setRoot(o),{node:o,newValue:p,clearSelection:!1})}return l.setRoot(o),{node:o,newValue:!a,clearSelection:!h}}else{l.setRoot(o);const p=Oy(r),f=Oo(r)==="filteredDescendants",C=g&&(!p||!c);if(f&&a===void 0&&oe(r))return{node:o,newValue:!1,clearSelection:!h||C};if(g){const m=a?!p:c;return m===a&&!C||m&&!c||!m&&!u?null:{node:o,newValue:m,clearSelection:!h||C,keepDescendants:o.group&&d}}return{node:o,newValue:!a,clearSelection:!h||C}}}}class qy extends jy{constructor(){super(...arguments);R(this,"beanName","selectionSvc");R(this,"selectedNodes",new Map);R(this,"detailSelection",new Map);R(this,"groupSelectsDescendants");R(this,"groupSelectsFiltered");R(this,"mode");R(this,"masterSelectsDetail",!1)}postConstruct(){super.postConstruct();const{gos:o}=this;this.mode=Ho(o),this.groupSelectsDescendants=Xt(o),this.groupSelectsFiltered=Oo(o)==="filteredDescendants",this.masterSelectsDetail=od(o)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const i=Xt(o),s=Ho(o),n=Oo(o)==="filteredDescendants";this.masterSelectsDetail=od(o)==="detail",(i!==this.groupSelectsDescendants||n!==this.groupSelectsFiltered||s!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=i,this.groupSelectsFiltered=n,this.mode=s)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(o,i,s){if(this.isRowSelectionBlocked(i))return 0;const n=this.inferNodeSelections(i,o.shiftKey,o.metaKey||o.ctrlKey,s);return n==null?0:(this.selectionCtx.selectAll=!1,"select"in n?(n.reset?this.resetNodes():this.selectRange(n.deselect,!1,s),this.selectRange(n.select,!0,s)):this.setNodesSelected({nodes:[n.node],newValue:n.newValue,clearSelection:n.clearSelection,keepDescendants:n.keepDescendants,event:o,source:s}))}setNodesSelected({newValue:o,clearSelection:i,suppressFinishActions:s,nodes:n,event:r,source:l,keepDescendants:a=!1}){var c;if(!Qe(this.gos)&&o)return k(132),0;if(n.length===0)return 0;if(n.length>1&&!this.isMultiSelect())return k(130),0;let d=0;for(let u=0;u<n.length;u++){const h=n[u],g=Nt(h),p=this.groupSelectsFiltered&&g.group;if(g.rowPinned&&!Ai(g)){k(59);continue}if(g.id===void 0){k(60);continue}p||this.selectRowNode(g,o,r,l)&&(this.detailSelection.delete(g.id),d++),this.groupSelectsDescendants&&((c=g.childrenAfterGroup)!=null&&c.length)&&(d+=this.selectChildren(g,o,l))}return s||(n.length===1&&l==="api"&&this.selectionCtx.setRoot(Nt(n[0])),o&&(i||!this.isMultiSelect())&&(d+=this.clearOtherNodes(Nt(n[0]),a,l)),d>0&&(this.updateGroupsFromChildrenSelections(l),this.dispatchSelectionChanged(l))),d}selectRange(o,i,s){let n=0;return o.forEach(r=>{const l=Nt(r);l.group&&this.groupSelectsDescendants||this.selectRowNode(l,i,void 0,s)&&n++}),n>0&&(this.updateGroupsFromChildrenSelections(s),this.dispatchSelectionChanged(s)),n}selectChildren(o,i,s){const n=this.groupSelectsFiltered?o.childrenAfterAggFilter:o.childrenAfterGroup;return n?this.setNodesSelected({newValue:i,clearSelection:!1,suppressFinishActions:!0,source:s,nodes:n}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const o=[];return this.selectedNodes.forEach(i=>i.data&&o.push(i.data)),o}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(o){const i=new Map;this.selectedNodes.forEach((s,n)=>{o(s)&&i.set(n,s)}),this.selectedNodes=i}updateGroupsFromChildrenSelections(o,i){if(!this.groupSelectsDescendants)return!1;const{gos:s,rowModel:n}=this.beans;if(!oe(s))return!1;const r=n.rootNode;if(!r)return!1;i||(i=new Ci(!0,r),i.active=!1);let l=!1;return i.forEachChangedNodeDepthFirst(a=>{if(a!==r){const d=this.calculateSelectedFromChildren(a);l=this.selectRowNode(a,d===null?!1:d,void 0,o)||l}}),l}clearOtherNodes(o,i,s){const n=new Map;let r=0;return this.selectedNodes.forEach(l=>{const a=l.id==o.id;if((!i||!Zy(o,l))&&!a){const d=this.selectedNodes.get(l.id);r+=this.setNodesSelected({nodes:[d],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:s}),this.groupSelectsDescendants&&l.parent&&n.set(l.parent.id,l.parent)}}),n.forEach(l=>{const a=this.calculateSelectedFromChildren(l);this.selectRowNode(l,a===null?!1:a,void 0,s)}),r}onRowSelected(o){const i=o.node;this.groupSelectsDescendants&&i.group||(i.isSelected()?this.selectedNodes.set(i.id,i):this.selectedNodes.delete(i.id))}syncInRowNode(o,i){this.syncInOldRowNode(o,i),this.syncInNewRowNode(o)}createDaemonNode(o){if(!o.id)return;const i=new so(this.beans);return i.id=o.id,i.data=o.data,i.__daemon=!0,i.__selected=o.__selected,i.level=o.level,i}syncInOldRowNode(o,i){i&&o.id!==i.id&&this.selectedNodes.get(i.id)==o&&this.selectedNodes.set(i.id,i)}syncInNewRowNode(o){this.selectedNodes.has(o.id)?(o.__selected=!0,this.selectedNodes.set(o.id,o)):o.__selected=!1}reset(o){const i=this.getSelectionCount();this.resetNodes(),i&&this.dispatchSelectionChanged(o)}resetNodes(){this.selectedNodes.forEach(o=>{this.selectRowNode(o,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:o,rowModel:i}=this.beans;if(!oe(o))return;const s=i.getTopLevelNodes();if(s===null)return;const n=[];function r(l){for(let a=0,d=l.length;a<d;a++){const c=l[a];c.isSelected()?n.push(c):c.group&&c.childrenAfterGroup&&r(c.childrenAfterGroup)}}return r(s),n}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:o,selectAll:i}){const s=oe(this.gos);let n=!1;const r=l=>{const a=this.selectRowNode(Nt(l),!1,void 0,o);n||(n=a)};if(i==="currentPage"||i==="filtered"){if(!s){U(102);return}this.getNodesToSelect(i).forEach(r)}else this.selectedNodes.forEach(r),this.reset(o);if(this.selectionCtx.selectAll=!1,s&&this.groupSelectsDescendants){const l=this.updateGroupsFromChildrenSelections(o);n||(n=l)}n&&this.dispatchSelectionChanged(o)}getSelectedCounts(o){let i=0,s=0;return this.getNodesToSelect(o).forEach(n=>{this.groupSelectsDescendants&&n.group||(n.isSelected()?i++:n.selectable&&s++)}),{selectedCount:i,notSelectedCount:s}}getSelectAllState(o){const{selectedCount:i,notSelectedCount:s}=this.getSelectedCounts(o);return rd(i,s)??null}hasNodesToSelect(o){return this.getNodesToSelect(o).filter(i=>i.selectable).length>0}getNodesToSelect(o){if(!this.canSelectAll())return[];const i=[],s=r=>i.push(r);if(o==="currentPage")return this.forEachNodeOnPage(r=>{if(!r.group){s(r);return}if(!r.expanded&&!r.footer){const l=a=>{var d;s(a),(d=a.childrenAfterFilter)==null||d.forEach(l)};l(r);return}this.groupSelectsDescendants||s(r)}),i;const n=this.beans.rowModel;return o==="filtered"?(n.forEachNodeAfterFilter(s),i):(n.forEachNode(s),i)}forEachNodeOnPage(o){const{pageBounds:i,rowModel:s}=this.beans,n=i.getFirstRow(),r=i.getLastRow();for(let l=n;l<=r;l++){const a=s.getRow(l);a&&o(a)}}selectAllRowNodes(o){const{gos:i,selectionCtx:s}=this;if(!Qe(i)){k(132);return}if(Sc(i)&&!Qt(i)){k(130);return}if(!this.canSelectAll())return;const{source:n,selectAll:r}=o;let l=!1;if(this.getNodesToSelect(r).forEach(a=>{const d=this.selectRowNode(Nt(a),!0,void 0,n);l||(l=d)}),s.selectAll=!0,oe(i)&&this.groupSelectsDescendants){const a=this.updateGroupsFromChildrenSelections(n);l||(l=a)}l&&this.dispatchSelectionChanged(n)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(o,i,s){if(o||(o=[]),!Array.isArray(o)){U(103);return}const n=new Set(o),r=[];this.beans.rowModel.forEachNode(l=>{n.has(l.id)&&r.push(l)}),s&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:r,source:i})}canSelectAll(){const{gos:o}=this.beans;return!!oe(o)}updateSelectable(o){var c;const{gos:i,rowModel:s}=this.beans;if(!Qe(i))return;const n="selectableChanged",r=o!==void 0,l=oe(i)&&this.groupSelectsDescendants,a=[],d=u=>{var h;if(!(r&&!u.group)){if(l&&u.group){const g=((h=u.childrenAfterGroup)==null?void 0:h.some(p=>p.selectable))??!1;this.setRowSelectable(u,g,!0);return}!this.updateRowSelectable(u,!0)&&u.isSelected()&&a.push(u)}};if(l){if(o===void 0){const u=s.rootNode;o=u?new Ci(!1,u):void 0}o==null||o.forEachChangedNodeDepthFirst(d,!r,!r)}else s.forEachNode(d);a.length&&this.setNodesSelected({nodes:a,newValue:!1,source:n}),!r&&l&&((c=this.updateGroupsFromChildrenSelections)==null||c.call(this,n))}updateSelectableAfterGrouping(o){var i;this.updateSelectable(o),this.groupSelectsDescendants&&((i=this.updateGroupsFromChildrenSelections)!=null&&i.call(this,"rowGroupChanged",o))&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(o,i){var r,l;if(!this.masterSelectsDetail)return;const s=(l=(r=o.detailNode)==null?void 0:r.detailGridInfo)==null?void 0:l.api;if(!s)return;const n=Yy(s);if(o.isSelected()!==n&&this.selectRowNode(o,n,i,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!n){const a=this.detailSelection.get(o.id)??new Set;for(const d of s.getSelectedNodes())a.add(d.id);this.detailSelection.set(o.id,a)}}setDetailSelectionState(o,i,s){if(this.masterSelectsDetail){if(!Qt(i)){k(269);return}switch(o.isSelected()){case!0:{s.selectAll();break}case!1:{s.deselectAll();break}case void 0:{const n=this.detailSelection.get(o.id);if(n){const r=[];for(const l of n){const a=s.getRowNode(l);a&&r.push(a)}s.setNodesSelected({nodes:r,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(o){this.eventSvc.dispatchEvent({type:"selectionChanged",source:o,selectedNodes:this.getSelectedNodes(),serverSideState:null})}}function Nt(e){return Ai(e)?e.pinnedSibling:e.footer?e.sibling:e}function Yy(e){let t=0,o=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&o++}),rd(t,o)}function rd(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function Zy(e,t){let o=t.parent;for(;o;){if(o===e)return!0;o=o.parent}return!1}const ld={moduleName:"SharedRowSelection",version:Ii,beans:[ky],apiFunctions:{setNodesSelected:By,selectAll:Vy,deselectAll:Ny,getSelectedNodes:_y,getSelectedRows:Wy}},ad={moduleName:"RowSelection",version:Ii,rowModels:["clientSide","infinite","viewport"],beans:[qy],dependsOn:[ld]},Qy="ROOT_NODE_ID";class Xy extends x{constructor(){super(...arguments);R(this,"nextId",0);R(this,"allNodesMap",{});R(this,"rootNode",null)}getRowNode(o){return this.allNodesMap[o]}extractRowData(){var o,i;return(i=(o=this.rootNode)==null?void 0:o.allLeafChildren)==null?void 0:i.map(s=>s.data)}activate(o){this.rootNode=o,o.group=!0,o.level=-1,o.id=Qy,o.allLeafChildren=[],o.childrenAfterGroup=[],o.childrenAfterSort=[],o.childrenAfterAggFilter=[],o.childrenAfterFilter=[],this.updateRootSiblingArrays(o)}deactivate(){this.rootNode&&(this.allNodesMap={},this.rootNode=null)}destroy(){super.destroy(),this.allNodesMap={},this.rootNode=null}setNewRowData(o){const i=this.rootNode;i&&(this.dispatchRowDataUpdateStartedEvent(o),i.childrenAfterFilter=null,i.childrenAfterGroup=null,i.childrenAfterAggFilter=null,i.childrenAfterSort=null,i.childrenMapped=null,i.updateHasChildren(),this.allNodesMap={},this.nextId=0,this.loadNewRowData(o),this.updateRootSiblingArrays(i))}updateRootSiblingArrays(o){const i=o.sibling;i&&(i.childrenAfterFilter=o.childrenAfterFilter,i.childrenAfterGroup=o.childrenAfterGroup,i.childrenAfterAggFilter=o.childrenAfterAggFilter,i.childrenAfterSort=o.childrenAfterSort,i.childrenMapped=o.childrenMapped,i.allLeafChildren=o.allLeafChildren)}loadNewRowData(o){this.rootNode.allLeafChildren=(o==null?void 0:o.map((i,s)=>this.createRowNode(i,s)))??[]}setImmutableRowData(o,i){var C;const s=ko(this.gos),n=!this.gos.get("suppressMaintainUnsortedOrder"),r=o.changedRowNodes,l=new Set,a=this.rootNode,d=a.allLeafChildren,c=d.length;let u=!1,h=!1,g=!1,p=!1;for(let m=0,w=-1,b=i.length;m<b;m++){const v=i[m];let S=this.getRowNode(s({data:v,level:0}));if(!S)u=!0,S=this.createRowNode(v,-1),r.add(S);else{if(n){const D=S.sourceRowIndex;p||(p=D<=w||u),w=D}S.data!==v&&(g=!0,S.updateData(v),r.update(S))}l.add(S)}const f=[];for(let m=0;m<c;m++){const w=d[m];l.has(w)||(h=!0,w.isSelected()&&f.push(w),w.pinnedSibling&&((C=this.beans.pinnedRowModel)==null||C.pinRow(w.pinnedSibling,null)),this.rowNodeDeleted(w),r.remove(w))}if(u||h||p){const m=new Array(l.size);let w=0;if(!n)for(let v=0;v<c;++v){const S=d[v];l.delete(S)&&(S.sourceRowIndex=w,m[w++]=S)}for(const v of l)v.sourceRowIndex=w,m[w++]=v;a.allLeafChildren=m;const b=a.sibling;b&&(b.allLeafChildren=m),o.rowNodesOrderChanged||(o.rowNodesOrderChanged=p)}(u||h||p||g)&&(this.deselectNodes(f),o.rowDataUpdated=!0)}rowNodeDeleted(o){o.clearRowTopAndRowIndex();const i=o.id,s=this.allNodesMap;s[i]===o&&delete s[i]}updateRowData(o,i){this.dispatchRowDataUpdateStartedEvent(o.add);const s={changedRowNodes:i,rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},n=[],r=ko(this.gos);return this.executeRemove(r,o,s,n),this.executeUpdate(r,o,s,n),this.executeAdd(o,s),this.deselectNodes(n),s}executeAdd(o,i){var h;const s=o.add;if(!(s!=null&&s.length))return;let n=this.rootNode.allLeafChildren,r=n.length;if(typeof o.addIndex=="number"&&(r=this.sanitizeAddIndex(o.addIndex),r>0&&this.gos.get("treeData")&&this.gos.get("getDataPath"))){for(let g=0;g<n.length;g++)if(((h=n[g])==null?void 0:h.rowIndex)==r-1){r=g+1;break}}const l=s.length,a=i.changedRowNodes,d=new Array(l);for(let g=0;g<l;g++){const p=this.createRowNode(s[g],r+g);a.add(p),d[g]=p}const c=this.rootNode;if(r<n.length){const g=n.slice(0,r),p=n.slice(r,n.length),f=g.length+d.length;for(let C=0,m=p.length;C<m;++C)p[C].sourceRowIndex=f+C;n=[...g,...d,...p],i.rowsInserted=!0}else n=n.concat(d);c.allLeafChildren=n;const u=c.sibling;u&&(u.allLeafChildren=n),i.rowNodeTransaction.add=d}executeRemove(o,i,{changedRowNodes:s,rowNodeTransaction:n},r){var u,h;const{remove:l}=i;if(!(l!=null&&l.length))return;const a={};l.forEach(g=>{var f;const p=this.lookupRowNode(o,g);p&&(p.isSelected()&&r.push(p),p.pinnedSibling&&((f=this.beans.pinnedRowModel)==null||f.pinRow(p.pinnedSibling,null)),p.clearRowTopAndRowIndex(),a[p.id]=!0,delete this.allNodesMap[p.id],n.remove.push(p),s.remove(p))});const d=this.rootNode;d.allLeafChildren=((u=d.allLeafChildren)==null?void 0:u.filter(g=>!a[g.id]))??null,(h=d.allLeafChildren)==null||h.forEach((g,p)=>{g.sourceRowIndex=p});const c=d.sibling;c&&(c.allLeafChildren=d.allLeafChildren)}executeUpdate(o,i,{changedRowNodes:s,rowNodeTransaction:n},r){const{update:l}=i;l!=null&&l.length&&l.forEach(a=>{const d=this.lookupRowNode(o,a);d&&(d.updateData(a),!d.selectable&&d.isSelected()&&r.push(d),n.update.push(d),s.update(d))})}dispatchRowDataUpdateStartedEvent(o){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:o!=null&&o.length?o[0]:null})}deselectNodes(o){var r;const i="rowDataChanged",s=this.beans.selectionSvc,n=o.length>0;n&&(s==null||s.setNodesSelected({newValue:!1,nodes:o,suppressFinishActions:!0,source:i})),(r=s==null?void 0:s.updateGroupsFromChildrenSelections)==null||r.call(s,i),n&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:i,selectedNodes:(s==null?void 0:s.getSelectedNodes())??null,serverSideState:null})}sanitizeAddIndex(o){var s;const i=((s=this.rootNode.allLeafChildren)==null?void 0:s.length)??0;return o<0||o>=i||Number.isNaN(o)?i:Math.ceil(o)}createRowNode(o,i){const s=new so(this.beans);return s.parent=this.rootNode,s.level=0,s.group=!1,s.expanded=!1,s.sourceRowIndex=i,s.setDataAndId(o,String(this.nextId)),this.allNodesMap[s.id]&&k(2,{nodeId:s.id}),this.allNodesMap[s.id]=s,this.nextId++,s}lookupRowNode(o,i){var n,r;let s;if(o){const l=o({data:i,level:0});if(s=this.allNodesMap[l],!s)return U(4,{id:l}),null}else if(s=(r=(n=this.rootNode)==null?void 0:n.allLeafChildren)==null?void 0:r.find(l=>l.data===i),!s)return U(5,{data:i}),null;return s||null}}class Jy extends Xy{constructor(){super(...arguments);R(this,"beanName","csrmNodeSvc")}}class fn{constructor(){R(this,"removals",new Set);R(this,"updates",new Set);R(this,"adds",new Set)}remove(t){this.adds.delete(t)||(this.updates.delete(t),this.removals.add(t))}update(t){this.adds.has(t)||this.updates.add(t)}add(t){this.adds.add(t)}}function eR(e){e.sibling&&(e.sibling.childrenAfterFilter=e.childrenAfterFilter)}function tR(e){if(K(e.childrenAfterSort))return;const t=e.childrenAfterSort;for(let o=0;o<t.length;o++){const i=t[o],s=o===0,n=o===e.childrenAfterSort.length-1;i.setFirstChild(s),i.lastChild!==n&&(i.lastChild=n,i.dispatchRowEvent("lastChildChanged")),i.childIndex!==o&&(i.childIndex=o,i.dispatchRowEvent("childIndexChanged"))}}function dd(e){e.sibling&&(e.sibling.childrenAfterSort=e.childrenAfterSort),tR(e)}class oR extends x{constructor(){super(...arguments);R(this,"beanName","sortStage");R(this,"refreshProps",new Set(["postSortRows","groupDisplayType","accentedSort"]));R(this,"step","sort")}execute(o){const i=this.beans,s=i.sortSvc.getSortOptions(),n=M(s)&&s.length>0,r=n&&!!o.changedRowNodes&&this.gos.get("deltaSort"),l=s.some(({column:a})=>Re(i.gos)?a.isPrimary()&&a.isRowGroupActive():!!a.getColDef().showRowGroup);this.sort(i,s,n,r,o.changedRowNodes,o.changedPath,l)}sort(o,i,s,n,r,l,a){const{gos:d,colModel:c,rowGroupColsSvc:u,rowNodeSorter:h,rowRenderer:g,showRowGroupCols:p}=o,f=d.get("groupMaintainOrder"),C=c.getCols().some(S=>S.isRowGroupActive()),m=c.isPivotMode(),w=d.getCallback("postSortRows");let b=!1;const v=S=>{var F,P,T;const D=m&&S.leafGroup,I=f&&C&&!S.leafGroup&&!a;let O;if(I){const V=((P=(F=u==null?void 0:u.columns)==null?void 0:F[S.level+1])==null?void 0:P.getSort())===null,B=S.childrenAfterAggFilter.slice(0);if(S.childrenAfterSort&&!V){const W={};S.childrenAfterSort.forEach((z,de)=>{W[z.id]=de}),B.sort((z,de)=>(W[z.id]??0)-(W[de.id]??0))}O=B}else!s||D?O=S.childrenAfterAggFilter.slice(0):n&&r?O=iR(h,S,r,l,i):O=S.childrenAfterAggFilter.slice(0);if(b||(b=((T=S.childrenAfterSort)==null?void 0:T[0])!==O[0]),S.childrenAfterSort=O,dd(S),w){const V={nodes:S.childrenAfterSort};w(V)}};if(l==null||l.forEachChangedNodeDepthFirst(v),b&&this.gos.get("groupHideOpenParents")){const S=p==null?void 0:p.getShowRowGroupCols();S!=null&&S.length&&g.refreshCells({columns:S,force:!0})}}}function iR(e,t,o,i,s){const n=t.childrenAfterAggFilter,r=t.childrenAfterSort;if(!r)return e.doFullSort(n,s);const l=new Set,a=[],{updates:d,adds:c}=o;for(let h=0,g=n.length;h<g;++h){const p=n[h];d.has(p)||c.has(p)||i&&!i.canSkip(p)?a.push({currentPos:a.length,rowNode:p}):l.add(p.id)}const u=r.filter(h=>l.has(h.id)).map((h,g)=>({currentPos:g,rowNode:h}));return a.sort((h,g)=>e.compareRowNodes(s,h,g)),sR(e,s,a,u)}function sR(e,t,o,i){const s=[];let n=0,r=0;const l=o.length,a=i.length;for(;n<l&&r<a;){const d=o[n],c=i[r],u=e.compareRowNodes(t,d,c);let h;u<0?(h=d,++n):(h=c,++r),s.push(h.rowNode)}for(;n<l;)s.push(o[n++].rowNode);for(;r<a;)s.push(i[r++].rowNode);return s}class nR extends x{constructor(){super(...arguments);R(this,"beanName","rowModel");R(this,"colModel");R(this,"valueCache");R(this,"filterStage");R(this,"sortStage");R(this,"flattenStage");R(this,"groupStage");R(this,"aggStage");R(this,"pivotStage");R(this,"filterAggStage");R(this,"rootNode",null);R(this,"rowsToDisplay",[]);R(this,"nodeManager");R(this,"rowDataTransactionBatch");R(this,"rowDataUpdatedPending",!1);R(this,"applyAsyncTransactionsTimeout");R(this,"started",!1);R(this,"isRefreshingModel",!1);R(this,"rowNodesCountReady",!1);R(this,"rowCountReady",!1);R(this,"orderedStages");R(this,"onRowHeightChanged_debounced",ge(this,this.onRowHeightChanged.bind(this),100))}wireBeans(o){this.colModel=o.colModel,this.valueCache=o.valueCache,this.filterStage=o.filterStage,this.sortStage=o.sortStage,this.flattenStage=o.flattenStage,this.groupStage=o.groupStage,this.aggStage=o.aggStage,this.pivotStage=o.pivotStage,this.filterAggStage=o.filterAggStage}postConstruct(){this.orderedStages=[this.groupStage,this.filterStage,this.pivotStage,this.aggStage,this.sortStage,this.filterAggStage,this.flattenStage].filter(n=>!!n);const o=this.refreshModel.bind(this,{step:"group"}),i=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:o,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:o,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this)}),this.addPropertyListeners(),this.rootNode=new so(this.beans);const s=this.getNewNodeManager();this.nodeManager=s,s.activate(this.rootNode)}getNewNodeManager(){const{gos:o,beans:i}=this;return Dc(o)==="treeNested"&&i.csrmChildrenTreeNodeSvc||i.csrmNodeSvc}addPropertyListeners(){const o=["treeData","treeDataChildrenField",...this.orderedStages.flatMap(({refreshProps:i})=>[...i])];this.addManagedPropertyListeners(o,i=>{var n;const s=(n=i.changeSet)==null?void 0:n.properties;s&&this.onPropChange(s)}),this.addManagedPropertyListener("rowData",()=>this.onPropChange(["rowData"])),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(o,i,s,n){let r,l=!1;do{r=!1;const a=this.getRowIndexAtPixel(o),d=this.getRowIndexAtPixel(i),c=Math.max(a,s),u=Math.min(d,n);for(let h=c;h<=u;h++){const g=this.getRow(h);if(g.rowHeightEstimated){const p=_e(this.beans,g);g.setRowHeight(p.height),r=!0,l=!0}}r&&this.setRowTopAndRowIndex()}while(r);return l}onPropChange(o){if(!this.rootNode)return;const i=this.gos,s=new Set(o),n={step:"nothing",changedProps:s},r=s.has("rowData"),l=this.nodeManager,a=this.getNewNodeManager(),d=l!==a||r&&s.has("treeData")&&i.get("treeData")||s.has("treeDataChildrenField")&&i.get("treeData");let c;if((d||r)&&(c=i.get("rowData"),c!=null&&!Array.isArray(c)&&(c=null,k(1))),d&&(r||(c=(l==null?void 0:l.extractRowData())??c),l!==a&&(l==null||l.deactivate(),this.nodeManager=a),a.activate(this.rootNode)),c)if(!d&&!this.isEmpty()&&c.length>0&&i.exists("getRowId")&&!i.get("resetRowDataOnUpdate"))n.keepRenderedRows=!0,n.animate=!this.gos.get("suppressAnimationFrame"),n.changedRowNodes=new fn,a.setImmutableRowData(n,c);else{n.rowDataUpdated=!0,n.newData=!0;const{selectionSvc:u,pinnedRowModel:h}=this.beans;u==null||u.reset("rowDataChanged"),h!=null&&h.isManual()&&h.reset(),this.rowNodesCountReady=!0,a.setNewRowData(c)}if(n.rowDataUpdated)n.step="group";else if(n.step==="nothing"){for(const{refreshProps:u,step:h}of this.orderedStages)if(o.some(g=>u.has(g))){n.step=h;break}}n.step!=="nothing"&&this.refreshModel(n)}setRowTopAndRowIndex(){const{beans:o,rowsToDisplay:i}=this,s=o.environment.getDefaultRowHeight();let n=0;const r=new Set,l=ee(this.gos,"normal");for(let a=0,d=i.length;a<d;++a){const c=i[a];if(c.id!=null&&r.add(c.id),c.rowHeight==null){const u=_e(o,c,l,s);c.setRowHeight(u.height,u.estimated)}c.setRowTop(n),c.setRowIndex(a),n+=c.rowHeight}return r}clearRowTopAndRowIndex(o,i){const s=o.active,n=l=>{l&&l.id!=null&&!i.has(l.id)&&l.clearRowTopAndRowIndex()},r=l=>{if(l!==null&&(n(l),n(l.detailNode),n(l.sibling),l.hasChildren()&&l.childrenAfterGroup)){const a=l.level==-1;s&&!a&&!l.expanded||l.childrenAfterGroup.forEach(r)}};r(this.rootNode)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){const o=this.rootNode;if(!o||this.rowsToDisplay.length===0)return 0;if(this.rowsToDisplay&&this.rowsToDisplay[0]===o)return 1;const i=o.childrenAfterSort,s=o.sibling&&o.sibling.displayed?1:0;return(i?i.length:0)+s}getTopLevelRowDisplayedIndex(o){const{rootNode:i,rowsToDisplay:s}=this;if(!i||!s.length||s[0]===i)return o;const{childrenAfterSort:n}=i,r=a=>{let d=n[a];if(this.gos.get("groupHideOpenParents"))for(;d.expanded&&d.childrenAfterSort&&d.childrenAfterSort.length>0;)d=d.childrenAfterSort[0];return d.rowIndex},{footerSvc:l}=this.beans;return l?l.getTopDisplayIndex(s,o,n,r):r(o)}getTopLevelIndexFromDisplayedIndex(o){var l;const{rootNode:i,rowsToDisplay:s}=this;if(!i||!s.length||s[0]===i)return o;let n=this.getRow(o);for(n.footer&&(n=n.sibling);n.parent&&n.parent!==i;)n=n.parent;const r=(l=i.childrenAfterSort)==null?void 0:l.findIndex(a=>a===n);return r===-1?o:r??o}getRowBounds(o){const i=this.rowsToDisplay[o];return i?{rowTop:i.rowTop,rowHeight:i.rowHeight}:null}onRowGroupOpened(){const o=mt(this.gos);this.refreshModel({step:"map",keepRenderedRows:!0,animate:o})}onFilterChanged(o){if(o.afterDataChange)return;const i=mt(this.gos),s=o.columns.length===0||o.columns.some(n=>n.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:s,keepRenderedRows:!0,animate:i})}onSortChanged(){const o=mt(this.gos);this.refreshModel({step:"sort",keepRenderedRows:!1,animate:o})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(o){const i=new Ci(!1,this.rootNode);return o||(i.active=!1),i}isSuppressModelUpdateAfterUpdateTransaction(o){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:i,newData:s,rowDataUpdated:n}=o;return!(!i||s||!n||i.removals.size||i.adds.size)}refreshModel(o){var l,a,d;if(!this.rootNode)return;const i=this.beans;let s=!!o.rowDataUpdated;const n=o.changedPath??(o.changedPath=this.createChangePath(!o.newData&&s));if(this.started&&s&&this.eventSvc.dispatchEvent({type:"rowDataUpdated"}),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=s),!this.started||this.isRefreshingModel||this.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(o))return;switch(this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,o.rowDataUpdated=s=!0),this.isRefreshingModel=!0,(l=i.masterDetailSvc)==null||l.refreshModel(o),s&&o.step!=="group"&&((a=i.colFilter)==null||a.refreshModel()),o.step){case"group":(this.doRowGrouping(o)||s)&&((d=i.colFilter)==null||d.refreshModel()),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}));case"filter":this.doFilter(n);case"pivot":this.doPivot(n);case"aggregate":this.doAggregate(n);case"filter_aggregates":this.doFilterAggregates(n);case"sort":this.doSort(o.changedRowNodes,n);case"map":this.doRowsToDisplay()}const r=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(n,r),this.isRefreshingModel=!1,this.eventSvc.dispatchEvent({type:"modelUpdated",animate:o.animate,keepRenderedRows:o.keepRenderedRows,newData:o.newData,newPage:!1,keepUndoRedoStack:o.keepUndoRedoStack})}isEmpty(){var o,i,s;return!((i=(o=this.rootNode)==null?void 0:o.allLeafChildren)!=null&&i.length)||!((s=this.colModel)!=null&&s.ready)}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(o,i){let s=!1,n=!1;const r=[],l=Xt(this.gos);return this.forEachNodeAfterFilterAndSort(a=>{if(!n){if(s&&(a===i||a===o)&&(n=!0,a.group&&l)){r.push(...a.allLeafChildren);return}if(!s){if(a!==i&&a!==o)return;s=!0}if(!a.group||!l){r.push(a);return}}}),r}getTopLevelNodes(){var o;return((o=this.rootNode)==null?void 0:o.childrenAfterGroup)??null}getRow(o){return this.rowsToDisplay[o]}isRowPresent(o){return this.rowsToDisplay.indexOf(o)>=0}getRowIndexAtPixel(o){const i=this.rowsToDisplay;if(this.isEmpty()||i.length===0)return-1;let s=0,n=i.length-1;if(o<=0)return 0;if($(i).rowTop<=o)return i.length-1;let r=-1,l=-1;for(;;){const a=Math.floor((s+n)/2),d=i[a];if(this.isRowInPixel(d,o)||(d.rowTop<o?s=a+1:d.rowTop>o&&(n=a-1),r===s&&l===n))return a;r=s,l=n}}isRowInPixel(o,i){const s=o.rowTop,n=o.rowTop+o.rowHeight;return s<=i&&n>i}forEachLeafNode(o){var i,s;(s=(i=this.rootNode)==null?void 0:i.allLeafChildren)==null||s.forEach((n,r)=>o(n,r))}forEachNode(o,i=!1){this.depthFirstSearchRowNodes(o,i)}forEachDisplayedNode(o){this.rowsToDisplay.forEach(o)}forEachNodeAfterFilter(o,i=!1){this.depthFirstSearchRowNodes(o,i,s=>s.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(o,i=!1){this.depthFirstSearchRowNodes(o,i,s=>s.childrenAfterSort)}forEachPivotNode(o,i=!1,s=!1){const{colModel:n,rowGroupColsSvc:r}=this.beans;if(!n.isPivotMode())return;if(!(r!=null&&r.columns.length)){o(this.rootNode,0);return}const l=s?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(o,i,a=>a.leafGroup?null:a[l])}depthFirstSearchRowNodes(o,i=!1,s=l=>l.childrenAfterGroup,n=this.rootNode,r=0){let l=r;if(!n)return l;const a=n===this.rootNode;a||o(n,l++);const{footerSvc:d}=this.beans;if(n.hasChildren()&&!n.footer){const c=s(n);if(c){l=(d==null?void 0:d.addTotalRows(l,n,o,i,a,"top"))??l;for(const u of c)l=this.depthFirstSearchRowNodes(o,i,s,u,l);return(d==null?void 0:d.addTotalRows(l,n,o,i,a,"bottom"))??l}}return l}doAggregate(o){var s;const i=this.rootNode;i&&((s=this.aggStage)==null||s.execute({rowNode:i,changedPath:o}))}doFilterAggregates(o){const i=this.rootNode;this.filterAggStage?this.filterAggStage.execute({rowNode:i,changedPath:o}):i.childrenAfterAggFilter=i.childrenAfterFilter}doSort(o,i){this.sortStage?this.sortStage.execute({rowNode:this.rootNode,changedRowNodes:o,changedPath:i}):i.forEachChangedNodeDepthFirst(s=>{s.childrenAfterSort=s.childrenAfterAggFilter.slice(0),dd(s)})}doRowGrouping(o){var r;const i=this.rootNode,s=(r=this.groupStage)==null?void 0:r.execute({rowNode:i,changedRowNodes:o.changedRowNodes,changedPath:o.changedPath,rowNodesOrderChanged:!!o.rowNodesOrderChanged,afterColumnsChanged:!!o.afterColumnsChanged});if(s!==void 0)return s;const n=i.sibling;return i.childrenAfterGroup=i.allLeafChildren,n&&(n.childrenAfterGroup=i.childrenAfterGroup),i.updateHasChildren(),!1}doFilter(o){this.filterStage?this.filterStage.execute({rowNode:this.rootNode,changedPath:o}):o.forEachChangedNodeDepthFirst(i=>{i.childrenAfterFilter=i.childrenAfterGroup,eR(i)},!0)}doPivot(o){var i;(i=this.pivotStage)==null||i.execute({rowNode:this.rootNode,changedPath:o})}getRowNode(o){var s;const i=this.nodeManager.getRowNode(o);return typeof i=="object"?i:typeof o=="string"&&o.indexOf(Cs)===0?(s=this.groupStage)==null?void 0:s.getNode(o):void 0}batchUpdateRowData(o,i){if(this.applyAsyncTransactionsTimeout==null){this.rowDataTransactionBatch=[];const s=this.gos.get("asyncTransactionWaitMillis");this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.isAlive()&&this.executeBatchUpdateRowData()},s)}this.rowDataTransactionBatch.push({rowDataTransaction:o,callback:i})}flushAsyncTransactions(){this.applyAsyncTransactionsTimeout!=null&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){var r,l;(r=this.valueCache)==null||r.onDataChanged();const o=[],i=[],s=new fn;let n=!1;(l=this.rowDataTransactionBatch)==null||l.forEach(a=>{this.rowNodesCountReady=!0;const{rowNodeTransaction:d,rowsInserted:c}=this.nodeManager.updateRowData(a.rowDataTransaction,s);c&&(n=!0),i.push(d),a.callback&&o.push(a.callback.bind(null,d))}),this.commitTransactions(n,s),o.length>0&&window.setTimeout(()=>{o.forEach(a=>a())},0),i.length>0&&this.eventSvc.dispatchEvent({type:"asyncTransactionsFlushed",results:i}),this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(o){var r;(r=this.valueCache)==null||r.onDataChanged(),this.rowNodesCountReady=!0;const i=new fn,{rowNodeTransaction:s,rowsInserted:n}=this.nodeManager.updateRowData(o,i);return this.commitTransactions(n,i),s}commitTransactions(o,i){this.refreshModel({step:"group",rowDataUpdated:!0,rowNodesOrderChanged:o,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:i,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{flattenStage:o,rootNode:i}=this;let s;if(o)s=o.execute({rowNode:i});else{s=(i==null?void 0:i.childrenAfterSort)??[];for(const n of s)n.setUiLevel(0)}this.rowsToDisplay=s}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const o=this.rootNode;if(!o)return;const i=this.resetRowHeightsForAllRowNodes();o.setRowHeight(o.rowHeight,!0),o.sibling&&o.sibling.setRowHeight(o.sibling.rowHeight,!0),i&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let o=!1;return this.forEachNode(i=>{i.setRowHeight(i.rowHeight,!0);const s=i.detailNode;s&&s.setRowHeight(s.rowHeight,!0),i.sibling&&i.sibling.setRowHeight(i.sibling.rowHeight,!0),o=!0}),o}onGridStylesChanges(o){var i;if(o.rowHeightChanged){if((i=this.beans.rowAutoHeight)!=null&&i.active)return;this.resetRowHeights()}}onGridReady(){this.started||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}destroy(){super.destroy(),this.started=!1,this.rootNode=null,this.nodeManager=null,this.rowDataTransactionBatch=null,this.orderedStages=hr,this.rowsToDisplay=hr}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}}function rR(e){var t;(t=e.expansionSvc)==null||t.onGroupExpandedOrCollapsed()}function lR(e,t){const o=Te(e);o&&((!t||t==="everything")&&(t="group"),o.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function aR(e){var t;return((t=Te(e))==null?void 0:t.isEmpty())??!0}function dR(e,t){var o;(o=Te(e))==null||o.forEachLeafNode(t)}function cR(e,t){var o;(o=Te(e))==null||o.forEachNodeAfterFilter(t)}function uR(e,t){var o;(o=Te(e))==null||o.forEachNodeAfterFilterAndSort(t)}function hR(e){var t,o;if((t=e.rowAutoHeight)!=null&&t.active){k(3);return}(o=Te(e))==null||o.resetRowHeights()}function gR(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var o;return(o=Te(e))==null?void 0:o.updateRowData(t)})}function pR(e,t,o){e.frameworkOverrides.wrapIncoming(()=>{var i;return(i=Te(e))==null?void 0:i.batchUpdateRowData(t,o)})}function fR(e){e.frameworkOverrides.wrapIncoming(()=>{var t;return(t=Te(e))==null?void 0:t.flushAsyncTransactions()})}function CR(e){var t;return(t=e.selectionSvc)==null?void 0:t.getBestCostNodeSelection()}const cd={moduleName:"ClientSideRowModel",version:Ii,rowModels:["clientSide"],beans:[Jy,nR,oR],dependsOn:[ga]},ud={moduleName:"ClientSideRowModelApi",version:Ii,apiFunctions:{onGroupExpandedOrCollapsed:rR,refreshClientSideRowModel:lR,isRowDataEmpty:aR,forEachLeafNode:dR,forEachNodeAfterFilter:cR,forEachNodeAfterFilterAndSort:uR,resetRowHeights:hR,applyTransaction:gR,applyTransactionAsync:pR,flushAsyncTransactions:fR,getBestCostNodeSelection:CR},dependsOn:[nS]};class vo{static getComponentDefinition(t,o){let i;return typeof t=="string"?i=this.searchForComponentInstance(o,t):i={extends:E.defineComponent({...t})},i||U(114,{component:t}),i.extends?(i.extends.setup&&(i.setup=i.extends.setup),i.extends.props=this.addParamsToProps(i.extends.props)):i.props=this.addParamsToProps(i.props),i}static addParamsToProps(t){return!t||Array.isArray(t)&&t.indexOf("params")===-1?t=["params",...t||[]]:typeof t=="object"&&!t.params&&(t.params={type:Object}),t}static createAndMountComponent(t,o,i,s){const n=vo.getComponentDefinition(t,i);if(!n)return;const{vm:r,destroy:l,el:a}=this.mount(n,{params:Object.freeze(o)},i,s||{});return{componentInstance:r,element:a,destroy:l}}static mount(t,o,i,s){let n=new E({beforeCreate(){s?(this._provided=Object.create(i.proxy._provided||null),Object.keys(s).forEach(a=>{this._provided[a]=s[a]})):this._provided=i.proxy._provided||{};const l=i.proxy.$root;l&&l.$router&&(Object.defineProperty(this,"$route",{value:i.proxy.$root.$route,writable:!1,configurable:!0}),Object.defineProperty(this,"$router",{value:i.proxy.$root.$router,writable:!1,configurable:!0}))},render(l){return l(t,{props:o})}});return n.$mount(),{vm:n,destroy:()=>{n&&(n.$destroy(),n=null)},el:n.$el}}static searchForComponentInstance(t,o,i=10,s=!1){let n=null,r=0,l=t.proxy.$parent;for(;!n&&l&&l.components&&++r<i;)l.components&&l.components[o]&&(n=l.components[o]),l=l.$parent;for(r=0,l=t.proxy.$parent;!n&&l&&l.$options&&++r<i;){const a=l;a.$options&&a.$options.components&&a.$options.components[o]?n=a.$options.components[o]:a[o]&&(n=a[o]),l=l.$parent}for(r=0,l=t.proxy.$parent;!n&&l&&++r<i;){if(l.exposed){const a=l;a.exposed&&a.exposed[o]?n=a.exposed[o]:a[o]&&(n=a[o])}l=l.$parent}return n||E.options&&E.options.components&&E.options.components[o]&&(n=E.options.components[o]),!n&&!s?(U(114,{component:o}),null):n}}var mR=Object.defineProperty,wR=(e,t,o)=>t in e?mR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,bo=(e,t,o)=>wR(e,typeof t!="symbol"?t+"":t,o);class vR extends Nv{constructor(t,o){super(),bo(this,"parent"),bo(this,"provides"),this.parent=t,this.provides=o}createWrapper(t){const o=this;class i extends bR{init(r){super.init(r)}hasMethod(r){return s.getFrameworkComponentInstance()[r]}callMethod(r,l){var a,d;const c=this.getFrameworkComponentInstance(),u=s.getFrameworkComponentInstance();if(u[r])return u[r].apply(c,l);{const h=((a=c.$.exposed)==null?void 0:a[r])||((d=c.exposed)==null?void 0:d[r])||c.$.setupState[r];return h==null?void 0:h.apply(c,l)}}addMethod(r,l){s[r]=l}processMethod(r,l){return r==="refresh"&&(this.getFrameworkComponentInstance().params=l[0]),this.hasMethod(r)?this.callMethod(r,l):r==="refresh"}createComponent(r){return o.createComponent(t,r)}}const s=new i;return s}createComponent(t,o){return vo.createAndMountComponent(t,o,this.parent,this.provides)}createMethodProxy(t,o,i){return function(){return t.hasMethod(o)?t.callMethod(o,arguments):(i&&k(233,{methodName:o}),null)}}destroy(){this.parent=null}}class bR{constructor(){bo(this,"componentInstance"),bo(this,"element"),bo(this,"unmount")}getGui(){return this.element}destroy(){this.getFrameworkComponentInstance()&&typeof this.getFrameworkComponentInstance().destroy=="function"&&this.getFrameworkComponentInstance().destroy(),this.unmount()}getFrameworkComponentInstance(){return this.componentInstance}init(t){const{componentInstance:o,element:i,destroy:s}=this.createComponent(t);this.componentInstance=o,this.unmount=s,this.element=i}}var SR=Object.defineProperty,yR=(e,t,o)=>t in e?SR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,RR=(e,t,o)=>yR(e,t+"",o);class ER extends Fl{constructor(t){super("vue"),RR(this,"parent"),this.parent=t}frameworkComponent(t,o){let i=vo.searchForComponentInstance(this.parent,t,10,!0)?t:null;if(!i&&o&&o[t]){const s=o[t];i=vo.searchForComponentInstance(this.parent,s,10,!0)?s:null}return i}isFrameworkComponent(t){return typeof t=="object"}}function xR(){return{gridOptions:()=>({}),modules:()=>[],statusBar:void 0,sideBar:void 0,suppressContextMenu:void 0,preventDefaultOnContextMenu:void 0,allowContextMenuWithControlKey:void 0,columnMenu:void 0,suppressMenuHide:void 0,enableBrowserTooltips:void 0,tooltipTrigger:void 0,tooltipShowDelay:void 0,tooltipHideDelay:void 0,tooltipMouseTrack:void 0,tooltipShowMode:void 0,tooltipInteraction:void 0,popupParent:void 0,copyHeadersToClipboard:void 0,copyGroupHeadersToClipboard:void 0,clipboardDelimiter:void 0,suppressCopyRowsToClipboard:void 0,suppressCopySingleCellRanges:void 0,suppressLastEmptyLineOnPaste:void 0,suppressClipboardPaste:void 0,suppressClipboardApi:void 0,suppressCutToClipboard:void 0,columnDefs:void 0,defaultColDef:void 0,defaultColGroupDef:void 0,columnTypes:void 0,dataTypeDefinitions:void 0,maintainColumnOrder:void 0,enableStrictPivotColumnOrder:void 0,suppressFieldDotNotation:void 0,headerHeight:void 0,groupHeaderHeight:void 0,floatingFiltersHeight:void 0,pivotHeaderHeight:void 0,pivotGroupHeaderHeight:void 0,hidePaddedHeaderRows:void 0,allowDragFromColumnsToolPanel:void 0,suppressMovableColumns:void 0,suppressColumnMoveAnimation:void 0,suppressMoveWhenColumnDragging:void 0,suppressDragLeaveHidesColumns:void 0,suppressGroupChangesColumnVisibility:void 0,suppressMakeColumnVisibleAfterUnGroup:void 0,suppressRowGroupHidesColumns:void 0,colResizeDefault:void 0,suppressAutoSize:void 0,autoSizePadding:void 0,skipHeaderOnAutoSize:void 0,autoSizeStrategy:void 0,components:void 0,editType:void 0,suppressStartEditOnTab:void 0,getFullRowEditValidationErrors:void 0,invalidEditValueMode:void 0,singleClickEdit:void 0,suppressClickEdit:void 0,readOnlyEdit:void 0,stopEditingWhenCellsLoseFocus:void 0,enterNavigatesVertically:void 0,enterNavigatesVerticallyAfterEdit:void 0,enableCellEditingOnBackspace:void 0,undoRedoCellEditing:void 0,undoRedoCellEditingLimit:void 0,defaultCsvExportParams:void 0,suppressCsvExport:void 0,defaultExcelExportParams:void 0,suppressExcelExport:void 0,excelStyles:void 0,findSearchValue:void 0,findOptions:void 0,quickFilterText:void 0,cacheQuickFilter:void 0,includeHiddenColumnsInQuickFilter:void 0,quickFilterParser:void 0,quickFilterMatcher:void 0,applyQuickFilterBeforePivotOrAgg:void 0,excludeChildrenWhenTreeDataFiltering:void 0,enableAdvancedFilter:void 0,alwaysPassFilter:void 0,includeHiddenColumnsInAdvancedFilter:void 0,advancedFilterParent:void 0,advancedFilterBuilderParams:void 0,advancedFilterParams:void 0,suppressAdvancedFilterEval:void 0,suppressSetFilterByDefault:void 0,enableFilterHandlers:void 0,filterHandlers:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,localeText:void 0,masterDetail:void 0,keepDetailRows:void 0,keepDetailRowsCount:void 0,detailCellRenderer:void 0,detailCellRendererParams:void 0,detailRowHeight:void 0,detailRowAutoHeight:void 0,context:void 0,alignedGrids:void 0,tabIndex:void 0,rowBuffer:void 0,valueCache:void 0,valueCacheNeverExpires:void 0,enableCellExpressions:void 0,suppressTouch:void 0,suppressFocusAfterRefresh:void 0,suppressBrowserResizeObserver:void 0,suppressPropertyNamesCheck:void 0,suppressChangeDetection:void 0,debug:void 0,loading:void 0,overlayLoadingTemplate:void 0,loadingOverlayComponent:void 0,loadingOverlayComponentParams:void 0,suppressLoadingOverlay:void 0,overlayNoRowsTemplate:void 0,noRowsOverlayComponent:void 0,noRowsOverlayComponentParams:void 0,suppressNoRowsOverlay:void 0,pagination:void 0,paginationPageSize:void 0,paginationPageSizeSelector:void 0,paginationAutoPageSize:void 0,paginateChildRows:void 0,suppressPaginationPanel:void 0,pivotMode:void 0,pivotPanelShow:void 0,pivotMaxGeneratedColumns:void 0,pivotDefaultExpanded:void 0,pivotColumnGroupTotals:void 0,pivotRowTotals:void 0,pivotSuppressAutoColumn:void 0,suppressExpandablePivotGroups:void 0,functionsReadOnly:void 0,aggFuncs:void 0,suppressAggFuncInHeader:void 0,alwaysAggregateAtRootLevel:void 0,aggregateOnlyChangedColumns:void 0,suppressAggFilteredOnly:void 0,removePivotHeaderRowWhenSingleValueColumn:void 0,animateRows:void 0,cellFlashDuration:void 0,cellFadeDuration:void 0,allowShowChangeAfterFilter:void 0,domLayout:void 0,ensureDomOrder:void 0,enableCellSpan:void 0,enableRtl:void 0,suppressColumnVirtualisation:void 0,suppressMaxRenderedRowRestriction:void 0,suppressRowVirtualisation:void 0,rowDragManaged:void 0,rowDragInsertDelay:void 0,suppressRowDrag:void 0,suppressMoveWhenRowDragging:void 0,rowDragEntireRow:void 0,rowDragMultiRow:void 0,rowDragText:void 0,dragAndDropImageComponent:void 0,dragAndDropImageComponentParams:void 0,fullWidthCellRenderer:void 0,fullWidthCellRendererParams:void 0,embedFullWidthRows:void 0,groupDisplayType:void 0,groupDefaultExpanded:void 0,autoGroupColumnDef:void 0,groupMaintainOrder:void 0,groupSelectsChildren:void 0,groupLockGroupColumns:void 0,groupAggFiltering:void 0,groupTotalRow:void 0,grandTotalRow:void 0,suppressStickyTotalRow:void 0,groupSuppressBlankHeader:void 0,groupSelectsFiltered:void 0,showOpenedGroup:void 0,groupHideParentOfSingleChild:void 0,groupRemoveSingleChildren:void 0,groupRemoveLowestSingleChildren:void 0,groupHideOpenParents:void 0,groupAllowUnbalanced:void 0,rowGroupPanelShow:void 0,groupRowRenderer:void 0,groupRowRendererParams:void 0,treeData:void 0,treeDataChildrenField:void 0,treeDataParentIdField:void 0,rowGroupPanelSuppressSort:void 0,suppressGroupRowsSticky:void 0,groupHierarchyConfig:void 0,pinnedTopRowData:void 0,pinnedBottomRowData:void 0,enableRowPinning:void 0,isRowPinnable:void 0,isRowPinned:void 0,rowModelType:void 0,rowData:void 0,asyncTransactionWaitMillis:void 0,suppressModelUpdateAfterUpdateTransaction:void 0,datasource:void 0,cacheOverflowSize:void 0,infiniteInitialRowCount:void 0,serverSideInitialRowCount:void 0,suppressServerSideFullWidthLoadingRow:void 0,cacheBlockSize:void 0,maxBlocksInCache:void 0,maxConcurrentDatasourceRequests:void 0,blockLoadDebounceMillis:void 0,purgeClosedRowNodes:void 0,serverSideDatasource:void 0,serverSideSortAllLevels:void 0,serverSideEnableClientSideSort:void 0,serverSideOnlyRefreshFilteredGroups:void 0,serverSidePivotResultFieldSeparator:void 0,viewportDatasource:void 0,viewportRowModelPageSize:void 0,viewportRowModelBufferSize:void 0,alwaysShowHorizontalScroll:void 0,alwaysShowVerticalScroll:void 0,debounceVerticalScrollbar:void 0,suppressHorizontalScroll:void 0,suppressScrollOnNewData:void 0,suppressScrollWhenPopupsAreOpen:void 0,suppressAnimationFrame:void 0,suppressMiddleClickScrolls:void 0,suppressPreventDefaultOnMouseWheel:void 0,scrollbarWidth:void 0,rowSelection:void 0,cellSelection:void 0,rowMultiSelectWithClick:void 0,suppressRowDeselection:void 0,suppressRowClickSelection:void 0,suppressCellFocus:void 0,suppressHeaderFocus:void 0,selectionColumnDef:void 0,rowNumbers:void 0,suppressMultiRangeSelection:void 0,enableCellTextSelection:void 0,enableRangeSelection:void 0,enableRangeHandle:void 0,enableFillHandle:void 0,fillHandleDirection:void 0,suppressClearOnFillReduction:void 0,sortingOrder:void 0,accentedSort:void 0,unSortIcon:void 0,suppressMultiSort:void 0,alwaysMultiSort:void 0,multiSortKey:void 0,suppressMaintainUnsortedOrder:void 0,icons:void 0,rowHeight:void 0,rowStyle:void 0,rowClass:void 0,rowClassRules:void 0,suppressRowHoverHighlight:void 0,suppressRowTransform:void 0,columnHoverHighlight:void 0,gridId:void 0,deltaSort:void 0,treeDataDisplayType:void 0,enableGroupEdit:void 0,initialState:void 0,theme:void 0,loadThemeGoogleFonts:void 0,themeCssLayer:void 0,styleNonce:void 0,themeStyleContainer:void 0,getContextMenuItems:void 0,getMainMenuItems:void 0,postProcessPopup:void 0,processUnpinnedColumns:void 0,processCellForClipboard:void 0,processHeaderForClipboard:void 0,processGroupHeaderForClipboard:void 0,processCellFromClipboard:void 0,sendToClipboard:void 0,processDataFromClipboard:void 0,isExternalFilterPresent:void 0,doesExternalFilterPass:void 0,getChartToolbarItems:void 0,createChartContainer:void 0,focusGridInnerElement:void 0,navigateToNextHeader:void 0,tabToNextHeader:void 0,navigateToNextCell:void 0,tabToNextCell:void 0,getLocaleText:void 0,getDocument:void 0,paginationNumberFormatter:void 0,getGroupRowAgg:void 0,isGroupOpenByDefault:void 0,ssrmExpandAllAffectsAllRows:void 0,initialGroupOrderComparator:void 0,processPivotResultColDef:void 0,processPivotResultColGroupDef:void 0,getDataPath:void 0,getChildCount:void 0,getServerSideGroupLevelParams:void 0,isServerSideGroupOpenByDefault:void 0,isApplyServerSideTransaction:void 0,isServerSideGroup:void 0,getServerSideGroupKey:void 0,getBusinessKeyForNode:void 0,getRowId:void 0,resetRowDataOnUpdate:void 0,processRowPostCreate:void 0,isRowSelectable:void 0,isRowMaster:void 0,fillOperation:void 0,postSortRows:void 0,getRowStyle:void 0,getRowClass:void 0,getRowHeight:void 0,isFullWidthRow:void 0,isRowValidDropPosition:void 0,"onColumn-everything-changed":void 0,"onNew-columns-loaded":void 0,"onColumn-pivot-mode-changed":void 0,"onPivot-max-columns-exceeded":void 0,"onColumn-row-group-changed":void 0,"onExpand-or-collapse-all":void 0,"onColumn-pivot-changed":void 0,"onGrid-columns-changed":void 0,"onColumn-value-changed":void 0,"onColumn-moved":void 0,"onColumn-visible":void 0,"onColumn-pinned":void 0,"onColumn-group-opened":void 0,"onColumn-resized":void 0,"onDisplayed-columns-changed":void 0,"onVirtual-columns-changed":void 0,"onColumn-header-mouse-over":void 0,"onColumn-header-mouse-leave":void 0,"onColumn-header-clicked":void 0,"onColumn-header-context-menu":void 0,"onAsync-transactions-flushed":void 0,"onRow-group-opened":void 0,"onRow-data-updated":void 0,"onPinned-row-data-changed":void 0,"onPinned-rows-changed":void 0,"onRange-selection-changed":void 0,"onCell-selection-changed":void 0,"onChart-created":void 0,"onChart-range-selection-changed":void 0,"onChart-options-changed":void 0,"onChart-destroyed":void 0,"onTool-panel-visible-changed":void 0,"onTool-panel-size-changed":void 0,"onModel-updated":void 0,"onCut-start":void 0,"onCut-end":void 0,"onPaste-start":void 0,"onPaste-end":void 0,"onFill-start":void 0,"onFill-end":void 0,"onCell-selection-delete-start":void 0,"onCell-selection-delete-end":void 0,"onRange-delete-start":void 0,"onRange-delete-end":void 0,"onUndo-started":void 0,"onUndo-ended":void 0,"onRedo-started":void 0,"onRedo-ended":void 0,"onCell-clicked":void 0,"onCell-double-clicked":void 0,"onCell-mouse-down":void 0,"onCell-context-menu":void 0,"onCell-value-changed":void 0,"onCell-edit-request":void 0,"onRow-value-changed":void 0,"onHeader-focused":void 0,"onCell-focused":void 0,"onRow-selected":void 0,"onSelection-changed":void 0,"onTooltip-show":void 0,"onTooltip-hide":void 0,"onCell-key-down":void 0,"onCell-mouse-over":void 0,"onCell-mouse-out":void 0,"onFilter-changed":void 0,"onFilter-modified":void 0,"onFilter-ui-changed":void 0,"onFilter-opened":void 0,"onFloating-filter-ui-changed":void 0,"onAdvanced-filter-builder-visible-changed":void 0,"onSort-changed":void 0,"onVirtual-row-removed":void 0,"onRow-clicked":void 0,"onRow-double-clicked":void 0,"onGrid-ready":void 0,"onGrid-pre-destroyed":void 0,"onGrid-size-changed":void 0,"onViewport-changed":void 0,"onFirst-data-rendered":void 0,"onDrag-started":void 0,"onDrag-stopped":void 0,"onDrag-cancelled":void 0,"onRow-editing-started":void 0,"onRow-editing-stopped":void 0,"onCell-editing-started":void 0,"onCell-editing-stopped":void 0,"onBody-scroll":void 0,"onBody-scroll-end":void 0,"onPagination-changed":void 0,"onComponent-state-changed":void 0,"onStore-refreshed":void 0,"onState-updated":void 0,"onColumn-menu-visible-changed":void 0,"onContext-menu-visible-changed":void 0,"onRow-drag-enter":void 0,"onRow-drag-move":void 0,"onRow-drag-leave":void 0,"onRow-drag-end":void 0,"onRow-drag-cancel":void 0,"onFind-changed":void 0,"onRow-resize-started":void 0,"onRow-resize-ended":void 0,"onColumns-reset":void 0,"onBulk-editing-started":void 0,"onBulk-editing-stopped":void 0,"onBatch-editing-started":void 0,"onBatch-editing-stopped":void 0}}const DR=(e,t)=>{let o;return()=>{const i=function(){e()};window.clearTimeout(o),o=window.setTimeout(i,t)}};function FR(e){return e&&e.constructor&&e.constructor.toString().substring(0,5)==="class"}function So(e){const t=new WeakSet,o=i=>{if(FR(i))return E.toRaw(i);if(E.isRef(i)||E.isReactive(i)||E.isProxy(i)){const s=E.toRaw(i);return s===i?i:o(s)}if(i!==null&&typeof i=="object"){if(t.has(i))return i;t.add(i)}return Array.isArray(i)?i.map(s=>o(s)):i};return o(e)}const PR=E.defineComponent({__name:"AgGridVue",props:E.mergeDefaults({gridOptions:null,modules:null,modelValue:null,statusBar:null,sideBar:{type:[String,Boolean]},suppressContextMenu:{type:Boolean},preventDefaultOnContextMenu:{type:Boolean},allowContextMenuWithControlKey:{type:Boolean},columnMenu:null,suppressMenuHide:{type:Boolean},enableBrowserTooltips:{type:Boolean},tooltipTrigger:null,tooltipShowDelay:null,tooltipHideDelay:null,tooltipMouseTrack:{type:Boolean},tooltipShowMode:null,tooltipInteraction:{type:Boolean},popupParent:null,copyHeadersToClipboard:{type:Boolean},copyGroupHeadersToClipboard:{type:Boolean},clipboardDelimiter:null,suppressCopyRowsToClipboard:{type:Boolean},suppressCopySingleCellRanges:{type:Boolean},suppressLastEmptyLineOnPaste:{type:Boolean},suppressClipboardPaste:{type:Boolean},suppressClipboardApi:{type:Boolean},suppressCutToClipboard:{type:Boolean},columnDefs:null,defaultColDef:null,defaultColGroupDef:null,columnTypes:null,dataTypeDefinitions:null,maintainColumnOrder:{type:Boolean},enableStrictPivotColumnOrder:{type:Boolean},suppressFieldDotNotation:{type:Boolean},headerHeight:null,groupHeaderHeight:null,floatingFiltersHeight:null,pivotHeaderHeight:null,pivotGroupHeaderHeight:null,hidePaddedHeaderRows:{type:Boolean},allowDragFromColumnsToolPanel:{type:Boolean},suppressMovableColumns:{type:Boolean},suppressColumnMoveAnimation:{type:Boolean},suppressMoveWhenColumnDragging:{type:Boolean},suppressDragLeaveHidesColumns:{type:Boolean},suppressGroupChangesColumnVisibility:{type:[Boolean,String]},suppressMakeColumnVisibleAfterUnGroup:{type:Boolean},suppressRowGroupHidesColumns:{type:Boolean},colResizeDefault:null,suppressAutoSize:{type:Boolean},autoSizePadding:null,skipHeaderOnAutoSize:{type:Boolean},autoSizeStrategy:null,components:null,editType:null,suppressStartEditOnTab:{type:Boolean},getFullRowEditValidationErrors:null,invalidEditValueMode:null,singleClickEdit:{type:Boolean},suppressClickEdit:{type:Boolean},readOnlyEdit:{type:Boolean},stopEditingWhenCellsLoseFocus:{type:Boolean},enterNavigatesVertically:{type:Boolean},enterNavigatesVerticallyAfterEdit:{type:Boolean},enableCellEditingOnBackspace:{type:Boolean},undoRedoCellEditing:{type:Boolean},undoRedoCellEditingLimit:null,defaultCsvExportParams:null,suppressCsvExport:{type:Boolean},defaultExcelExportParams:null,suppressExcelExport:{type:Boolean},excelStyles:null,findSearchValue:null,findOptions:null,quickFilterText:null,cacheQuickFilter:{type:Boolean},includeHiddenColumnsInQuickFilter:{type:Boolean},quickFilterParser:{type:Function},quickFilterMatcher:{type:Function},applyQuickFilterBeforePivotOrAgg:{type:Boolean},excludeChildrenWhenTreeDataFiltering:{type:Boolean},enableAdvancedFilter:{type:Boolean},alwaysPassFilter:{type:Function},includeHiddenColumnsInAdvancedFilter:{type:Boolean},advancedFilterParent:null,advancedFilterBuilderParams:null,advancedFilterParams:null,suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},enableFilterHandlers:{type:Boolean},filterHandlers:null,loadingCellRenderer:null,loadingCellRendererParams:null,loadingCellRendererSelector:null,localeText:null,masterDetail:{type:Boolean},keepDetailRows:{type:Boolean},keepDetailRowsCount:null,detailCellRenderer:null,detailCellRendererParams:null,detailRowHeight:null,detailRowAutoHeight:{type:Boolean},context:null,alignedGrids:{type:Function},tabIndex:null,rowBuffer:null,valueCache:{type:Boolean},valueCacheNeverExpires:{type:Boolean},enableCellExpressions:{type:Boolean},suppressTouch:{type:Boolean},suppressFocusAfterRefresh:{type:Boolean},suppressBrowserResizeObserver:{type:Boolean},suppressPropertyNamesCheck:{type:Boolean},suppressChangeDetection:{type:Boolean},debug:{type:Boolean},loading:{type:Boolean},overlayLoadingTemplate:null,loadingOverlayComponent:null,loadingOverlayComponentParams:null,suppressLoadingOverlay:{type:Boolean},overlayNoRowsTemplate:null,noRowsOverlayComponent:null,noRowsOverlayComponentParams:null,suppressNoRowsOverlay:{type:Boolean},pagination:{type:Boolean},paginationPageSize:null,paginationPageSizeSelector:{type:Boolean},paginationAutoPageSize:{type:Boolean},paginateChildRows:{type:Boolean},suppressPaginationPanel:{type:Boolean},pivotMode:{type:Boolean},pivotPanelShow:null,pivotMaxGeneratedColumns:null,pivotDefaultExpanded:null,pivotColumnGroupTotals:null,pivotRowTotals:null,pivotSuppressAutoColumn:{type:Boolean},suppressExpandablePivotGroups:{type:Boolean},functionsReadOnly:{type:Boolean},aggFuncs:null,suppressAggFuncInHeader:{type:Boolean},alwaysAggregateAtRootLevel:{type:Boolean},aggregateOnlyChangedColumns:{type:Boolean},suppressAggFilteredOnly:{type:Boolean},removePivotHeaderRowWhenSingleValueColumn:{type:Boolean},animateRows:{type:Boolean},cellFlashDuration:null,cellFadeDuration:null,allowShowChangeAfterFilter:{type:Boolean},domLayout:null,ensureDomOrder:{type:Boolean},enableCellSpan:{type:Boolean},enableRtl:{type:Boolean},suppressColumnVirtualisation:{type:Boolean},suppressMaxRenderedRowRestriction:{type:Boolean},suppressRowVirtualisation:{type:Boolean},rowDragManaged:{type:Boolean},rowDragInsertDelay:null,suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},dragAndDropImageComponent:null,dragAndDropImageComponentParams:null,fullWidthCellRenderer:null,fullWidthCellRendererParams:null,embedFullWidthRows:{type:Boolean},groupDisplayType:null,groupDefaultExpanded:null,autoGroupColumnDef:null,groupMaintainOrder:{type:Boolean},groupSelectsChildren:{type:Boolean},groupLockGroupColumns:null,groupAggFiltering:{type:Boolean},groupTotalRow:null,grandTotalRow:null,suppressStickyTotalRow:{type:[Boolean,String]},groupSuppressBlankHeader:{type:Boolean},groupSelectsFiltered:{type:Boolean},showOpenedGroup:{type:Boolean},groupHideParentOfSingleChild:{type:[Boolean,String]},groupRemoveSingleChildren:{type:Boolean},groupRemoveLowestSingleChildren:{type:Boolean},groupHideOpenParents:{type:Boolean},groupAllowUnbalanced:{type:Boolean},rowGroupPanelShow:null,groupRowRenderer:null,groupRowRendererParams:null,treeData:{type:Boolean},treeDataChildrenField:null,treeDataParentIdField:null,rowGroupPanelSuppressSort:{type:Boolean},suppressGroupRowsSticky:{type:Boolean},groupHierarchyConfig:null,pinnedTopRowData:null,pinnedBottomRowData:null,enableRowPinning:{type:[Boolean,String]},isRowPinnable:null,isRowPinned:null,rowModelType:null,rowData:null,asyncTransactionWaitMillis:null,suppressModelUpdateAfterUpdateTransaction:{type:Boolean},datasource:null,cacheOverflowSize:null,infiniteInitialRowCount:null,serverSideInitialRowCount:null,suppressServerSideFullWidthLoadingRow:{type:Boolean},cacheBlockSize:null,maxBlocksInCache:null,maxConcurrentDatasourceRequests:null,blockLoadDebounceMillis:null,purgeClosedRowNodes:{type:Boolean},serverSideDatasource:null,serverSideSortAllLevels:{type:Boolean},serverSideEnableClientSideSort:{type:Boolean},serverSideOnlyRefreshFilteredGroups:{type:Boolean},serverSidePivotResultFieldSeparator:null,viewportDatasource:null,viewportRowModelPageSize:null,viewportRowModelBufferSize:null,alwaysShowHorizontalScroll:{type:Boolean},alwaysShowVerticalScroll:{type:Boolean},debounceVerticalScrollbar:{type:Boolean},suppressHorizontalScroll:{type:Boolean},suppressScrollOnNewData:{type:Boolean},suppressScrollWhenPopupsAreOpen:{type:Boolean},suppressAnimationFrame:{type:Boolean},suppressMiddleClickScrolls:{type:Boolean},suppressPreventDefaultOnMouseWheel:{type:Boolean},scrollbarWidth:null,rowSelection:null,cellSelection:{type:Boolean},rowMultiSelectWithClick:{type:Boolean},suppressRowDeselection:{type:Boolean},suppressRowClickSelection:{type:Boolean},suppressCellFocus:{type:Boolean},suppressHeaderFocus:{type:Boolean},selectionColumnDef:null,rowNumbers:{type:Boolean},suppressMultiRangeSelection:{type:Boolean},enableCellTextSelection:{type:Boolean},enableRangeSelection:{type:Boolean},enableRangeHandle:{type:Boolean},enableFillHandle:{type:Boolean},fillHandleDirection:null,suppressClearOnFillReduction:{type:Boolean},sortingOrder:null,accentedSort:{type:Boolean},unSortIcon:{type:Boolean},suppressMultiSort:{type:Boolean},alwaysMultiSort:{type:Boolean},multiSortKey:null,suppressMaintainUnsortedOrder:{type:Boolean},icons:null,rowHeight:null,rowStyle:null,rowClass:null,rowClassRules:null,suppressRowHoverHighlight:{type:Boolean},suppressRowTransform:{type:Boolean},columnHoverHighlight:{type:Boolean},gridId:null,deltaSort:{type:Boolean},treeDataDisplayType:null,enableGroupEdit:{type:Boolean},initialState:null,theme:null,loadThemeGoogleFonts:{type:Boolean},themeCssLayer:null,styleNonce:null,themeStyleContainer:null,getContextMenuItems:null,getMainMenuItems:null,postProcessPopup:{type:Function},processUnpinnedColumns:{type:Function},processCellForClipboard:{type:Function},processHeaderForClipboard:{type:Function},processGroupHeaderForClipboard:{type:Function},processCellFromClipboard:{type:Function},sendToClipboard:{type:Function},processDataFromClipboard:{type:Function},isExternalFilterPresent:{type:Function},doesExternalFilterPass:{type:Function},getChartToolbarItems:null,createChartContainer:{type:Function},focusGridInnerElement:{type:Function},navigateToNextHeader:{type:Function},tabToNextHeader:{type:Function},navigateToNextCell:{type:Function},tabToNextCell:{type:Function},getLocaleText:{type:Function},getDocument:{type:Function},paginationNumberFormatter:{type:Function},getGroupRowAgg:{type:Function},isGroupOpenByDefault:{type:Function},ssrmExpandAllAffectsAllRows:{type:Boolean},initialGroupOrderComparator:{type:Function},processPivotResultColDef:{type:Function},processPivotResultColGroupDef:{type:Function},getDataPath:null,getChildCount:{type:Function},getServerSideGroupLevelParams:{type:Function},isServerSideGroupOpenByDefault:{type:Function},isApplyServerSideTransaction:null,isServerSideGroup:null,getServerSideGroupKey:null,getBusinessKeyForNode:{type:Function},getRowId:null,resetRowDataOnUpdate:{type:Boolean},processRowPostCreate:{type:Function},isRowSelectable:null,isRowMaster:null,fillOperation:{type:Function},postSortRows:{type:Function},getRowStyle:{type:Function},getRowClass:{type:Function},getRowHeight:{type:Function},isFullWidthRow:{type:Function},isRowValidDropPosition:null,"onTool-panel-visible-changed":null,"onTool-panel-size-changed":null,"onColumn-menu-visible-changed":null,"onContext-menu-visible-changed":null,"onCut-start":null,"onCut-end":null,"onPaste-start":null,"onPaste-end":null,"onColumn-visible":null,"onColumn-pinned":null,"onColumn-resized":null,"onColumn-moved":null,"onColumn-value-changed":null,"onColumn-pivot-mode-changed":null,"onColumn-pivot-changed":null,"onColumn-group-opened":null,"onNew-columns-loaded":null,"onGrid-columns-changed":null,"onDisplayed-columns-changed":null,"onVirtual-columns-changed":null,"onColumn-everything-changed":null,"onColumns-reset":null,"onColumn-header-mouse-over":null,"onColumn-header-mouse-leave":null,"onColumn-header-clicked":null,"onColumn-header-context-menu":null,"onComponent-state-changed":null,"onCell-value-changed":null,"onCell-edit-request":null,"onRow-value-changed":null,"onCell-editing-started":null,"onCell-editing-stopped":null,"onRow-editing-started":null,"onRow-editing-stopped":null,"onBulk-editing-started":null,"onBulk-editing-stopped":null,"onBatch-editing-started":null,"onBatch-editing-stopped":null,"onUndo-started":null,"onUndo-ended":null,"onRedo-started":null,"onRedo-ended":null,"onCell-selection-delete-start":null,"onCell-selection-delete-end":null,"onRange-delete-start":null,"onRange-delete-end":null,"onFill-start":null,"onFill-end":null,"onFilter-opened":null,"onFilter-changed":null,"onFilter-modified":null,"onFilter-ui-changed":null,"onFloating-filter-ui-changed":null,"onAdvanced-filter-builder-visible-changed":null,"onFind-changed":null,"onChart-created":null,"onChart-range-selection-changed":null,"onChart-options-changed":null,"onChart-destroyed":null,"onCell-key-down":null,"onGrid-ready":null,"onGrid-pre-destroyed":null,"onFirst-data-rendered":null,"onGrid-size-changed":null,"onModel-updated":null,"onVirtual-row-removed":null,"onViewport-changed":null,"onBody-scroll":null,"onBody-scroll-end":null,"onDrag-started":null,"onDrag-stopped":null,"onDrag-cancelled":null,"onState-updated":null,"onPagination-changed":null,"onRow-drag-enter":null,"onRow-drag-move":null,"onRow-drag-leave":null,"onRow-drag-end":null,"onRow-drag-cancel":null,"onRow-resize-started":null,"onRow-resize-ended":null,"onColumn-row-group-changed":null,"onRow-group-opened":null,"onExpand-or-collapse-all":null,"onPivot-max-columns-exceeded":null,"onPinned-row-data-changed":null,"onPinned-rows-changed":null,"onRow-data-updated":null,"onAsync-transactions-flushed":null,"onStore-refreshed":null,"onHeader-focused":null,"onCell-clicked":null,"onCell-double-clicked":null,"onCell-focused":null,"onCell-mouse-over":null,"onCell-mouse-out":null,"onCell-mouse-down":null,"onRow-clicked":null,"onRow-double-clicked":null,"onRow-selected":null,"onSelection-changed":null,"onCell-context-menu":null,"onRange-selection-changed":null,"onCell-selection-changed":null,"onTooltip-show":null,"onTooltip-hide":null,"onSort-changed":null},xR()),emits:["update:modelValue"],setup(e,{expose:t,emit:o}){const i=e,s=E.ref(),n=E.ref(void 0),r=E.ref(!1),l=E.ref(!1),a=E.ref(!1),d=E.ref({}),c=E.ref(null),u=E.toRefs(i);on().filter(F=>F!="gridOptions").forEach(F=>{E.watch(()=>u[F],(P,T)=>{(F==="rowData"&&!f.value||F!=="rowData")&&I(F,P),f.value=!1},{deep:!0})});const h=new Set(["rowDataUpdated","cellValueChanged","rowValueChanged"]),g=E.ref(i.modelValue),p=E.ref(!1),f=E.ref(!1);E.watch(()=>i.modelValue,F=>{g.value=F}),E.watch(g,(F,P)=>{r.value&&(f.value||(p.value=!0,I("rowData",So(F),So(P))),f.value=!1)},{deep:!0});const C=DR(()=>{f.value=!0,o("update:modelValue",S())},10),m=E.getCurrentInstance(),w=F=>{var P;a.value&&h.has(F)&&(P=m==null?void 0:m.proxy)!=null&&P.$props["onUpdate:modelValue"]&&C()},b=()=>{var F;(i.rowData||(F=i.gridOptions)!=null&&F.rowData)&&g.value&&k(232)},v=()=>{var F;return g.value||i.rowData||((F=i.gridOptions)==null?void 0:F.rowData)},S=()=>{const F=[];return n==null||n.value.forEachLeafNode(P=>{F.push(P.data)}),F},D=F=>P=>{if(l.value)return;P==="gridReady"&&(a.value=!0);const T=ho.has(P);T&&!F||!T&&F||h.has(P)&&(p.value||w(P),p.value=!1)},I=(F,P,T)=>{if(r.value){let V=P.value||P;F==="rowData"&&V!=null&&(V=So(V)),d.value[F]=V,c.value==null&&(c.value=window.setTimeout(()=>{c.value=null,xc(d.value,n.value),d.value={}},0))}},O=()=>Object.create(E.getCurrentInstance().proxy._provided);return E.onMounted(()=>{Et(Ha,void 0,!0);const F=new vR(E.getCurrentInstance(),O()),P={globalListener:D(),globalSyncListener:D(!0),frameworkOverrides:new ER(E.getCurrentInstance()),providedBeanInstances:{frameworkCompWrapper:F},modules:i.modules},T=E.markRaw(Ec(So(i.gridOptions),i,[...on(),...Object.values(bi)])),V=v();V!==void 0&&(T.rowData=So(V)),n.value=kv(s.value,T,P),r.value=!0}),E.onUnmounted(()=>{var F;r.value&&((F=n==null?void 0:n.value)==null||F.destroy(),l.value=!0)}),t({api:n}),{__sfc:!0,props:i,rootRef:s,api:n,gridCreated:r,isDestroyed:l,gridReadyFired:a,batchChanges:d,batchTimeout:c,propsAsRefs:u,ROW_DATA_EVENTS:h,rowDataModel:g,rowDataUpdating:p,emittingRowData:f,emits:o,emitRowModel:C,thisInstance:m,updateModelIfUsed:w,checkForBindingConflicts:b,getRowDataBasedOnBindings:v,getRowData:S,globalEventListenerFactory:D,processChanges:I,getProvides:O}}});function se(e,t,o,i,s,n,r,l){var a=typeof e=="function"?e.options:e;return t&&(a.render=t,a.staticRenderFns=o,a._compiled=!0),n&&(a._scopeId="data-v-"+n),{exports:e,options:a}}var TR=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{ref:"rootRef"})},IR=[],AR=se(PR,TR,IR,!1,null,"60566900");const hd=AR.exports,MR=e=>{const t=E.getCurrentInstance(),o={id:e.id,rowIdMapper:e.rowIdMapper,columns:e.columns,rowData:e.rowData,pageSize:e.pageSize,gridOptions:e.gridOptions,footerHeight:e.footerHeight,editable:e.editable,onRowChange:e.onRowChange,onError:i=>Ad.Message.error(i),instanceCtx:{getInstanceName:i=>{var s,n;return(n=(s=i==null?void 0:i.$options)==null?void 0:s.name)!=null?n:null},getParentInstance:i=>{var s;return(s=i==null?void 0:i.$parent)!=null?s:null}},currentInstance:t==null?void 0:t.proxy};return ed(o)},gd={functional:!0,name:"VNodeRender",props:["params"],render(e,t){var o;const i=t.props.params;return i.render?i.render(i):e("span",(o=i.valueFormatted)!=null?o:i.value)}},kR={functional:!0,props:{params:{type:Object,required:!0}},render(e,t){const o=e("",{});return o.text=`${t.props.params.column.getColId()} holder`,o}},LR=E.defineComponent({name:"CellRenderer"}),GR=E.defineComponent({...LR,props:{params:null},setup(e){const t=e,o=E.computed(()=>{const r=t.params.data,l=r.isEditing()&&t.params.editeRender?t.params.editeRender:t.params.render,a={...t.params,render:l};if(r instanceof Ot){const d=r.getCell(a.column);if(!d)return a.render=t.params.render,a;const{hostArray:c,hostObject:u}=r.getHostObject(a);r.getActualRow().isCellEditing(t.params.node.id,t.params.column)||(a.render=t.params.render),a.hostObject=u,a.hostArrayHook=g=>{var p;let f=c;((p=a.colDef)==null?void 0:p.cellDataType)==="array"&&!c&&(f=[],H.set(r.getData(),d.path,f)),f&&(g(f),r.buildSpan(),a.context.reload(),a.api.redrawRows({rowNodes:a.api.getRenderedNodes().filter(C=>r.match(C))}))}}return a}),i=E.computed(()=>{const r=t.params.data,l=r.getActualRow();if(l.isEditing()&&t.params.editeRender){const d=l.getSourceRow().getData(),c=r.getCell(t.params.column);return c?!H.isEqual(H.get(d,c.getReadPath()),t.params.value):!1}return!1}),s=E.computed(()=>t.params.data.isTransient()),n=E.computed(()=>t.params.data.getRowSpan(t.params.column));return{__sfc:!0,props:t,eventParams:o,isChange:i,isDraft:s,rowSpan:n,VNodeRenderer:gd,CellHolder:kR}}});var HR=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return i.rowSpan>0?o("div",{staticClass:"custom-cell"},[i.isChange?o("span",{staticClass:"value-change"}):t._e(),i.isDraft?o("span",{staticClass:"value-change transient"}):t._e(),o(i.VNodeRenderer,{attrs:{params:i.eventParams}})],1):o(i.CellHolder,{attrs:{params:i.eventParams}})},OR=[],BR=se(GR,HR,OR,!1,null,null);const VR=BR.exports,NR=E.defineComponent({name:"GridToolbar"}),_R=E.defineComponent({...NR,setup(e){return{__sfc:!0}}});var WR=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{staticClass:"grid-toolbar"},[o("div",{staticClass:"grid-toolbar-left"},[t._t("default")],2),o("div",{staticClass:"grid-toolbar-right"},[t._t("system")],2)])},zR=[],$R=se(_R,WR,zR,!1,null,"f12c2536");const pd=$R.exports,UR=E.defineComponent({__name:"FooterCellRender",props:{params:null},setup(e){return{__sfc:!0,props:e,VNodeRenderer:gd}}});var KR=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",{staticClass:"custom-cell"},[o(i.VNodeRenderer,{attrs:{params:t.params}})],1)},jR=[],qR=se(UR,KR,jR,!1,null,"4998e205");const YR=qR.exports,ZR=E.defineComponent({name:"SearchItem",props:{search:{type:Object,required:!0},teleported:{type:Boolean}},setup(e){return()=>e.search.render(e.search)}});var QR=se(ZR,null,null,!1,null,"e1931525");const Cn=QR.exports,XR=E.defineComponent({name:"ClSearch"}),JR=E.defineComponent({...XR,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},id:null,confirmButtonText:{default:"搜索"},resetButtonText:{default:"重置"},autoResetSearch:{type:Boolean,default:!0},enable:{type:Boolean,default:!0}},setup(e){const t=e,o=E.ref(),i=E.ref(),s=()=>{t.search.forEach(c=>{c.value=H.cloneDeep(c.initValue)})},n=E.computed(()=>`${t.id}_SEARCH`),r=()=>{localStorage.setItem(n.value,JSON.stringify(t.search.filter(c=>!c.transient).map(c=>({field:c.field,value:c.value}))))},l=()=>{var c;const u=JSON.parse((c=localStorage.getItem(n.value))!=null?c:"[]");t.search.forEach(h=>{const g=u.find(p=>h.field===p.field);h.transient||!g?h.value=H.cloneDeep(h.initValue):h.value=g.value})},a=async()=>{i.value=!0;try{await t.searchRemote(),t.id&&r()}catch(c){console.error(c)}finally{i.value=!1}},d=()=>{if(s(),t.autoResetSearch)return a()};return E.onBeforeMount(()=>{l()}),{__sfc:!0,searchForm:o,props:t,loading:i,reset:s,persistenceKey:n,doPersistence:r,restore:l,doSearch:a,handleReset:d,SearchItem:Cn}}});var eE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("el-form",{ref:"searchForm"},[o("div",{staticClass:"search-container"},[t._l(t.search,function(s){return o("el-form-item",{key:s.field},[o(i.SearchItem,{attrs:{search:s}})],1)}),o("el-form-item",[o("el-button",{staticStyle:{width:"80px"},attrs:{disabled:!t.enable||i.loading,type:"primary"},on:{click:i.doSearch}},[t._v(" "+t._s(t.confirmButtonText)+" ")]),o("el-button",{staticStyle:{width:"80px"},attrs:{disabled:i.loading},on:{click:i.handleReset}},[t._v(t._s(t.resetButtonText))])],1),t._t("default")],2)])},tE=[],oE=se(JR,eE,tE,!1,null,"962588ec");const iE=oE.exports,fd=(e,t,o)=>{const i=E.ref(),s=E.ref(!1),n=E.computed(()=>{if(Array.isArray(o)){const h=o.map(g=>{var p;return(p=g.width)!=null?p:-1}).filter(g=>g);if(h.length>0)return Math.max(...h)}else return o==null?void 0:o.width}),r=h=>H.isEmpty(h)&&!H.isNumber(h),l=E.computed(()=>Array.isArray(o)?o.some(h=>!r(h.value)):!r(o==null?void 0:o.value)),a=E.computed(()=>[s.value?"is-loading":""]),d=E.computed(()=>l.value?"var(--el-color-primary)":void 0);return{visible:i,loading:s,width:n,loadingClass:a,hasCondition:l,hasConditionColor:d,doSearch:async()=>{s.value=!0;try{await e()}catch(h){console.error(h)}finally{s.value=!1,i.value=!1}},reset:()=>{Array.isArray(o)?o.forEach(h=>{h.value=H.cloneDeep(h.initValue)}):o.value=H.cloneDeep(o==null?void 0:o.initValue)}}},sE=E.defineComponent({name:"ClPopoverSearch"}),nE=E.defineComponent({...sE,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},field:null},setup(e){const t=e,o=E.computed(()=>{var u;return(u=t.search)==null?void 0:u.find(h=>h.field===t.field)}),{visible:i,loading:s,width:n,loadingClass:r,hasConditionColor:l,doSearch:a,reset:d}=fd(t.searchRemote,t,o.value),c=E.computed(()=>{var u;return(u=n.value)!=null?u:300});return{__sfc:!0,props:t,search:o,visible:i,loading:s,width:n,loadingClass:r,hasConditionColor:l,doSearch:a,reset:d,popoverWidth:c,SearchItem:Cn}}});var rE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return i.search?o("el-popover",{attrs:{width:i.popoverWidth,trigger:"click"},scopedSlots:t._u([{key:"reference",fn:function(){return[o("div",[t._t("default",function(){return[o("i",{class:["el-icon-search",i.loadingClass],attrs:{color:i.hasConditionColor}})]},null,{loading:i.loading})],2)]},proxy:!0}],null,!0),model:{value:i.visible,callback:function(s){i.visible=s},expression:"visible"}},[o("div",{on:{keyup:function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"enter",13,s.key,"Enter")?null:i.doSearch.apply(null,arguments)}}},[o("el-form",{on:{submit:function(s){s.preventDefault(),s.stopPropagation()}}},[o("el-form-item",[o(i.SearchItem,t._b({attrs:{search:i.search,teleported:!1}},"SearchItem",{style:"width: 100%"},!1))],1)],1),o("el-space",{staticStyle:{width:"100%","justify-content":"end"},attrs:{size:"small"}},[o("el-button",{attrs:{size:"small"},on:{click:i.reset}},[t._v(" 重置 ")]),o("el-button",{attrs:{loading:i.loading,size:"small",type:"primary"},on:{click:i.doSearch}},[t._v("搜索")])],1)],1)]):t._e()},lE=[],aE=se(nE,rE,lE,!1,null,null);const dE=aE.exports,cE=E.defineComponent({name:"ClDrawerSearch"}),uE=E.defineComponent({...cE,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},attached:{type:Boolean}},setup(e){const t=e,{visible:o,loading:i,loadingClass:s,hasConditionColor:n,doSearch:r,reset:l}=fd(t.searchRemote,t,t.search);return E.onMounted(()=>{t.attached||l()}),{__sfc:!0,props:t,visible:o,loading:i,loadingClass:s,hasConditionColor:n,doSearch:r,reset:l,SearchItem:Cn}}});var hE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",[o("div",{on:{click:function(s){i.visible=!0}}},[t._t("default",function(){return[o("el-button",{attrs:{disabled:i.loading,circle:""}},[o("i",{class:["el-icon-search",i.loadingClass],attrs:{color:i.hasConditionColor}},[o("Search")],1)])]},null,{loading:i.loading})],2),o("el-drawer",{attrs:{"append-to-body":"","with-header":!1},on:{keyup:function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"enter",13,s.key,"Enter")?null:i.doSearch.apply(null,arguments)}},model:{value:i.visible,callback:function(s){i.visible=s},expression:"visible"}},[o("el-form",{staticStyle:{height:"calc(100% - 100px)"},attrs:{"label-position":"right","label-suffix":":","label-width":"auto"}},[o("el-scrollbar",t._l(t.search,function(s){return o("el-form-item",{key:s.field,attrs:{label:s.label}},[o(i.SearchItem,t._b({attrs:{search:s,teleported:""}},"SearchItem",{style:"width: 100%"},!1))],1)}),1)],1),o("el-divider"),o("el-space",{staticStyle:{width:"100%","justify-content":"end"},attrs:{size:"small"}},[o("el-button",{on:{click:i.reset}},[t._v(" 重置 ")]),o("el-button",{attrs:{loading:i.loading,type:"primary"},on:{click:i.doSearch}},[t._v("搜索")])],1)],1)],1)},gE=[],pE=se(uE,hE,gE,!1,null,null);const Cd=pE.exports;var fE=Object.defineProperty,CE=(e,t,o)=>t in e?fE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,mE=(e,t,o)=>CE(e,t+"",o);class mn{constructor(t){mE(this,"record"),this.record=t}static from(t){const o=t.filter(i=>{var s;return(s=i.value)!=null?s:!1}).reduce((i,s)=>({...i,...H.isPlainObject(s.value)?s.value:{[s.field]:s.value}}),{});return new mn(o)}transform(t,o){const i=this.record[t],s=o(i);return delete this.record[t],this.record={...this.record,...s},this}toCondition(t){return{...this.record,...t??{}}}}const wE=E.defineComponent({name:"SearchButton"}),vE=E.defineComponent({...wE,props:{searches:null},setup(e){const t=e,o=E.inject(ct);return{__sfc:!0,props:t,context:o,ClDrawerSearch:Cd}}});var bE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o(i.ClDrawerSearch,{attrs:{search:t.searches,"search-remote":i.context.refresh}})},SE=[],yE=se(vE,bE,SE,!1,null,"45be5dfc");const md=yE.exports,RE=E.defineComponent({name:"RefreshButton"}),EE=E.defineComponent({...RE,setup(e){const t=E.ref(!1),{refresh:o}=E.inject(ct);return{__sfc:!0,loading:t,refresh:o,handlerRefreshClick:async()=>{if(!t.value){t.value=!0;try{await o()}catch(s){console.error(s)}finally{t.value=!1}}}}}});var xE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("el-button",{attrs:{disabled:i.loading,circle:""},on:{click:i.handlerRefreshClick}},[o("i",{class:["el-icon-refresh",i.loading?"is-loading":""]})])},DE=[],FE=se(EE,xE,DE,!1,null,"0eaeb325");const wd=FE.exports;function vd(e,t){const o=t(e);return PE(e)&&(o.children=e.children.map(i=>vd(i,t))),o}const PE=e=>!!e.children,TE=()=>{const e=E.inject(ct),t=E.ref(),o=E.ref([]),i=E.ref([]),s=E.ref(),n=C=>{const m=e.api.value.getAllDisplayedColumns(),w=m.find(b=>b.getColId()===C);return w?m.indexOf(w):-1},r=C=>{if(C.field)return C.field;if(C.groupId)return C.groupId;throw new Error(`${C.headerName} field or groupId not found`)},l=()=>{var C,m;o.value=(m=(C=e.api.value.getColumnDefs())==null?void 0:C.map(w=>vd(w,b=>{var v,S;return{id:r(b),label:b.headerName,pined:(S=(v=e.api.value.getColumnGroup(r(b)))==null?void 0:v.getPinned())!=null?S:b.pinned}})))!=null?m:[],i.value=e.api.value.getAllDisplayedColumns().map(w=>w.getColId())},a=(C,m,w)=>w!=="inner"&&C.parent===m.parent,d=()=>{s.value=t.value.getCheckedKeys()},c=C=>{if(C instanceof We)return[C];const m=C.getChildren();return m?[...m.flatMap(w=>c(w))]:[]},u=(C,m,w)=>{const b=n(m[0].colId),v=n(w.colId);return C==="after"?v-m.length+1:v>b?v-m.length:v};return{treeData:o,defaultCheckedKeys:i,treeRef:t,refreshTreeData:l,checkColumnAllowDrop:a,onColumnDragStart:d,onColumnDragFinish:(C,m,w)=>{if(m&&C&&C.key!==m.key){const b=e.api.value.getColumnGroup(C.key),v=e.api.value.getColumn(C.key),S=e.api.value.getColumn(m.key),D=c(b??v);if(S){const I=u(w,D,S);e.api.value.moveColumns(D,I)}}t.value.setCheckedKeys(s.value),s.value=void 0},onColumnVisibleChange:(C,m)=>{e.api.value.setColumnsVisible([C.id],m)},onColumnPinedChange:(C,m)=>{var w;const b=e.api.value.getColumnGroup(C),v=b?b.getDisplayedLeafColumns().map(D=>D.getColId()):[C],S=b?b.getPinned():(w=e.api.value.getColumn(C))==null?void 0:w.getPinned();e.api.value.setColumnsPinned(v,S===m?null:m),l()},columnAutoResize:()=>{e.api.value.sizeColumnsToFit()}}},IE=E.defineComponent({name:"SettingButton"}),AE=E.defineComponent({...IE,setup(e){const{treeRef:t,treeData:o,defaultCheckedKeys:i,refreshTreeData:s,checkColumnAllowDrop:n,onColumnDragStart:r,onColumnDragFinish:l,onColumnVisibleChange:a,onColumnPinedChange:d,columnAutoResize:c}=TE(),u=E.ref(!1),h=E.inject(ct);return{__sfc:!0,treeRef:t,treeData:o,defaultCheckedKeys:i,refreshTreeData:s,checkColumnAllowDrop:n,onColumnDragStart:r,onColumnDragFinish:l,onColumnVisibleChange:a,onColumnPinedChange:d,columnAutoResize:c,visible:u,gridContext:h,handleResetGridState:()=>{h.resetGridState(),s()}}}});var ME=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",[o("el-button",{attrs:{circle:""},on:{click:function(s){i.visible=!0}}},[o("i",{staticClass:"el-icon-setting"})]),o("el-drawer",{staticClass:"setting-drawer",attrs:{visible:i.visible,size:280,"modal-append-to-body":!0,"append-to-body":!0},on:{"update:visible":function(s){i.visible=s},open:i.refreshTreeData},scopedSlots:t._u([{key:"title",fn:function(){return[o("div",{staticStyle:{display:"flex","align-items":"center"}},[o("span",[t._v("表格显示设置")])])]},proxy:!0}])},[o("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",plain:"",size:"mini"},on:{click:i.handleResetGridState}},[t._v("重置")]),o("el-button",{attrs:{type:"primary",plain:"",size:"mini"},on:{click:i.columnAutoResize}},[t._v("自适应")]),i.treeData.length>0?o("el-tree",{ref:"treeRef",staticClass:"cl-grid-column-settings cl-scrollbar",attrs:{"allow-drop":i.checkColumnAllowDrop,"node-key":"id","default-checked-keys":i.defaultCheckedKeys,"show-checkbox":"",data:i.treeData,"default-expand-all":"",draggable:"","highlight-current":""},on:{"node-drag-start":i.onColumnDragStart,"node-drag-end":i.onColumnDragFinish,"check-change":i.onColumnVisibleChange},scopedSlots:t._u([{key:"default",fn:function({node:s}){return[o("div",{class:{"pined-row":s.data.pined==="left"||s.data.pined==="right"},staticStyle:{display:"flex","justify-content":"space-between",width:"100%"}},[o("span",{class:[s.data.pined==="left"||s.data.pined==="right"?"pined-active":""]},[t._v(" "+t._s(s.label)+" ")]),o("span",[o("i",{class:["el-icon-arrow-left",s.data.pined==="left"?"pined-active":""],on:{click:function(n){return n.stopPropagation(),(()=>i.onColumnPinedChange(s.key,"left")).apply(null,arguments)}}}),o("i",{class:["el-icon-arrow-right",s.data.pined==="right"?"pined-active":""],on:{click:function(n){return n.stopPropagation(),(()=>i.onColumnPinedChange(s.key,"right")).apply(null,arguments)}}})])])]}}],null,!1,2278526884)}):t._e()],1)],1)},kE=[],LE=se(AE,ME,kE,!1,null,"522bf761");const bd=LE.exports,GE={functional:!0,name:"HeaderVNodeRender",props:["params"],render(e,t){const o=t.props.params;return o.headerRender?o.headerRender(o):e("span",o.displayName)}},HE=E.defineComponent({name:"HeaderRenderer"}),OE=E.defineComponent({...HE,props:{params:null},setup(e){const t=e,o=E.ref(),i=E.ref(-1),s=E.inject(ct),n=()=>{o.value=t.params.column.getSort(),i.value=Na(t.params.api,t.params.column.getColId())},r=async(l,a)=>{try{o.value=l,t.params.setSort(l,a.shiftKey),await s.refresh()}catch{}};return E.onMounted(()=>{t.params.api.addEventListener("sortChanged",n),n()}),E.onUnmounted(()=>{t.params.api.removeEventListener("sortChanged",n)}),{__sfc:!0,props:t,sorted:o,sortIndex:i,context:s,handleSortChange:n,handleSortClick:r,HeaderVNodeRender:GE}}});var BE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",[t.params.headerRender?o(i.HeaderVNodeRender,{attrs:{params:t.params}}):o("span",[t._v(t._s(t.params.displayName))]),t.params.enableSorting?[i.sortIndex>=0?o("span",{staticStyle:{"line-height":"12px"}},[t._v(" "+t._s(i.sortIndex+1))]):t._e(),i.sorted==="asc"?o("i",{staticClass:"el-icon-sort-up",staticStyle:{cursor:"pointer"},attrs:{color:"var(--el-color-primary)"},on:{click:s=>i.handleSortClick(null,s)}}):i.sorted==="desc"?o("i",{staticClass:"el-icon-sort-down",staticStyle:{cursor:"pointer"},attrs:{color:"var(--el-color-danger, #F56C6C)"},on:{click:s=>i.handleSortClick("asc",s)}}):o("i",{staticClass:"el-icon-sort",staticStyle:{cursor:"pointer"},on:{click:s=>i.handleSortClick("desc",s)}})]:t._e()],2)},VE=[],NE=se(OE,BE,VE,!1,null,"126699e0");const _E=NE.exports,WE=E.defineComponent({name:"GridEmptyDataOverlay"}),zE=E.defineComponent({...WE,setup(e){return{__sfc:!0}}});var $E=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("el-empty",{attrs:{description:"没有数据了","image-size":75}})},UE=[],KE=se(zE,$E,UE,!1,null,"05fc87c0");const jE=KE.exports,qE=E.defineComponent({name:"GridLoadingOverlay"}),YE=E.defineComponent({...qE,setup(e){return{__sfc:!0}}});var ZE=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{directives:[{name:"loading",rawName:"v-loading",value:!0,expression:"true"}],staticClass:"table-loading",staticStyle:{height:"100%",width:"100%"},attrs:{"element-loading-text":"加载中","element-loading-background":"rgba(0, 0, 0, 0.1)"}})},QE=[],XE=se(YE,ZE,QE,!1,null,"c60c1386");const JE=XE.exports,e0=(e,t,o)=>{const i=td({columns:e.columns,gridOptions:e.gridOptions,footerHeight:e.footerHeight},t,o);return{...i,footerGridOptions:i.footerGridOptions}},t0=()=>({theme:E.ref("ag-theme-alpine")}),o0=E.defineComponent({name:"Grid",components:{SearchButton:md,RefreshButton:wd,SettingButton:bd,CellRenderer:VR,GridEmptyDataOverlay:jE,HeaderRenderer:_E,GridLoadingOverlay:JE,AgGridVue:hd,GridToolbar:pd,FooterCellRender:YR}}),i0=E.defineComponent({...o0,props:{id:null,rowIdMapper:{type:Function},columns:null,rowData:{type:Function},pageSize:{default:50},footerHeight:null,tools:{default:()=>["search","refresh","setting"]},searches:null,gridOptions:{default:()=>({})},editable:null,onRowChange:{type:Function}},setup(e,{expose:t}){const o=e,i=E.ref(),s=E.ref(),{theme:n}=t0(),{gridOptions:r,dataCache:l,gridStyles:a,gridApi:d,gridElRef:c,reload:u,insertRows:h,existRow:g,getRows:p,refresh:f,resetGridState:C}=MR(o),{footerGridOptions:m,setFooterData:w,footerStyles:b}=e0(o,s,a);return E.provide(ct,{refresh:f,resetGridState:C,api:d}),E.watch(()=>r.value,()=>{d.value&&d.value.updateGridOptions(H.omit(r.value,["scrollbarWidth","getRowId","suppressRowTransform","defaultColGroupDef"]))},{deep:!0}),t({setFooterData:w,updateGridOptions:v=>{d.value.updateGridOptions(v)},reload:u,refresh:f,getRows:p,createRow(v,S=!1){const D=l.value.createRow(v);return S?new Fi(D,o.rowIdMapper,!0):D},existRow:g,insertRows:h,startEditing:()=>{const v=l.value.getRows().filter(S=>!S.isEditing());H.isEmpty(v)||(v.forEach(S=>S.startEditing()),u(),d.value.redrawRows())},stopEditing:()=>{const v=l.value.getRows().filter(S=>S.isEditing());H.isEmpty(v)||(v.forEach(S=>S.stopEditing()),u(),d.value.redrawRows())},deselectAll:(v,S)=>{d.value.deselectAll(v,S)}}),{__sfc:!0,props:o,bottomRef:i,gridRef:s,theme:n,options:r,dataCache:l,gridStyles:a,gridApi:d,gridElRef:c,reload:u,insertRows:h,existRow:g,getRows:p,refresh:f,resetGridState:C,footerGridOptions:m,setFooterData:w,footerStyles:b,AgGridVue:hd,GridToolbar:pd,SearchButton:md,RefreshButton:wd,SettingButton:bd}}});var s0=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",{ref:"gridElRef",staticClass:"cl-grid"},[o(i.GridToolbar,{scopedSlots:t._u([{key:"system",fn:function(){return[t.searches&&t.tools.includes("search")?o(i.SearchButton,{attrs:{searches:t.searches}}):t._e(),t.tools.includes("refresh")?o(i.RefreshButton):t._e(),t.tools.includes("setting")?o(i.SettingButton):t._e()]},proxy:!0}])},[t._t("toolbar")],2),o("div",{staticClass:"cl-grid-container"},[o(i.AgGridVue,{ref:"gridRef",staticClass:"cl-scrollbar flex-1",class:[i.theme],style:i.gridStyles,attrs:{tooltipShowDelay:500,"loading-overlay-component":"GridLoadingOverlay","no-rows-overlay-component":"GridEmptyDataOverlay","grid-options":{...i.options,suppressHorizontalScroll:!!t.footerHeight,alignedGrids:()=>[i.bottomRef].filter(s=>s)}}}),t.footerHeight?o(i.AgGridVue,{ref:"bottomRef",staticClass:"cl-scrollbar footer-grid",class:[i.theme],style:i.footerStyles,attrs:{"grid-options":i.footerGridOptions}}):t._e()],1)],1)},n0=[],r0=se(i0,s0,n0,!1,null,null);const l0=r0.exports;var a0=Object.defineProperty,d0=(e,t,o)=>t in e?a0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,yo=(e,t,o)=>d0(e,typeof t!="symbol"?t+"":t,o);const c0=e=>new Sd(e);class Sd{constructor(t){yo(this,"colDef"),yo(this,"agGridCellRenderParams"),this.colDef=t,this.agGridCellRenderParams={}}cellRender(t){return this.agGridCellRenderParams.render=t,this}footerRender(t){return this.agGridCellRenderParams.footerRender=t,this}editeRender(t){return this.agGridCellRenderParams.editeRender=t,this}headerRender(t){return this.agGridCellRenderParams.headerRender=t,this}build(){return this.agGridCellRenderParams.headerRender&&(this.colDef.headerComponentParams=this.agGridCellRenderParams.headerRender),this.colDef.cellRendererParams=this.agGridCellRenderParams,this.colDef}}const u0=e=>new yd(e);class yd{constructor(t){yo(this,"colDefs"),yo(this,"rendersMap",new Map),yo(this,"headerRendersMap",new Map),this.colDefs=t,this.eachColDef(t,o=>{this.rendersMap.set(o.field,{}),this.headerRendersMap.set(o.field,{})})}eachColDef(t,o){for(const i of t)ja.isGroupColDef(i)?this.eachColDef(i.children,o):o(i)}getRenderParams(t){if(!this.rendersMap.has(t))throw new Error(`${t} 不存在配置项`);return this.rendersMap.get(t)}getHeaderRenderParams(t){if(!this.headerRendersMap.has(t))throw new Error(`${t} 不存在配置项`);return this.headerRendersMap.get(t)}render(t,o){return this.getRenderParams(t).render=o,this}footerRender(t,o){return this.getRenderParams(t).footerRender=o,this}editRender(t,o){return this.getRenderParams(t).editeRender=o,this}headerRender(t,o){return this.getHeaderRenderParams(t).headerRender=o,this}alwaysRender(t){this.eachColDef(this.colDefs,o=>{o.field===t&&(o.enableCellChangeFlash=!1,o.tooltipValueGetter=()=>"",o.valueGetter=i=>i.data.getSignature())})}build(){return this.eachColDef(this.colDefs,t=>{const o=this.headerRendersMap.get(t.field);o!=null&&o.headerRender&&(t.headerComponentParams=o),t.cellRendererParams=this.rendersMap.get(t.field)}),this.colDefs}}const h0=(e,t)=>({model:{value:H.get(e,t),callback:o=>{H.set(e,t,o)}}});Gd({theme:"legacy"});const g0={install:()=>{Uu.registerModules([Yb,Zb,Qb,Xb,eS,Jb,RS,lS,sb,_l,Ha,kS,_S,KS,JS,ad,mv,dy,fy,cy,Sy,bv,mS,xa,yy,Ey,tf,ry,ud,cd,tS])}};L.ActualRow=mo,L.CLEAN_AG_GRID_OPTIONS=Ua,L.CellEditableRow=Pi,L.CellRenderAdapter=Sd,L.CellValue=Bt,L.ClDrawerSearch=Cd,L.ClPopoverSearch=dE,L.ClSearch=iE,L.ClientSideRowModelApiModule=ud,L.ClientSideRowModelModule=cd,L.ColumnRendersBuilder=yd,L.EditableRow=Fi,L.GRID_CONTEXT=ct,L.Grid=l0,L.GridDataCache=$a,L.GridDataSource=_a,L.GridUtils=ja,L.ID_FIRST_DEEP=Ka,L.ID_SPLITTER=Ti,L.ProjectionRow=Ot,L.RowSelectionModule=ad,L.RowSpans=hn,L.Searches=mn,L.ServerGetRowsParamsRequest=Vt,L.SharedRowSelectionModule=ld,L.SpanMatrix=za,L.VueGridPlugin=g0,L._getColumnSortIndexe=Na,L._getSortedColumns=un,L._getSortedColumnsIndexes=Va,L.buildProxyOptions=Ya,L.defaultColDefCellClassRules=Qa,L.isActualRow=Py,L.isGridRow=Fy,L.mergeRowClass=gn,L.selectionColumnCellClassRules=Za,L.useFooter=td,L.useGrid=ed,L.useGridScroll=Xa,L.useGridState=qa,L.vModel=h0,L.withColumnRenderBuilder=u0,L.withRender=c0,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|
|
55
|
+
To see what part of your code that caused the refresh check this stacktrace.`,253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e==null?void 0:e.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>Sl("IntegratedChartsModule"),258:()=>Sl("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:o,gridId:i,rowModelType:s})=>vl({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:Ot[t],gridId:i,gridScoped:o,rowModelType:s}),261:()=>"As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",262:()=>'As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor.',263:()=>'As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.',264:()=>'As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus.',265:({colId:e})=>`Unable to infer chart data type for column '${e}' if first data entry is null. Please specify "chartDataType", or a "cellDataType" in the column definition. For more information, see ${vt}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using treeDataChildrenField",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:e,parentId:t})=>`Cycle detected for row with id='${e}' and parent id='${t}'. Resetting the parent for row with id='${e}' and showing it as a root-level node.`,271:({id:e,parentId:t})=>`Parent row not found for row with id='${e}' and parent id='${t}'. Showing row with id='${e}' as a root-level node.`,272:()=>ml(),273:({providedId:e,usedId:t})=>`Provided column id '${e}' was already in use, ensure all column and group ids are unique. Using '${t}' instead.`,274:({prop:e})=>{let t=`Since v33, ${e} has been deprecated.`;switch(e){case"maxComponentCreationTimeMs":t+=" This property is no longer required and so will be removed in a future version.";break;case"setGridApi":t+=" This method is not called by AG Grid. To access the GridApi see: https://ag-grid.com/react-data-grid/grid-interface/#grid-api ";break;case"children":t+=" For multiple versions AgGridReact does not support children.";break}return t},275:wl,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`};function Mv(e,t){const o=Av[e];if(!o)return[`Missing error text for error id ${e}!`];const i=o(t),n=`
|
|
56
|
+
See ${Jn(e,t)}`;return Array.isArray(i)?i.concat(n):[i,n]}var kv={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},bl=new WeakMap,yl=new WeakMap;function Lv(e,t,o){if(!t)return j(11),{};const i=o;let s;if(!(i!=null&&i.setThemeOnGridDiv)){const r=ee({tag:"div"});r.style.height="100%",e.appendChild(r),e=r,s=()=>e.remove()}return new Hv().create(e,t,r=>{const a=new $p(e);r.createBean(a)},void 0,o,s)}var Gv=1,Hv=class{create(e,t,o,i,s,n){const r=Hi.applyGlobalGridOptions(t),a=r.gridId??String(Gv++),l=this.getRegisteredModules(s,a,r.rowModelType),d=this.createBeansList(r.rowModelType,l,a),c=this.createProvidedBeans(e,r,s);if(!d)return;const h={providedBeanInstances:c,beanClasses:d,gridId:a,beanInitComparator:Fp,beanDestroyComparator:Pp,derivedBeans:[xp],destroyCallback:()=>{yl.delete(p),bl.delete(e),n==null||n()}},g=new Yu(h);this.registerModuleFeatures(g,l),o(g),g.getBean("syncSvc").start(),i==null||i(g);const p=g.getBean("gridApi");return bl.set(e,p),yl.set(p,e),p}getRegisteredModules(e,t,o){var i;return Ft(Rv,void 0,!0),(i=e==null?void 0:e.modules)==null||i.forEach(s=>Ft(s,t)),Wu(t,Rl(o))}registerModuleFeatures(e,t){const o=e.getBean("registry"),i=e.getBean("apiFunctionSvc");t.forEach(s=>{o.registerModule(s);const n=s.apiFunctions;n&&Object.keys(n).forEach(a=>{i==null||i.addFunction(a,n[a])})})}createProvidedBeans(e,t,o){let i=o?o.frameworkOverrides:null;q(i)&&(i=new Ta);const s={gridOptions:t,eGridDiv:e,globalListener:o?o.globalListener:null,globalSyncListener:o?o.globalSyncListener:null,frameworkOverrides:i};return o&&o.providedBeanInstances&&Object.assign(s,o.providedBeanInstances),s}createBeansList(e,t,o){const i={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},s=Rl(e),n=i[s];if(!n){Qt(201,{rowModelType:s},`Unknown rowModelType ${s}.`);return}if(!$u()){Qt(272,void 0,ml());return}if(!e){const a=Object.entries(i).filter(([l,d])=>hs(d,o,l));if(a.length==1){const[l,d]=a[0];if(l!==s){const c={moduleName:d,rowModelType:l};Qt(275,c,wl(c));return}}}if(!hs(n,o,s)){Qt(200,{reasonOrId:`rowModelType = '${s}'`,moduleName:n,gridScoped:gs(),gridId:o,rowModelType:s},`Missing module ${n}Module for rowModelType ${s}.`);return}const r=new Set;return t.forEach(a=>{var l;return(l=a.beans)==null?void 0:l.forEach(d=>r.add(d))}),Array.from(r)}};function Rl(e){return e??"clientSide"}function Ae(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function Ov(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var Bv=class extends x{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");if(t)return(i,s,n)=>t({key:i,defaultValue:s,variableValues:n});const o=e.get("localeText");return(i,s,n)=>{let r=o&&o[i];if(r&&n&&n.length){let a=0;for(;!(a>=n.length||r.indexOf("${variable}")===-1);)r=r.replace("${variable}",n[a++])}return r??s}}};function Vv(e,t=!1){const o=[],i=[],s=[],n=[],r=[],a=[],l=[],d=[],c=[];let u=0;for(let h=0;h<e.length;h++){const{colId:g,sort:p,sortIndex:f,rowGroup:C,rowGroupIndex:m,aggFunc:w,pivot:S,pivotIndex:v,pinned:b,hide:D,width:T,flex:G}=e[h];c.push(g),p&&(o[f??u++]={colId:g,sort:p}),C&&(i[m??0]=g),typeof w=="string"&&s.push({colId:g,aggFunc:w}),S&&(n[v??0]=g),b&&(b==="right"?a:r).push(g),D&&l.push(g),(G!=null||T)&&d.push({colId:g,flex:G??void 0,width:T})}return{sort:o.length?{sortModel:o}:void 0,rowGroup:i.length?{groupColIds:i}:void 0,aggregation:s.length?{aggregationModel:s}:void 0,pivot:n.length||t?{pivotMode:t,pivotColIds:n}:void 0,columnPinning:r.length||a.length?{leftColIds:r,rightColIds:a}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:d.length?{columnSizingModel:d}:void 0,columnOrder:c.length?{orderedColIds:c}:void 0}}function Nv(e){const t=[];return e.forEach(({groupId:o,open:i})=>{i&&t.push(o)}),t.length?{openColumnGroupIds:t}:void 0}var _v=class{wrap(e,t,o,i){const s=this.createWrapper(e,i);return t==null||t.forEach(n=>{this.createMethod(s,n,!0)}),o==null||o.forEach(n=>{this.createMethod(s,n,!1)}),s}createMethod(e,t,o){e.addMethod(t,this.createMethodProxy(e,t,o))}createMethodProxy(e,t,o){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(o&&M(49,{methodName:t}),null)}}},Wv={tag:"div",cls:"ag-tooltip"},zv=class extends Gs{constructor(){super(Wv)}init(e){const{value:t}=e,o=this.getGui();o.textContent=Rt(t);const i=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();o.classList.add(`ag-${i}-tooltip`)}},$v=1e3,Uv=1e3,El=100,xl,Ei=!1,Kv=class extends x{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc,this.userCompFactory=e.userCompFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){var t,o,i,s;return e==="show"?((o=(t=this.tooltipCtrl).getTooltipShowDelayOverride)==null?void 0:o.call(t))??this.getGridOptionsTooltipDelay("tooltipShowDelay"):((s=(i=this.tooltipCtrl).getTooltipHideDelayOverride)==null?void 0:s.call(i))??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!Ct()&&(Ei?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},El):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){var s;const t=e.relatedTarget,o=this.tooltipCtrl.getGui(),i=(s=this.tooltipComp)==null?void 0:s.getGui();this.isInteractingWithTooltip||o.contains(t)||this.interactionEnabled&&(i!=null&&i.contains(t))||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||Ei)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-xl<$v}setToDoNothing(e){!e&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){var r,a,l,d,c,u,h;const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!A(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const o=(r=t.getRowNode)==null?void 0:r.call(t),i=_(this.gos,{location:((a=t.getLocation)==null?void 0:a.call(t))??"UNKNOWN",colDef:(l=t.getColDef)==null?void 0:l.call(t),column:(d=t.getColumn)==null?void 0:d.call(t),rowIndex:(c=t.getRowIndex)==null?void 0:c.call(t),node:o,data:o==null?void 0:o.data,value:e,valueFormatted:(u=t.getValueFormatted)==null?void 0:u.call(t),hideTooltipCallback:()=>this.hideTooltip(!0),...((h=t.getAdditionalParams)==null?void 0:h.call(t))??{}});this.state=2,this.tooltipInstanceCount++;const s=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount),n=Ou(this.userCompFactory,i);n==null||n.newAgStackInstance().then(s)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),xl=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){var r;if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");const s=this.getLocaleTextFunc(),n=(r=this.popupSvc)==null?void 0:r.addPopup({eChild:i,ariaLabel:s("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const a=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:a,columnMoved:a})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(te(this.beans),{keydown:a=>{i.contains(a==null?void 0:a.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:i,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){var o;const e=(o=this.tooltipComp)==null?void 0:o.getGui(),t=Q(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){var t,o;const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?(t=this.popupSvc)==null||t.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):(o=this.popupSvc)==null||o.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,o=this.tooltipTrigger===0?Uv:0;window.setTimeout(()=>{e(),this.destroyBean(t)},o),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(e=>{e&&e()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){Ei=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},El)}unlockService(){Ei=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};function un(e){return e.get("tooltipShowMode")==="whenTruncated"}var jv=class extends x{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const o="title",i=this.ctrl.getGui();i&&(e!=null&&(e!=""||t)?i.setAttribute(o,e):i.removeAttribute(o))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){this.tooltipManager==null&&(this.tooltipManager=this.createBean(new Kv(this.ctrl,()=>this.tooltip),this.beans.context))}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(e){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(e?"":null,e),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},qv={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,renderingMode:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0,enableFilterHandlers:!0,filterHandlers:!0},ue="clientSide",re="serverSide",Bt="infinite",Yv={onGroupExpandedOrCollapsed:[ue],refreshClientSideRowModel:[ue],isRowDataEmpty:[ue],forEachLeafNode:[ue],forEachNodeAfterFilter:[ue],forEachNodeAfterFilterAndSort:[ue],resetRowHeights:[ue],applyTransaction:[ue],applyTransactionAsync:[ue],flushAsyncTransactions:[ue],getBestCostNodeSelection:[ue],getServerSideSelectionState:[re],setServerSideSelectionState:[re],applyServerSideTransaction:[re],applyServerSideTransactionAsync:[re],applyServerSideRowData:[re],retryServerSideLoads:[re],flushServerSideAsyncTransactions:[re],refreshServerSide:[re],getServerSideGroupLevelState:[re],refreshInfiniteCache:[Bt],purgeInfiniteCache:[Bt],getInfiniteRowCount:[Bt],isLastRowIndexKnown:[Bt,re],expandAll:[ue,re],collapseAll:[ue,re],onRowHeightChanged:[ue,re],setRowCount:[Bt,re],getCacheBlockState:[Bt,re]},Zv={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 Qv(e,t,o){const i=Zv[e];if(i){const{version:n,new:r,old:a,message:l}=i,d=a??e;return(...c)=>{const u=r?`Please use ${r} instead. `:"";return Zt(`Since ${n} api.${d} is deprecated. ${u}${l??""}`),t.apply(t,c)}}const s=Yv[e];return s?(...n)=>{const r=o.rowModel.getType();if(!s.includes(r)){wt(`api.${e} can only be called when gridOptions.rowModelType is ${s.join(" or ")}`);return}return t.apply(t,n)}:t}var Xv={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",tooltipFeature:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},Jv={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,"filter-add":1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1,"column-arrow":1,"un-pin":1,"pinned-top":1,"pinned-bottom":1,"chevron-up":1,"chevron-down":1,"chevron-left":1,"chevron-right":1,edit:1},eS={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterAdd:"NewFiltersToolPanel",filterCardCollapse:"NewFiltersToolPanel",filterCardExpand:"NewFiltersToolPanel",filterCardEditing:"NewFiltersToolPanel",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",ensureColumnVisible:["ColumnsToolPanel","ColumnMenu"],groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuValue:"MenuCore",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore",rowPin:"PinnedRow",rowUnpin:"PinnedRow",rowPinBottom:"PinnedRow",rowPinTop:"PinnedRow"},tS=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),oS=class extends x{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,dc(this)}warnOnInitialPropertyUpdate(e,t){e==="api"&&qv[t]&&M(22,{key:t})}processGridOptions(e){this.processOptions(e,ww())}validateApiFunction(e,t){return Qv(e,t,this.beans)}missingUserComponent(e,t,o,i){const s=Ot[t];s?this.gos.assertModuleRegistered(s,`AG Grid '${e}' component: ${t}`):M(101,{propertyName:e,componentName:t,agGridDefaults:o,jsComps:i})}missingDynamicBean(e){const t=Xv[e];return t?Ee(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){sS.has(e)&&M(10,{eventType:e})}validateIcon(e){if(tS.has(e)&&M(43,{iconName:e}),Jv[e])return;const t=eS[e];if(t){j(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:gs(),gridId:this.beans.context.getGridId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}M(134,{iconName:e})}isProvidedUserComp(e){return!!Ot[e]}validateColDef(e){this.processOptions(e,lw())}processOptions(e,t){const{validations:o,deprecations:i,allProperties:s,propertyExceptions:n,objectName:r,docsUrl:a}=t;s&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...n??[],...Object.keys(i)],s,r,a);const l=new Set;Object.keys(e).forEach(c=>{const u=i[c];if(u){const{message:w,version:S}=u;l.add(`As of v${S}, ${String(c)} is deprecated. ${w??""}`)}const h=e[c];if(h==null||h===!1)return;const g=o[c];if(!g)return;const{dependencies:p,validate:f,supportedRowModels:C,expectedType:m}=g;if(m){const w=typeof h;if(w!==m){l.add(`${String(c)} should be of type '${m}' but received '${w}' (${h}).`);return}}if(C){const w=this.gridOptions.rowModelType??"clientSide";if(!C.includes(w)){l.add(`${String(c)} is not supported with the '${w}' row model. It is only valid with: ${C.join(", ")}.`);return}}if(p){const w=this.checkForRequiredDependencies(c,p,e);if(w){l.add(w);return}}if(f){const w=f(e,this.gridOptions,this.beans);if(w){l.add(w);return}}}),l.size>0&&l.forEach(c=>{Zt(c)})}checkForRequiredDependencies(e,t,o){const s=Object.entries(t).filter(([n,r])=>{const a=o[n];return!r.required.includes(a)});return s.length===0?null:s.map(([n,r])=>`'${String(e)}' requires '${n}' to be one of [${r.required.map(a=>a===null?"null":a===void 0?"undefined":a).join(", ")}]. ${r.reason??""}`).join(`
|
|
57
|
+
`)}checkProperties(e,t,o,i,s){const n=["__ob__","__v_skip","__metadata__"],r=iS(Object.getOwnPropertyNames(e),[...n,...t,...o],o),a=Object.keys(r);for(const l of a){const d=r[l];let c=`invalid ${i} property '${l}' did you mean any of these: ${d.slice(0,8).join(", ")}.`;o.includes("context")&&(c+=`
|
|
58
|
+
If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),Zt(c)}if(a.length>0&&s){const l=this.beans.frameworkOverrides.getDocLink(s);Zt(`to see all the valid ${i} properties please check: ${l}`)}}getConsoleMessage(e,t){return Mv(e,t)}};function iS(e,t,o){const i={},s=e.filter(n=>!t.some(r=>r===n));return s.length>0&&s.forEach(n=>i[n]=dn({inputValue:n,allSuggestions:o}).values),i}var sS=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),nS={moduleName:"Validation",version:L,beans:[oS]},xi=0,rS=200,aS=class extends x{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:o,column:i,node:s,event:n}=e,r=t.getBoundingClientRect(),a=this.getParentRect();this.setAlignedTo(t,o);let l=!1;const d=()=>{const c=this.keepXYWithinBounds(o,r.top-a.top,0),u=o.clientWidth>0?o.clientWidth:200;l||(o.style.minWidth=`${u}px`,l=!0);const g=a.right-a.left-u;let p;return this.gos.get("enableRtl")?(p=C(),p<0&&(p=f(),this.setAlignedStyles(o,"left")),p>g&&(p=0,this.setAlignedStyles(o,"right"))):(p=f(),p>g&&(p=C(),this.setAlignedStyles(o,"right")),p<0&&(p=0,this.setAlignedStyles(o,"left"))),{x:p,y:c};function f(){return r.right-a.left-2}function C(){return r.left-a.left-u}};this.positionPopup({ePopup:o,keepWithinBounds:!0,updatePosition:d,postProcessCallback:()=>this.callPostProcessPopup("subMenu",o,t,n instanceof MouseEvent?n:void 0,i,s)})}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:o,nudgeY:i,skipObserver:s}=e;this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:!0,skipObserver:s,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,eventSource:n,alignSide:r="left",position:a="over",column:l,rowNode:d,type:c}=e,u=n.getBoundingClientRect(),h=this.getParentRect();this.setAlignedTo(n,t);const g=()=>{let p=u.left-h.left;r==="right"&&(p-=t.offsetWidth-u.width);let f;return a==="over"?(f=u.top-h.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,u,h,e.nudgeY||0)==="under"?f=u.top-h.top+u.height:f=u.top-t.offsetHeight-(i||0)*2-h.top),{x:p,y:f}};this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,updatePosition:g,postProcessCallback:()=>this.callPostProcessPopup(c,t,n,null,l,d)})}shouldRenderUnderOrAbove(e,t,o,i){const s=o.bottom-t.bottom,n=t.top-o.top,r=e.offsetHeight+i;return s>r?"under":n>r||n>s?"above":"under"}setAlignedStyles(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const i=this.popupList[o],{alignedToElement:s}=i;!s||(["right","left","over","above","under"].forEach(r=>{s.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`)}),!t)||(s.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const o=this.getPopupIndex(t);if(o!==-1){const i=this.popupList[o];i.alignedToElement=e}}callPostProcessPopup(e,t,o,i,s,n){const r=this.gos.getCallback("postProcessPopup");r&&r({column:s,rowNode:n,ePopup:t,type:e,eventSource:o,mouseEvent:i})}positionPopup(e){const{ePopup:t,keepWithinBounds:o,nudgeX:i,nudgeY:s,skipObserver:n,updatePosition:r}=e,a={width:0,height:0},l=(d=!1)=>{let{x:c,y:u}=r();d&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,i&&(c+=i),s&&(u+=s),o&&(c=this.keepXYWithinBounds(t,c,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${c}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!n){const d=Je(this.beans,t,()=>l(!0));setTimeout(()=>d(),rS)}}getActivePopups(){return this.popupList.map(e=>e.element)}getParentRect(){const e=te(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),Bn(t)}keepXYWithinBounds(e,t,o){const i=o===0,s=i?"clientHeight":"clientWidth",n=i?"top":"left",r=i?"height":"width",a=i?"scrollTop":"scrollLeft",l=te(this.beans),d=l.documentElement,c=this.getPopupParent(),u=e.getBoundingClientRect(),h=c.getBoundingClientRect(),g=l.documentElement.getBoundingClientRect(),p=c===l.body,f=Math.ceil(u[r]);let m=p?(i?sc:Yi)(d)+d[a]:c[s];p&&(m-=Math.abs(g[n]-h[n]));const w=m-f;return Math.min(Math.max(t,0),Math.abs(w))}addPopup(e){const t=te(this.beans),{eChild:o,ariaLabel:i,ariaOwns:s,alwaysOnTop:n,positionCallback:r,anchorToElement:a}=e;if(!t)return M(122),{hideFunc:()=>{}};const l=this.getPopupIndex(o);if(l!==-1)return{hideFunc:this.popupList[l].hideFunc};this.initialisePopupPosition(o);const d=this.createPopupWrapper(o,!!n,i,s),c=this.addEventListenersToPopup({...e,wrapperEl:d});return r&&r(),this.addPopupToPopupList(o,d,c,a),{hideFunc:c}}initialisePopupPosition(e){const o=this.getPopupParent().getBoundingClientRect();A(e.style.top)||(e.style.top=`${o.top*-1}px`),A(e.style.left)||(e.style.left=`${o.left*-1}px`)}createPopupWrapper(e,t,o,i){const s=this.getPopupParent(),{environment:n,gos:r}=this.beans,a=ee({tag:"div"});return n.applyThemeClasses(a),a.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Ne(e,"dialog"),o?Ut(e,o):i&&(e.id||(e.id=`popup-component-${xi}`),In(i,e.id)),a.appendChild(e),s.appendChild(a),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),a}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const o of this.popupList)t.applyThemeClasses(o.wrapper)}}addEventListenersToPopup(e){const t=this.beans,o=te(t),i=this.getPopupParent(),{wrapperEl:s,eChild:n,closedCallback:r,afterGuiAttached:a,closeOnEsc:l,modal:d,ariaOwns:c}=e;let u=!1;const h=C=>{if(!s.contains(Q(t)))return;C.key===y.ESCAPE&&!Ge(C)&&f({keyboardEvent:C})},g=C=>f({mouseEvent:C}),p=C=>f({touchEvent:C}),f=(C={})=>{const{mouseEvent:m,touchEvent:w,keyboardEvent:S,forceHide:v}=C;!v&&(this.isEventFromCurrentPopup({mouseEvent:m,touchEvent:w},n)||u)||(u=!0,i.removeChild(s),o.removeEventListener("keydown",h),o.removeEventListener("mousedown",g),o.removeEventListener("touchstart",p),o.removeEventListener("contextmenu",g),this.eventSvc.removeEventListener("dragStarted",g),r&&r(m||w||S),this.removePopupFromPopupList(n,c))};return a&&a({hidePopup:f}),window.setTimeout(()=>{l&&o.addEventListener("keydown",h),d&&(o.addEventListener("mousedown",g),this.eventSvc.addEventListener("dragStarted",g),o.addEventListener("touchstart",p),o.addEventListener("contextmenu",g))},0),f}addPopupToPopupList(e,t,o,i){this.popupList.push({element:e,wrapper:t,hideFunc:o,instanceId:xi,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),xi=xi+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const i=this.popupList[o];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then(n=>n&&n()),i.stopAnchoringPromise=void 0,i.isAnchored=!1,!t)return;const s=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:i.hideFunc});return i.stopAnchoringPromise=s,i.isAnchored=!0,s}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&In(t,null),this.popupList=this.popupList.filter(o=>o.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),o=t.getBoundingClientRect(),{element:i,ePopup:s}=e,n=i.getBoundingClientRect(),r=u=>parseInt(u.substring(0,u.length-1),10),a=(u,h)=>{const g=o[u]-n[u],p=r(s.style[u]);return{initialDiff:g,lastDiff:g,initial:p,last:p,direction:h}},l=a("top",0),d=a("left",1),c=this.beans.frameworkOverrides;return new oo(u=>{c.wrapIncoming(()=>{c.setInterval(()=>{const h=t.getBoundingClientRect(),g=i.getBoundingClientRect();if(g.top==0&&g.left==0&&g.height==0&&g.width==0){e.hidePopup();return}const f=(C,m)=>{const w=r(s.style[m]);C.last!==w&&(C.initial=w,C.last=w);const S=h[m]-g[m];if(S!=C.lastDiff){const v=this.keepXYWithinBounds(s,C.initial+C.initialDiff-S,C.direction);s.style[m]=`${v}px`,C.last=v}C.lastDiff=S};f(l,"top"),f(d,"left")},200).then(h=>{u(()=>{h!=null&&window.clearInterval(h)})})},"popupPositioning")})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){const{mouseEvent:o,touchEvent:i}=e,s=o||i;if(!s)return!1;const n=this.getPopupIndex(t);if(n===-1)return!1;for(let r=n;r<this.popupList.length;r++){const a=this.popupList[r];if(Ic(a.element,s))return!0}return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){const t=te(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const o=this.getWrapper(e);o&&(o.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(o))}bringPopupToFront(e){const t=this.getPopupParent(),o=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),i=o.length,s=this.getWrapper(e);if(!s||i<=1||!t.contains(e))return;const n=[],r=[];for(const h of o)h!==s&&(h.classList.contains("ag-always-on-top")?r.push(h):n.push(h));const a=[],l=r.length,u=s.classList.contains("ag-always-on-top")||!l?[...n,...r,s]:[...n,s,...r];for(let h=0;h<=i;h++){const g=u[h];if(o[h]===u[h]||g===s)continue;g.querySelectorAll("div").forEach(f=>{f.scrollTop!==0&&a.push([f,f.scrollTop])}),h===0?t.insertAdjacentElement("afterbegin",g):u[h-1].insertAdjacentElement("afterend",g)}for(;a.length;){const h=a.pop();h[0].scrollTop=h[1]}}},Dl={moduleName:"Popup",version:L,beans:[aS]},lS=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",hn=(e,t,o)=>{var a,l,d;const{editModelSvc:i}=e,s=(l=(a=i==null?void 0:i.getCellValidationModel())==null?void 0:a.getCellValidation(t))==null?void 0:l.errorMessages,n=(d=i==null?void 0:i.getRowValidationModel().getRowValidation(t))==null?void 0:d.errorMessages,r=s||n;return r&&r.length?r.join(o("tooltipValidationErrorSeparator",". ")):void 0},dS=class extends x{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,o,i){e&&t.destroyBean(e);const s=un(this.gos),{column:n,eGui:r}=t,a=n.getColDef();!i&&s&&!a.headerComponent&&(i=Io(()=>r.querySelector(".ag-header-cell-text")));const l={getColumn:()=>n,getColDef:()=>n.getColDef(),getGui:()=>r,getLocation:()=>"header",getTooltipValue:()=>o??n.getColDef().headerTooltip,shouldDisplayTooltip:i};let d=this.createTooltipFeature(l);return d&&(d=t.createBean(d),t.setRefreshFunction("tooltip",()=>d.refreshTooltip())),d}setupHeaderGroupTooltip(e,t,o,i){e&&t.destroyBean(e);const s=un(this.gos),{column:n,eGui:r}=t,a=n.getColGroupDef();!i&&s&&!(a!=null&&a.headerGroupComponent)&&(i=Io(()=>r.querySelector(".ag-header-group-text")));const l={getColumn:()=>n,getGui:()=>r,getLocation:()=>"headerGroup",getTooltipValue:()=>o??(a&&a.headerTooltip),shouldDisplayTooltip:i};a&&(l.getColDef=()=>a);const d=this.createTooltipFeature(l);return d&&t.createBean(d)}enableCellTooltipFeature(e,t,o){const{beans:i}=this,{gos:s,editSvc:n}=i,{column:r,rowNode:a}=e;let l="cell";const d=()=>{const g=!!!(n!=null&&n.isEditing(e))&&hn(i,e,this.getLocaleTextFunc());if(g)return l="cellEditor",g;l="cell";const p=r.getColDef(),f=a.data;if(p.tooltipField&&A(f))return $t(f,p.tooltipField,r.isTooltipFieldContainsDots());const C=p.tooltipValueGetter;return C?C(_(s,{location:"cell",colDef:r.getColDef(),column:r,rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,value:e.value,valueFormatted:e.valueFormatted})):null},c=un(s);o||(c&&!e.isCellRenderer()?o=()=>{const h=!!(n!=null&&n.isEditing(e));if(!h&&hn(i,e,this.getLocaleTextFunc()))return!0;if(!r.isTooltipEnabled())return!1;const f=Io(()=>{const C=e.eGui;return C.children.length===0?C:C.querySelector(".ag-cell-value")});return!h&&f()}:o=()=>!(n!=null&&n.isEditing(e)));const u={getColumn:()=>r,getColDef:()=>r.getColDef(),getRowIndex:()=>e.cellPosition.rowIndex,getRowNode:()=>a,getGui:()=>e.eGui,getLocation:()=>l,getTooltipValue:t!=null?()=>t:d,getValueFormatted:()=>e.valueFormatted,shouldDisplayTooltip:o};return this.createTooltipFeature(u,i)}setupFullWidthRowTooltip(e,t,o,i){const s={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>o,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},n=this.beans,r=n.context;e&&t.destroyBean(e,r);const a=this.createTooltipFeature(s,n);if(a)return t.createBean(a,r)}setupCellEditorTooltip(e,t){var a,l;const{beans:o}=this,{context:i}=o,s=((a=t.getValidationElement)==null?void 0:a.call(t,!0))||!((l=t.isPopup)!=null&&l.call(t))&&e.eGui;if(!s)return;const n={getGui:()=>s,getTooltipValue:()=>hn(o,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{var p,f;const{editModelSvc:d}=o,c=(p=d==null?void 0:d.getRowValidationModel())==null?void 0:p.getRowValidationMap(),u=(f=d==null?void 0:d.getCellValidationModel())==null?void 0:f.getCellValidationMap(),h=!!c&&c.size>0,g=!!u&&u.size>0;return h||g}},r=this.createTooltipFeature(n,o);if(r)return e.createBean(r,i)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=A(t.tooltipField)||A(t.tooltipValueGetter)||A(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},Fl={moduleName:"Tooltip",version:L,beans:[dS],dynamicBeans:{tooltipFeature:jv},userComponents:{agTooltipComponent:zv},dependsOn:[Dl],css:[lS]},cS=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}",uS={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},hS=class extends mi{constructor(){super(uS,[Os]),this.eEditor=I}initialiseEditor(e){const t=e.value??void 0,o=this.eEditor;o.setValue(t),o.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(o,{fieldValueChanged:s=>this.setAriaLabel(s.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),o=An(t,e),i=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${i} (${o})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,o=this.getValue();return t?t({value:o,internalErrors:null,cellEditorParams:e}):null}},Di=class extends mi{constructor(e){super(),this.cellEditorInput=e,this.eEditor=I}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:o}=this,{cellStartedEdit:i,eventKey:s,suppressPreventDefault:n}=e;o.getInputElement().setAttribute("title",""),t.init(o,e);let r,a=!0;i?(this.focusAfterAttached=!0,s===y.BACKSPACE||s===y.DELETE?r="":s&&s.length===1?n?a=!1:r=s:(r=t.getStartValue(),s!==y.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),a&&r!=null&&o.setStartValue(r),this.addGuiEventListener("keydown",l=>{const{key:d}=l;(d===y.PAGE_UP||d===y.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){var i,s;const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;ft()||t.getFocusableElement().focus();const o=t.getInputElement();this.highlightAllOnFocus?o.select():(s=(i=this.cellEditorInput).setCaret)==null||s.call(i)}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),o=e.getInputElement();t.focus(),o.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},gS={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},pS=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return gS}getAgComponents(){return[Pa]}init(e,t){var r,a;this.eEditor=e,this.params=t;const{min:o,max:i,step:s,colDef:n}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((a=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:a.call(r,n.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:o}=this,{min:i,max:s,getValidationErrors:n}=o;let r=[];const a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){const l=i instanceof Date?i:new Date(i);if(t<l){const d=l.toLocaleDateString();r.push(a("minDateValidation",`Date must be after ${d}`,[d]))}}if(s){const l=s instanceof Date?s:new Date(s);if(t>l){const d=l.toLocaleDateString();r.push(a("maxDateValidation",`Date must be before ${d}`,[d]))}}}return r.length||(r=null),n?n({value:t,cellEditorParams:o,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,o=e.getDate();return!A(o)&&!A(t.value)?t.value:o??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return Ke(e,this.includeTime??!1)}},fS=class extends Di{constructor(){super(new pS(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},CS={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},mS=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return CS}getAgComponents(){return[Pa]}init(e,t){var r,a;this.eEditor=e,this.params=t;const{min:o,max:i,step:s,colDef:n}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((a=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:a.call(r,n.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,o=e.getInputElement().value,i=this.formatDate(this.parseDate(o??void 0)),{min:s,max:n,getValidationErrors:r}=t;let a=[];if(i){const l=new Date(i),d=this.getLocaleTextFunc();if(s){const c=new Date(s);if(l<c){const u=c.toLocaleDateString();a.push(d("minDateValidation",`Date must be after ${u}`,[u]))}}if(n){const c=new Date(n);if(l>c){const u=c.toLocaleDateString();a.push(d("maxDateValidation",`Date must be before ${u}`,[u]))}}}return a.length||(a=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,o=this.formatDate(t.getDate());return!A(o)&&!A(e.value)?e.value:e.parseValue(o??"")}getStartValue(){return Ke(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):ao(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):Ke(e??null,this.includeTime??!1)??void 0}},wS=class extends Di{constructor(){super(new mS(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},vS={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},SS=class extends mi{constructor(){super(vS,[up]),this.eEditor=I}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:o,eventKey:i,value:s,maxLength:n,cols:r,rows:a}=e;this.focusAfterAttached=o,t.getInputElement().setAttribute("title",""),t.setMaxLength(n||200).setCols(r||60).setRows(a||10);let l;o?(this.focusAfterAttached=!0,i===y.BACKSPACE||i===y.DELETE?l="":i&&i.length===1?l=i:(l=s.toString(),i!==y.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,l=s.toString()),l!=null&&t.setValue(l,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}onKeyDown(e){const t=e.key;(t===y.LEFT||t===y.UP||t===y.RIGHT||t===y.DOWN||e.shiftKey&&t===y.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:o}=this,i=this.getLocaleTextFunc();e.setInputAriaLabel(i("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),o&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:o}=t,i=e.getValue();return!A(i)&&!A(o)?o:t.parseValue(i)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getLocaleTextFunc(),s=this.getValue();let n=[];return typeof s=="string"&&t!=null&&s.length>t&&n.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),o?o({value:s,internalErrors:n,cellEditorParams:e}):n}},bS={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},yS=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return bS}getAgComponents(){return[gp]}init(e,t){this.eEditor=e,this.params=t;const{max:o,min:i,precision:s,step:n}=t;o!=null&&e.setMax(o),i!=null&&e.setMin(i),s!=null&&e.setPrecision(s),n!=null&&e.setStep(n);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:o,getValidationErrors:i}=e,n=this.eEditor.getInputElement().valueAsNumber,r=this.getLocaleTextFunc();let a=[];return typeof n=="number"&&(t!=null&&n<t&&a.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),o!=null&&n>o&&a.push(r("maxValueValidation",`Must be less than or equal to ${o}.`,[String(o)]))),a.length||(a=null),i?i({value:n,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===y.UP||e.key===y.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();if(!A(o)&&!A(t.value))return t.value;let i=t.parseValue(o);if(i==null)return i;if(typeof i=="string"){if(i==="")return null;i=Number(i)}return isNaN(i)?null:i}getStartValue(){return this.params.value}setCaret(){ft()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},RS=class extends Di{constructor(){super(new yS(()=>this.getLocaleTextFunc()))}},ES={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},xS=class extends mi{constructor(){super(ES,[bp]),this.eEditor=I,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:o,gos:i}=this,{values:s,value:n,eventKey:r}=e;if(q(s)){M(58);return}this.startedByEnter=r!=null?r===y.ENTER:!1;let a=!1;s.forEach(u=>{const h={value:u},g=o.formatValue(e.column,null,u),p=g!=null;h.text=p?g:u,t.addOption(h),a=a||n===u}),a?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:d,valueListMaxHeight:c}=e;l!=null&&t.setPickerGap(l),c!=null&&t.setPickerMaxHeight(c),d!=null&&t.setPickerMaxWidth(d),i.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:o}=e,i=this.getValue();let s=[];if(t&&!t.includes(i)){const n=this.getLocaleTextFunc();s.push(n("invalidSelectionValidation","Invalid selection."))}else s=null;return o?o({value:i,internalErrors:s,cellEditorParams:e}):s}},DS={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},FS=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return DS}getAgComponents(){return[dp]}init(e,t){this.eEditor=e,this.params=t;const o=t.maxLength;o!=null&&e.setMaxLength(o)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getValue(),s=this.getLocaleTextFunc();let n=[];return t!=null&&typeof i=="string"&&i.length>t&&n.push(s("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),o?o({value:i,cellEditorParams:e,internalErrors:n}):n}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();return!A(o)&&!A(t.value)?t.value:t.parseValue(o)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){const e=this.eEditor,t=e.getValue(),o=A(t)&&t.length||0;o&&e.getInputElement().setSelectionRange(o,o)}},Pl=class extends Di{constructor(){super(new FS(()=>this.getLocaleTextFunc()))}};function PS(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function TS(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function Tl(e,t,o="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,o),"ensureVisible")}function Il(e,t,o){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,o),"ensureVisible")}function IS(e,t,o=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,o),"ensureVisible")}function AS(e){var i;const t=(i=e.editModelSvc)==null?void 0:i.getEditMap(),o=[];return t==null||t.forEach((s,n)=>{const{rowIndex:r,rowPinned:a}=n;s.forEach((l,d)=>{const{editorValue:c,pendingValue:u,sourceValue:h,state:g}=l,p=Ue(l);let f=c??u;f===Ce&&(f=void 0);const C={newValue:f,oldValue:h,state:g,column:d,colId:d.getColId(),colKey:d.getColId(),rowIndex:r,rowPinned:a};(g==="editing"||g==="changed"&&p)&&o.push(C)})}),o}function MS(e,t=!1){var i;const{editSvc:o}=e;o!=null&&o.isBatchEditing()?(t?(i=e.editModelSvc)==null||i.getEditPositions().forEach(s=>{s.state==="editing"&&o.revertSingleCellEdit(s)}):at(e,!0),Tt(e)):o==null||o.stopEditing(void 0,{cancel:t,source:"api"})}function kS(e,t){var i;const o=Z(e,t);return((i=e.editSvc)==null?void 0:i.isEditing(o))??!1}function LS(e,t){const{key:o,colKey:i,rowIndex:s,rowPinned:n}=t,{editSvc:r,colModel:a}=e,l=a.getCol(i);if(!l){M(12,{colKey:i});return}const c=rt(e,{rowIndex:s,rowPinned:n||null});if(!c){M(290,{rowIndex:s,rowPinned:n});return}if(!l.isCellEditable(c))return;n==null&&Il(e,s),Tl(e,i),r==null||r.startEditing({rowNode:c,column:l},{event:o?new KeyboardEvent("keydown",{key:o}):void 0,source:"api"})}function GS(e){var t;return((t=e.editSvc)==null?void 0:t.validateEdit())||null}var HS={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},OS=class extends Gs{constructor(e){super(HS),this.params=e}postConstruct(){tt(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,o=i=>{Fs(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:o})}},Fi=(e,t=!1)=>{if(e!==void 0)return Ue(e)||t&&e.state==="editing"};function Al(e,t,o=!1){var i;return Fi((i=e.editModelSvc)==null?void 0:i.getEdit(t),o)}function Ml(e,t){const{editModelSvc:o}=e,{column:i,rowNode:s}=t;if(e.gos.get("groupTotalRow")&&!(s!=null&&s.footer))return!1;for(const n of(s==null?void 0:s.allLeafChildren)??[])if(Fi(o==null?void 0:o.getEdit({rowNode:n,column:i}))||Fi(o==null?void 0:o.getEdit({rowNode:n.pinnedSibling,column:i})))return!0}function kl(e,{rowNode:t,column:o}){var i;if(t=t.pinnedSibling,!!t)return Fi((i=e.editModelSvc)==null?void 0:i.getEdit({rowNode:t,column:o}))}var BS=class extends x{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){var s;const{cellCtrl:e,editSvc:t,beans:o}=this;if(t!=null&&t.isBatchEditing()&&t.isEditing()){const n=Al(o,e)||Ml(o,e)||kl(o,e);this.applyBatchingStyle(n)}else this.applyBatchingStyle(!1);const i=!!((s=this.editModelSvc)!=null&&s.getCellValidationModel().hasCellValidation(this.cellCtrl));this.cellComp.toggleCss("ag-cell-editing-error",i)}applyBatchingStyle(e){var t;this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&((t=this.editSvc)==null?void 0:t.isBatchEditing()))??!1)}},VS=class extends x{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){var r;const{rowCtrl:e,editModelSvc:t,beans:o}=this;let i=e.rowNode,s=t==null?void 0:t.getEditRow(i);const n=(r=this.editModelSvc)==null?void 0:r.getRowValidationModel().hasRowValidation({rowNode:i});if(!s&&i.pinnedSibling&&(i=i.pinnedSibling,s=t==null?void 0:t.getEditRow(i)),s){const a=Array.from(s.keys()).some(l=>{const d={rowNode:i,column:l};return Al(o,d,!0)||Ml(o,d)||kl(o,d)});this.applyStyle(n,a);return}this.applyStyle(n)}applyStyle(e=!1,t=!1){var s,n;const o=((s=this.editSvc)==null?void 0:s.isBatchEditing())??!1,i=this.gos.get("editType")==="fullRow";(n=this.rowCtrl)==null||n.forEachGui(void 0,({rowComp:r})=>{r.toggleCss("ag-row-editing",i&&t),r.toggleCss("ag-row-batch-edit",i&&t&&o),r.toggleCss("ag-row-inline-editing",t),r.toggleCss("ag-row-not-inline-editing",!t),r.toggleCss("ag-row-editing-invalid",i&&t&&e)})}},NS=({rowModel:e,pinnedRowModel:t,editModelSvc:o},i)=>{const s=new Set;return e.forEachNode(n=>i.has(n)&&s.add(n)),t==null||t.forEachPinnedRow("top",n=>i.has(n)&&s.add(n)),t==null||t.forEachPinnedRow("bottom",n=>i.has(n)&&s.add(n)),i.forEach(n=>{s.has(n)||o.removeEdits({rowNode:n})}),s},_S=({editModelSvc:e},t,o)=>{t.forEach(i=>{var s;return(s=e==null?void 0:e.getEditRow(i))==null?void 0:s.forEach((n,r)=>!o.has(r)&&e.removeEdits({rowNode:i,column:r}))})},WS=e=>()=>{const t=new Set(e.colModel.getCols()),o=e.editModelSvc.getEditMap(!0),i=new Set(o.keys());_S(e,NS(e,i),t)},zS=new Set(["undo","redo"]),Ll={paste:"ui",rangeSvc:"ui",fillHandle:"api",cellClear:"api"},$S=new Set(Object.keys(Ll)),US=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),Pi={cancel:!0,source:"api"},KS={cancel:!1,source:"api"},Vt={checkSiblings:!0},wo={force:!0,suppressFlash:!0},jS=class extends x{constructor(){super(...arguments),this.beanName="editSvc",this.batch=!1}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:i})=>{this.stopEditing(void 0,Pi),this.createStrategy(i)});const t=WS(e),o=()=>{const i=this.model.getCellValidationModel().getCellValidationMap().size>0,s=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||s?this.stopEditing(void 0,Pi):this.isEditing()&&(this.isBatchEditing()?Tt(e,this.model.getEditPositions()):this.stopEditing(void 0,KS)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowGroupOpened:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:o,filterChanged:o,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}setBatchEditing(e){e?(this.batch=!0,this.stopEditing(void 0,Pi)):(this.stopEditing(void 0,Pi),this.batch=!1)}createStrategy(e){const{beans:t,gos:o,strategy:i}=this,s=e??o.get("editType")??"singleCell";if(i){if(i.beanName===s)return i;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,o,i="ui"){var s;return this.strategy??(this.strategy=this.createStrategy()),((s=this.strategy)==null?void 0:s.shouldStart(e,t,o,i))??null}shouldStopEditing(e,t,o="ui"){var i;return((i=this.strategy)==null?void 0:i.shouldStop(e,t,o))??null}shouldCancelEditing(e,t,o="ui"){var i;return((i=this.strategy)==null?void 0:i.shouldCancel(e,t,o))??null}validateEdit(){return ch(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??Vt)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){var l;const{startedEdit:o=!0,event:i=null,source:s="ui",ignoreEventKey:n=!1}=t;if(this.strategy??(this.strategy=this.createStrategy()),!this.isCellEditable(e,"api"))return;const r=Z(this.beans,e);if(r&&!r.comp){r.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const a=(l=this.shouldStartEditing)==null?void 0:l.call(this,e,i,o,s);if(a===!1&&s!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,s)&&this.stopEditing(void 0,{source:s}),a&&this.isBatchEditing()&&this.dispatchBatchEvent("batchEditingStarted",new Map),this.strategy.start(e,i,s,n)}stopEditing(e,t){var p,f,C;const{event:o,cancel:i,source:s="ui",suppressNavigateAfterEdit:n}=t||{},{beans:r,model:a}=this;if($S.has(s))return this.isBatchEditing()?(this.bulkRefresh(e),!1):this.stopEditing(e,{...t,source:Ll[s]});if(!(this.isEditing(e)||this.isBatchEditing()&&a.hasEdits(e,Vt))||!this.strategy)return!1;const d=Z(r,e);d&&(d.onEditorAttachedFuncs=[]);let c=a.getEditMap(!0),u=!1;const h=!i&&!!this.shouldStopEditing(e,o,s),g=i&&!!this.shouldCancelEditing(e,o,s);if(h||g){at(r,!0);const m=a.getEditMap();this.processEdits(m,i),(p=this.strategy)==null||p.stop(i,o),this.bulkRefresh(void 0,c),c=m,u||(u=h)}else if(o instanceof KeyboardEvent&&this.batch&&((f=this.strategy)!=null&&f.midBatchInputsAllowed(e))&&this.isEditing(e,{withOpenEditor:!0})){const m=o.key,w=m===y.ENTER,S=m===y.ESCAPE,v=m===y.TAB;(w||v||S)&&(w||v?at(r,!0):S&&this.revertSingleCellEdit(d),this.isBatchEditing()?(C=this.strategy)==null||C.cleanupEditors():Tt(r,a.getEditPositions(),{event:o}),o.preventDefault(),this.bulkRefresh(e,c,{suppressFlash:!0}),c=a.getEditMap())}else at(r,!0),c=a.getEditMap();return u&&e&&this.model.removeEdits(e),!n&&d&&this.navigateAfterEdit(o instanceof KeyboardEvent&&o.shiftKey,d.cellPosition),Cs(r),this.model.hasEdits()||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap()),this.bulkRefresh(),g&&this.beans.rowRenderer.refreshRows({rowNodes:Array.from(c.keys())}),this.isBatchEditing()&&(this.beans.rowRenderer.refreshRows({suppressFlash:!0,force:!0}),u&&h&&this.dispatchBatchEvent("batchEditingStopped",c)),u}navigateAfterEdit(e,t){var i;if(this.gos.get("enterNavigatesVerticallyAfterEdit")){const s=e?y.UP:y.DOWN;(i=this.beans.navigation)==null||i.navigateToNextCell(null,s,t,!1)}}processEdits(e,t=!1){var r,a,l;const o=Array.from(e.keys()),{beans:i}=this,s=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,n=[];for(const d of o){const c=e.get(d);for(const u of c.keys()){const h=c.get(u),g={rowNode:d,column:u},p=Z(i,g),f=Ue(h),C=(l=(a=(r=p==null?void 0:p.comp)==null?void 0:r.getCellEditor())==null?void 0:a.isCancelAfterEnd)==null?void 0:l.call(a);!t&&!C&&f&&!s&&(this.setNodeDataValue(d,u,h.pendingValue)||n.push(g)),p==null||p.refreshCell(wo)}}n.forEach(d=>{this.model.clearEditValue(d)})}setNodeDataValue(e,t,o,i){const{beans:s}=this,n=Z(s,{rowNode:e,column:t});n&&(n.suppressRefreshCell=!0);const r=e.setDataValue(t,o,"commit");return n&&(n.suppressRefreshCell=!1),i&&(n==null||n.refreshCell(wo)),r}setEditMap(e,t){var o;this.strategy??(this.strategy=this.createStrategy()),(o=this.strategy)==null||o.setEditMap(e,t),this.bulkRefresh(),this.beans.rowRenderer.refreshCells(wo)}dispatchEditValuesChanged({rowNode:e,column:t},o={}){if(!e||!t||!o)return;const{pendingValue:i,sourceValue:s}=o,{rowIndex:n,rowPinned:r,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:n,rowPinned:r,column:t,source:"api",data:a,newValue:i,oldValue:s,value:i,colDef:t.getColDef()})}bulkRefresh(e={},t,o={}){var a;const{beans:i,gos:s}=this,{editModelSvc:n,rowModel:r}=i;ne(s)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),o):t&&((a=n==null?void 0:n.getEditMap(!1))==null||a.forEach((l,d)=>{for(const c of l.keys())this.refCell({rowNode:d,column:c},l.get(c),o)})))}refCell({rowNode:e,column:t},o,i={}){var u;const{beans:s,gos:n}=this,r=new Set([e]),a=new Set,l=e.pinnedSibling;l&&r.add(l);const d=e.sibling;d&&a.add(d);let c=e.parent;for(;c;)(u=c.sibling)!=null&&u.footer&&n.get("groupTotalRow")||!c.parent&&c.sibling&&n.get("grandTotalRow")?a.add(c.sibling):a.add(c),c=c.parent;r.forEach(h=>this.dispatchEditValuesChanged({rowNode:h,column:t},o)),r.forEach(h=>{var g;return(g=Z(s,{rowNode:h,column:t}))==null?void 0:g.refreshCell(i)}),a.forEach(h=>{var g;return(g=Z(s,{rowNode:h,column:t}))==null?void 0:g.refreshCell(i)})}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){var i;const{rowNode:o}=e;if(o.group){if(this.gos.get("treeData")){if(!o.data&&!this.gos.get("enableGroupEdit"))return!1}else if(!this.gos.get("enableGroupEdit"))return!1}return this.strategy??(this.strategy=this.createStrategy()),((i=this.strategy)==null?void 0:i.isCellEditable(e,t))??!1}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,o=!0){var i,s,n,r;if(this.hasValidationErrors(e)){const a=Z(this.beans,e);return this.cellEditingInvalidCommitBlocks()?((i=t==null?void 0:t.preventDefault)==null||i.call(t),o&&(!(a!=null&&a.hasBrowserFocus())&&(a==null||a.focusCell()),(r=(n=(s=a==null?void 0:a.comp)==null?void 0:s.getCellEditor())==null?void 0:n.focusIn)==null||r.call(n)),"block-stop"):(a&&this.revertSingleCellEdit(a),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){var i,s,n,r,a;const o=Z(this.beans,e);(i=o==null?void 0:o.comp)!=null&&i.getCellEditor()&&(Tt(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),Pt(this.beans,e,{silent:!0}),lt(this.beans),o==null||o.refreshCell(wo),(s=o.rowCtrl.rowEditStyleFeature)==null||s.applyRowStyles(),t&&(o==null||o.focusCell(),(a=(r=(n=o==null?void 0:o.comp)==null?void 0:n.getCellEditor())==null?void 0:r.focusIn)==null||a.call(r)))}hasValidationErrors(e){var i;lt(this.beans);const t=Z(this.beans,e);t&&(t.refreshCell(wo),(i=t.rowCtrl.rowEditStyleFeature)==null||i.applyRowStyles());let o=!1;return e!=null&&e.rowNode?(o||(o=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(o||(o=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(o||(o=this.model.getCellValidationModel().getCellValidationMap().size>0),o||(o=this.model.getRowValidationModel().getRowValidationMap().size>0)),o}moveToNextCell(e,t,o,i="ui"){var a;let s;const n=this.isEditing(),r=n&&this.checkNavWithValidation(void 0,o)==="block-stop";return e instanceof At&&n&&(s=(a=this.strategy)==null?void 0:a.moveToNextEditingCell(e,t,o,i,r)),s===null||(s=s||!!this.beans.focusSvc.focusedHeader,s===!1&&!r&&this.stopEditing()),s}getCellDataValue({rowNode:e,column:t},o=!0){if(!e||!t)return;let i=this.model.getEdit({rowNode:e,column:t});const s=e.pinnedSibling;if(s){const r=this.model.getEdit({rowNode:s,column:t});r&&(i=r)}const n=o?(i==null?void 0:i.editorValue)??(i==null?void 0:i.pendingValue):i==null?void 0:i.pendingValue;return n===Ce||!i?this.valueSvc.getValue(t,e,!0,"api"):n}getRowDataValue(e,t){return this.model.getEditRowDataValue(e,t)}addStopEditingWhenGridLosesFocus(e){sh(this,this.beans,e)}createPopupEditorWrapper(e){return new OS(e)}setDataValue(e,t,o){var r;if((!this.isEditing()||o==="commit")&&!US.has(o))return;const{beans:i}=this;this.strategy??(this.strategy=this.createStrategy());const s=this.isBatchEditing()?"ui":"api";if(!o||zS.has(o))return Jo(i,e,!0,t),this.setNodeDataValue(e.rowNode,e.column,t,!0);const n=this.model.getEdit(e);if(n){if(n.pendingValue===t)return!1;if(n.sourceValue!==t)return Jo(i,e,!0,t),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0;if(n.sourceValue===t)return(r=i.editModelSvc)==null||r.removeEdits(e),this.dispatchEditValuesChanged(e,{...n,pendingValue:t}),!0}return Jo(i,e,!0,t),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0}handleColDefChanged(e){ah(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){if(!this.batch||!this.model.hasRowEdits(e.rowNode,Vt))return;const{rowNode:i,column:s}=e,{compDetails:n,valueToDisplay:r}=t;if(n){const{params:l}=n;return l.data=this.model.getEditRowDataValue(i,Vt),{compDetails:n}}const a=this.model.getEditRow(e.rowNode,Vt);if(r!==void 0&&(a!=null&&a.has(s)))return{valueToDisplay:this.valueSvc.getValue(s,i)}}cleanupEditors(){var e;(e=this.strategy)==null||e.cleanupEditors()}dispatchCellEvent(e,t,o,i){var s;(s=this.strategy)==null||s.dispatchCellEvent(e,t,o,i)}dispatchRowEvent(e,t){var o;(o=this.strategy)==null||o.dispatchRowEvent(e,t)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return _(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},o){var d,c;if(!o||o.length===0)return;const{beans:i,rangeSvc:s,valueSvc:n}=this;at(i,!0);const r=this.model.getEditMap(!0),a=(c=(d=r.get(e))==null?void 0:d.get(t))==null?void 0:c.pendingValue;this.batch||this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),o.forEach(u=>{if(s==null||s.forEachRowInRange(u,h=>{const g=rt(i,h);if(g===void 0)return;const p=r.get(g)??new Map;for(const f of u.columns)if(f&&this.isCellEditable({rowNode:g,column:f},"api")){const C=n.getValue(f,g,!0,"api");let m=n.parseValue(f,g??null,a,C);Number.isNaN(m)&&(m=null),p.set(f,{editorValue:void 0,pendingValue:m,sourceValue:C,state:"changed"})}p.size>0&&r.set(g,p)}),this.setEditMap(r),this.batch){this.cleanupEditors(),Cs(i),this.bulkRefresh();return}this.stopEditing(void 0,{source:"api"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(r)})}),this.bulkRefresh();const l=Z(i,{rowNode:e,column:t});l&&l.focusCell(!0)}createCellStyleFeature(e,t){return new BS(e,t)}createRowStyleFeature(e,t){return new VS(e,t)}setEditingCells(e,t){const{beans:o}=this,{colModel:i,valueSvc:s}=o,n=new Map;e.forEach(({colId:r,column:a,colKey:l,rowIndex:d,rowPinned:c,newValue:u,state:h})=>{const g=r?i.getCol(r):l?i.getCol(l):a;if(!g)return;const p=rt(o,{rowIndex:d,rowPinned:c});if(!p)return;const f=s.getValue(g,p,!0,"api");if(!Ue({pendingValue:u,sourceValue:f})&&h!=="editing")return;let C=n.get(p);C||(C=new Map,n.set(p,C)),u===void 0&&(u=Ce),C.set(g,{editorValue:void 0,pendingValue:u,sourceValue:f,state:h??"changed"})}),this.setEditMap(n,t)}onCellFocused(e){var n;const t=Z(this.beans,e);if(!t||!this.isEditing(t,Vt))return;const o=this.model.getEdit(t);if(!o||!Ue(o))return;const s=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");(n=this.beans.ariaAnnounce)==null||n.announceValue(s,"pendingChange")}allowedFocusTargetOnValidation(e){return Z(this.beans,e)}},Gl=class extends x{postConstruct(){var e,t;this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:(e=this.onCellFocusChanged)==null?void 0:e.bind(this),cellFocusCleared:(t=this.onCellFocusChanged)==null?void 0:t.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const o=e.previousParams,{editSvc:i,beans:s}=this,n=e.type==="cellFocused"?e.sourceEvent:null;o&&(t=Z(s,o));const{gos:r,editModelSvc:a}=s,l=e.type==="cellFocusCleared";if(i.isEditing(void 0,{withOpenEditor:!0})){const{column:d,rowIndex:c,rowPinned:u}=e,h={column:d,rowNode:rt(s,{rowIndex:c,rowPinned:u})},g=r.get("invalidEditValueMode")==="block";if(g)return;const p=!g,f=!!(a!=null&&a.getCellValidationModel().hasCellValidation(h)),C=p&&f;(o||l?i.stopEditing(void 0,{cancel:C,source:l&&p?"api":void 0,event:n}):!0)||(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"}))}t==null||t.refreshCell({suppressFlash:!0,force:!0})}isCellEditable({rowNode:e,column:t},o="ui"){return t.isColumnFunc(e,t.getColDef().editable)}stop(e,t){const o=this.model.getEditPositions(),i={all:[],pass:[],fail:[]};if(o.forEach(n=>{var a;i.all.push(n);const r=this.model.getCellValidationModel().getCellValidation(n);if((((a=r==null?void 0:r.errorMessages)==null?void 0:a.length)??0)>0){i.fail.push(n);return}i.pass.push(n)}),e)return o.forEach(n=>{ei(this.beans,n),this.model.stop(n)}),!0;const s=this.processValidationResults(i);return s.destroy.length>0&&s.destroy.forEach(n=>{ei(this.beans,n,{event:t}),this.model.stop(n)}),s.keep.length>0&&s.keep.forEach(n=>{var a;const r=Z(this.beans,n);(a=this.editSvc)!=null&&a.cellEditingInvalidCommitBlocks()||r&&this.editSvc.revertSingleCellEdit(r)}),!0}cleanupEditors({rowNode:e}={},t){at(this.beans,!1);const o=this.model.getEditPositions(),i=[];e?o.forEach(s=>{!e||s.rowNode===e||i.push(s)}):o.forEach(s=>{i.push(s)}),Tt(this.beans,i),Cs(this.beans,t)}setFocusOutOnEditor(e){var t,o,i;(i=(o=(t=e.comp)==null?void 0:t.getCellEditor())==null?void 0:o.focusOut)==null||i.call(o)}setFocusInOnEditor(e){const t=e.comp,o=t==null?void 0:t.getCellEditor();if(o!=null&&o.focusIn)o.focusIn();else{const i=this.beans.gos.get("editType")==="fullRow";e.focusCell(i),e.onEditorAttachedFuncs.push(()=>{var s,n;return(n=(s=t==null?void 0:t.getCellEditor())==null?void 0:s.focusIn)==null?void 0:n.call(s)})}}setupEditors(e=this.model.getEditPositions(),t,o,i,s=!1){const n=i instanceof KeyboardEvent&&!s&&i.key||void 0;rh(this.beans,e,t,n,i,o)}dispatchCellEvent(e,t,o,i){const s=Z(this.beans,e);s&&this.eventSvc.dispatchEvent({...s.createEvent(t??null,o),...i})}dispatchRowEvent(e,t){const o=ps(this.beans,e);o&&this.eventSvc.dispatchEvent(o.createRowEvent(t))}shouldStart({column:e},t,o,i="ui"){var l;if(t instanceof KeyboardEvent&&(t.key===y.TAB||t.key===y.ENTER||t.key===y.F2||t.key===y.BACKSPACE&&o))return!0;if((t==null?void 0:t.shiftKey)&&((l=this.beans.rangeSvc)==null?void 0:l.getCellRanges().length)!=0)return!1;const n=e==null?void 0:e.getColDef(),r=this.deriveClickCount(n),a=t==null?void 0:t.type;return a==="click"&&(t==null?void 0:t.detail)===1&&r===1||a==="dblclick"&&(t==null?void 0:t.detail)===2&&r===2?!0:i==="api"?o??!1:!1}shouldStop(e,t,o="ui"){const i=this.editSvc.isBatchEditing();return i&&o==="api"?!0:i&&o==="ui"?!1:o==="api"?!0:t instanceof KeyboardEvent&&!i?t.key===y.ENTER:null}shouldCancel(e,t,o="ui"){const i=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!i&&t.key===y.ESCAPE||i&&o==="api"||o==="api")}setEditMap(e,t){var i;t!=null&&t.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const o=[];if(e.forEach((s,n)=>{s.forEach((r,a)=>{r.state==="editing"&&o.push({...r,rowNode:n,column:a})})}),t!=null&&t.update&&(e=new Map([...this.model.getEditMap(),...e])),(i=this.model)==null||i.setEditMap(e),o.length>0){const s=o.at(-1),n=s.pendingValue===Ce?void 0:s.pendingValue;this.start(s,new KeyboardEvent("keydown",{key:n}),"api");const r=Z(this.beans,s);r&&this.setFocusInOnEditor(r)}}deriveClickCount(e){const{gos:t}=this.beans;return t.get("suppressClickEdit")===!0?0:t.get("singleClickEdit")===!0||e!=null&&e.singleClickEdit?1:2}destroy(){this.cleanupEditors(),super.destroy()}},qS=class extends Gl{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}isCellEditable(e,t="ui"){const o=super.isCellEditable(e,t);return o===!0||t==="ui"?o:this.beans.colModel.getCols().some(s=>super.isCellEditable({rowNode:e.rowNode,column:s},t))}shouldStop(e,t,o="ui"){const{rowNode:i}=e||{};if(!ps(this.beans,{rowNode:this.rowNode}))return!0;const n=super.shouldStop({rowNode:this.rowNode},t,o);return n!==null?n:this.rowNode?i!==this.rowNode:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e,t,o="ui",i){const{rowNode:s}=e;this.rowNode!==s&&super.cleanupEditors(e),this.dispatchRowEvent({rowNode:s},"rowEditingStarted"),this.startedRows.push(s);const n=this.beans.visibleCols.allCols,r=[];n.forEach(a=>{if(!a.isCellEditable(s))return;const l={rowNode:s,column:a};r.push(l),this.model.hasEdits(l)||this.model.start(l)}),this.rowNode=s,this.setupEditors(r,e,!0,t,i)}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){var s;const{rowNode:o}=this;if(o&&!this.model.hasRowEdits(o))return!1;const i=[];return e||this.model.getEditMap().forEach((n,r)=>{if(!(!n||n.size===0)){for(const a of n.values())if(Ue(a)){i.push(r);break}}}),lt(this.beans),!e&&((s=this.editSvc)==null?void 0:s.checkNavWithValidation({rowNode:o}))==="block-stop"?!1:(super.stop(e,t),i.forEach(n=>this.dispatchRowEvent({rowNode:n},"rowValueChanged")),this.cleanupEditors({rowNode:o},!0),this.rowNode=void 0,!0)}onCellFocusChanged(e){const{rowIndex:t}=e,o=e.previousParams;if((o==null?void 0:o.rowIndex)===t||e.sourceEvent instanceof KeyboardEvent)return;const i=Z(this.beans,o);this.gos.get("invalidEditValueMode")==="block"&&i&&(this.model.getCellValidationModel().getCellValidation(i)||this.model.getRowValidationModel().getRowValidation(i))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t),this.startedRows.forEach(o=>this.dispatchRowEvent({rowNode:o},"rowEditingStopped")),this.startedRows.length=0}moveToNextEditingCell(e,t,o,i="ui",s=!1){var h,g,p;const n=e.cellPosition;let r;this.model.suspend(!0);try{r=(h=this.beans.navigation)==null?void 0:h.findNextCellToFocusOn(n,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const a=r.cellPosition,l=e.isCellEditable(),d=r.isCellEditable(),c=a&&n.rowIndex===a.rowIndex&&n.rowPinned===a.rowPinned;l&&this.setFocusOutOnEditor(e),this.restoreEditors();const u=this.gos.get("suppressStartEditOnTab");return d&&!s?u?r.focusCell(!0,o):((g=r.comp)!=null&&g.getCellEditor()||Pt(this.beans,r,{event:o,cellStartedEdit:!0}),this.setFocusInOnEditor(r),r.focusCell(!1,o)):(d&&s&&this.setFocusInOnEditor(r),r.focusCell(!0,o)),!c&&!s&&(this.cleanupEditors(r,!0),u?r.focusCell(!0,o):this.editSvc.startEditing(r,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0})),(p=e.rowCtrl)==null||p.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach((e,t)=>e.forEach(({state:o},i)=>{var n;if(o!=="editing")return;const s=Z(this.beans,{rowNode:t,column:i});s&&!((n=s.comp)!=null&&n.getCellEditor())&&Pt(this.beans,s,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}},YS=class extends Gl{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,o="ui"){const i=super.shouldStop(e,t,o);if(i!==null)return i;const{rowNode:s,column:n}=e||{};return(!this.rowNode||!this.column)&&s&&n?null:this.rowNode!==s||this.column!==n}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e,t,o="ui",i){(this.rowNode!==e.rowNode||this.column!==e.column)&&super.cleanupEditors(),this.rowNode=e.rowNode,this.column=e.column,this.model.start(e),this.setupEditors([e],e,!0,t,i)}dispatchRowEvent(e,t){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){return super.stop(e,t),this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:o}=this.beans,{rowIndex:i,column:s,rowPinned:n}=e,r=rt(this.beans,{rowIndex:i,rowPinned:n}),a=fs(s),l=t.getCol(a),d=e.previousParams;if(d){const c=fs(d.column);if((d==null?void 0:d.rowIndex)===i&&c===a&&(d==null?void 0:d.rowPinned)===n)return}o!=null&&o.isEditing({rowNode:r,column:l},{withOpenEditor:!0})&&e.type==="cellFocused"||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,o,i="ui",s=!1){var g,p,f,C,m;const n=e.cellPosition;let r;const a=this.beans.gos.get("editType")==="fullRow";a&&this.model.suspend(!0),s||(e.eGui.focus(),(p=this.editSvc)==null||p.stopEditing(e,{source:(g=this.editSvc)!=null&&g.isBatchEditing()?"ui":"api",event:o}));try{r=(f=this.beans.navigation)==null?void 0:f.findNextCellToFocusOn(n,{backwards:t,startEditing:!0})}finally{a&&this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const l=r.cellPosition,d=e.isCellEditable(),c=r.isCellEditable(),u=l&&n.rowIndex===l.rowIndex&&n.rowPinned===l.rowPinned;d&&!s&&this.setFocusOutOnEditor(e);const h=this.gos.get("suppressStartEditOnTab");return!u&&!s&&(super.cleanupEditors(r,!0),h?r.focusCell(!0,o):this.editSvc.startEditing(r,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0})),c&&!s?(r.focusCell(!1,o),h?r.focusCell(!0,o):(C=r.comp)!=null&&C.getCellEditor()||(Pt(this.beans,r,{event:o,cellStartedEdit:!0}),this.setFocusInOnEditor(r))):(c&&s&&this.setFocusInOnEditor(r),r.focusCell(!0,o)),(m=e.rowCtrl)==null||m.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},ht={moduleName:"EditCore",version:L,beans:[Zu,jS],apiFunctions:{getEditingCells:AS,getCellEditorInstances:nh,startEditingCell:LS,stopEditing:MS,isEditing:kS,validateEdit:GS},dynamicBeans:{singleCell:YS,fullRow:qS},dependsOn:[Dl,Fl],css:[cS]},ZS={moduleName:"TextEditor",version:L,userComponents:{agCellEditor:Pl,agTextCellEditor:Pl},dependsOn:[ht]},QS={moduleName:"NumberEditor",version:L,userComponents:{agNumberCellEditor:{classImp:RS}},dependsOn:[ht]},XS={moduleName:"DateEditor",version:L,userComponents:{agDateCellEditor:fS,agDateStringCellEditor:wS},dependsOn:[ht]},JS={moduleName:"CheckboxEditor",version:L,userComponents:{agCheckboxCellEditor:hS},dependsOn:[ht]},eb={moduleName:"SelectEditor",version:L,userComponents:{agSelectCellEditor:xS},dependsOn:[ht]},tb={moduleName:"LargeTextEditor",version:L,userComponents:{agLargeTextCellEditor:SS},dependsOn:[ht]},ob={moduleName:"CustomEditor",version:L,dependsOn:[ht]};function ib(e){var t;(t=e.expansionSvc)==null||t.expandAll(!0)}function sb(e){var t;(t=e.expansionSvc)==null||t.expandAll(!1)}function nb(e){const t=Ae(e),o=Ov(e);t?t.onRowHeightChanged():o&&o.onRowHeightChanged()}var rb={moduleName:"CsrmSsrmSharedApi",version:L,apiFunctions:{expandAll:ib,collapseAll:sb,onRowHeightChanged:nb}},ab=class extends x{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(i=>{var n;if(!i){j(18),t||j(20);return}if(this.isGridApi(i))return i;const s=i;return"current"in s?(n=s.current)==null?void 0:n.api:(s.api||j(19),s.api)}).filter(i=>!!i&&!i.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){this.consuming||this.getAlignedGridApis().forEach(t=>{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 o=[];return e.columns?e.columns.forEach(i=>{o.push(t(i))}):e.column&&o.push(t(e.column)),o}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":M(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;t&&e.columnGroups.forEach(o=>{let i=null;o&&(i=t.getProvidedColGroup(o.getGroupId())),!(o&&!i)&&t.setColumnGroupOpened(i,o.isExpanded(),"alignedGridChanged")})}processColumnEvent(e){var c;const t=e.column;let o=null;const i=this.beans,{colResize:s,ctrlsSvc:n,colModel:r}=i;if(t&&(o=r.getColDefCol(t.getColId())),t&&!o)return;const a=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const h=e.api.getColumnState().map(g=>({colId:g.colId}));be(i,{state:h,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const h=e.api.getColumnState().map(g=>({colId:g.colId,hide:g.hide}));be(i,{state:h},"alignedGridChanged")}break;case"columnPinned":{const h=e.api.getColumnState().map(g=>({colId:g.colId,pinned:g.pinned}));be(i,{state:h},"alignedGridChanged")}break;case"columnResized":{const u=e,h={};a.forEach(g=>{h[g.getId()]={key:g.getColId(),newWidth:g.getActualWidth()}}),(c=u.flexColumns)==null||c.forEach(g=>{h[g.getId()]&&delete h[g.getId()]}),s==null||s.setColumnWidths(Object.values(h),!1,u.finished,"alignedGridChanged");break}}const d=n.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(u=>{u.setGridOption("alwaysShowVerticalScroll",d)})}},lb={moduleName:"AlignedGrids",version:L,beans:[ab],dependsOn:[za]},db="↑",cb="↓",ub={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},hb=class extends Y{constructor(){super(ub),this.eValue=I,this.eDelta=I,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const o=Math.abs(t),i=e.formatValue(o),s=A(i)?i:o,n=t>=0,r=this.eDelta;n?r.textContent=db+s:r.textContent=cb+s,r.classList.toggle("ag-value-change-delta-up",n),r.classList.toggle("ag-value-change-delta-down",!n)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),pe(this.eDelta)}refresh(e,t=!1){var d;const{value:o,valueFormatted:i}=e,{eValue:s,lastValue:n,beans:r}=this;if(o===n||(A(i)?s.textContent=i:A(o)?s.textContent=o:pe(s),(d=r.filterManager)!=null&&d.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=o&&typeof o=="object"&&"toNumber"in o?o.toNumber():o,l=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const c=a-l;this.showDelta(e,c)}return n&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=o,!0}},gb=".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}",pb={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},fb=class extends Y{constructor(){super(pb),this.eCurrent=I,this.refreshCount=0,this.registerCSS(gb)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious);const{beans:t,eCurrent:o}=this,i=ee({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=i,i.textContent=o.textContent,this.getGui().insertBefore(i,o),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.getGui().removeChild(this.ePrevious),this.ePrevious=null)},3e3)})}refresh(e,t=!1){var s;let o=e.value;if(q(o)&&(o=""),o===this.lastValue||(s=this.beans.filterManager)!=null&&s.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=o;const i=this.eCurrent;return A(e.valueFormatted)?i.textContent=e.valueFormatted:A(e.value)?i.textContent=o:pe(i),!0}},Cb=class extends x{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,o=this.beans.gos.get("cellFlashDuration"),i=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];s.delete(e);const n=Date.now(),r=n+o,a=n+o+i,l={phase:"flash",flashEndTime:r,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&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),o)}),this.nextAnimationTime=r)}advanceAnimations(){const e=Date.now();let t=null;for(const o of Object.keys(this.animations)){const i=this.animations[o],s=`ag-cell-${o}`,n=`${s}-animation`;for(const[r,a]of i){if(!r.isAlive()||!r.comp){i.delete(r);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}}=r;switch(l){case"flash":g.toggleCss(s,!1),g.toggleCss(n,!0),p.transition=`background-color ${c-d}ms`,p.transitionDelay=`${d-e}ms`,t=Math.min(c,t??1/0),a.phase="fade";break;case"fade":g.toggleCss(s,!1),g.toggleCss(n,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),i.delete(r);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 o=Qu(e.cellPosition);t.cells[o]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t==null?void 0:t.flashDuration,t==null?void 0:t.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function mb(e,t={}){const{cellFlashSvc:o}=e;o&&e.frameworkOverrides.wrapIncoming(()=>{e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(i=>o.flashCell(i,t))})}var wb={moduleName:"HighlightChanges",version:L,beans:[Cb],userComponents:{agAnimateShowChangeCellRenderer:hb,agAnimateSlideCellRenderer:fb},apiFunctions:{flashCells:mb}};function vb(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function Sb(e,t,o){var i;return(i=e.stateSvc)==null?void 0:i.setState(t,o)}function Hl(e){switch(e={...e},e.version||(e.version="32.1.0"),e.version){case"32.1.0":e=bb(e)}return e.version=L,e}function bb(e){return e.cellSelection=yb(e,"rangeSelection"),e}function yb(e,t){if(e&&typeof e=="object")return e[t]}var Rb=class extends x{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=fe(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=fe(this,()=>{this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())},0),this.onRowSelectedDebounced=fe(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){this.isClientSideRowModel=ne(this.gos);const e=Hl(this.gos.get("initialState")??{}),t=e.partialColumnState;delete e.partialColumnState,this.cachedState=e;const o=this.suppressEventsAndDispatchInitEvent.bind(this);this.beans.ctrlsSvc.whenReady(this,()=>o(()=>this.setupStateOnGridReady(e)));const[i,s,n]=this.addManagedEventListeners({newColumnsLoaded:({source:r})=>{r==="gridInitializing"&&(i(),o(()=>this.setupStateOnColumnsInitialised(e,!!t)))},rowCountReady:()=>{s==null||s(),o(()=>this.setupStateOnRowCountReady(e))},firstDataRendered:()=>{n==null||n(),o(()=>this.setupStateOnFirstDataRendered(e))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const o=Hl(e);delete o.partialColumnState,this.cachedState=o,this.startSuppressEvents();const i="api",s=t?new Set(t):void 0;this.setGridReadyState(o,i,s),this.setColumnsInitialisedState(o,i,!1,s),this.setRowCountState(o,i,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(o,i,s),this.stopSuppressEvents(i)})}setGridReadyState(e,t,o){var i,s;t==="api"&&!(o!=null&&o.has("sideBar"))&&((s=(i=this.beans.sideBar)==null?void 0:i.comp)==null||s.setState(e.sideBar)),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,o,i){this.setColumnState(e,t,o,i),this.setColumnGroupState(e,t,i),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const o=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:o("aggregation"),columnMoved:o("columnOrder"),columnPinned:o("columnPinning"),columnResized:o("columnSizing"),columnVisible:o("columnVisibility"),columnPivotChanged:o("pivot"),columnPivotModeChanged:o("pivot"),columnRowGroupChanged:o("rowGroup"),sortChanged:o("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,o){const{filter:i,rowGroupExpansion:s,rowSelection:n,pagination:r}=e,a=(d,c)=>!(o!=null&&o.has(d))&&(c||t==="api");a("filter",i)&&this.setFilterState(i),a("rowGroupExpansion",s)&&this.setRowGroupExpansionState(s,t),a("rowSelection",n)&&this.setRowSelectionState(n,t),a("pagination",r)&&this.setPaginationState(r,t);const l=this.updateCachedState.bind(this);l("filter",this.getFilterState()),l("rowGroupExpansion",this.getRowGroupExpansionState()),l("rowSelection",this.getRowSelectionState()),l("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),o=()=>{this.updateRowGroupExpansionStateTimer=0,t("rowGroupExpansion",this.getRowGroupExpansionState())},i=()=>t("filter",this.getFilterState()),{gos:s,colFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:i,rowGroupOpened:()=>this.onRowGroupOpenedDebounced(),expandOrCollapseAll:o,columnRowGroupChanged:o,rowDataUpdated:()=>{(s.get("groupDefaultExpanded")!==0||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(o)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:r=>{(r.newPage||r.newPageSize)&&t("pagination",this.getPaginationState())}}),n&&this.addManagedListeners(n,{filterStateChanged:i})}setFirstDataRenderedState(e,t,o){const{scroll:i,cellSelection:s,focusedCell:n,columnOrder:r,rowPinning:a}=e,l=(u,h)=>!(o!=null&&o.has(u))&&(h||t==="api");l("focusedCell",n)&&this.setFocusedCellState(n),l("cellSelection",s)&&this.setCellSelectionState(s),l("scroll",i)&&this.setScrollState(i),l("rowPinning",a)&&this.setRowPinningState(a),this.setColumnPivotState(!!(r!=null&&r.orderedColIds),t);const d=this.updateCachedState.bind(this);d("sideBar",this.getSideBarState()),d("focusedCell",this.getFocusedCellState());const c=this.getRangeSelectionState();d("rangeSelection",c),d("cellSelection",c),d("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this);this.addManagedEventListeners({cellFocused:()=>t("focusedCell",this.getFocusedCellState()),cellSelectionChanged:o=>{if(o.finished){const i=this.getRangeSelectionState();t("rangeSelection",i),t("cellSelection",i)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return Vv(jo(e),e.colModel.isPivotMode())}setColumnState(e,t,o,i){const{sort:s,rowGroup:n,aggregation:r,pivot:a,columnPinning:l,columnVisibility:d,columnSizing:c,columnOrder:u}=e,h=(P,H)=>!(i!=null&&i.has(P))&&(H||t==="api"),g={},p=P=>{let H=g[P];return H||(H={colId:P},g[P]=H,H)},f={},C=h("sort",s);C&&(s==null||s.sortModel.forEach(({colId:P,sort:H},W)=>{const K=p(P);K.sort=H,K.sortIndex=W})),(C||!o)&&(f.sort=null,f.sortIndex=null);const m=h("rowGroup",n);m&&(n==null||n.groupColIds.forEach((P,H)=>{const W=p(P);W.rowGroup=!0,W.rowGroupIndex=H})),(m||!o)&&(f.rowGroup=null,f.rowGroupIndex=null);const w=h("aggregation",r);w&&(r==null||r.aggregationModel.forEach(({colId:P,aggFunc:H})=>{p(P).aggFunc=H})),(w||!o)&&(f.aggFunc=null);const S=h("pivot",a);S&&(a==null||a.pivotColIds.forEach((P,H)=>{const W=p(P);W.pivot=!0,W.pivotIndex=H}),this.gos.updateGridOptions({options:{pivotMode:!!(a!=null&&a.pivotMode)},source:t})),(S||!o)&&(f.pivot=null,f.pivotIndex=null);const v=h("columnPinning",l);v&&(l==null||l.leftColIds.forEach(P=>{p(P).pinned="left"}),l==null||l.rightColIds.forEach(P=>{p(P).pinned="right"})),(v||!o)&&(f.pinned=null);const b=h("columnVisibility",d);b&&(d==null||d.hiddenColIds.forEach(P=>{p(P).hide=!0})),(b||!o)&&(f.hide=null);const D=h("columnSizing",c);D&&(c==null||c.columnSizingModel.forEach(({colId:P,flex:H,width:W})=>{const K=p(P);K.flex=H??null,K.width=W})),(D||!o)&&(f.flex=null);const T=u==null?void 0:u.orderedColIds,G=!!(T!=null&&T.length)&&!(i!=null&&i.has("columnOrder")),F=G?T.map(P=>p(P)):Object.values(g);F.length&&(this.columnStates=F,be(this.beans,{state:F,applyOrder:G,defaultState:f},t))}setColumnPivotState(e,t){const o=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:n,colGroupSvc:r}=s;if(n!=null&&n.isPivotResultColsPresent()){if(o){const a=[];for(const l of o)n.getPivotResultCol(l.colId)&&a.push(l);be(s,{state:a,applyOrder:e},t)}i&&(r==null||r.setColumnGroupState(i,t))}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return Nv(t)}setColumnGroupState(e,t,o){var a;const i=this.beans.colGroupSvc;if(!i||o!=null&&o.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const s=new Set((a=e.columnGroup)==null?void 0:a.openColumnGroupIds),r=i.getColumnGroupState().map(({groupId:l})=>{const d=s.has(l);return d&&s.delete(l),{groupId:l,open:d}});s.forEach(l=>{r.push({groupId:l,open:!0})}),r.length&&(this.columnGroupStates=r),i.setColumnGroupState(r,t)}getFilterState(){const e=this.beans.filterManager;let t=e==null?void 0:e.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const o=e==null?void 0:e.getFilterState(),i=(e==null?void 0:e.getAdvFilterModel())??void 0;return t||i||o?{filterModel:t,columnFilterState:o,advancedFilterModel:i}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:o,columnFilterState:i,advancedFilterModel:s}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(o!==void 0||i!==void 0)&&(t==null||t.setFilterState(o??null,i??null,"columnFilter")),s!==void 0&&(t==null||t.setAdvFilterModel(s??null,"advancedFilter"))}getRangeSelectionState(){var t;const e=(t=this.beans.rangeSvc)==null?void 0:t.getCellRanges().map(o=>{const{id:i,type:s,startRow:n,endRow:r,columns:a,startColumn:l}=o;return{id:i,type:s,startRow:n,endRow:r,colIds:a.map(d=>d.getColId()),startColId:l.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:o,colModel:i,visibleCols:s}=this.beans;if(!ot(t)||!o)return;const n=[];e==null||e.cellRanges.forEach(r=>{const a=[];if(r.colIds.forEach(d=>{const c=i.getCol(d);c&&a.push(c)}),!a.length)return;let l=i.getCol(r.startColId);if(!l){const d=s.allCols,c=new Set(a);l=d.find(u=>c.has(u))}n.push({...r,columns:a,startColumn:l})}),o.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=(e==null?void 0:e.getHScrollPosition())??{left:0},{top:o}=(e==null?void 0:e.getVScrollPosition())??{top:0};return o||t?{top:o,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:o}=e??{top:0,left:0},{frameworkOverrides:i,rowRenderer:s,animationFrameSvc:n,ctrlsSvc:r}=this.beans;i.wrapIncoming(()=>{var a;r.get("center").setCenterViewportScrollLeft(o),(a=r.getScrollFeature())==null||a.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),n==null||n.flushAllFrames()})}getSideBarState(){var e,t;return(t=(e=this.beans.sideBar)==null?void 0:e.comp)==null?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:o,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:o,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:o}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:i,rowIndex:s,rowPinned:n}=e;t.setFocusedCell({column:o.getCol(i),rowIndex:s,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const o=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!o&&!i))return{page:o,pageSize:i}}setPaginationState(e,t){const{pagination:o,gos:i}=this.beans;if(!o)return;const{pageSize:s,page:n}=e??{page:0,pageSize:i.get("paginationPageSize")},r=t==="gridInitializing";s&&!i.get("paginationAutoPageSize")&&o.setPageSize(s,r?"initialState":"pageSizeSelector"),typeof n=="number"&&(r?o.setPage(n):o.goToPage(n))}getRowSelectionState(){var i;const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((i=t==null?void 0:t.toggledNodes)!=null&&i.length)?void 0:t}setRowSelectionState(e,t){var o;(o=this.beans.selectionSvc)==null||o.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e,rowModel:t}=this.beans;if(!e)return;const o=[];return t.forEachNode(({expanded:i,id:s})=>{i&&s&&o.push(s)}),o.length?{expandedRowGroupIds:o}:void 0}getRowPinningState(){var e;return(e=this.beans.pinnedRowModel)==null?void 0:e.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t==null||t.setPinnedState(e):t==null||t.reset()}setRowGroupExpansionState(e,t){var n;const o=this.beans.expansionSvc;if(!o)return;const i=(e==null?void 0:e.expandedRowGroupIds)??[];let s;if(t==="api"){const r=(n=this.getRowGroupExpansionState())==null?void 0:n.expandedRowGroupIds;if(r!=null&&r.length){const a=new Set(r);for(const l of i)a.delete(l);s=Array.from(a)}}o.expandRows(i,s)}updateColumnState(e){const t=this.getColumnState();let o=!1;const i=this.cachedState;for(const s of Object.keys(t)){const n=t[s];yn(n,i[s])||(o=!0)}this.cachedState={...i,...t},o&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const o=this.cachedState[e];this.setCachedStateValue(e,t),yn(t,o)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;e.forEach(t=>{switch(t){case"rowSelection":this.setCachedStateValue(t,this.getRowSelectionState());break}}),e.clear()}dispatchStateUpdateEvent(e){this.suppressEvents||(e.forEach(t=>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(){var e;this.suppressEvents=!0,(e=this.beans.colAnimation)==null||e.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{var t;this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&((t=this.beans.colAnimation)==null||t.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},Eb={moduleName:"GridState",version:L,beans:[Rb],apiFunctions:{getState:vb,setState:Sb}};function xb(e,t={}){const o=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(o))}function Ol(e,t,o,i,s){t&&(i&&t.parent&&t.parent.level!==-1&&Ol(e,t.parent,o,i,s),t.setExpanded(o,void 0,s))}function Db(e,t){return e.rowModel.getRowNode(t)}function Fb(e,t,o,i){e.rowRenderer.addRenderedRowListener(t,o,i)}function Pb(e){return e.rowRenderer.getRenderedNodes()}function Tb(e,t,o){e.rowModel.forEachNode(t,o)}function Ib(e){return e.rowRenderer.firstRenderedRow}function Ab(e){return e.rowRenderer.lastRenderedRow}function Mb(e,t){return e.rowModel.getRow(t)}function kb(e){return e.rowModel.getRowCount()}var Bl={moduleName:"RowApi",version:L,apiFunctions:{redrawRows:xb,setRowNodeExpanded:Ol,getRowNode:Db,addRenderedRowListener:Fb,getRenderedNodes:Pb,forEachNode:Tb,getFirstDisplayedRowIndex:Ib,getLastDisplayedRowIndex:Ab,getDisplayedRowAtIndex:Mb,getDisplayedRowCount:kb}},Lb={moduleName:"ScrollApi",version:L,apiFunctions:{getVerticalPixelRange:PS,getHorizontalPixelRange:TS,ensureColumnVisible:Tl,ensureIndexVisible:Il,ensureNodeVisible:IS}};function Gb(e,t,o){if(!t)return;const i=e.ctrlsSvc.getGridBodyCtrl().eGridBody,s=`aria-${t}`;o===null?i.removeAttribute(s):i.setAttribute(s,o)}function Hb(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function Ob(e){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getHeaderRowContainerCtrls().forEach(t=>t.refresh()))}function Bb(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function Vb(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function Nb(e){return{rowHeight:ns(e),headerHeight:co(e)}}function _b(e,t={}){var n;const o=[];if(e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(r=>{const a=r.getCellRenderer();a!=null&&o.push(us(a))}),(n=t.columns)!=null&&n.length)return o;const i=[],s=an(t.rowNodes);return e.rowRenderer.getAllRowCtrls().forEach(r=>{if(s&&!ln(r.rowNode,s)||!r.isFullWidth())return;const a=r.getFullWidthCellRenderers();for(let l=0;l<a.length;l++){const d=a[l];d!=null&&i.push(us(d))}}),[...i,...o]}var Wb={moduleName:"RenderApi",version:L,apiFunctions:{setGridAriaProperty:Gb,refreshCells:Hb,refreshHeader:Ob,isAnimationFrameQueueEmpty:Bb,flushAllAnimationFrames:Vb,getSizesForCurrentTheme:Nb,getCellRendererInstances:_b}};function zb(e,t){var o,i;typeof t=="number"?(o=e.colAutosize)==null||o.sizeColumnsToFit(t,"api"):(i=e.colAutosize)==null||i.sizeColumnsToFitGridBody(t)}function Vl({colAutosize:e,visibleCols:t},o,i){Array.isArray(o)?e==null||e.autoSizeCols({colKeys:o,skipHeader:i,source:"api"}):e==null||e.autoSizeCols({colKeys:o.colIds??t.allCols,skipHeader:o.skipHeader,defaultMaxWidth:o.defaultMaxWidth,defaultMinWidth:o.defaultMinWidth,columnLimits:o.columnLimits,source:"api"})}function $b(e,t){var o;t&&typeof t=="object"?Vl(e,t):(o=e.colAutosize)==null||o.autoSizeAllColumns({source:"api",skipHeader:t})}var Ub=class extends x{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}autoSizeCols(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeCols(e));return}const{colKeys:t,skipHeader:o,skipHeaderGroups:i,stopAtGroup:s,defaultMaxWidth:n,defaultMinWidth:r,columnLimits:a=[],source:l="api"}=e,{animationFrameSvc:d,renderStatus:c,colModel:u,autoWidthCalc:h,visibleCols:g}=this.beans;if(d==null||d.flushAllFrames(),this.timesDelayed<5&&c&&!c.areHeaderCellsRendered()){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.autoSizeCols(e)});return}this.timesDelayed=0;const p=[];let f=-1;const C=Object.fromEntries(a.map(({colId:S,maxWidth:v,minWidth:b})=>[S,{maxWidth:v,minWidth:b}])),m=o??this.gos.get("skipHeaderOnAutoSize"),w=i??m;for(;f!==0;){f=0;const S=[];t.forEach(v=>{if(!v||_c(v))return;const b=u.getCol(v);if(!b||p.indexOf(b)>=0)return;const D=h.getPreferredWidthForColumn(b,m);if(D>0){const T=C[b.colId]??{};T.minWidth??(T.minWidth=r),T.maxWidth??(T.maxWidth=n);const G=Kb(b,D,T);b.setActualWidth(G,l),p.push(b),f++}S.push(b)}),S.length&&g.refresh(l)}w||this.autoSizeColumnGroupsByColumns(t,l,s),xt(this.eventSvc,p,!0,"autosizeColumns")}autoSizeColumn(e,t,o){e&&this.autoSizeCols({colKeys:[e],skipHeader:o,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,o){const{colModel:i,ctrlsSvc:s}=this.beans,n=new Set;i.getColsForKeys(e).forEach(d=>{let c=d.getParent();for(;c&&c!=o;)c.isPadding()||n.add(c),c=c.getParent()});let a;const l=[];for(const d of n){for(const c of s.getHeaderRowContainerCtrls())if(a=c.getHeaderCtrlForColumn(d),a)break;a&&a.resizeLeafColumnsToFit(t)}return l}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}const t=this.beans.visibleCols.allCols;this.autoSizeCols({colKeys:t,...e})}addColumnAutosize(e,t){const o=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.autoSizeColumn(t,"uiColumnResized",o)};e.addEventListener("dblclick",i);const s=new ct(e);return s.addEventListener("doubleTap",i),()=>{e.removeEventListener("dblclick",i),s.removeEventListener("doubleTap",i),s.destroy()}}addColumnGroupResize(e,t,o){const i=this.gos.get("skipHeaderOnAutoSize"),s=()=>{const n=[];t.getDisplayedLeafColumns().forEach(a=>{a.getColDef().suppressAutoSize||n.push(a.getColId())}),n.length>0&&this.autoSizeCols({colKeys:n,skipHeader:i,stopAtGroup:t,source:"uiColumnResized"}),o()};return e.addEventListener("dblclick",s),()=>e.removeEventListener("dblclick",s)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const{ctrlsSvc:o,scrollVisibleSvc:i}=this.beans,s=o.getGridBodyCtrl(),r=s.isVerticalScrollShowing()?i.getScrollbarWidth():0,l=jt(s.eGridBody)-r;if(l>0){this.sizeColumnsToFit(l,"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):M(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",o,i){var g;if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,o,i));return}const s={};i&&((g=i==null?void 0:i.columnLimits)==null||g.forEach(({key:p,...f})=>{s[typeof p=="string"?p:p.getColId()]=f}));const n=this.beans.visibleCols.allCols;if(e<=0||!n.length||e===He(n)&&n.every(f=>{if(f.colDef.suppressSizeToFit)return!0;const C=s==null?void 0:s[f.getId()],m=(C==null?void 0:C.minWidth)??(i==null?void 0:i.defaultMinWidth),w=(C==null?void 0:C.maxWidth)??(i==null?void 0:i.defaultMaxWidth),S=f.getActualWidth();return(m==null||S>=m)&&(w==null||S<=w)}))return;const a=[],l=[];n.forEach(p=>{p.getColDef().suppressSizeToFit===!0?l.push(p):a.push(p)});const d=a.slice(0);let c=!1;const u=p=>{Se(a,p),l.push(p)};for(a.forEach(p=>{p.resetActualWidth(t);const f=s==null?void 0:s[p.getId()],C=(f==null?void 0:f.minWidth)??(i==null?void 0:i.defaultMinWidth),m=(f==null?void 0:f.maxWidth)??(i==null?void 0:i.defaultMaxWidth),w=p.getActualWidth();typeof C=="number"&&w<C?p.setActualWidth(C,t,!0):typeof m=="number"&&w>m&&p.setActualWidth(m,t,!0)});!c;){c=!0;const p=e-He(l);if(p<=0)a.forEach(f=>{var m;const C=((m=s==null?void 0:s[f.getId()])==null?void 0:m.minWidth)??(i==null?void 0:i.defaultMinWidth);if(typeof C=="number"){f.setActualWidth(C,t,!0);return}f.setActualWidth(f.minWidth,t)});else{const f=p/He(a);let C=p;for(let m=a.length-1;m>=0;m--){const w=a[m],S=s==null?void 0:s[w.getId()],v=(S==null?void 0:S.minWidth)??(i==null?void 0:i.defaultMinWidth),b=(S==null?void 0:S.maxWidth)??(i==null?void 0:i.defaultMaxWidth),D=w.getMinWidth(),T=w.getMaxWidth(),G=typeof v=="number"&&v>D?v:D,F=typeof b=="number"&&b<T?b:T;let P=Math.round(w.getActualWidth()*f);P<G?(P=G,u(w),c=!1):P>F?(P=F,u(w),c=!1):m===0&&(P=C),w.setActualWidth(P,t,!0),C-=P}}}d.forEach(p=>{p.fireColumnWidthChangedEvent(t)});const h=this.beans.visibleCols;h.setLeftValues(t),h.updateBodyWidths(),!o&&xt(this.eventSvc,d,!0,t)}applyAutosizeStrategy(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout(()=>{if(t==="fitGridWidth"){const{columnLimits:o,defaultMinWidth:i,defaultMaxWidth:s}=e,n=o==null?void 0:o.map(({colId:r,minWidth:a,maxWidth:l})=>({key:r,minWidth:a,maxWidth:l}));this.sizeColumnsToFitGridBody({defaultMinWidth:i,defaultMaxWidth:s,columnLimits:n})}else t==="fitProvidedWidth"&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if((e==null?void 0:e.type)!=="fitCellContents")return;const{colIds:t,skipHeader:o,defaultMaxWidth:i,defaultMinWidth:s,columnLimits:n}=e;setTimeout(()=>{const r={skipHeader:o,source:"autosizeColumns",defaultMaxWidth:i,defaultMinWidth:s,columnLimits:n};t?this.autoSizeCols({colKeys:t,...r}):this.autoSizeAllColumns(r)})}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function Kb(e,t,o={}){const i=o.minWidth??e.getMinWidth();t<i&&(t=i);const s=o.maxWidth??e.getMaxWidth();return t>s&&(t=s),t}var jb={moduleName:"ColumnAutoSize",version:L,beans:[Ub],apiFunctions:{sizeColumnsToFit:zb,autoSizeColumns:Vl,autoSizeAllColumns:$b},dependsOn:[Va]},qb=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function Yb(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function Zb(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function Qb(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedTopRow(t)}function Xb(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedBottomRow(t)}function Jb(e,t,o){var i;return(i=e.pinnedRowModel)==null?void 0:i.forEachPinnedRow(t,o)}var ey={moduleName:"PinnedRow",version:L,beans:[lp],css:[qb],apiFunctions:{getPinnedTopRowCount:Yb,getPinnedBottomRowCount:Zb,getPinnedTopRow:Qb,getPinnedBottomRow:Xb,forEachPinnedRow:Jb},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},ty=class extends At{constructor(e,t,o){super(e.col,e.firstNode,o,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,o,i,s,n,r){this.eWrapper=o,super.setComp(e,t,o,i,s,n,r),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){this.rowNode.rowIndex!=null&&Fo(this.eGui,this.rowNode.rowIndex)}setAriaRowSpan(){jd(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(ni(t)){this.focusedCellPosition=void 0;return}const o=this.isCellFocused();o||(this.focusedCellPosition=void 0),e&&o&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},oy=class extends ci{onRowIndexChanged(){super.onRowIndexChanged(),this.getAllCellCtrls().forEach(e=>e.refreshAriaRowIndex())}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){var i;const t=(i=this.beans.rowSpanSvc)==null?void 0:i.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new ty(t,this,this.beans)}isCorrectCtrlForSpan(e){var i;const t=(i=this.beans.rowSpanSvc)==null?void 0:i.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},iy=class extends x{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,o=`${e}Ctrls`,i=this[o],s=i.size,n=this.getAllRelevantRowControls(e),r=new Map;let a=!1;for(const d of n)d.isAlive()&&(t==null||t.forEachSpannedColumn(d.rowNode,(c,u)=>{if(r.has(u.firstNode))return;const h=i.get(u.firstNode);if(h){r.set(u.firstNode,h),i.delete(u.firstNode);return}a=!0;const g=new oy(u.firstNode,this.beans,!1,!1,!1);r.set(u.firstNode,g)}));this[o]=r;const l=r.size===s;if(!(!a&&l)){for(const d of i.values())d.destroyFirstPass(!0),d.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,o=t==null?void 0:t.getCellSpanByPosition(e);if(!o)return;const i=`${Nl(e.rowPinned)}Ctrls`,s=this[i].get(o.firstNode);if(s)return s.getAllCellCtrls().find(n=>n.column===e.column)}getCtrls(e){const t=`${e}Ctrls`;return[...this[t].values()]}destroyRowCtrls(e){const t=`${e}Ctrls`;for(const o of this[t].values())o.destroyFirstPass(!0),o.destroySecondPass();this[t]=new Map}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},Nl=e=>e??"center",sy=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(){var o;const e=(o=this.firstNode.__autoHeights)==null?void 0:o[this.col.getColId()];if(e==null)return;let t=0;return this.spannedNodes.forEach(i=>{i!==this.lastNode&&(t+=i.rowHeight)}),e-t}},ny=class extends x{constructor(e){super(),this.column=e}buildCache(e){var S;const{column:t,beans:{gos:o,pinnedRowModel:i,rowModel:s,valueSvc:n,pagination:r}}=this,{colDef:a}=t,l=this[`${e}ValueNodeMap`],d=new Map,c=o.getCallback("isFullWidthRow"),u=a.equals,h=a.spanRows,g=typeof h=="function";let p=null,f=null,C;const m=(v,b)=>{p=v,f=null,C=b},w=v=>{const b=!v.isExpandable()&&!v.group&&!v.detail&&(c?!c({rowNode:v}):!0);if(v.rowIndex==null||!b){m(null,null);return}if(p==null||v.level!==p.level||v.footer||f&&v.rowIndex-1!==(f==null?void 0:f.getLastNode().rowIndex)){m(v,n.getValue(t,v));return}const D=n.getValue(t,v);if(g){const T=_(o,{valueA:C,nodeA:p,valueB:D,nodeB:v,column:t,colDef:a});if(!h(T)){m(v,D);return}}else if(u?!u(C,D):C!==D){m(v,D);return}if(!f){const T=l==null?void 0:l.get(p);(T==null?void 0:T.firstNode)===p?(T.reset(),f=T):f=new sy(t,p),d.set(p,f)}f.addSpannedNode(v),d.set(v,f)};switch(e){case"center":(S=s.forEachDisplayedNode)==null||S.call(s,v=>{(!r||r.isRowInPage(v.rowIndex))&&w(v)});break;case"top":i==null||i.forEachPinnedRow("top",w);break;case"bottom":i==null||i.forEachPinnedRow("bottom",w);break}this[`${e}ValueNodeMap`]=d}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this[`${Nl(e.rowPinned)}ValueNodeMap`].get(e)}},ry=class extends x{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=fe(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=fe(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const o=this.createManagedBean(new ny(e));this.spanningColumns.set(e,o),o.buildCache("top"),o.buildCache("bottom"),o.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t==null||t.createCtrls("top"),t==null||t.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t==null||t.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const o=this.spanningColumns.get(e);return o?o.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:o}=this.beans,i=e.column,s=e.rowIndex,n=this.spanningColumns.get(i);if(!n)return;let r;switch(e.rowPinned){case"top":r=t==null?void 0:t.getPinnedTopRow(s);break;case"bottom":r=t==null?void 0:t.getPinnedBottomRow(s);break;default:r=o.getRow(s)}if(r)return n.getCellSpan(r)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const o=this.spanningColumns.get(e);if(o)return o.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[o,i]of this.spanningColumns)if(i.isCellSpanning(e)){const s=i.getCellSpan(e);t(o,s)}}destroy(){super.destroy(),this.spanningColumns.clear()}},ay={moduleName:"CellSpan",version:L,beans:[ry,iy]},ly=class extends x{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,o=e.colDef,i=o.cellClassRules,s=this.getCellClassParams(e,o);Ds(this.beans.expressionSvc,i===this.cellClassRules?void 0:this.cellClassRules,i,s,n=>t.toggleCss(n,!0),n=>t.toggleCss(n,!1)),this.cellClassRules=i}applyUserStyles(){const e=this.column,t=e.colDef,o=t.cellStyle;if(!o)return;let i;if(typeof o=="function"){const s=this.getCellClassParams(e,t);i=o(s)}else i=o;i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,o=e.colDef,i=this.getCellClassParams(e,o);this.staticClasses.forEach(n=>t.toggleCss(n,!1));const s=this.beans.cellStyles.getStaticCellClasses(o,i);this.staticClasses=s,s.forEach(n=>t.toggleCss(n,!0))}getCellClassParams(e,t){const{value:o,rowNode:i}=this.cellCtrl;return _(this.beans.gos,{value:o,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},dy=class extends x{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,o,i){Ds(this.beans.expressionSvc,void 0,e.cellClassRules,t,o,i),this.processStaticCellClasses(e,t,o)}getStaticCellClasses(e,t){const{cellClass:o}=e;if(!o)return[];let i;return typeof o=="function"?i=o(t):i=o,typeof i=="string"&&(i=[i]),i||[]}createCellCustomStyleFeature(e,t){return new ly(e,t)}processStaticCellClasses(e,t,o){this.getStaticCellClasses(e,t).forEach(s=>{o(s)})}},cy={moduleName:"CellStyle",version:L,beans:[dy]},uy={moduleName:"RowStyle",version:L,beans:[qh]};function hy(e,t){var o;return!!((o=e.colHover)!=null&&o.isHovered(t))}var gy=class extends x{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=o=>{const{beans:i,gos:s,element:n,columns:r}=this,a=i.colHover;o??!!s.get("columnHoverHighlight")?this.destroyManagedListeners=this.addManagedElementListeners(n,{mouseover:a.setMouseOver.bind(a,r),mouseout:a.clearMouseOver.bind(a)}):(this.destroyManagedListeners.forEach(d=>d()),this.destroyManagedListeners=[])}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},py="ag-column-hover",fy=class extends x{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,o){const i=()=>{const s=this.isHovered(o);t.toggleCss("ag-column-hover",s)};e.addManagedEventListeners({columnHoverChanged:i}),i()}onCellColumnHover(e,t){if(!t)return;const o=this.isHovered(e);t.toggleCss(py,o)}addHeaderFilterColumnHoverListener(e,t,o,i){this.createHoverFeature(e,[o],i);const s=()=>{const n=this.isHovered(o);t.toggleCss("ag-column-hover",n)};e.addManagedEventListeners({columnHoverChanged:s}),s()}createHoverFeature(e,t,o){e.createManagedBean(new gy(t,o))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},Cy={moduleName:"ColumnHover",version:L,beans:[fy],apiFunctions:{isColumnHovered:hy}},my=class extends x{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){var e,t;this.wrapSvc=(t=(e=this.beans.frameworkOverrides).createGlobalEventListenerWrapper)==null?void 0:t.call(e)}addEventListener(e,t){var n;const o=((n=this.wrapSvc)==null?void 0:n.wrap(e,t))??t,i=!po.has(e),s=i?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(o),this.eventSvc.addEventListener(e,o,i)}removeEventListener(e,t){var n,r;const o=((n=this.wrapSvc)==null?void 0:n.unwrap(e,t))??t,i=this.asyncListeners.get(e),s=!!(i!=null&&i.delete(o));s||(r=this.syncListeners.get(e))==null||r.delete(o),this.eventSvc.removeEventListener(e,o,s)}addGlobalListener(e){var n;const t=((n=this.wrapSvc)==null?void 0:n.wrapGlobal(e))??e,o=(r,a)=>{po.has(r)&&t(r,a)},i=(r,a)=>{po.has(r)||t(r,a)};this.globalListenerPairs.set(e,{syncListener:o,asyncListener:i});const s=this.eventSvc;s.addGlobalListener(o,!1),s.addGlobalListener(i,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:o,globalListenerPairs:i}=this,s=(o==null?void 0:o.unwrapGlobal(e))??e;if(i.has(s)){const{syncListener:r,asyncListener:a}=i.get(s);t.removeGlobalListener(r,!1),t.removeGlobalListener(a,!0),i.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((o,i)=>{o.forEach(s=>this.eventSvc.removeEventListener(i,s,t)),o.clear()}),e.clear()}destroyGlobalListeners(e,t){e.forEach(o=>this.eventSvc.removeGlobalListener(o,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:o,asyncListener:i})=>{t.removeGlobalListener(o,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function wy(e,t,o){var i;(i=e.apiEventSvc)==null||i.addEventListener(t,o)}function vy(e,t,o){var i;(i=e.apiEventSvc)==null||i.removeEventListener(t,o)}function Sy(e,t){var o;(o=e.apiEventSvc)==null||o.addGlobalListener(t)}function by(e,t){var o;(o=e.apiEventSvc)==null||o.removeGlobalListener(t)}var yy={moduleName:"EventApi",version:L,apiFunctions:{addEventListener:wy,addGlobalListener:Sy,removeEventListener:vy,removeGlobalListener:by},beans:[my]},Ry={moduleName:"Locale",version:L,beans:[Bv]},Ey=class extends x{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=fe(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){var a,l,d,c;const{visibleCols:e,rowModel:t,rowSpanSvc:o,pinnedRowModel:i}=this.beans,s=e.autoHeightCols;let n=!1;const r=u=>{var p;const h=u.__autoHeights;let g=ze(this.beans,u).height;for(const f of s){let C=h==null?void 0:h[f.getColId()];const m=o==null?void 0:o.getCellSpan(f,u);if(m){if(m.getLastNode()!==u)continue;if(C=(p=o==null?void 0:o.getCellSpan(f,u))==null?void 0:p.getLastNodeAutoHeight(),!C)return}if(C==null){if(this.colSpanSkipCell(f,u))continue;return}g=Math.max(C,g)}g!==u.rowHeight&&(u.setRowHeight(g),n=!0)};(a=i==null?void 0:i.forEachPinnedRow)==null||a.call(i,"top",r),(l=i==null?void 0:i.forEachPinnedRow)==null||l.call(i,"bottom",r),(d=t.forEachDisplayedNode)==null||d.call(t,r),n&&((c=t.onRowHeightChanged)==null||c.call(t))}setRowAutoHeight(e,t,o){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[o.getId()];return}const i=e.__autoHeights[o.getId()];e.__autoHeights[o.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:o,colViewport:i,visibleCols:s}=this.beans;if(!o.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=s.getLeftColsForRow(t);break;case"right":n=s.getRightColsForRow(t);break;case null:n=i.getColsWithinViewport(t);break}return!n.includes(e)}setupCellAutoHeight(e,t,o){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const i=t.parentElement,{rowNode:s,column:n}=e,r=this.beans,a=c=>{var w;if((w=this.beans.editSvc)!=null&&w.isEditing(e)||!e.isAlive()||!o.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:g,borderTopWidth:p}=Xe(i),f=u+h+g+p,m=t.offsetHeight+f;if(c<5){const S=te(r),v=!S||!S.contains(t),b=m==0;if(v||b){window.setTimeout(()=>a(c+1),0);return}}this.setRowAutoHeight(s,m,n)},l=()=>a(0);l();const d=Je(r,t,l);return o.addDestroyFunc(()=>{d(),this.setRowAutoHeight(s,void 0,n)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:o}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(o).filter(s=>s.isAutoHeight())),t.length!==0){if(!o.__autoHeights)return!1;for(const i of t){const s=o.__autoHeights[i.getColId()];if(!s||o.rowHeight<s)return!1}}return!0}},xy={moduleName:"RowAutoHeight",version:L,beans:[Ey]};const gt=Symbol("grid-context"),gn=e=>{const t=e.getColumnState().filter(i=>i.sort!=null),o={};return t.forEach((i,s)=>o[i.colId]=s),t.sort((i,s)=>{const n=i.sortIndex,r=s.sortIndex;if(n!=null&&r!=null)return n-r;if(n==null&&r==null){const a=o[i.colId],l=o[s.colId];return a>l?1:-1}else return r==null?-1:1}),t},_l=e=>{const t=gn(e),o=new Map;return t.forEach((i,s)=>{o.set(i.colId,s)}),o},Wl=(e,t)=>_l(e).get(t)??-1,Dy=e=>!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function";class zl{constructor(t,o){R(this,"loading",!1);R(this,"dataGetter");R(this,"cache");R(this,"_api");R(this,"loadingDelay");R(this,"getSorts",()=>gn(this.api).map(t=>({colId:t.colId,sort:t.sort})));this.dataGetter=t,this.cache=o}set api(t){this._api=t}get api(){return this._api}destroy(){this.loading=!1}loadData(){const t=this.cache.getRows().map((o,i)=>(o.__setIndex(i),o)).flatMap(o=>o.flat());this.api.setGridOption("rowData",t),this.api.redrawRows(),this.loading=!1}getRows(t){var i,s,n,r,a,l,d,c;if(this.loading||!this._api){(s=(i=t.context)==null?void 0:i.resolve)==null||s.call(i);return}const o=this.cache.enableCursorPage;if(this.cache.isFinished&&(o||t.pageNum!==1)){(r=(n=t.context)==null?void 0:n.resolve)==null||r.call(n);return}if(this.loading=!0,O.isFunction(this.dataGetter)){const u=this.dataGetter({startRow:t.startRow,endRow:t.endRow,pageNum:t.pageNum,pageSize:t.pageSize,cursorId:t.cursorId,params:t.filterModel,sorts:o?[]:this.getSorts()});Dy(u)&&(this.loadingDelay=setTimeout(()=>{this.api.setGridOption("loading",!0)},500),u.then(h=>{var g,p;t.successCallback(h,h.length),(p=(g=t.context)==null?void 0:g.resolve)==null||p.call(g)}).catch(h=>{var g,p;t.failCallback(),(p=(g=t.context)==null?void 0:g.reject)==null||p.call(g,h)}).finally(()=>{clearTimeout(this.loadingDelay),this.api.setGridOption("loading",!1),this.loadData()})),O.isArray(u)&&(t.successCallback(u,u.length),this.loadData(),(l=(a=t.context)==null?void 0:a.resolve)==null||l.call(a))}else t.successCallback(this.dataGetter,this.dataGetter.length),this.loadData(),(c=(d=t.context)==null?void 0:d.resolve)==null||c.call(d)}}class pn{constructor(t,o,i){R(this,"spanMatrix");R(this,"rootId");R(this,"rowIdToNestingIdx");this.spanMatrix=o,this.rootId=i,this.rowIdToNestingIdx=new Map;for(let s=0;s<t.length;s++)this.rowIdToNestingIdx.set(t[s].id,s)}get(t,o){const i=o.getColId(),s=this.rowIdToNestingIdx.get(t);return s===void 0?0:this.spanMatrix.getCellSpan(this.rootId,s,i)}set(t,o,i){}}class Nt{constructor(t,o,i=[]){R(this,"actualRow");R(this,"id");R(this,"nestingIndexes");this.actualRow=o,this.id=t,this.nestingIndexes=i}delete(){this.actualRow.delete()}redraw(){this.actualRow.redraw()}getActualRow(){return this.actualRow}isCellEditing(t){return this.actualRow.isCellEditing(this.id,t)}startEditing(t){t!==null&&this.actualRow.isEditing()&&(this.actualRow=this.actualRow.stopEditing(!0)),this.actualRow.isEditing(t)||(t==null?this.actualRow.startEditing(!0):this.actualRow.startEditingCell(this.id,t,!0))}getDataIndex(){return this.actualRow.getDataIndex()}getRowSpans(){return this.actualRow.getRowSpans()}isEditing(){return this.actualRow.isEditing()}getValue(t){var o;return(o=this.actualRow.getCell(t,this.getNestingIndexes()))==null?void 0:o.value}getRowSpan(t){return this.actualRow.getRowSpans().get(this.id,t)}getData(){return this.actualRow.getData()}isColumnValueChanged(t,o){return this.actualRow.isEditing()&&this.actualRow.getValue(o,this.getNestingIndexes())!==t}getNestingIndexes(){return this.nestingIndexes}getSignature(){return this.actualRow.getSignature()}getId(){return this.actualRow.getId()}getCell(t){return this.actualRow.getCell(t,this.getNestingIndexes())}isTransient(){return this.actualRow.isTransient()}setData(t){this.actualRow.setData(t)}buildSpan(){this.actualRow.buildSpan()}scrollIntoView(){this.actualRow.scrollIntoView()}match(t){return t.data.getId()===this.actualRow.getId()}getHostObject(t){var r;const o=this.getCell(t.column);if(!o)return{hostObject:this.getData()};if(!o.parent||o.parent.field==="$")return{hostObject:this.getData()};let i=o.isArrayElement()?o.path:o.parent.path;((r=t.colDef)==null?void 0:r.cellDataType)==="array"&&(i=o.path);const s=O.get(this.getData(),i),n=i.endsWith("]")?O.get(this.getData(),i.substring(0,i.lastIndexOf("["))):void 0;return{hostObject:s,hostArray:n}}}class $l{constructor(t,o,i){R(this,"actualRow");R(this,"idMapper");R(this,"draft");this.actualRow=t,this.idMapper=i,this.draft=E.reactive(O.cloneDeep(o))}getSourceRow(){return this.actualRow}getDataIndex(){return this.actualRow.getDataIndex()}getSignature(){return this.actualRow.signature}getValue(t,o){var i;return(i=this.getCell(t,o))==null?void 0:i.value}getCell(t,o){return this.actualRow.getCell(t,o)}getId(){return this.actualRow.id}getRowSpans(){return this.actualRow.getRowSpans()}match(t){return this.actualRow.match(t)}__setIndex(t){this.actualRow.__setIndex(t)}getData(){return this.draft}getDraft(){return this.draft}setData(t){this.draft=E.reactive(t)}buildSpan(){this.actualRow.update(this.actualRow.id,E.toRaw(this.draft))}flat(){return this.actualRow.leafCells.map(t=>new Nt(t.id,this,t.nestingIndexes))}scrollIntoView(){this.actualRow.scrollIntoView()}_stopEditingImpl(t=!1){const o=E.toRaw(this.draft),i=this.idMapper(o);return this.actualRow.update(i,o),t&&this.redraw(),this.actualRow.dataCache.replace(this.actualRow),this.actualRow}get expand(){return this.actualRow.expand===!0}set expand(t){var o,i;this.actualRow.expand=t===!0,(i=(o=this.actualRow.bridge)==null?void 0:o.refreshModel)==null||i.call(o,{step:"map"})}get detailCardData(){return this.actualRow.detailCardData}set detailCardData(t){this.actualRow.detailCardData=t}isExpanded(){return this.actualRow.isExpanded()}setExpanded(t,o){this.actualRow.setExpanded(t,o)}toggleExpanded(){this.actualRow.toggleExpanded()}isEditing(t){return!!this.draft}isCellEditing(t,o){return!!this.draft}stopEditing(t=!1){return this._stopEditingImpl(t)}}class Ti extends $l{constructor(o,i,s=!1){super(o,O.cloneDeep(o.data),i);R(this,"transient");this.transient=s}redraw(){this.actualRow.redraw()}delete(){this.actualRow.delete()}isTransient(){return this.transient}async persistent(o){const i=await o(O.cloneDeep(this.draft));return this.actualRow.update(this.idMapper(i),i),this.draft=E.reactive(i),this.transient=!1,this}}class Ii extends $l{constructor(o,i,s,n){super(o,o.data,n);R(this,"editingColumn");R(this,"rowId");this.rowId=i,this.editingColumn=s}getEditingColumn(){return this.editingColumn}getRowId(){return this.rowId}delete(){throw new Error("CellEditableRow 不允许删除")}redraw(){this.actualRow.redrawCell(this.rowId,this.editingColumn)}isCellEditing(o,i){return!!this.draft&&this.editingColumn.getColId()===i.getColId()&&this.rowId===o}isTransient(){return!1}}class _t{constructor(t,o,i,s,n){R(this,"id");R(this,"field");R(this,"value");R(this,"index");R(this,"properties",new Map);R(this,"parent");R(this,"spanRow",1);R(this,"path");this.id=t,this.field=o,this.value=i,this.index=s,this.parent=n,this.path=this.getReadPath()}getRoot(){let t=this.parent;for(;;){if(t.field==="$")return t;t=t==null?void 0:t.parent}}pretreatmentValue(t,o,i){const s=this.properties.get(t);if(s)return s;const n=O.get(this.value,t);let r;if(O.isArray(n)&&i.cellDataType!=="native"){r=new Array(n.length);for(let a=0;a<n.length;a++)r[a]=new _t(`${this.id}_${a}`,t,n[a],a,o)}else r=new _t(this.id,t,n,void 0,o);return this.properties.set(t,r),r}isNeedSpan(){return Array.from(this.properties.values()).some(t=>O.isArray(t))}get(t){return this.properties.get(t)}calcSpan(){if(this.isNeedSpan()){let t=1,o=!1;for(const i of this.properties.values())if(O.isArray(i)){o=!0;let s=0;for(const n of i)s+=n.calcSpan();t=Math.max(t,s)}if(o&&t>1)for(const i of this.properties.values())O.isArray(i)||i.setRowSpan(t);return this.spanRow=t,this.spanRow}return this.spanRow}setRowSpan(t){this.spanRow=t;for(const o of this.properties.values())O.isArray(o)||o.setRowSpan(this.spanRow)}getPath(){const t=[];let o=this;for(;o;)t.push(o.field),o=o.parent;return t.reverse().slice(1).join(".")}getReadPath(){const t=[];let o=this;for(;o;)t.push(`${o.field}${O.isNumber(o.index)?`[${o.index}]`:""}`),o=o.parent;return t.reverse().slice(1).join(".")}isArrayElement(){return this.path.endsWith("]")}}class Ul{constructor(){R(this,"trees",new Map);R(this,"arrayParents",new Map);R(this,"cellSpanCaches",new Map);R(this,"columns",new Map);R(this,"dirtyRoots",new Set)}setRow(t,o,i){this.columns.clear();for(const c of i.columns)this.columns.set(c.colId,c);const s=this._computeExpandPaths(o,i.columns),n=new Map;this.arrayParents.set(t,n);const r=this.buildTree(t,o,n,s);this.computeSpans(r),this.trees.set(t,r);const a=new Map,l=new Set,d=this.collectLeaves(r);for(const c of d)this._walkUpAndRecord(c,a,l,t);if(d.length>0){const c=new Set;for(const g of d)for(const p of a.keys())if(p.startsWith(`${g.id}|`)){const f=p.substring(g.id.length+1);c.add(f)}const u=d[0],h=r.spanRow;for(const g of this.columns.keys())c.has(g)||a.set(`${u.id}|${g}`,h)}this.cellSpanCaches.set(t,a),this.dirtyRoots.add(t)}_computeExpandPaths(t,o){const i=new Set;for(const s of o){const n=s.colId.split(".");let r=t,a="";const l=s.cellDataType==="native"&&r!=null&&Array.isArray(r[n[0]]);for(let d=0;d<n.length&&r!=null;d++){const c=n[d];a=a?`${a}.${c}`:c;const u=r[c];if(Array.isArray(u)){if(d===0&&l)break;i.add(a),r=u[0]}else r=u}}return i}setArrayLength(t,o,i){var g,p;const s=this.trees.get(t);if(!s)return;const n=(g=this.arrayParents.get(t))==null?void 0:g.get(o);if(!n){this.dirtyRoots.add(t);return}const r=n.children.filter(f=>f.isArrayElement&&f.path===o),a=r.length,l=((p=r[0])==null?void 0:p.field)??o.split(".").pop();if(a===i){this.dirtyRoots.add(t);return}if(i<a)n.children=n.children.filter(f=>!(f.isArrayElement&&f.path===o)||f.index<i);else{n.children=n.children.filter(f=>!(f.path===o&&Array.isArray(f.value)&&f.value.length===0));for(let f=a;f<i;f++){const C=n.children.filter(w=>w.isArrayElement&&w.path===o),m=C.length>0?C[0].nestingIndexes.slice(0,-1):n.nestingIndexes;n.children.push({id:`${n.id}_${l}_${f}`,field:l,value:void 0,index:f,isArrayElement:!0,parent:n,children:[],spanRow:1,path:o,readPath:`${o}[${f}]`,nestingIndexes:[...m,f]})}}let d=n;for(;d;)this.computeSpans(d),d=d.parent;const c=new Map,u=new Set,h=this.collectLeaves(s);for(const f of h)this._walkUpAndRecord(f,c,u,t);if(h.length>0){const f=new Set;for(const w of h)for(const S of c.keys())if(S.startsWith(`${w.id}|`)){const v=S.substring(w.id.length+1);f.add(v)}const C=h[0],m=s.spanRow;for(const w of this.columns.keys())f.has(w)||c.set(`${C.id}|${w}`,m)}this.cellSpanCaches.set(t,c),this.dirtyRoots.add(t)}getCellSpan(t,o,i){if(!this.columns.has(i))return 0;const s=this.cellSpanCaches.get(t);if(!s)return 0;const n=this.trees.get(t);if(!n)return 0;const r=this.collectLeaves(n);if(o<0||o>=r.length)return 0;const a=r[o];return s.get(`${a.id}|${i}`)??0}getCellPath(t,o){if(!this.columns.has(t))return null;const i=this.firstArrayPaths();if(!i)return null;const s=t.split("."),n=[];let r=0;for(let a=0;a<s.length;a++){let l=s[a];if(a<s.length-1){const d=s.slice(0,a+1).join(".");i.has(d)&&r<o.length&&(l+=`[${o[r]}]`,r++)}n.push(l)}return n.join(".")}getMaxArrayLength(t){const o=this.trees.get(t);return o?o.spanRow:1}getLeaves(t){const o=this.trees.get(t);return o?this.collectLeaves(o):[]}getDirtyRoots(){return this.dirtyRoots}clearDirty(){this.dirtyRoots.clear()}buildTree(t,o,i,s){const n={id:t,field:"$",value:o,isArrayElement:!1,children:[],spanRow:1,path:"",readPath:"",nestingIndexes:[]};return this.expandChildren(n,o,i,s),n}expandChildren(t,o,i,s){if(Array.isArray(o)){if(s.has(t.path)){i.set(t.path,t);for(let n=0;n<o.length;n++){const r=this.createNode(`${t.id}_${t.field}_${n}`,t.field,o[n],n,t,t.path,[...t.nestingIndexes,n]);t.children.push(r),this.expandChildren(r,o[n],i,s)}}else{const n=this.createNode(t.id,t.field,o,void 0,t,t.path,t.nestingIndexes);t.children.push(n)}return}if(this.isPlainObject(o))for(const[n,r]of Object.entries(o)){const a=t.path?`${t.path}.${n}`:n;if(Array.isArray(r))if(s.has(a)){i.set(a,t);for(let l=0;l<r.length;l++){const d=this.createNode(`${t.id}_${n}_${l}`,n,r[l],l,t,a,[...t.nestingIndexes,l]);t.children.push(d),this.expandChildren(d,r[l],i,s)}if(r.length===0){const l=this.createNode(`${t.id}_${n}_empty`,n,r,void 0,t,a,t.nestingIndexes);t.children.push(l)}}else{const l=this.createNode(t.id,n,r,void 0,t,a,t.nestingIndexes);t.children.push(l)}else{const l=this.createNode(t.id,n,r,void 0,t,a,t.nestingIndexes);t.children.push(l),this.expandChildren(l,r,i,s)}}}createNode(t,o,i,s,n,r,a){return{id:t,field:o,value:i,index:s,isArrayElement:s!==void 0,parent:n,children:[],spanRow:1,path:r,readPath:s!==void 0?`${r}[${s}]`:r,nestingIndexes:a}}isPlainObject(t){return t!=null&&typeof t=="object"&&!Array.isArray(t)}computeSpans(t){if(t.children.length===0)return t.spanRow=1,1;const o=[],i=[];for(const s of t.children)this.computeSpans(s),s.isArrayElement?o.push(s):i.push(s);if(o.length>0){const s=new Map;for(const r of o){const a=r.path;s.set(a,(s.get(a)??0)+r.spanRow)}let n=1;for(const r of s.values())r>n&&(n=r);if(t.spanRow=n,n>1)for(const r of i)this.propagateSpan(r,n)}else{let s=1;for(const n of i)n.spanRow>s&&(s=n.spanRow);t.spanRow=s}return t.spanRow}propagateSpan(t,o){t.spanRow=o;for(const i of t.children)i.isArrayElement||this.propagateSpan(i,o)}collectLeaves(t){const o=[];return this._collectLeaves(t,o),o.length===0&&o.push(t),o}_collectLeaves(t,o){for(const i of t.children)i.isArrayElement?this._hasArrayDescendant(i)?this._collectLeaves(i,o):o.push(i):this._collectLeaves(i,o)}_hasArrayDescendant(t){for(const o of t.children)if(o.isArrayElement||this._hasArrayDescendant(o))return!0;return!1}findSpanByPath(t,o){let i=t;for(;i;){if(i.path===o)return i.spanRow;const s=this.searchInNonArrayChildren(i,o);if(s!==null)return s;i=i.parent}return 0}searchInNonArrayChildren(t,o){for(const i of t.children){if(i.isArrayElement)continue;if(i.path===o)return i.spanRow;const s=this.searchInNonArrayChildren(i,o);if(s!==null)return s}return null}_walkUpAndRecord(t,o,i,s){let n=t;for(;n;){if(i.has(n))return;i.add(n),Array.from(this.columns.keys()),o.set(`${t.id}|${n.path}`,n.spanRow);for(const r of n.children)r.isArrayElement?Array.isArray(r.value)&&r.value.length===0&&this._recordEmptyArrayColumns(t,n,r.field,o):(o.set(`${t.id}|${r.path}`,r.spanRow),this._processDeep(t,r,o,i),Array.isArray(r.value)&&r.value.length===0&&this._recordEmptyArrayColumns(t,n,r.field,o));n=n.parent}}_processDeep(t,o,i,s){if(!s.has(o)){s.add(o);for(const n of o.children)n.isArrayElement||(i.set(`${t.id}|${n.path}`,n.spanRow),this._processDeep(t,n,i,s))}}_recordEmptyArrayColumns(t,o,i,s){const n=o.path?`${o.path}.${i}`:i;for(const r of this.columns.keys())r.startsWith(n)&&s.set(`${t.id}|${r}`,o.spanRow)}_collectArrayPaths(t,o){for(const i of t.children)i.isArrayElement&&o.add(i.path),this._collectArrayPaths(i,o)}collectArrayPaths(t){const o=new Set;return this._collectArrayPaths(t,o),o}firstArrayPaths(){const t=this.trees.values().next().value;return t?this.collectArrayPaths(t):null}}class Fy{constructor(t,o,i){R(this,"id");R(this,"rootValue");R(this,"spanMatrix");R(this,"leafCells");R(this,"columns");R(this,"data");this.id=t,this.data=o,this.columns=i,this.rootValue=new _t(this.id,"$",this.data),this._buildPathCells(i),this.rootValue.calcSpan(),this.spanMatrix=new Ul,this.spanMatrix.setRow(this.id,this.data,{columns:i}),this.leafCells=this.spanMatrix.getLeaves(this.id)}_buildPathCells(t){for(const o of t){const i=o.colId.split(".");let s=this.rootValue;for(let n=0;n<i.length;n++){const r=i[n];if(!O.isArray(s))s=s.pretreatmentValue(r,s,o);else{const a=[];for(const l of s){const d=l.pretreatmentValue(r,l,o);O.isArray(d)?a.push(...d):a.push(d)}s=a}}}}getMaxArrayLength(){return this.spanMatrix.getMaxArrayLength(this.id)}getCell(t,o){const i=t.getColId().split(".");let s=this.rootValue.properties.get(i.shift());if(!s)return;let n=0;O.isArray(s)&&(s=s[o[n]],n++);let r=s;for(const a of i){if(!r)break;if(!O.isArray(r)){const l=r.get(a);O.isArray(l)?(r=l[o[n]],n=n+1):r=l}}return r}getValue(t,o){const i=this.getCell(t,o);if(i)return O.get(this.data,i.path)}setArrayLength(t,o){this.spanMatrix.setArrayLength(this.id,t,o),this.leafCells=this.spanMatrix.getLeaves(this.id)}rebuild(t,o){const i=o??this.columns;this.data=t,this.spanMatrix.setRow(this.id,t,{columns:i}),this.leafCells=this.spanMatrix.getLeaves(this.id);const s=new _t(this.id,"$",t);for(const n of i){const r=n.colId.split(".");let a=s;for(let l=0;l<r.length;l++){const d=r[l];if(!O.isArray(a))a=a.pretreatmentValue(d,a,n);else{const c=[];for(const u of a){const h=u.pretreatmentValue(d,u,n);O.isArray(h)?c.push(...h):c.push(h)}a=c}}}s.calcSpan(),this.rootValue=s,o&&(this.columns=i)}getSpanMatrix(){return this.spanMatrix}}class vo{constructor(t,o,i,s,n,r){R(this,"id");R(this,"data");R(this,"signature");R(this,"dataModel");R(this,"spanCache");R(this,"columns");R(this,"bridge");R(this,"idMapper");R(this,"dataCache");R(this,"index");R(this,"expand",!1);R(this,"detailCardData",null);this.index=r,this.dataCache=s,this.idMapper=i,this.columns=o,this.bridge=n,this.id=i(t),this.data=t,this.signature=Ve(JSON.stringify(t)),this.buildSpan()}get pathCells(){return this.dataModel.rootValue.properties}get leafCells(){return this.dataModel.leafCells}get spanMatrix(){return this.dataModel.spanMatrix}buildSpan(){this.dataModel=new Fy(this.id,this.data,this.columns),this.spanCache=new pn(this.dataModel.leafCells,this.dataModel.spanMatrix,this.id)}getMaxArrayLength(){return this.dataModel.getMaxArrayLength()}getCell(t,o){return this.dataModel.getCell(t,o)}getValue(t,o){return this.dataModel.getValue(t,o)}getSpanMatrix(){return this.dataModel.getSpanMatrix()}setArrayLength(t,o){this.dataModel.setArrayLength(t,o)}delete(){this.dataCache.remove([this])}redraw(){var t;(t=this.bridge)==null||t.redraw(this)}redrawCell(t,o){var i;(i=this.bridge)==null||i.redrawCell(this,t,o)}getSourceRow(){return this}isExpanded(){return this.expand===!0}setExpanded(t,o){var s,n;const i=t===!0;this.expand!==i&&(this.expand=i,(n=(s=this.bridge)==null?void 0:s.refreshModel)==null||n.call(s,{step:"map"}))}toggleExpanded(){this.setExpanded(!this.expand)}getDataIndex(){if(this.index===void 0)throw new Error(`row[${this.id}] not ready`);return this.index}getRowSpans(){return this.spanCache}isCellEditing(t,o){return!1}getSignature(){return this.signature}startEditing(t=!1){const o=new Ti(this,this.idMapper,!1);return this.dataCache.replace(o),t&&this.redraw(),o}startEditingCell(t,o,i=!1){const s=new Ii(this,t,o,this.idMapper);return this.dataCache.replace(s),i&&this.redrawCell(t,o),s}__setIndex(t){this.index=t}update(t,o){this.id=t,this.data=o,this.signature=Ve(JSON.stringify(o)),this.dataModel.rebuild(o),this.spanCache=new pn(this.dataModel.leafCells,this.dataModel.spanMatrix,this.id)}isTransient(){return!1}getId(){return this.id}isEditing(){return!1}getData(){return this.data}scrollIntoView(){var o;const t=this.leafCells[this.leafCells.length-1];t&&((o=this.bridge)==null||o.ensureNodeVisible(t.id))}flat(){return this.dataModel.leafCells.map(t=>new Nt(t.id,this,t.nestingIndexes))}setData(t){this.update(this.idMapper(t),t)}match(t){return this.getId()===t.data.getId()}}class Kl{constructor(t){R(this,"rows");R(this,"pageNum",1);R(this,"pageSize",100);R(this,"isFinished",!1);R(this,"enableCursorPage",!1);R(this,"idMapper");R(this,"idMap",new Map);R(this,"bridge");this.rows=[],this.idMapper=t}createRow(t){var o;return new vo(t,((o=this.bridge)==null?void 0:o.getColumns())??[],this.idMapper,this,this.bridge)}rebuildIdMap(){this.idMap.clear(),this.rows.forEach((t,o)=>this.idMap.set(t.getId(),o))}setRows(t){return this.rows=t,this.rebuildIdMap(),this}replace(t){this.rows[t.getDataIndex()]=t,this.rebuildIdMap()}remove(t){var i;const o=new Set(t.map(s=>s.getId()));this.rows=this.rows.filter(s=>!o.has(s.getId())),this.rebuildIdMap(),(i=this.bridge)==null||i.reload()}getRows(){return this.rows??[]}appendRows(t){if(!this.rows){this.setRows(t);return}for(const o of t){const i=o.getId(),s=this.idMap.get(i);s!==void 0?(this.rows[s]=o,this.idMap.set(i,s)):(this.rows.push(o),this.idMap.set(i,this.rows.length-1))}}insertRows(t,o=0){if(!this.rows){this.setRows(t);return}const i=new Set(t.map(s=>s.getId()));this.rows=this.rows.filter(s=>!i.has(s.getId())),this.rows.splice(o,0,...t),this.rebuildIdMap()}deleteRows(t){const o=new Set(t.map(i=>O.isString(i)?i:i.getId()));this.rows=this.rows.filter(i=>!o.has(i.getId())),this.rebuildIdMap()}}const jl={getContextMenuItems:void 0},Py=e=>e instanceof vo||e instanceof Nt?!0:e instanceof Ti,Ty=e=>e instanceof vo,Ai="_",ql=1;class Yl{static createRowNode(t,o,i={}){return{...t,__id:o(t),...i}}static generateId(t){if(t.length===0)throw new Error("传入标识数组为空无法生成ID");return t.join(Ai)}static getId(t){return t.__id?t.__id.split(Ai)[0]:t.id}static getSignature(t){return t.__signature}static getFlatIndex(t,o=ql){if(!t.__id)throw new Error("不包含有效的ID信息");const i=t.__id.split(Ai);if(i.length===1)throw new Error(`${i} 不包含索引信息`);const s=i[o];if(!s)throw new Error(`${i} deep[${o}] 不包含索引信息`);const n=Number.parseInt(s);if(!Number.isFinite(n))throw new TypeError(`${s} 不是一个正确的数组索引`);return n}static ValueGetter(t){return console.warn("deprecated GridUtils.ValueGetter 现在只需要正常使用valueGetter了"),o=>{if(!(o.data.id&&typeof o.data.id=="string"&&o.data.id.includes("footer-")))return t(o)}}static spanRow(t,o,i){const s=t[o];return!s||s.length===0?t:s.map((n,r)=>({...t,__id:`${i??t.id}_${r}`,rowSpan:r===0?s.length:0}))}static isGroupColDef(t){return!!t.children}}const Zl=(e,t,o,i,s)=>{const n=E.ref(t),r=E.ref(),a=E.ref(!1),l=(g,p)=>{if(n.value)return n.value;const f=p??[];if(!g){const w=Ve(f.join(","));return n.value=w,w}const C=e.getInstanceName(g);C&&f.push(C);const m=e.getParentInstance(g);return l(m,f)},d=g=>{const p=localStorage.getItem(g);if(!(!p||p==="undefined"))return JSON.parse(p)},c=O.debounce(()=>{const g=l(s);localStorage.setItem(g,JSON.stringify(o.value.getColumnState()))},200),u=async()=>{const g=l(s),p=d(g);if(p&&p.length>0){const f=p.filter(C=>{var m;return!((m=C.colId)!=null&&m.includes("ag-Grid-SelectionColumn"))});o.value.applyColumnState({state:f,applyOrder:!0}),a.value=!0}},h=()=>O.sumBy(o.value.getAllDisplayedVirtualColumns().map(g=>g.getActualWidth()));return{storeGridState:c,restoreGridState:u,resetGridState:()=>{o.value.applyColumnState({state:r.value,applyOrder:!0})},initGridState:()=>{const g=l(s);if(r.value=o.value.getColumnState(),!localStorage.getItem(`${g}-initial`)){const p=h();i.value>p&&o.value.sizeColumnsToFit()}},isStateInitialized:a}},So=e=>{if(e.id)return`${e.id}`.split("_")[0]},Ql=e=>{const{options:t,elRef:o,editable:i,onRowChange:s,onMessageError:n,findOtherEditingCell:r,isCellEditable:a}=e;let l;const d=h=>{o.value&&o.value.querySelectorAll(`.row_${h}`).forEach(g=>{g.classList.add("row-hover")})},c=h=>{o.value&&o.value.querySelectorAll(`.row_${h}`).forEach(g=>{g.classList.remove("row-hover")})},u=(h,g)=>{var C;if(!h||!o.value)return!1;const p=h;if(!p||typeof p.contains!="function")return!1;const f=o.value.querySelectorAll(`.row_${g}`);for(let m=0;m<f.length;m++){const w=f[m];if(w===p||(C=w.contains)!=null&&C.call(w,p))return!0}return!1};return{...t,onCellMouseOver(h){var p,f,C;const g=So(h.node);if(!g){(p=t.onCellMouseOver)==null||p.call(t,h);return}u((f=h.event)==null?void 0:f.relatedTarget,g)||(l&&l!==g&&c(l),l=g,d(g),(C=t.onCellMouseOver)==null||C.call(t,h))},onCellMouseOut(h){var p;const g=So(h.node);g&&(u((p=h.event)==null?void 0:p.relatedTarget,g)||l===g&&(c(g),l=void 0))},onCellClicked(h){if(i==="cell"&&h.data instanceof Nt){if(a&&!a(h.column,h.node))return;const g=h.data.getActualRow(),p=r==null?void 0:r(h.node.id);if(g instanceof Ii){const f=g.getEditingColumn(),C=g.getRowId();if(s==null)throw new Error("可编辑单元格必须配置保存能力");if(f.getId()==h.column.getId()&&C===h.node.id)return;s(g).then(()=>{g.stopEditing(!0);const m=g.getSourceRow();m.setData(g.getData()),m.startEditingCell(h.node.id,h.column,!0)}).catch(m=>{n==null||n(`单元格[${h.column.getColDef().headerName}]保存失败: `+m.message)})}else if(g instanceof vo)if(p){if(s==null)throw new Error("可编辑单元格必须配置保存能力");s(p).then(()=>{p.stopEditing(!0),p.getSourceRow().setData(p.getData()),g.startEditingCell(h.node.id,h.column,!0)}).catch(f=>{n==null||n(`单元格[${h.column.getColDef().headerName}]保存失败: `+f.message)})}else g.startEditingCell(h.node.id,h.column,!0)}},onRowSelected(h){var C;const g=So(h.node),p=h.api.getRenderedNodes().filter(m=>So(m)===g),f=h.node.isSelected();p.forEach(m=>{m.setSelected(!!f,!1,"api")}),(C=t==null?void 0:t.onRowSelected)==null||C.call(t,h)},getRowClass(h){var m,w;const g=(m=t==null?void 0:t.getRowClass)==null?void 0:m.call(t,h),p=[];g&&(O.isArray(g)?p.push(...g):p.push(g)),p.push(`row_${So(h.node)}`);const f=h.node.data,C=((w=(f==null?void 0:f.actualRow)??f)==null?void 0:w.index)??h.node.rowIndex??0;return p.push(`row-zebra-${C%2}`),p},onRowDoubleClicked(h){i==="row"&&(h.data.isEditing()||h.data.startEditing())}}},Xl={"cell-span":({data:e,column:t})=>e.getRowSpan(t)>0,"cell-span-hide":({data:e,column:t})=>e.getRowSpan(t)===0},Jl={"cell-span":({data:e,column:t})=>e.getRowSpan(t)>0,"cell-span-hide":({data:e,column:t})=>e.getRowSpan(t)===0},fn=(e,t)=>({...e,...t??{}});class Ye{constructor(t,o,i,s=[],n,r){R(this,"context");R(this,"endRow");R(this,"filterModel");R(this,"sortModel");R(this,"startRow");R(this,"dataCache");R(this,"pageNum");R(this,"pageSize");R(this,"cursorId");R(this,"onError");R(this,"onFirstPageLoaded");this.pageNum=t,this.pageSize=o,this.sortModel=s,this.startRow=(t-1)*o,this.endRow=this.startRow+this.pageSize,this.dataCache=i,this.onError=n,this.cursorId=r}static from(t,o,i,s){const n=o??i.pageSize;return i.enableCursorPage?new Ye(1,n,i,[],s,void 0):new Ye(t,n,i,[],s)}static nextPage(t,o){if(t.enableCursorPage){const i=t.getRows(),s=i.length?i[i.length-1].getId():void 0;return new Ye(1,t.pageSize,t,[],o,s)}return new Ye(t.pageNum+1,t.pageSize,t,[],o)}failCallback(){var t;(t=this.onError)==null||t.call(this,"表格数据加载失败,请重试")}successCallback(t){var o;if(this.dataCache.enableCursorPage){this.successCallbackByCursor(t);return}(O.isEmpty(t)||t.length<this.pageSize)&&(this.dataCache.isFinished=!0),this.pageNum===1?this.dataCache.setRows((t??[]).map(i=>this.dataCache.createRow(i))):this.dataCache.appendRows((t??[]).map(i=>this.dataCache.createRow(i))),this.dataCache.pageNum=this.pageNum,this.pageNum===1&&((o=this.onFirstPageLoaded)==null||o.call(this,t??[]))}successCallbackByCursor(t){var s;const o=(t??[]).map(n=>this.dataCache.createRow(n));if(this.cursorId===void 0){this.dataCache.setRows(o),this.dataCache.pageNum=1,o.length===0&&(this.dataCache.isFinished=!0),(s=this.onFirstPageLoaded)==null||s.call(this,t??[]);return}const i=new Set(this.dataCache.getRows().map(n=>n.getId()));if(!o.some(n=>!i.has(n.getId()))){this.dataCache.isFinished=!0;return}this.dataCache.appendRows(o),this.dataCache.pageNum=1}}const ed=e=>{const t=s=>{const n=s.getLastDisplayedRowIndex();return s.getDisplayedRowCount()-1===n},o=({direction:s,api:n})=>{s==="vertical"&&t(n)&&i()},i=()=>{var s;(s=e==null?void 0:e.onVScrollEnd)==null||s.call(e)};return{onBodyScrollEnd:o}};class Iy{constructor(t){R(this,"gridApi");this.gridApi=t}reload(){this.gridApi.getGridOption("context").reload()}redraw(t){const o=this.gridApi.getRenderedNodes().filter(i=>{var s;return((s=i.data)==null?void 0:s.getId())===t.getId()});this.gridApi.getGridOption("context").reload(),this.gridApi.redrawRows({rowNodes:o})}redrawCell(t,o,i){const s=this.gridApi.getRenderedNodes().filter(n=>{var r;return((r=n.data)==null?void 0:r.getId())===o});this.gridApi.getGridOption("context").reload(),this.gridApi.refreshCells({rowNodes:s,columns:[i],force:!0,suppressFlash:!0})}ensureNodeVisible(t){const o=this.gridApi.getRowNode(t);o&&this.gridApi.ensureNodeVisible(o)}refreshModel(t){var i,s,n,r;const o=this.gridApi.getGridOption("rowModelType")==="clientSide"?this.gridApi.rowModel:null;o!=null&&o.refreshModel?o.refreshModel(t):t.step==="everything"?(s=(i=this.gridApi).refreshClientSideRowModel)==null||s.call(i):(r=(n=this.gridApi).refreshClientSideRowModel)==null||r.call(n,{step:"map"})}getColumns(){return this.gridApi.getAllGridColumns().map(t=>{var i,s;const o=(s=(i=t.getColDef)==null?void 0:i.call(t))==null?void 0:s.cellDataType;return{colId:t.getColId(),cellDataType:typeof o=="string"?o:void 0}})}}const td=(e,t)=>{if(t.length===0)return[];const o=new Set(t),i=[];return e.forEachNode(s=>{const n=s.data;n&&typeof n.getId=="function"&&o.has(n.getId())&&i.push(s)}),i},Ay=(e,t,o)=>{!e||t.length===0||e.setNodesSelected({nodes:td(e,t),newValue:!0,source:o})},My=(e,t,o)=>{!e||t.length===0||e.setNodesSelected({nodes:td(e,t),newValue:!1,source:o})},ky=e=>{if(!e)return[];const t=new Set,o=[];return e.forEachNode(i=>{if(!i.isSelected()||!i.data)return;const s=i.data,n=s!=null&&s.getActualRow?s.getActualRow():i.data;t.has(n)||(t.add(n),o.push(n))}),o},od=(e,t)=>{var K;const o=E.ref(),i=E.ref(),s=E.ref({height:`calc(100% - ${e.footerHeight??0}px)`,width:"100%"}),n=new Set(["columnSizing","columnVisibility","columnPinning","columnOrder"]),r=E.ref(0),a=E.ref(),{onBodyScrollEnd:l}=ed({onVScrollEnd(){u.value.getRows(Ye.nextPage(c.value,e.onError))}}),d=({data:B})=>B.id,c=E.ref(new Kl(e.rowIdMapper)),u=E.ref(new zl(e.rowData,c.value));E.watch(()=>e.enableCursorPage,B=>{c.value.enableCursorPage=B===!0});const{initGridState:h,resetGridState:g,storeGridState:p,restoreGridState:f}=Zl(e.instanceCtx,e.id,o,a,e.currentInstance),C=async B=>{T(),c.value.pageSize=e.pageSize,c.value.enableCursorPage=e.enableCursorPage===!0,c.value.bridge=new Iy(B.api),u.value.api=B.api,B.api.getAllGridColumns(),o.value=B.api,h(),await f(),await G(),B.api.setGridOption("popupParent",document.querySelector("body"))},m=()=>{u.value.loadData()},w=async(B,z=0)=>{c.value.insertRows(B,z),m()},S=B=>c.value.getRows().some(z=>z.getId()===B.getId()),v=()=>c.value.getRows(),b=()=>{var oe,Me;const B=i.value.querySelector(".ag-body-viewport"),z=Number.parseFloat(B.querySelector(".ag-center-cols-container").style.height),N=i.value.querySelector(".ag-header").offsetHeight,$=(Me=(oe=i.value.querySelector(".ag-overlay-no-rows-wrapper"))==null?void 0:oe.querySelector(".el-empty"))==null?void 0:Me.offsetHeight;z<r.value?s.value.height=`${N+($||z)+(e.footerHeight?2:11)}px`:s.value.height.includes("100%")||(s.value.height=`calc(100% - ${e.footerHeight??0}px)`)},D=()=>{const B=i.value;if(!B||s.value.height.includes("%"))return;const z=B.querySelector(".cl-grid-container"),N=B.querySelector(".grid-toolbar");if(!z)return;const $=z.firstElementChild;if(!$)return;const oe=$.offsetHeight,Me=(N==null?void 0:N.offsetHeight)||0;B.style.height=`${oe+Me}px`},T=()=>{const B=i.value.querySelector(".ag-body-viewport");a.value=B.offsetWidth,r.value=B.offsetHeight},G=()=>new Promise((B,z)=>{c.value.isFinished=!1;const N=Ye.from(1,c.value.pageSize,c.value,e.onError);N.onFirstPageLoaded=$=>{E.nextTick(()=>{var oe;return(oe=e.onFirstPageLoaded)==null?void 0:oe.call(e,$)})},N.context={resolve:B,reject:z},u.value.getRows(N),u.value.api.getDisplayedRowCount()>0&&u.value.api.ensureIndexVisible(0)}),F=B=>{const z={...B,sortable:!1};return Array.isArray(B.children)&&(z.children=B.children.map(F)),z},P=E.computed(()=>e.enableCursorPage?e.columns.map(F):e.columns),H=E.computed(()=>{var B,z;return{onGridReady:C,onBodyScrollEnd:l,scrollbarWidth:8,getRowId:d,columnDefs:P.value,preventDefaultOnContextMenu:!0,suppressRowTransform:!0,suppressRowHoverHighlight:!0,selectionColumnDef:{pinned:"left",rowSpan:({data:N,column:$})=>N.getRowSpan($),cellClassRules:fn(Xl,(B=e.gridOptions)==null?void 0:B.rowClassRules)},defaultColGroupDef:{marryChildren:!0},onStateUpdated(N){N.sources.some($=>n.has($))&&p()},onSortChanged(N){N.source==="uiColumnSorted"&&p()},context:{refresh:G,reload:m},onRowDataUpdated(){E.nextTick(()=>{b(),E.nextTick(()=>{D()})})},defaultColDef:{rowSpan({column:N,data:$}){return $.getRowSpan(N)},cellClassRules:fn(Jl,(z=e.gridOptions)==null?void 0:z.rowClassRules),suppressFloatingFilterButton:!0,enableCellChangeFlash:!0,tooltipValueGetter(N){return N.valueFormatted},resizable:!0,sortable:!1,headerComponent:"HeaderRenderer",cellRenderer:"CellRenderer",valueGetter({column:N,data:$}){return $.getValue(N)},valueFormatter({value:N}){return N}},...Ql({options:e.gridOptions??{},elRef:i,editable:e.editable,onRowChange:e.onRowChange,onMessageError:e.onError,findOtherEditingCell:N=>c.value.getRows().find($=>$ instanceof Ii&&$.getRowId()!==N),isCellEditable:(N,$)=>{var Me;const oe=(Me=N.getColDef)==null?void 0:Me.call(N);return typeof(oe==null?void 0:oe.editable)=="function"?oe.editable({column:N,colDef:oe,node:$,data:$.data}):(oe==null?void 0:oe.editable)!==!1}}),onBodyScroll(N){W.left=N.left,W.top=N.top},...jl}}),W={left:0,top:0};return(K=t==null?void 0:t.onActivated)==null||K.call(t,()=>{}),{gridOptions:H,datasource:u,gridStyles:s,dataCache:c,gridApi:o,gridElRef:i,resetGridState:g,reload:m,insertRows:w,existRow:S,getRows:v,refresh:G,selectByIds:(B,z)=>Ay(o.value,B,z),deselectByIds:(B,z)=>My(o.value,B,z),getSelectedRows:()=>ky(o.value)}},id=(e,t,o)=>{const i=E.ref(),s=E.ref([{}]),n=E.computed(()=>e.footerHeight?{height:`${e.footerHeight+10}px`}:{});E.watch(()=>[s.value,i.value],()=>{var d;s.value&&i.value&&((d=i.value)==null||d.setGridOption("rowData",s.value.map((c,u)=>({id:`footer-${u}`,...c}))))});const r=d=>!!d.children,a=d=>{var c;return r(d)?{headerName:d.headerName,groupId:d.groupId,children:[...d.children.map(u=>a(u))]}:{width:d.width,headerName:d.headerName,field:d.field,cellRendererParams:{render:(c=d.cellRendererParams)==null?void 0:c.footerRender}}},l=E.computed(()=>{var d;return{scrollbarWidth:8,suppressRowTransform:!0,suppressRowHoverHighlight:!0,columnDefs:e.columns.map(c=>a(c)),defaultColGroupDef:{marryChildren:!0},rowSelection:(d=e.gridOptions)!=null&&d.rowSelection?{mode:"singleRow",isRowSelectable:()=>!1,hideDisabledCheckboxes:!0}:void 0,rowHeight:e.footerHeight,headerHeight:0,alwaysShowVerticalScroll:o.value.height.includes("100%"),defaultColDef:{suppressFloatingFilterButton:!0,cellRenderer:"FooterCellRender",enableCellChangeFlash:!0,tooltipValueGetter(c){return c.value}},onGridReady(c){i.value=c.api,c.api.setGridOption("popupParent",document.querySelector("body"))},alignedGrids:()=>{const c=t.value;if(!c)return[];const u=c.api??(typeof c.addEventListener=="function"?c:void 0);return u?[u]:[]}}});return{setFooterData:d=>{s.value=d},footerGridApi:i,footerData:s,footerStyles:n,footerGridOptions:l}};class Ly extends x{constructor(){super(...arguments);R(this,"beanName","selectionColSvc");R(this,"columns")}postConstruct(){this.addManagedPropertyListener("rowSelection",o=>{this.onSelectionOptionsChanged(o.currentValue,o.previousValue,Et(o.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(o){const i=this.columns;i!=null&&(o.list=i.list.concat(o.list),o.tree=i.tree.concat(o.tree),zc(o))}createColumns(o,i){var u,h;const s=()=>{var g;Uo(this.beans,(g=this.columns)==null?void 0:g.tree),this.columns=null},n=o.treeDepth,r=(((u=this.columns)==null?void 0:u.treeDepth)??-1)==n,a=this.generateSelectionCols();if(Wc(a,((h=this.columns)==null?void 0:h.list)??[])&&r)return;s();const{colGroupSvc:l}=this.beans,d=(l==null?void 0:l.findDepth(o.tree))??0,c=(l==null?void 0:l.balanceTreeForAutoCols(a,d))??[];this.columns={list:a,tree:c,treeDepth:d,map:{}},i(g=>{if(!g)return null;const p=g.filter(f=>!st(f));return[...a,...p]})}updateColumns(o){var s;const i=Et(o.source);(s=this.columns)==null||s.list.forEach(n=>{const r=this.createSelectionColDef(o.currentValue);n.setColDef(r,null,i),be(this.beans,{state:[{...r,colId:n.getColId()}]},i)})}getColumn(o){var i;return((i=this.columns)==null?void 0:i.list.find(s=>Sr(s,o)))??null}getColumns(){var o;return((o=this.columns)==null?void 0:o.list)??null}isSelectionColumnEnabled(){var l,d;const{gos:o,beans:i}=this,s=o.get("rowSelection");if(typeof s!="object"||!et(o))return!1;const n=(((d=(l=i.autoColSvc)==null?void 0:l.getColumns())==null?void 0:d.length)??0)>0;if(s.checkboxLocation==="autoGroupColumn"&&n)return!1;const r=!!bt(s),a=Ho(s);return r||a}createSelectionColDef(o){const{gos:i}=this,s=o??i.get("selectionColumnDef"),n=i.get("enableRtl"),{rowSpan:r,spanRows:a,...l}=s??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:n?"right":"left",comparator(d,c,u,h){const g=u.isSelected(),p=h.isSelected();return g===p?0:g?1:-1},editable:!1,suppressFillHandle:!0,pinned:"left",rowSpan:r,...l,colId:Cr,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const o=this.createSelectionColDef(),i=o.colId;this.gos.validateColDef(o,i,!0);const s=new $e(o,null,i,!1);return this.createBean(s),[s]}onSelectionOptionsChanged(o,i,s){const n=i&&typeof i!="string"?bt(i):void 0,r=o&&typeof o!="string"?bt(o):void 0,a=n!==r,l=i&&typeof i!="string"?Ho(i):void 0,d=o&&typeof o!="string"?Ho(o):void 0,c=l!==d,u=Oo(o),h=Oo(i);(a||c||u!==h)&&this.beans.colModel.refreshAll(s)}destroy(){var o;Uo(this.beans,(o=this.columns)==null?void 0:o.tree),super.destroy()}refreshVisibility(o,i,s){var l,d;if(!((l=this.columns)!=null&&l.list.length))return;const n=o.length+i.length+s.length;if(n===0)return;const r=this.columns.list[0];if(!r.isVisible())return;const a=()=>{let c;switch(r.pinned){case"left":case!0:c=o;break;case"right":c=s;break;default:c=i}c&&Se(c,r)};((d=this.beans.rowNumbersSvc)!=null&&d.getColumn(mr)?2:1)===n&&a()}}const Mi="34.1.1";function sd(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function ki(e){return!!(e.rowPinned&&e.pinnedSibling)}function Gy(e,t=!0){const o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function nd(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}function ve(e,t,o,i){const s=t==="top";if(!o)return ve(e,t,s?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),i);if(!i){const l=s?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return ve(e,t,o,s?e.getPinnedTopRow(l-1):e.getPinnedBottomRow(l-1))}let n=!1,r=!1;const a=[];return e.forEachPinnedRow(t,l=>{if(l===o&&!n){n=!0,a.push(l);return}if(n&&l===i){r=!0,a.push(l);return}n&&!r&&a.push(l)}),a}function Cn(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function rd(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const o=e.get("suppressRowClickSelection"),i=e.get("suppressRowDeselection");return o&&i?!1:o?"enableDeselection":i?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function Hy(e){const t=rd(e);return t===!0||t==="enableDeselection"}function Oy(e){const t=rd(e);return t===!0||t==="enableSelection"}function By(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function Vy(e,t){var n;if(!t.nodes.every(r=>r.rowPinned&&!ki(r)?(M(59),!1):r.id===void 0?(M(60),!1):!0))return;const{nodes:o,source:i,newValue:s}=t;(n=e.selectionSvc)==null||n.setNodesSelected({nodes:o,source:i??"api",newValue:s})}function Ny(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.selectAllRowNodes({source:o,selectAll:t})}function _y(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.deselectAllRowNodes({source:o,selectAll:t})}function Wy(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedNodes())??[]}function zy(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedRows())??[]}const $y={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]};class Uy extends Y{constructor(){super($y,[Os]);R(this,"eCheckbox",I);R(this,"rowNode");R(this,"column");R(this,"overrides")}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const o=this.getLocaleTextFunc(),{rowNode:i,eCheckbox:s}=this,n=i.isSelected(),r=nd(o,n),[a,l]=i.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],d=o(a,l);s.setValue(n,!0),s.setInputAriaLabel(`${d} (${r})`)}init(o){if(this.rowNode=o.rowNode,this.column=o.column,this.overrides=o.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:yt,click:i=>{var s;yt(i),(s=this.beans.selectionSvc)==null||s.handleSelectionEvent(i,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:s})=>{const n=typeof i=="object"?Cn(i):void 0,r=typeof s=="object"?Cn(s):void 0;n!==r&&this.onSelectableChanged()}),ls(this.gos)||typeof this.getIsVisible()=="function"){const i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:o,rowNode:i,overrides:s,gos:n}=this,r=i.selectable,a=this.getIsVisible();let l;if(typeof a=="function"){const g=s==null?void 0:s.callbackParams;if(!o)l=a({...g,node:i,data:i.data});else{const p=o.createColumnFunctionCallbackParams(i);l=a({...g,...p})}}else l=a??!1;const d=r&&!l||!r&&l,c=r||l,u=n.get("rowSelection"),h=u&&typeof u!="string"?!Cn(u):!!(o!=null&&o.getColDef().showDisabledCheckboxes);if(this.setVisible(c&&(d?h:!0)),this.setDisplayed(c&&(d?h:!0)),c&&this.eCheckbox.setDisabled(d),s==null?void 0:s.removeHidden){this.setDisplayed(c);return}}getIsVisible(){var s,n;const o=this.overrides;if(o)return o.isVisible;const i=this.gos.get("rowSelection");return i&&typeof i!="string"?bt(i):(n=(s=this.column)==null?void 0:s.getColDef())==null?void 0:n.checkboxSelection}}class Ky{constructor(t,o){R(this,"rowModel");R(this,"pinnedRowModel");R(this,"selectAll",!1);R(this,"rootId",null);R(this,"endId",null);R(this,"cachedRange",[]);this.rowModel=t,this.pinnedRowModel=o}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(t){this.rootId=t.id,this.endId=null,this.cachedRange.length=0}setEndRange(t){this.endId=t.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const t=this.getRoot(),o=this.getEnd();if(t==null||o==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(t,o)??[]}return this.cachedRange}isInRange(t){return this.rootId===null?!1:this.getRange().some(o=>o.id===t.id)}getRoot(t){if(this.rootId)return this.getRowNode(this.rootId);if(t)return this.setRoot(t),t}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(t){let o;const{rowModel:i,pinnedRowModel:s}=this;return o??(o=i.getRowNode(t)),s!=null&&s.isManual()&&(o??(o=s.getPinnedRowById(t,"top")),o??(o=s.getPinnedRowById(t,"bottom"))),o}truncate(t){const o=this.getRange();if(o.length===0)return{keep:[],discard:[]};const i=o[0].id===this.rootId,s=o.findIndex(n=>n.id===t.id);if(s>-1){const n=o.slice(0,s),r=o.slice(s+1);return this.setEndRange(t),i?{keep:n,discard:r}:{keep:r,discard:n}}else return{keep:o,discard:[]}}extend(t,o=!1){const i=this.getRoot();if(i==null){const n=this.getRange().slice();return o&&t.depthFirstSearch(r=>!r.group&&n.push(r)),n.push(t),this.setRoot(t),{keep:n,discard:[]}}const s=this.getNodesInRange(i,t);if(!s)return this.setRoot(t),{keep:[t],discard:[]};if(s.find(n=>n.id===this.endId))return this.setEndRange(t),{keep:this.getRange(),discard:[]};{const n=this.getRange().slice();return this.setEndRange(t),{keep:this.getRange(),discard:n}}}getNodesInRange(t,o){const{pinnedRowModel:i,rowModel:s}=this;if(!(i!=null&&i.isManual()))return s.getNodesInRangeForSelection(t,o);if(t.rowPinned==="top"&&!o.rowPinned)return ve(i,"top",t,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),o)??[]);if(t.rowPinned==="bottom"&&!o.rowPinned){const n=ve(i,"bottom",void 0,t),r=s.getRowCount(),a=s.getRow(r-1);return(s.getNodesInRangeForSelection(o,a)??[]).concat(n)}if(!t.rowPinned&&!o.rowPinned)return s.getNodesInRangeForSelection(t,o);if(t.rowPinned==="top"&&o.rowPinned==="top")return ve(i,"top",t,o);if(t.rowPinned==="bottom"&&o.rowPinned==="top"){const n=ve(i,"top",o,void 0),r=ve(i,"bottom",void 0,t),a=s.getRow(0),l=s.getRow(s.getRowCount()-1);return n.concat(s.getNodesInRangeForSelection(a,l)??[]).concat(r)}if(!t.rowPinned&&o.rowPinned==="top")return ve(i,"top",o,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),t)??[]);if(t.rowPinned==="top"&&o.rowPinned==="bottom"){const n=ve(i,"top",t,void 0),r=ve(i,"bottom",void 0,o),a=s.getRow(0),l=s.getRow(s.getRowCount()-1);return n.concat(s.getNodesInRangeForSelection(a,l)??[]).concat(r)}if(t.rowPinned==="bottom"&&o.rowPinned==="bottom")return ve(i,"bottom",t,o);if(!t.rowPinned&&o.rowPinned==="bottom"){const n=ve(i,"bottom",void 0,o),r=s.getRow(s.getRowCount());return(s.getNodesInRangeForSelection(t,r)??[]).concat(n)}return null}}class jy extends x{constructor(o){super();R(this,"column");R(this,"cbSelectAllVisible",!1);R(this,"processingEventFromCheckbox",!1);R(this,"headerCellCtrl");R(this,"cbSelectAll");this.column=o}onSpaceKeyDown(o){const i=this.cbSelectAll;i.isDisplayed()&&!i.getGui().contains(Q(this.beans))&&(o.preventDefault(),i.setValue(!i.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(o){this.headerCellCtrl=o;const i=this.createManagedBean(new Sa);this.cbSelectAll=i,i.addCss("ag-header-select-all"),Ne(i.getGui(),"presentation"),this.showOrHideSelectAll();const s=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:s,paginationChanged:s,modelUpdated:s}),this.addManagedPropertyListener("rowSelection",({currentValue:n,previousValue:r})=>{const a=l=>typeof l=="string"||!l||l.mode==="singleRow"?void 0:l.selectAll;a(n)!==a(r)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(i,{fieldValueChanged:this.onCbSelectAll.bind(this)}),i.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(o){this.isAlive()&&this.showOrHideSelectAll(o.source==="uiColumnMoved")}showOrHideSelectAll(o=!1){const i=this.isCheckboxSelection();this.cbSelectAllVisible=i,this.cbSelectAll.setDisplayed(i),i&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(o)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const o=this.getSelectAllMode(),i=this.beans.selectionSvc,s=this.cbSelectAll,n=i.getSelectAllState(o);s.setValue(n);const r=i.hasNodesToSelect(o);s.setDisabled(!r),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(o=!1){const i=this.getLocaleTextFunc(),{headerCellCtrl:s,cbSelectAll:n,cbSelectAllVisible:r}=this,a=n.getValue(),l=nd(i,a),d=i("ariaRowSelectAll","Press Space to toggle all rows selection");s.setAriaDescriptionProperty("selectAll",r?`${d} (${l})`:null),n.setInputAriaLabel(i("ariaHeaderSelection","Column with Header Selection")),o||s.announceAriaDescription()}checkSelectionType(o){return Jt(this.gos)?!0:(M(128,{feature:o}),!1)}checkRightRowModelType(o){const{gos:i,rowModel:s}=this.beans;return ne(i)||Lo(i)?!0:(M(129,{feature:o,rowModel:s.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const o=this.cbSelectAll.getValue(),i=this.getSelectAllMode();let s="uiSelectAll";i==="currentPage"?s="uiSelectAllCurrentPage":i==="filtered"&&(s="uiSelectAllFiltered");const n={source:s,selectAll:i},r=this.beans.selectionSvc;o?r.selectAllRowNodes(n):r.deselectAllRowNodes(n)}isCheckboxSelection(){const{column:o,gos:i,beans:s}=this,n=typeof i.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return ad(s,o)&&this.checkRightRowModelType(n)&&this.checkSelectionType(n)}getSelectAllMode(){const o=Gy(this.gos,!1);if(o)return o;const{headerCheckboxSelectionCurrentPageOnly:i,headerCheckboxSelectionFilteredOnly:s}=this.column.getColDef();return i?"currentPage":s?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}}function ad({gos:e,selectionColSvc:t},o){const i=e.get("rowSelection"),s=o.getColDef(),{headerCheckboxSelection:n}=s;let r=!1;if(typeof i=="object"){const a=st(o),l=vr(o);(Oo(i)==="autoGroupColumn"&&l||a&&(t!=null&&t.isSelectionColumnEnabled()))&&(r=Ho(i))}else typeof n=="function"?r=n(_(e,{column:o,colDef:s})):r=!!n;return r}class qy extends x{constructor(){super(...arguments);R(this,"isRowSelectable");R(this,"selectionCtx")}postConstruct(){const{gos:o,beans:i}=this;this.selectionCtx=new Ky(i.rowModel,i.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const s=ls(o);s!==this.isRowSelectable&&(this.isRowSelectable=s,this.updateSelectable())}),this.isRowSelectable=ls(o),this.addManagedEventListeners({cellValueChanged:s=>this.updateRowSelectable(s.node),rowNodeDataChanged:s=>this.updateRowSelectable(s.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new Uy}createSelectAllFeature(o){if(ad(this.beans,o))return new jy(o)}isMultiSelect(){return Jt(this.gos)}onRowCtrlSelected(o,i,s){const n=!!o.rowNode.isSelected();o.forEachGui(s,r=>{r.rowComp.toggleCss("ag-row-selected",n);const a=r.element;Bi(a,n),a.contains(Q(this.beans))&&i(r)})}announceAriaRowSelection(o){var n;if(this.isRowSelectionBlocked(o))return;const i=o.isSelected();if(!o.selectable)return;const s=this.getLocaleTextFunc()(i?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${i?"deselect":"select"} this row`);(n=this.beans.ariaAnnounce)==null||n.announceValue(s,"rowSelection")}isRowSelectionBlocked(o){return!o.selectable||o.rowPinned&&!ki(o)||!et(this.gos)}updateRowSelectable(o,i){var n;const s=o.rowPinned&&o.pinnedSibling?o.pinnedSibling.selectable:((n=this.isRowSelectable)==null?void 0:n.call(this,o))??!0;return this.setRowSelectable(o,s,i),s}setRowSelectable(o,i,s){if(o.selectable!==i){if(o.selectable=i,o.dispatchRowEvent("selectableChanged"),s)return;if(eo(this.gos)){const n=this.calculateSelectedFromChildren(o);this.setNodesSelected({nodes:[o],newValue:n??!1,source:"selectableChanged"});return}o.isSelected()&&!o.selectable&&this.setNodesSelected({nodes:[o],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(o){var n;let i=!1,s=!1;if(!((n=o.childrenAfterGroup)!=null&&n.length))return o.selectable?o.__selected:null;for(let r=0;r<o.childrenAfterGroup.length;r++){const a=o.childrenAfterGroup[r];let l=a.isSelected();if(!a.selectable){const d=this.calculateSelectedFromChildren(a);if(d===null)continue;l=d}switch(l){case!0:i=!0;break;case!1:s=!0;break;default:return}}if(!(i&&s))return i?!0:s?!1:o.selectable?o.__selected:null}selectRowNode(o,i,s,n="api"){const r=!o.selectable&&i,a=o.__selected===i;if(r||a)return!1;o.__selected=i,o.dispatchRowEvent("rowSelected");const l=o.sibling;l&&l.footer&&l.__localEventService&&l.dispatchRowEvent("rowSelected");const d=o.pinnedSibling;return d&&d.rowPinned&&d.__localEventService&&d.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...Vh(o,this.gos,"rowSelected"),event:s||null,source:n}),!0}isCellCheckboxSelection(o,i){const s=this.gos.get("rowSelection");if(s&&typeof s!="string"){const n=st(o)&&bt(s);return o.isColumnFunc(i,n)}else return o.isColumnFunc(i,o.colDef.checkboxSelection)}inferNodeSelections(o,i,s,n){const{gos:r,selectionCtx:a}=this,l=o.isSelected(),d=eo(r),c=Oy(r),u=Hy(r),h=this.isMultiSelect(),g=n==="rowClicked";if(g&&!(c||u))return null;if(i&&s&&h){const p=a.getRoot();if(p)if(p.isSelected()){const f=a.isInRange(o)?a.truncate(o):a.extend(o,d);return{deselect:f.discard,select:f.keep,reset:!1}}else{const f=a.extend(o,d);return{select:[],deselect:f.keep,reset:!1}}else return null}else if(i&&h){const p=a.selectAll?this.beans.rowModel.getRow(0):void 0,f=a.getRoot(p),C=a.isInRange(o)?a.truncate(o):a.extend(o,d);return{select:C.keep,deselect:C.discard,reset:a.selectAll||!!(f&&!f.isSelected())}}else if(s){if(g){const p=!l;return p&&!c||!p&&!u?null:(a.setRoot(o),{node:o,newValue:p,clearSelection:!1})}return a.setRoot(o),{node:o,newValue:!l,clearSelection:!h}}else{a.setRoot(o);const p=By(r),f=Vo(r)==="filteredDescendants",C=g&&(!p||!c);if(f&&l===void 0&&ne(r))return{node:o,newValue:!1,clearSelection:!h||C};if(g){const m=l?!p:c;return m===l&&!C||m&&!c||!m&&!u?null:{node:o,newValue:m,clearSelection:!h||C,keepDescendants:o.group&&d}}return{node:o,newValue:!l,clearSelection:!h||C}}}}class Yy extends qy{constructor(){super(...arguments);R(this,"beanName","selectionSvc");R(this,"selectedNodes",new Map);R(this,"detailSelection",new Map);R(this,"groupSelectsDescendants");R(this,"groupSelectsFiltered");R(this,"mode");R(this,"masterSelectsDetail",!1)}postConstruct(){super.postConstruct();const{gos:o}=this;this.mode=Bo(o),this.groupSelectsDescendants=eo(o),this.groupSelectsFiltered=Vo(o)==="filteredDescendants",this.masterSelectsDetail=sd(o)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const i=eo(o),s=Bo(o),n=Vo(o)==="filteredDescendants";this.masterSelectsDetail=sd(o)==="detail",(i!==this.groupSelectsDescendants||n!==this.groupSelectsFiltered||s!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=i,this.groupSelectsFiltered=n,this.mode=s)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(o,i,s){if(this.isRowSelectionBlocked(i))return 0;const n=this.inferNodeSelections(i,o.shiftKey,o.metaKey||o.ctrlKey,s);return n==null?0:(this.selectionCtx.selectAll=!1,"select"in n?(n.reset?this.resetNodes():this.selectRange(n.deselect,!1,s),this.selectRange(n.select,!0,s)):this.setNodesSelected({nodes:[n.node],newValue:n.newValue,clearSelection:n.clearSelection,keepDescendants:n.keepDescendants,event:o,source:s}))}setNodesSelected({newValue:o,clearSelection:i,suppressFinishActions:s,nodes:n,event:r,source:a,keepDescendants:l=!1}){var c;if(!et(this.gos)&&o)return M(132),0;if(n.length===0)return 0;if(n.length>1&&!this.isMultiSelect())return M(130),0;let d=0;for(let u=0;u<n.length;u++){const h=n[u],g=Wt(h),p=this.groupSelectsFiltered&&g.group;if(g.rowPinned&&!ki(g)){M(59);continue}if(g.id===void 0){M(60);continue}p||this.selectRowNode(g,o,r,a)&&(this.detailSelection.delete(g.id),d++),this.groupSelectsDescendants&&((c=g.childrenAfterGroup)!=null&&c.length)&&(d+=this.selectChildren(g,o,a))}return s||(n.length===1&&a==="api"&&this.selectionCtx.setRoot(Wt(n[0])),o&&(i||!this.isMultiSelect())&&(d+=this.clearOtherNodes(Wt(n[0]),l,a)),d>0&&(this.updateGroupsFromChildrenSelections(a),this.dispatchSelectionChanged(a))),d}selectRange(o,i,s){let n=0;return o.forEach(r=>{const a=Wt(r);a.group&&this.groupSelectsDescendants||this.selectRowNode(a,i,void 0,s)&&n++}),n>0&&(this.updateGroupsFromChildrenSelections(s),this.dispatchSelectionChanged(s)),n}selectChildren(o,i,s){const n=this.groupSelectsFiltered?o.childrenAfterAggFilter:o.childrenAfterGroup;return n?this.setNodesSelected({newValue:i,clearSelection:!1,suppressFinishActions:!0,source:s,nodes:n}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const o=[];return this.selectedNodes.forEach(i=>i.data&&o.push(i.data)),o}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(o){const i=new Map;this.selectedNodes.forEach((s,n)=>{o(s)&&i.set(n,s)}),this.selectedNodes=i}updateGroupsFromChildrenSelections(o,i){if(!this.groupSelectsDescendants)return!1;const{gos:s,rowModel:n}=this.beans;if(!ne(s))return!1;const r=n.rootNode;if(!r)return!1;i||(i=new wi(!0,r),i.active=!1);let a=!1;return i.forEachChangedNodeDepthFirst(l=>{if(l!==r){const d=this.calculateSelectedFromChildren(l);a=this.selectRowNode(l,d===null?!1:d,void 0,o)||a}}),a}clearOtherNodes(o,i,s){const n=new Map;let r=0;return this.selectedNodes.forEach(a=>{const l=a.id==o.id;if((!i||!Qy(o,a))&&!l){const d=this.selectedNodes.get(a.id);r+=this.setNodesSelected({nodes:[d],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:s}),this.groupSelectsDescendants&&a.parent&&n.set(a.parent.id,a.parent)}}),n.forEach(a=>{const l=this.calculateSelectedFromChildren(a);this.selectRowNode(a,l===null?!1:l,void 0,s)}),r}onRowSelected(o){const i=o.node;this.groupSelectsDescendants&&i.group||(i.isSelected()?this.selectedNodes.set(i.id,i):this.selectedNodes.delete(i.id))}syncInRowNode(o,i){this.syncInOldRowNode(o,i),this.syncInNewRowNode(o)}createDaemonNode(o){if(!o.id)return;const i=new ro(this.beans);return i.id=o.id,i.data=o.data,i.__daemon=!0,i.__selected=o.__selected,i.level=o.level,i}syncInOldRowNode(o,i){i&&o.id!==i.id&&this.selectedNodes.get(i.id)==o&&this.selectedNodes.set(i.id,i)}syncInNewRowNode(o){this.selectedNodes.has(o.id)?(o.__selected=!0,this.selectedNodes.set(o.id,o)):o.__selected=!1}reset(o){const i=this.getSelectionCount();this.resetNodes(),i&&this.dispatchSelectionChanged(o)}resetNodes(){this.selectedNodes.forEach(o=>{this.selectRowNode(o,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:o,rowModel:i}=this.beans;if(!ne(o))return;const s=i.getTopLevelNodes();if(s===null)return;const n=[];function r(a){for(let l=0,d=a.length;l<d;l++){const c=a[l];c.isSelected()?n.push(c):c.group&&c.childrenAfterGroup&&r(c.childrenAfterGroup)}}return r(s),n}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:o,selectAll:i}){const s=ne(this.gos);let n=!1;const r=a=>{const l=this.selectRowNode(Wt(a),!1,void 0,o);n||(n=l)};if(i==="currentPage"||i==="filtered"){if(!s){j(102);return}this.getNodesToSelect(i).forEach(r)}else this.selectedNodes.forEach(r),this.reset(o);if(this.selectionCtx.selectAll=!1,s&&this.groupSelectsDescendants){const a=this.updateGroupsFromChildrenSelections(o);n||(n=a)}n&&this.dispatchSelectionChanged(o)}getSelectedCounts(o){let i=0,s=0;return this.getNodesToSelect(o).forEach(n=>{this.groupSelectsDescendants&&n.group||(n.isSelected()?i++:n.selectable&&s++)}),{selectedCount:i,notSelectedCount:s}}getSelectAllState(o){const{selectedCount:i,notSelectedCount:s}=this.getSelectedCounts(o);return ld(i,s)??null}hasNodesToSelect(o){return this.getNodesToSelect(o).filter(i=>i.selectable).length>0}getNodesToSelect(o){if(!this.canSelectAll())return[];const i=[],s=r=>i.push(r);if(o==="currentPage")return this.forEachNodeOnPage(r=>{if(!r.group){s(r);return}if(!r.expanded&&!r.footer){const a=l=>{var d;s(l),(d=l.childrenAfterFilter)==null||d.forEach(a)};a(r);return}this.groupSelectsDescendants||s(r)}),i;const n=this.beans.rowModel;return o==="filtered"?(n.forEachNodeAfterFilter(s),i):(n.forEachNode(s),i)}forEachNodeOnPage(o){const{pageBounds:i,rowModel:s}=this.beans,n=i.getFirstRow(),r=i.getLastRow();for(let a=n;a<=r;a++){const l=s.getRow(a);l&&o(l)}}selectAllRowNodes(o){const{gos:i,selectionCtx:s}=this;if(!et(i)){M(132);return}if(yc(i)&&!Jt(i)){M(130);return}if(!this.canSelectAll())return;const{source:n,selectAll:r}=o;let a=!1;if(this.getNodesToSelect(r).forEach(l=>{const d=this.selectRowNode(Wt(l),!0,void 0,n);a||(a=d)}),s.selectAll=!0,ne(i)&&this.groupSelectsDescendants){const l=this.updateGroupsFromChildrenSelections(n);a||(a=l)}a&&this.dispatchSelectionChanged(n)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(o,i,s){if(o||(o=[]),!Array.isArray(o)){j(103);return}const n=new Set(o),r=[];this.beans.rowModel.forEachNode(a=>{n.has(a.id)&&r.push(a)}),s&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:r,source:i})}canSelectAll(){const{gos:o}=this.beans;return!!ne(o)}updateSelectable(o){var c;const{gos:i,rowModel:s}=this.beans;if(!et(i))return;const n="selectableChanged",r=o!==void 0,a=ne(i)&&this.groupSelectsDescendants,l=[],d=u=>{var h;if(!(r&&!u.group)){if(a&&u.group){const g=((h=u.childrenAfterGroup)==null?void 0:h.some(p=>p.selectable))??!1;this.setRowSelectable(u,g,!0);return}!this.updateRowSelectable(u,!0)&&u.isSelected()&&l.push(u)}};if(a){if(o===void 0){const u=s.rootNode;o=u?new wi(!1,u):void 0}o==null||o.forEachChangedNodeDepthFirst(d,!r,!r)}else s.forEachNode(d);l.length&&this.setNodesSelected({nodes:l,newValue:!1,source:n}),!r&&a&&((c=this.updateGroupsFromChildrenSelections)==null||c.call(this,n))}updateSelectableAfterGrouping(o){var i;this.updateSelectable(o),this.groupSelectsDescendants&&((i=this.updateGroupsFromChildrenSelections)!=null&&i.call(this,"rowGroupChanged",o))&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(o,i){var r,a;if(!this.masterSelectsDetail)return;const s=(a=(r=o.detailNode)==null?void 0:r.detailGridInfo)==null?void 0:a.api;if(!s)return;const n=Zy(s);if(o.isSelected()!==n&&this.selectRowNode(o,n,i,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!n){const l=this.detailSelection.get(o.id)??new Set;for(const d of s.getSelectedNodes())l.add(d.id);this.detailSelection.set(o.id,l)}}setDetailSelectionState(o,i,s){if(this.masterSelectsDetail){if(!Jt(i)){M(269);return}switch(o.isSelected()){case!0:{s.selectAll();break}case!1:{s.deselectAll();break}case void 0:{const n=this.detailSelection.get(o.id);if(n){const r=[];for(const a of n){const l=s.getRowNode(a);l&&r.push(l)}s.setNodesSelected({nodes:r,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(o){this.eventSvc.dispatchEvent({type:"selectionChanged",source:o,selectedNodes:this.getSelectedNodes(),serverSideState:null})}}function Wt(e){return ki(e)?e.pinnedSibling:e.footer?e.sibling:e}function Zy(e){let t=0,o=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&o++}),ld(t,o)}function ld(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function Qy(e,t){let o=t.parent;for(;o;){if(o===e)return!0;o=o.parent}return!1}const dd={moduleName:"SharedRowSelection",version:Mi,beans:[Ly],apiFunctions:{setNodesSelected:Vy,selectAll:Ny,deselectAll:_y,getSelectedNodes:Wy,getSelectedRows:zy}},cd={moduleName:"RowSelection",version:Mi,rowModels:["clientSide","infinite","viewport"],beans:[Yy],dependsOn:[dd]},Xy="ROOT_NODE_ID";class Jy extends x{constructor(){super(...arguments);R(this,"nextId",0);R(this,"allNodesMap",{});R(this,"rootNode",null)}getRowNode(o){return this.allNodesMap[o]}extractRowData(){var o,i;return(i=(o=this.rootNode)==null?void 0:o.allLeafChildren)==null?void 0:i.map(s=>s.data)}activate(o){this.rootNode=o,o.group=!0,o.level=-1,o.id=Xy,o.allLeafChildren=[],o.childrenAfterGroup=[],o.childrenAfterSort=[],o.childrenAfterAggFilter=[],o.childrenAfterFilter=[],this.updateRootSiblingArrays(o)}deactivate(){this.rootNode&&(this.allNodesMap={},this.rootNode=null)}destroy(){super.destroy(),this.allNodesMap={},this.rootNode=null}setNewRowData(o){const i=this.rootNode;i&&(this.dispatchRowDataUpdateStartedEvent(o),i.childrenAfterFilter=null,i.childrenAfterGroup=null,i.childrenAfterAggFilter=null,i.childrenAfterSort=null,i.childrenMapped=null,i.updateHasChildren(),this.allNodesMap={},this.nextId=0,this.loadNewRowData(o),this.updateRootSiblingArrays(i))}updateRootSiblingArrays(o){const i=o.sibling;i&&(i.childrenAfterFilter=o.childrenAfterFilter,i.childrenAfterGroup=o.childrenAfterGroup,i.childrenAfterAggFilter=o.childrenAfterAggFilter,i.childrenAfterSort=o.childrenAfterSort,i.childrenMapped=o.childrenMapped,i.allLeafChildren=o.allLeafChildren)}loadNewRowData(o){this.rootNode.allLeafChildren=(o==null?void 0:o.map((i,s)=>this.createRowNode(i,s)))??[]}setImmutableRowData(o,i){var C;const s=Go(this.gos),n=!this.gos.get("suppressMaintainUnsortedOrder"),r=o.changedRowNodes,a=new Set,l=this.rootNode,d=l.allLeafChildren,c=d.length;let u=!1,h=!1,g=!1,p=!1;for(let m=0,w=-1,S=i.length;m<S;m++){const v=i[m];let b=this.getRowNode(s({data:v,level:0}));if(!b)u=!0,b=this.createRowNode(v,-1),r.add(b);else{if(n){const D=b.sourceRowIndex;p||(p=D<=w||u),w=D}b.data!==v&&(g=!0,b.updateData(v),r.update(b))}a.add(b)}const f=[];for(let m=0;m<c;m++){const w=d[m];a.has(w)||(h=!0,w.isSelected()&&f.push(w),w.pinnedSibling&&((C=this.beans.pinnedRowModel)==null||C.pinRow(w.pinnedSibling,null)),this.rowNodeDeleted(w),r.remove(w))}if(u||h||p){const m=new Array(a.size);let w=0;if(!n)for(let v=0;v<c;++v){const b=d[v];a.delete(b)&&(b.sourceRowIndex=w,m[w++]=b)}for(const v of a)v.sourceRowIndex=w,m[w++]=v;l.allLeafChildren=m;const S=l.sibling;S&&(S.allLeafChildren=m),o.rowNodesOrderChanged||(o.rowNodesOrderChanged=p)}(u||h||p||g)&&(this.deselectNodes(f),o.rowDataUpdated=!0)}rowNodeDeleted(o){o.clearRowTopAndRowIndex();const i=o.id,s=this.allNodesMap;s[i]===o&&delete s[i]}updateRowData(o,i){this.dispatchRowDataUpdateStartedEvent(o.add);const s={changedRowNodes:i,rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},n=[],r=Go(this.gos);return this.executeRemove(r,o,s,n),this.executeUpdate(r,o,s,n),this.executeAdd(o,s),this.deselectNodes(n),s}executeAdd(o,i){var h;const s=o.add;if(!(s!=null&&s.length))return;let n=this.rootNode.allLeafChildren,r=n.length;if(typeof o.addIndex=="number"&&(r=this.sanitizeAddIndex(o.addIndex),r>0&&this.gos.get("treeData")&&this.gos.get("getDataPath"))){for(let g=0;g<n.length;g++)if(((h=n[g])==null?void 0:h.rowIndex)==r-1){r=g+1;break}}const a=s.length,l=i.changedRowNodes,d=new Array(a);for(let g=0;g<a;g++){const p=this.createRowNode(s[g],r+g);l.add(p),d[g]=p}const c=this.rootNode;if(r<n.length){const g=n.slice(0,r),p=n.slice(r,n.length),f=g.length+d.length;for(let C=0,m=p.length;C<m;++C)p[C].sourceRowIndex=f+C;n=[...g,...d,...p],i.rowsInserted=!0}else n=n.concat(d);c.allLeafChildren=n;const u=c.sibling;u&&(u.allLeafChildren=n),i.rowNodeTransaction.add=d}executeRemove(o,i,{changedRowNodes:s,rowNodeTransaction:n},r){var u,h;const{remove:a}=i;if(!(a!=null&&a.length))return;const l={};a.forEach(g=>{var f;const p=this.lookupRowNode(o,g);p&&(p.isSelected()&&r.push(p),p.pinnedSibling&&((f=this.beans.pinnedRowModel)==null||f.pinRow(p.pinnedSibling,null)),p.clearRowTopAndRowIndex(),l[p.id]=!0,delete this.allNodesMap[p.id],n.remove.push(p),s.remove(p))});const d=this.rootNode;d.allLeafChildren=((u=d.allLeafChildren)==null?void 0:u.filter(g=>!l[g.id]))??null,(h=d.allLeafChildren)==null||h.forEach((g,p)=>{g.sourceRowIndex=p});const c=d.sibling;c&&(c.allLeafChildren=d.allLeafChildren)}executeUpdate(o,i,{changedRowNodes:s,rowNodeTransaction:n},r){const{update:a}=i;a!=null&&a.length&&a.forEach(l=>{const d=this.lookupRowNode(o,l);d&&(d.updateData(l),!d.selectable&&d.isSelected()&&r.push(d),n.update.push(d),s.update(d))})}dispatchRowDataUpdateStartedEvent(o){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:o!=null&&o.length?o[0]:null})}deselectNodes(o){var r;const i="rowDataChanged",s=this.beans.selectionSvc,n=o.length>0;n&&(s==null||s.setNodesSelected({newValue:!1,nodes:o,suppressFinishActions:!0,source:i})),(r=s==null?void 0:s.updateGroupsFromChildrenSelections)==null||r.call(s,i),n&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:i,selectedNodes:(s==null?void 0:s.getSelectedNodes())??null,serverSideState:null})}sanitizeAddIndex(o){var s;const i=((s=this.rootNode.allLeafChildren)==null?void 0:s.length)??0;return o<0||o>=i||Number.isNaN(o)?i:Math.ceil(o)}createRowNode(o,i){const s=new ro(this.beans);return s.parent=this.rootNode,s.level=0,s.group=!1,s.expanded=!1,s.sourceRowIndex=i,s.setDataAndId(o,String(this.nextId)),this.allNodesMap[s.id]&&M(2,{nodeId:s.id}),this.allNodesMap[s.id]=s,this.nextId++,s}lookupRowNode(o,i){var n,r;let s;if(o){const a=o({data:i,level:0});if(s=this.allNodesMap[a],!s)return j(4,{id:a}),null}else if(s=(r=(n=this.rootNode)==null?void 0:n.allLeafChildren)==null?void 0:r.find(a=>a.data===i),!s)return j(5,{data:i}),null;return s||null}}class eR extends Jy{constructor(){super(...arguments);R(this,"beanName","csrmNodeSvc")}}class mn{constructor(){R(this,"removals",new Set);R(this,"updates",new Set);R(this,"adds",new Set)}remove(t){this.adds.delete(t)||(this.updates.delete(t),this.removals.add(t))}update(t){this.adds.has(t)||this.updates.add(t)}add(t){this.adds.add(t)}}function tR(e){e.sibling&&(e.sibling.childrenAfterFilter=e.childrenAfterFilter)}function oR(e){if(q(e.childrenAfterSort))return;const t=e.childrenAfterSort;for(let o=0;o<t.length;o++){const i=t[o],s=o===0,n=o===e.childrenAfterSort.length-1;i.setFirstChild(s),i.lastChild!==n&&(i.lastChild=n,i.dispatchRowEvent("lastChildChanged")),i.childIndex!==o&&(i.childIndex=o,i.dispatchRowEvent("childIndexChanged"))}}function ud(e){e.sibling&&(e.sibling.childrenAfterSort=e.childrenAfterSort),oR(e)}class iR extends x{constructor(){super(...arguments);R(this,"beanName","sortStage");R(this,"refreshProps",new Set(["postSortRows","groupDisplayType","accentedSort"]));R(this,"step","sort")}execute(o){const i=this.beans,s=i.sortSvc.getSortOptions(),n=A(s)&&s.length>0,r=n&&!!o.changedRowNodes&&this.gos.get("deltaSort"),a=s.some(({column:l})=>xe(i.gos)?l.isPrimary()&&l.isRowGroupActive():!!l.getColDef().showRowGroup);this.sort(i,s,n,r,o.changedRowNodes,o.changedPath,a)}sort(o,i,s,n,r,a,l){const{gos:d,colModel:c,rowGroupColsSvc:u,rowNodeSorter:h,rowRenderer:g,showRowGroupCols:p}=o,f=d.get("groupMaintainOrder"),C=c.getCols().some(b=>b.isRowGroupActive()),m=c.isPivotMode(),w=d.getCallback("postSortRows");let S=!1;const v=b=>{var F,P,H;const D=m&&b.leafGroup,T=f&&C&&!b.leafGroup&&!l;let G;if(T){const W=((P=(F=u==null?void 0:u.columns)==null?void 0:F[b.level+1])==null?void 0:P.getSort())===null,K=b.childrenAfterAggFilter.slice(0);if(b.childrenAfterSort&&!W){const B={};b.childrenAfterSort.forEach((z,N)=>{B[z.id]=N}),K.sort((z,N)=>(B[z.id]??0)-(B[N.id]??0))}G=K}else!s||D?G=b.childrenAfterAggFilter.slice(0):n&&r?G=sR(h,b,r,a,i):G=b.childrenAfterAggFilter.slice(0);if(S||(S=((H=b.childrenAfterSort)==null?void 0:H[0])!==G[0]),b.childrenAfterSort=G,ud(b),w){const W={nodes:b.childrenAfterSort};w(W)}};if(a==null||a.forEachChangedNodeDepthFirst(v),S&&this.gos.get("groupHideOpenParents")){const b=p==null?void 0:p.getShowRowGroupCols();b!=null&&b.length&&g.refreshCells({columns:b,force:!0})}}}function sR(e,t,o,i,s){const n=t.childrenAfterAggFilter,r=t.childrenAfterSort;if(!r)return e.doFullSort(n,s);const a=new Set,l=[],{updates:d,adds:c}=o;for(let h=0,g=n.length;h<g;++h){const p=n[h];d.has(p)||c.has(p)||i&&!i.canSkip(p)?l.push({currentPos:l.length,rowNode:p}):a.add(p.id)}const u=r.filter(h=>a.has(h.id)).map((h,g)=>({currentPos:g,rowNode:h}));return l.sort((h,g)=>e.compareRowNodes(s,h,g)),nR(e,s,l,u)}function nR(e,t,o,i){const s=[];let n=0,r=0;const a=o.length,l=i.length;for(;n<a&&r<l;){const d=o[n],c=i[r],u=e.compareRowNodes(t,d,c);let h;u<0?(h=d,++n):(h=c,++r),s.push(h.rowNode)}for(;n<a;)s.push(o[n++].rowNode);for(;r<l;)s.push(i[r++].rowNode);return s}class rR extends x{constructor(){super(...arguments);R(this,"beanName","rowModel");R(this,"colModel");R(this,"valueCache");R(this,"filterStage");R(this,"sortStage");R(this,"flattenStage");R(this,"groupStage");R(this,"aggStage");R(this,"pivotStage");R(this,"filterAggStage");R(this,"rootNode",null);R(this,"rowsToDisplay",[]);R(this,"nodeManager");R(this,"rowDataTransactionBatch");R(this,"rowDataUpdatedPending",!1);R(this,"applyAsyncTransactionsTimeout");R(this,"started",!1);R(this,"isRefreshingModel",!1);R(this,"rowNodesCountReady",!1);R(this,"rowCountReady",!1);R(this,"orderedStages");R(this,"onRowHeightChanged_debounced",fe(this,this.onRowHeightChanged.bind(this),100))}wireBeans(o){this.colModel=o.colModel,this.valueCache=o.valueCache,this.filterStage=o.filterStage,this.sortStage=o.sortStage,this.flattenStage=o.flattenStage,this.groupStage=o.groupStage,this.aggStage=o.aggStage,this.pivotStage=o.pivotStage,this.filterAggStage=o.filterAggStage}postConstruct(){this.orderedStages=[this.groupStage,this.filterStage,this.pivotStage,this.aggStage,this.sortStage,this.filterAggStage,this.flattenStage].filter(n=>!!n);const o=this.refreshModel.bind(this,{step:"group"}),i=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:o,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:o,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this)}),this.addPropertyListeners(),this.rootNode=new ro(this.beans);const s=this.getNewNodeManager();this.nodeManager=s,s.activate(this.rootNode)}getNewNodeManager(){const{gos:o,beans:i}=this;return Fc(o)==="treeNested"&&i.csrmChildrenTreeNodeSvc||i.csrmNodeSvc}addPropertyListeners(){const o=["treeData","treeDataChildrenField",...this.orderedStages.flatMap(({refreshProps:i})=>[...i])];this.addManagedPropertyListeners(o,i=>{var n;const s=(n=i.changeSet)==null?void 0:n.properties;s&&this.onPropChange(s)}),this.addManagedPropertyListener("rowData",()=>this.onPropChange(["rowData"])),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(o,i,s,n){let r,a=!1;do{r=!1;const l=this.getRowIndexAtPixel(o),d=this.getRowIndexAtPixel(i),c=Math.max(l,s),u=Math.min(d,n);for(let h=c;h<=u;h++){const g=this.getRow(h);if(g.rowHeightEstimated){const p=ze(this.beans,g);g.setRowHeight(p.height),r=!0,a=!0}}r&&this.setRowTopAndRowIndex()}while(r);return a}onPropChange(o){if(!this.rootNode)return;const i=this.gos,s=new Set(o),n={step:"nothing",changedProps:s},r=s.has("rowData"),a=this.nodeManager,l=this.getNewNodeManager(),d=a!==l||r&&s.has("treeData")&&i.get("treeData")||s.has("treeDataChildrenField")&&i.get("treeData");let c;if((d||r)&&(c=i.get("rowData"),c!=null&&!Array.isArray(c)&&(c=null,M(1))),d&&(r||(c=(a==null?void 0:a.extractRowData())??c),a!==l&&(a==null||a.deactivate(),this.nodeManager=l),l.activate(this.rootNode)),c)if(!d&&!this.isEmpty()&&c.length>0&&i.exists("getRowId")&&!i.get("resetRowDataOnUpdate"))n.keepRenderedRows=!0,n.animate=!this.gos.get("suppressAnimationFrame"),n.changedRowNodes=new mn,l.setImmutableRowData(n,c);else{n.rowDataUpdated=!0,n.newData=!0;const{selectionSvc:u,pinnedRowModel:h}=this.beans;u==null||u.reset("rowDataChanged"),h!=null&&h.isManual()&&h.reset(),this.rowNodesCountReady=!0,l.setNewRowData(c)}if(n.rowDataUpdated)n.step="group";else if(n.step==="nothing"){for(const{refreshProps:u,step:h}of this.orderedStages)if(o.some(g=>u.has(g))){n.step=h;break}}n.step!=="nothing"&&this.refreshModel(n)}setRowTopAndRowIndex(){const{beans:o,rowsToDisplay:i}=this,s=o.environment.getDefaultRowHeight();let n=0;const r=new Set,a=ie(this.gos,"normal");for(let l=0,d=i.length;l<d;++l){const c=i[l];if(c.id!=null&&r.add(c.id),c.rowHeight==null){const u=ze(o,c,a,s);c.setRowHeight(u.height,u.estimated)}c.setRowTop(n),c.setRowIndex(l),n+=c.rowHeight}return r}clearRowTopAndRowIndex(o,i){const s=o.active,n=a=>{a&&a.id!=null&&!i.has(a.id)&&a.clearRowTopAndRowIndex()},r=a=>{if(a!==null&&(n(a),n(a.detailNode),n(a.sibling),a.hasChildren()&&a.childrenAfterGroup)){const l=a.level==-1;s&&!l&&!a.expanded||a.childrenAfterGroup.forEach(r)}};r(this.rootNode)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){const o=this.rootNode;if(!o||this.rowsToDisplay.length===0)return 0;if(this.rowsToDisplay&&this.rowsToDisplay[0]===o)return 1;const i=o.childrenAfterSort,s=o.sibling&&o.sibling.displayed?1:0;return(i?i.length:0)+s}getTopLevelRowDisplayedIndex(o){const{rootNode:i,rowsToDisplay:s}=this;if(!i||!s.length||s[0]===i)return o;const{childrenAfterSort:n}=i,r=l=>{let d=n[l];if(this.gos.get("groupHideOpenParents"))for(;d.expanded&&d.childrenAfterSort&&d.childrenAfterSort.length>0;)d=d.childrenAfterSort[0];return d.rowIndex},{footerSvc:a}=this.beans;return a?a.getTopDisplayIndex(s,o,n,r):r(o)}getTopLevelIndexFromDisplayedIndex(o){var a;const{rootNode:i,rowsToDisplay:s}=this;if(!i||!s.length||s[0]===i)return o;let n=this.getRow(o);for(n.footer&&(n=n.sibling);n.parent&&n.parent!==i;)n=n.parent;const r=(a=i.childrenAfterSort)==null?void 0:a.findIndex(l=>l===n);return r===-1?o:r??o}getRowBounds(o){const i=this.rowsToDisplay[o];return i?{rowTop:i.rowTop,rowHeight:i.rowHeight}:null}onRowGroupOpened(){const o=St(this.gos);this.refreshModel({step:"map",keepRenderedRows:!0,animate:o})}onFilterChanged(o){if(o.afterDataChange)return;const i=St(this.gos),s=o.columns.length===0||o.columns.some(n=>n.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:s,keepRenderedRows:!0,animate:i})}onSortChanged(){const o=St(this.gos);this.refreshModel({step:"sort",keepRenderedRows:!1,animate:o})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(o){const i=new wi(!1,this.rootNode);return o||(i.active=!1),i}isSuppressModelUpdateAfterUpdateTransaction(o){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:i,newData:s,rowDataUpdated:n}=o;return!(!i||s||!n||i.removals.size||i.adds.size)}refreshModel(o){var a,l,d;if(!this.rootNode)return;const i=this.beans;let s=!!o.rowDataUpdated;const n=o.changedPath??(o.changedPath=this.createChangePath(!o.newData&&s));if(this.started&&s&&this.eventSvc.dispatchEvent({type:"rowDataUpdated"}),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=s),!this.started||this.isRefreshingModel||this.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(o))return;switch(this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,o.rowDataUpdated=s=!0),this.isRefreshingModel=!0,(a=i.masterDetailSvc)==null||a.refreshModel(o),s&&o.step!=="group"&&((l=i.colFilter)==null||l.refreshModel()),o.step){case"group":(this.doRowGrouping(o)||s)&&((d=i.colFilter)==null||d.refreshModel()),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}));case"filter":this.doFilter(n);case"pivot":this.doPivot(n);case"aggregate":this.doAggregate(n);case"filter_aggregates":this.doFilterAggregates(n);case"sort":this.doSort(o.changedRowNodes,n);case"map":this.doRowsToDisplay()}const r=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(n,r),this.isRefreshingModel=!1,this.eventSvc.dispatchEvent({type:"modelUpdated",animate:o.animate,keepRenderedRows:o.keepRenderedRows,newData:o.newData,newPage:!1,keepUndoRedoStack:o.keepUndoRedoStack})}isEmpty(){var o,i,s;return!((i=(o=this.rootNode)==null?void 0:o.allLeafChildren)!=null&&i.length)||!((s=this.colModel)!=null&&s.ready)}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(o,i){let s=!1,n=!1;const r=[],a=eo(this.gos);return this.forEachNodeAfterFilterAndSort(l=>{if(!n){if(s&&(l===i||l===o)&&(n=!0,l.group&&a)){r.push(...l.allLeafChildren);return}if(!s){if(l!==i&&l!==o)return;s=!0}if(!l.group||!a){r.push(l);return}}}),r}getTopLevelNodes(){var o;return((o=this.rootNode)==null?void 0:o.childrenAfterGroup)??null}getRow(o){return this.rowsToDisplay[o]}isRowPresent(o){return this.rowsToDisplay.indexOf(o)>=0}getRowIndexAtPixel(o){const i=this.rowsToDisplay;if(this.isEmpty()||i.length===0)return-1;let s=0,n=i.length-1;if(o<=0)return 0;if(U(i).rowTop<=o)return i.length-1;let r=-1,a=-1;for(;;){const l=Math.floor((s+n)/2),d=i[l];if(this.isRowInPixel(d,o)||(d.rowTop<o?s=l+1:d.rowTop>o&&(n=l-1),r===s&&a===n))return l;r=s,a=n}}isRowInPixel(o,i){const s=o.rowTop,n=o.rowTop+o.rowHeight;return s<=i&&n>i}forEachLeafNode(o){var i,s;(s=(i=this.rootNode)==null?void 0:i.allLeafChildren)==null||s.forEach((n,r)=>o(n,r))}forEachNode(o,i=!1){this.depthFirstSearchRowNodes(o,i)}forEachDisplayedNode(o){this.rowsToDisplay.forEach(o)}forEachNodeAfterFilter(o,i=!1){this.depthFirstSearchRowNodes(o,i,s=>s.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(o,i=!1){this.depthFirstSearchRowNodes(o,i,s=>s.childrenAfterSort)}forEachPivotNode(o,i=!1,s=!1){const{colModel:n,rowGroupColsSvc:r}=this.beans;if(!n.isPivotMode())return;if(!(r!=null&&r.columns.length)){o(this.rootNode,0);return}const a=s?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(o,i,l=>l.leafGroup?null:l[a])}depthFirstSearchRowNodes(o,i=!1,s=a=>a.childrenAfterGroup,n=this.rootNode,r=0){let a=r;if(!n)return a;const l=n===this.rootNode;l||o(n,a++);const{footerSvc:d}=this.beans;if(n.hasChildren()&&!n.footer){const c=s(n);if(c){a=(d==null?void 0:d.addTotalRows(a,n,o,i,l,"top"))??a;for(const u of c)a=this.depthFirstSearchRowNodes(o,i,s,u,a);return(d==null?void 0:d.addTotalRows(a,n,o,i,l,"bottom"))??a}}return a}doAggregate(o){var s;const i=this.rootNode;i&&((s=this.aggStage)==null||s.execute({rowNode:i,changedPath:o}))}doFilterAggregates(o){const i=this.rootNode;this.filterAggStage?this.filterAggStage.execute({rowNode:i,changedPath:o}):i.childrenAfterAggFilter=i.childrenAfterFilter}doSort(o,i){this.sortStage?this.sortStage.execute({rowNode:this.rootNode,changedRowNodes:o,changedPath:i}):i.forEachChangedNodeDepthFirst(s=>{s.childrenAfterSort=s.childrenAfterAggFilter.slice(0),ud(s)})}doRowGrouping(o){var r;const i=this.rootNode,s=(r=this.groupStage)==null?void 0:r.execute({rowNode:i,changedRowNodes:o.changedRowNodes,changedPath:o.changedPath,rowNodesOrderChanged:!!o.rowNodesOrderChanged,afterColumnsChanged:!!o.afterColumnsChanged});if(s!==void 0)return s;const n=i.sibling;return i.childrenAfterGroup=i.allLeafChildren,n&&(n.childrenAfterGroup=i.childrenAfterGroup),i.updateHasChildren(),!1}doFilter(o){this.filterStage?this.filterStage.execute({rowNode:this.rootNode,changedPath:o}):o.forEachChangedNodeDepthFirst(i=>{i.childrenAfterFilter=i.childrenAfterGroup,tR(i)},!0)}doPivot(o){var i;(i=this.pivotStage)==null||i.execute({rowNode:this.rootNode,changedPath:o})}getRowNode(o){var s;const i=this.nodeManager.getRowNode(o);return typeof i=="object"?i:typeof o=="string"&&o.indexOf(ws)===0?(s=this.groupStage)==null?void 0:s.getNode(o):void 0}batchUpdateRowData(o,i){if(this.applyAsyncTransactionsTimeout==null){this.rowDataTransactionBatch=[];const s=this.gos.get("asyncTransactionWaitMillis");this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.isAlive()&&this.executeBatchUpdateRowData()},s)}this.rowDataTransactionBatch.push({rowDataTransaction:o,callback:i})}flushAsyncTransactions(){this.applyAsyncTransactionsTimeout!=null&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){var r,a;(r=this.valueCache)==null||r.onDataChanged();const o=[],i=[],s=new mn;let n=!1;(a=this.rowDataTransactionBatch)==null||a.forEach(l=>{this.rowNodesCountReady=!0;const{rowNodeTransaction:d,rowsInserted:c}=this.nodeManager.updateRowData(l.rowDataTransaction,s);c&&(n=!0),i.push(d),l.callback&&o.push(l.callback.bind(null,d))}),this.commitTransactions(n,s),o.length>0&&window.setTimeout(()=>{o.forEach(l=>l())},0),i.length>0&&this.eventSvc.dispatchEvent({type:"asyncTransactionsFlushed",results:i}),this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(o){var r;(r=this.valueCache)==null||r.onDataChanged(),this.rowNodesCountReady=!0;const i=new mn,{rowNodeTransaction:s,rowsInserted:n}=this.nodeManager.updateRowData(o,i);return this.commitTransactions(n,i),s}commitTransactions(o,i){this.refreshModel({step:"group",rowDataUpdated:!0,rowNodesOrderChanged:o,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:i,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{flattenStage:o,rootNode:i}=this;let s;if(o)s=o.execute({rowNode:i});else{s=(i==null?void 0:i.childrenAfterSort)??[];for(const n of s)n.setUiLevel(0)}this.rowsToDisplay=s}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const o=this.rootNode;if(!o)return;const i=this.resetRowHeightsForAllRowNodes();o.setRowHeight(o.rowHeight,!0),o.sibling&&o.sibling.setRowHeight(o.sibling.rowHeight,!0),i&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let o=!1;return this.forEachNode(i=>{i.setRowHeight(i.rowHeight,!0);const s=i.detailNode;s&&s.setRowHeight(s.rowHeight,!0),i.sibling&&i.sibling.setRowHeight(i.sibling.rowHeight,!0),o=!0}),o}onGridStylesChanges(o){var i;if(o.rowHeightChanged){if((i=this.beans.rowAutoHeight)!=null&&i.active)return;this.resetRowHeights()}}onGridReady(){this.started||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}destroy(){super.destroy(),this.started=!1,this.rootNode=null,this.nodeManager=null,this.rowDataTransactionBatch=null,this.orderedStages=pr,this.rowsToDisplay=pr}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}}function aR(e){var t;(t=e.expansionSvc)==null||t.onGroupExpandedOrCollapsed()}function lR(e,t){const o=Ae(e);o&&((!t||t==="everything")&&(t="group"),o.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function dR(e){var t;return((t=Ae(e))==null?void 0:t.isEmpty())??!0}function cR(e,t){var o;(o=Ae(e))==null||o.forEachLeafNode(t)}function uR(e,t){var o;(o=Ae(e))==null||o.forEachNodeAfterFilter(t)}function hR(e,t){var o;(o=Ae(e))==null||o.forEachNodeAfterFilterAndSort(t)}function gR(e){var t,o;if((t=e.rowAutoHeight)!=null&&t.active){M(3);return}(o=Ae(e))==null||o.resetRowHeights()}function pR(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var o;return(o=Ae(e))==null?void 0:o.updateRowData(t)})}function fR(e,t,o){e.frameworkOverrides.wrapIncoming(()=>{var i;return(i=Ae(e))==null?void 0:i.batchUpdateRowData(t,o)})}function CR(e){e.frameworkOverrides.wrapIncoming(()=>{var t;return(t=Ae(e))==null?void 0:t.flushAsyncTransactions()})}function mR(e){var t;return(t=e.selectionSvc)==null?void 0:t.getBestCostNodeSelection()}const hd={moduleName:"ClientSideRowModel",version:Mi,rowModels:["clientSide"],beans:[eR,rR,iR],dependsOn:[fl]},gd={moduleName:"ClientSideRowModelApi",version:Mi,apiFunctions:{onGroupExpandedOrCollapsed:aR,refreshClientSideRowModel:lR,isRowDataEmpty:dR,forEachLeafNode:cR,forEachNodeAfterFilter:uR,forEachNodeAfterFilterAndSort:hR,resetRowHeights:gR,applyTransaction:pR,applyTransactionAsync:fR,flushAsyncTransactions:CR,getBestCostNodeSelection:mR},dependsOn:[rb]};class bo{static getComponentDefinition(t,o){let i;return typeof t=="string"?i=this.searchForComponentInstance(o,t):i={extends:E.defineComponent({...t})},i||j(114,{component:t}),i.extends?(i.extends.setup&&(i.setup=i.extends.setup),i.extends.props=this.addParamsToProps(i.extends.props)):i.props=this.addParamsToProps(i.props),i}static addParamsToProps(t){return!t||Array.isArray(t)&&t.indexOf("params")===-1?t=["params",...t||[]]:typeof t=="object"&&!t.params&&(t.params={type:Object}),t}static createAndMountComponent(t,o,i,s){const n=bo.getComponentDefinition(t,i);if(!n)return;const{vm:r,destroy:a,el:l}=this.mount(n,{params:Object.freeze(o)},i,s||{});return{componentInstance:r,element:l,destroy:a}}static mount(t,o,i,s){let n=new E({beforeCreate(){s?(this._provided=Object.create(i.proxy._provided||null),Object.keys(s).forEach(l=>{this._provided[l]=s[l]})):this._provided=i.proxy._provided||{};const a=i.proxy.$root;a&&a.$router&&(Object.defineProperty(this,"$route",{value:i.proxy.$root.$route,writable:!1,configurable:!0}),Object.defineProperty(this,"$router",{value:i.proxy.$root.$router,writable:!1,configurable:!0}))},render(a){return a(t,{props:o})}});return n.$mount(),{vm:n,destroy:()=>{n&&(n.$destroy(),n=null)},el:n.$el}}static searchForComponentInstance(t,o,i=10,s=!1){let n=null,r=0,a=t.proxy.$parent;for(;!n&&a&&a.components&&++r<i;)a.components&&a.components[o]&&(n=a.components[o]),a=a.$parent;for(r=0,a=t.proxy.$parent;!n&&a&&a.$options&&++r<i;){const l=a;l.$options&&l.$options.components&&l.$options.components[o]?n=l.$options.components[o]:l[o]&&(n=l[o]),a=a.$parent}for(r=0,a=t.proxy.$parent;!n&&a&&++r<i;){if(a.exposed){const l=a;l.exposed&&l.exposed[o]?n=l.exposed[o]:l[o]&&(n=l[o])}a=a.$parent}return n||E.options&&E.options.components&&E.options.components[o]&&(n=E.options.components[o]),!n&&!s?(j(114,{component:o}),null):n}}var wR=Object.defineProperty,vR=(e,t,o)=>t in e?wR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,yo=(e,t,o)=>vR(e,typeof t!="symbol"?t+"":t,o);class SR extends _v{constructor(t,o){super(),yo(this,"parent"),yo(this,"provides"),this.parent=t,this.provides=o}createWrapper(t){const o=this;class i extends bR{init(r){super.init(r)}hasMethod(r){return s.getFrameworkComponentInstance()[r]}callMethod(r,a){var l,d;const c=this.getFrameworkComponentInstance(),u=s.getFrameworkComponentInstance();if(u[r])return u[r].apply(c,a);{const h=((l=c.$.exposed)==null?void 0:l[r])||((d=c.exposed)==null?void 0:d[r])||c.$.setupState[r];return h==null?void 0:h.apply(c,a)}}addMethod(r,a){s[r]=a}processMethod(r,a){return r==="refresh"&&(this.getFrameworkComponentInstance().params=a[0]),this.hasMethod(r)?this.callMethod(r,a):r==="refresh"}createComponent(r){return o.createComponent(t,r)}}const s=new i;return s}createComponent(t,o){return bo.createAndMountComponent(t,o,this.parent,this.provides)}createMethodProxy(t,o,i){return function(){return t.hasMethod(o)?t.callMethod(o,arguments):(i&&M(233,{methodName:o}),null)}}destroy(){this.parent=null}}class bR{constructor(){yo(this,"componentInstance"),yo(this,"element"),yo(this,"unmount")}getGui(){return this.element}destroy(){this.getFrameworkComponentInstance()&&typeof this.getFrameworkComponentInstance().destroy=="function"&&this.getFrameworkComponentInstance().destroy(),this.unmount()}getFrameworkComponentInstance(){return this.componentInstance}init(t){const{componentInstance:o,element:i,destroy:s}=this.createComponent(t);this.componentInstance=o,this.unmount=s,this.element=i}}var yR=Object.defineProperty,RR=(e,t,o)=>t in e?yR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,ER=(e,t,o)=>RR(e,t+"",o);class xR extends Ta{constructor(t){super("vue"),ER(this,"parent"),this.parent=t}frameworkComponent(t,o){let i=bo.searchForComponentInstance(this.parent,t,10,!0)?t:null;if(!i&&o&&o[t]){const s=o[t];i=bo.searchForComponentInstance(this.parent,s,10,!0)?s:null}return i}isFrameworkComponent(t){return typeof t=="object"}}function DR(){return{gridOptions:()=>({}),modules:()=>[],statusBar:void 0,sideBar:void 0,suppressContextMenu:void 0,preventDefaultOnContextMenu:void 0,allowContextMenuWithControlKey:void 0,columnMenu:void 0,suppressMenuHide:void 0,enableBrowserTooltips:void 0,tooltipTrigger:void 0,tooltipShowDelay:void 0,tooltipHideDelay:void 0,tooltipMouseTrack:void 0,tooltipShowMode:void 0,tooltipInteraction:void 0,popupParent:void 0,copyHeadersToClipboard:void 0,copyGroupHeadersToClipboard:void 0,clipboardDelimiter:void 0,suppressCopyRowsToClipboard:void 0,suppressCopySingleCellRanges:void 0,suppressLastEmptyLineOnPaste:void 0,suppressClipboardPaste:void 0,suppressClipboardApi:void 0,suppressCutToClipboard:void 0,columnDefs:void 0,defaultColDef:void 0,defaultColGroupDef:void 0,columnTypes:void 0,dataTypeDefinitions:void 0,maintainColumnOrder:void 0,enableStrictPivotColumnOrder:void 0,suppressFieldDotNotation:void 0,headerHeight:void 0,groupHeaderHeight:void 0,floatingFiltersHeight:void 0,pivotHeaderHeight:void 0,pivotGroupHeaderHeight:void 0,hidePaddedHeaderRows:void 0,allowDragFromColumnsToolPanel:void 0,suppressMovableColumns:void 0,suppressColumnMoveAnimation:void 0,suppressMoveWhenColumnDragging:void 0,suppressDragLeaveHidesColumns:void 0,suppressGroupChangesColumnVisibility:void 0,suppressMakeColumnVisibleAfterUnGroup:void 0,suppressRowGroupHidesColumns:void 0,colResizeDefault:void 0,suppressAutoSize:void 0,autoSizePadding:void 0,skipHeaderOnAutoSize:void 0,autoSizeStrategy:void 0,components:void 0,editType:void 0,suppressStartEditOnTab:void 0,getFullRowEditValidationErrors:void 0,invalidEditValueMode:void 0,singleClickEdit:void 0,suppressClickEdit:void 0,readOnlyEdit:void 0,stopEditingWhenCellsLoseFocus:void 0,enterNavigatesVertically:void 0,enterNavigatesVerticallyAfterEdit:void 0,enableCellEditingOnBackspace:void 0,undoRedoCellEditing:void 0,undoRedoCellEditingLimit:void 0,defaultCsvExportParams:void 0,suppressCsvExport:void 0,defaultExcelExportParams:void 0,suppressExcelExport:void 0,excelStyles:void 0,findSearchValue:void 0,findOptions:void 0,quickFilterText:void 0,cacheQuickFilter:void 0,includeHiddenColumnsInQuickFilter:void 0,quickFilterParser:void 0,quickFilterMatcher:void 0,applyQuickFilterBeforePivotOrAgg:void 0,excludeChildrenWhenTreeDataFiltering:void 0,enableAdvancedFilter:void 0,alwaysPassFilter:void 0,includeHiddenColumnsInAdvancedFilter:void 0,advancedFilterParent:void 0,advancedFilterBuilderParams:void 0,advancedFilterParams:void 0,suppressAdvancedFilterEval:void 0,suppressSetFilterByDefault:void 0,enableFilterHandlers:void 0,filterHandlers:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,localeText:void 0,masterDetail:void 0,keepDetailRows:void 0,keepDetailRowsCount:void 0,detailCellRenderer:void 0,detailCellRendererParams:void 0,detailRowHeight:void 0,detailRowAutoHeight:void 0,context:void 0,alignedGrids:void 0,tabIndex:void 0,rowBuffer:void 0,valueCache:void 0,valueCacheNeverExpires:void 0,enableCellExpressions:void 0,suppressTouch:void 0,suppressFocusAfterRefresh:void 0,suppressBrowserResizeObserver:void 0,suppressPropertyNamesCheck:void 0,suppressChangeDetection:void 0,debug:void 0,loading:void 0,overlayLoadingTemplate:void 0,loadingOverlayComponent:void 0,loadingOverlayComponentParams:void 0,suppressLoadingOverlay:void 0,overlayNoRowsTemplate:void 0,noRowsOverlayComponent:void 0,noRowsOverlayComponentParams:void 0,suppressNoRowsOverlay:void 0,pagination:void 0,paginationPageSize:void 0,paginationPageSizeSelector:void 0,paginationAutoPageSize:void 0,paginateChildRows:void 0,suppressPaginationPanel:void 0,pivotMode:void 0,pivotPanelShow:void 0,pivotMaxGeneratedColumns:void 0,pivotDefaultExpanded:void 0,pivotColumnGroupTotals:void 0,pivotRowTotals:void 0,pivotSuppressAutoColumn:void 0,suppressExpandablePivotGroups:void 0,functionsReadOnly:void 0,aggFuncs:void 0,suppressAggFuncInHeader:void 0,alwaysAggregateAtRootLevel:void 0,aggregateOnlyChangedColumns:void 0,suppressAggFilteredOnly:void 0,removePivotHeaderRowWhenSingleValueColumn:void 0,animateRows:void 0,cellFlashDuration:void 0,cellFadeDuration:void 0,allowShowChangeAfterFilter:void 0,domLayout:void 0,ensureDomOrder:void 0,enableCellSpan:void 0,enableRtl:void 0,suppressColumnVirtualisation:void 0,suppressMaxRenderedRowRestriction:void 0,suppressRowVirtualisation:void 0,rowDragManaged:void 0,rowDragInsertDelay:void 0,suppressRowDrag:void 0,suppressMoveWhenRowDragging:void 0,rowDragEntireRow:void 0,rowDragMultiRow:void 0,rowDragText:void 0,dragAndDropImageComponent:void 0,dragAndDropImageComponentParams:void 0,fullWidthCellRenderer:void 0,fullWidthCellRendererParams:void 0,embedFullWidthRows:void 0,groupDisplayType:void 0,groupDefaultExpanded:void 0,autoGroupColumnDef:void 0,groupMaintainOrder:void 0,groupSelectsChildren:void 0,groupLockGroupColumns:void 0,groupAggFiltering:void 0,groupTotalRow:void 0,grandTotalRow:void 0,suppressStickyTotalRow:void 0,groupSuppressBlankHeader:void 0,groupSelectsFiltered:void 0,showOpenedGroup:void 0,groupHideParentOfSingleChild:void 0,groupRemoveSingleChildren:void 0,groupRemoveLowestSingleChildren:void 0,groupHideOpenParents:void 0,groupAllowUnbalanced:void 0,rowGroupPanelShow:void 0,groupRowRenderer:void 0,groupRowRendererParams:void 0,treeData:void 0,treeDataChildrenField:void 0,treeDataParentIdField:void 0,rowGroupPanelSuppressSort:void 0,suppressGroupRowsSticky:void 0,groupHierarchyConfig:void 0,pinnedTopRowData:void 0,pinnedBottomRowData:void 0,enableRowPinning:void 0,isRowPinnable:void 0,isRowPinned:void 0,rowModelType:void 0,rowData:void 0,asyncTransactionWaitMillis:void 0,suppressModelUpdateAfterUpdateTransaction:void 0,datasource:void 0,cacheOverflowSize:void 0,infiniteInitialRowCount:void 0,serverSideInitialRowCount:void 0,suppressServerSideFullWidthLoadingRow:void 0,cacheBlockSize:void 0,maxBlocksInCache:void 0,maxConcurrentDatasourceRequests:void 0,blockLoadDebounceMillis:void 0,purgeClosedRowNodes:void 0,serverSideDatasource:void 0,serverSideSortAllLevels:void 0,serverSideEnableClientSideSort:void 0,serverSideOnlyRefreshFilteredGroups:void 0,serverSidePivotResultFieldSeparator:void 0,viewportDatasource:void 0,viewportRowModelPageSize:void 0,viewportRowModelBufferSize:void 0,alwaysShowHorizontalScroll:void 0,alwaysShowVerticalScroll:void 0,debounceVerticalScrollbar:void 0,suppressHorizontalScroll:void 0,suppressScrollOnNewData:void 0,suppressScrollWhenPopupsAreOpen:void 0,suppressAnimationFrame:void 0,suppressMiddleClickScrolls:void 0,suppressPreventDefaultOnMouseWheel:void 0,scrollbarWidth:void 0,rowSelection:void 0,cellSelection:void 0,rowMultiSelectWithClick:void 0,suppressRowDeselection:void 0,suppressRowClickSelection:void 0,suppressCellFocus:void 0,suppressHeaderFocus:void 0,selectionColumnDef:void 0,rowNumbers:void 0,suppressMultiRangeSelection:void 0,enableCellTextSelection:void 0,enableRangeSelection:void 0,enableRangeHandle:void 0,enableFillHandle:void 0,fillHandleDirection:void 0,suppressClearOnFillReduction:void 0,sortingOrder:void 0,accentedSort:void 0,unSortIcon:void 0,suppressMultiSort:void 0,alwaysMultiSort:void 0,multiSortKey:void 0,suppressMaintainUnsortedOrder:void 0,icons:void 0,rowHeight:void 0,rowStyle:void 0,rowClass:void 0,rowClassRules:void 0,suppressRowHoverHighlight:void 0,suppressRowTransform:void 0,columnHoverHighlight:void 0,gridId:void 0,deltaSort:void 0,treeDataDisplayType:void 0,enableGroupEdit:void 0,initialState:void 0,theme:void 0,loadThemeGoogleFonts:void 0,themeCssLayer:void 0,styleNonce:void 0,themeStyleContainer:void 0,getContextMenuItems:void 0,getMainMenuItems:void 0,postProcessPopup:void 0,processUnpinnedColumns:void 0,processCellForClipboard:void 0,processHeaderForClipboard:void 0,processGroupHeaderForClipboard:void 0,processCellFromClipboard:void 0,sendToClipboard:void 0,processDataFromClipboard:void 0,isExternalFilterPresent:void 0,doesExternalFilterPass:void 0,getChartToolbarItems:void 0,createChartContainer:void 0,focusGridInnerElement:void 0,navigateToNextHeader:void 0,tabToNextHeader:void 0,navigateToNextCell:void 0,tabToNextCell:void 0,getLocaleText:void 0,getDocument:void 0,paginationNumberFormatter:void 0,getGroupRowAgg:void 0,isGroupOpenByDefault:void 0,ssrmExpandAllAffectsAllRows:void 0,initialGroupOrderComparator:void 0,processPivotResultColDef:void 0,processPivotResultColGroupDef:void 0,getDataPath:void 0,getChildCount:void 0,getServerSideGroupLevelParams:void 0,isServerSideGroupOpenByDefault:void 0,isApplyServerSideTransaction:void 0,isServerSideGroup:void 0,getServerSideGroupKey:void 0,getBusinessKeyForNode:void 0,getRowId:void 0,resetRowDataOnUpdate:void 0,processRowPostCreate:void 0,isRowSelectable:void 0,isRowMaster:void 0,fillOperation:void 0,postSortRows:void 0,getRowStyle:void 0,getRowClass:void 0,getRowHeight:void 0,isFullWidthRow:void 0,isRowValidDropPosition:void 0,"onColumn-everything-changed":void 0,"onNew-columns-loaded":void 0,"onColumn-pivot-mode-changed":void 0,"onPivot-max-columns-exceeded":void 0,"onColumn-row-group-changed":void 0,"onExpand-or-collapse-all":void 0,"onColumn-pivot-changed":void 0,"onGrid-columns-changed":void 0,"onColumn-value-changed":void 0,"onColumn-moved":void 0,"onColumn-visible":void 0,"onColumn-pinned":void 0,"onColumn-group-opened":void 0,"onColumn-resized":void 0,"onDisplayed-columns-changed":void 0,"onVirtual-columns-changed":void 0,"onColumn-header-mouse-over":void 0,"onColumn-header-mouse-leave":void 0,"onColumn-header-clicked":void 0,"onColumn-header-context-menu":void 0,"onAsync-transactions-flushed":void 0,"onRow-group-opened":void 0,"onRow-data-updated":void 0,"onPinned-row-data-changed":void 0,"onPinned-rows-changed":void 0,"onRange-selection-changed":void 0,"onCell-selection-changed":void 0,"onChart-created":void 0,"onChart-range-selection-changed":void 0,"onChart-options-changed":void 0,"onChart-destroyed":void 0,"onTool-panel-visible-changed":void 0,"onTool-panel-size-changed":void 0,"onModel-updated":void 0,"onCut-start":void 0,"onCut-end":void 0,"onPaste-start":void 0,"onPaste-end":void 0,"onFill-start":void 0,"onFill-end":void 0,"onCell-selection-delete-start":void 0,"onCell-selection-delete-end":void 0,"onRange-delete-start":void 0,"onRange-delete-end":void 0,"onUndo-started":void 0,"onUndo-ended":void 0,"onRedo-started":void 0,"onRedo-ended":void 0,"onCell-clicked":void 0,"onCell-double-clicked":void 0,"onCell-mouse-down":void 0,"onCell-context-menu":void 0,"onCell-value-changed":void 0,"onCell-edit-request":void 0,"onRow-value-changed":void 0,"onHeader-focused":void 0,"onCell-focused":void 0,"onRow-selected":void 0,"onSelection-changed":void 0,"onTooltip-show":void 0,"onTooltip-hide":void 0,"onCell-key-down":void 0,"onCell-mouse-over":void 0,"onCell-mouse-out":void 0,"onFilter-changed":void 0,"onFilter-modified":void 0,"onFilter-ui-changed":void 0,"onFilter-opened":void 0,"onFloating-filter-ui-changed":void 0,"onAdvanced-filter-builder-visible-changed":void 0,"onSort-changed":void 0,"onVirtual-row-removed":void 0,"onRow-clicked":void 0,"onRow-double-clicked":void 0,"onGrid-ready":void 0,"onGrid-pre-destroyed":void 0,"onGrid-size-changed":void 0,"onViewport-changed":void 0,"onFirst-data-rendered":void 0,"onDrag-started":void 0,"onDrag-stopped":void 0,"onDrag-cancelled":void 0,"onRow-editing-started":void 0,"onRow-editing-stopped":void 0,"onCell-editing-started":void 0,"onCell-editing-stopped":void 0,"onBody-scroll":void 0,"onBody-scroll-end":void 0,"onPagination-changed":void 0,"onComponent-state-changed":void 0,"onStore-refreshed":void 0,"onState-updated":void 0,"onColumn-menu-visible-changed":void 0,"onContext-menu-visible-changed":void 0,"onRow-drag-enter":void 0,"onRow-drag-move":void 0,"onRow-drag-leave":void 0,"onRow-drag-end":void 0,"onRow-drag-cancel":void 0,"onFind-changed":void 0,"onRow-resize-started":void 0,"onRow-resize-ended":void 0,"onColumns-reset":void 0,"onBulk-editing-started":void 0,"onBulk-editing-stopped":void 0,"onBatch-editing-started":void 0,"onBatch-editing-stopped":void 0}}const FR=(e,t)=>{let o;return()=>{const i=function(){e()};window.clearTimeout(o),o=window.setTimeout(i,t)}};function PR(e){return e&&e.constructor&&e.constructor.toString().substring(0,5)==="class"}function Ro(e){const t=new WeakSet,o=i=>{if(PR(i))return E.toRaw(i);if(E.isRef(i)||E.isReactive(i)||E.isProxy(i)){const s=E.toRaw(i);return s===i?i:o(s)}if(i!==null&&typeof i=="object"){if(t.has(i))return i;t.add(i)}return Array.isArray(i)?i.map(s=>o(s)):i};return o(e)}const TR=E.defineComponent({__name:"AgGridVue",props:E.mergeDefaults({gridOptions:null,modules:null,modelValue:null,statusBar:null,sideBar:{type:[String,Boolean]},suppressContextMenu:{type:Boolean},preventDefaultOnContextMenu:{type:Boolean},allowContextMenuWithControlKey:{type:Boolean},columnMenu:null,suppressMenuHide:{type:Boolean},enableBrowserTooltips:{type:Boolean},tooltipTrigger:null,tooltipShowDelay:null,tooltipHideDelay:null,tooltipMouseTrack:{type:Boolean},tooltipShowMode:null,tooltipInteraction:{type:Boolean},popupParent:null,copyHeadersToClipboard:{type:Boolean},copyGroupHeadersToClipboard:{type:Boolean},clipboardDelimiter:null,suppressCopyRowsToClipboard:{type:Boolean},suppressCopySingleCellRanges:{type:Boolean},suppressLastEmptyLineOnPaste:{type:Boolean},suppressClipboardPaste:{type:Boolean},suppressClipboardApi:{type:Boolean},suppressCutToClipboard:{type:Boolean},columnDefs:null,defaultColDef:null,defaultColGroupDef:null,columnTypes:null,dataTypeDefinitions:null,maintainColumnOrder:{type:Boolean},enableStrictPivotColumnOrder:{type:Boolean},suppressFieldDotNotation:{type:Boolean},headerHeight:null,groupHeaderHeight:null,floatingFiltersHeight:null,pivotHeaderHeight:null,pivotGroupHeaderHeight:null,hidePaddedHeaderRows:{type:Boolean},allowDragFromColumnsToolPanel:{type:Boolean},suppressMovableColumns:{type:Boolean},suppressColumnMoveAnimation:{type:Boolean},suppressMoveWhenColumnDragging:{type:Boolean},suppressDragLeaveHidesColumns:{type:Boolean},suppressGroupChangesColumnVisibility:{type:[Boolean,String]},suppressMakeColumnVisibleAfterUnGroup:{type:Boolean},suppressRowGroupHidesColumns:{type:Boolean},colResizeDefault:null,suppressAutoSize:{type:Boolean},autoSizePadding:null,skipHeaderOnAutoSize:{type:Boolean},autoSizeStrategy:null,components:null,editType:null,suppressStartEditOnTab:{type:Boolean},getFullRowEditValidationErrors:null,invalidEditValueMode:null,singleClickEdit:{type:Boolean},suppressClickEdit:{type:Boolean},readOnlyEdit:{type:Boolean},stopEditingWhenCellsLoseFocus:{type:Boolean},enterNavigatesVertically:{type:Boolean},enterNavigatesVerticallyAfterEdit:{type:Boolean},enableCellEditingOnBackspace:{type:Boolean},undoRedoCellEditing:{type:Boolean},undoRedoCellEditingLimit:null,defaultCsvExportParams:null,suppressCsvExport:{type:Boolean},defaultExcelExportParams:null,suppressExcelExport:{type:Boolean},excelStyles:null,findSearchValue:null,findOptions:null,quickFilterText:null,cacheQuickFilter:{type:Boolean},includeHiddenColumnsInQuickFilter:{type:Boolean},quickFilterParser:{type:Function},quickFilterMatcher:{type:Function},applyQuickFilterBeforePivotOrAgg:{type:Boolean},excludeChildrenWhenTreeDataFiltering:{type:Boolean},enableAdvancedFilter:{type:Boolean},alwaysPassFilter:{type:Function},includeHiddenColumnsInAdvancedFilter:{type:Boolean},advancedFilterParent:null,advancedFilterBuilderParams:null,advancedFilterParams:null,suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},enableFilterHandlers:{type:Boolean},filterHandlers:null,loadingCellRenderer:null,loadingCellRendererParams:null,loadingCellRendererSelector:null,localeText:null,masterDetail:{type:Boolean},keepDetailRows:{type:Boolean},keepDetailRowsCount:null,detailCellRenderer:null,detailCellRendererParams:null,detailRowHeight:null,detailRowAutoHeight:{type:Boolean},context:null,alignedGrids:{type:Function},tabIndex:null,rowBuffer:null,valueCache:{type:Boolean},valueCacheNeverExpires:{type:Boolean},enableCellExpressions:{type:Boolean},suppressTouch:{type:Boolean},suppressFocusAfterRefresh:{type:Boolean},suppressBrowserResizeObserver:{type:Boolean},suppressPropertyNamesCheck:{type:Boolean},suppressChangeDetection:{type:Boolean},debug:{type:Boolean},loading:{type:Boolean},overlayLoadingTemplate:null,loadingOverlayComponent:null,loadingOverlayComponentParams:null,suppressLoadingOverlay:{type:Boolean},overlayNoRowsTemplate:null,noRowsOverlayComponent:null,noRowsOverlayComponentParams:null,suppressNoRowsOverlay:{type:Boolean},pagination:{type:Boolean},paginationPageSize:null,paginationPageSizeSelector:{type:Boolean},paginationAutoPageSize:{type:Boolean},paginateChildRows:{type:Boolean},suppressPaginationPanel:{type:Boolean},pivotMode:{type:Boolean},pivotPanelShow:null,pivotMaxGeneratedColumns:null,pivotDefaultExpanded:null,pivotColumnGroupTotals:null,pivotRowTotals:null,pivotSuppressAutoColumn:{type:Boolean},suppressExpandablePivotGroups:{type:Boolean},functionsReadOnly:{type:Boolean},aggFuncs:null,suppressAggFuncInHeader:{type:Boolean},alwaysAggregateAtRootLevel:{type:Boolean},aggregateOnlyChangedColumns:{type:Boolean},suppressAggFilteredOnly:{type:Boolean},removePivotHeaderRowWhenSingleValueColumn:{type:Boolean},animateRows:{type:Boolean},cellFlashDuration:null,cellFadeDuration:null,allowShowChangeAfterFilter:{type:Boolean},domLayout:null,ensureDomOrder:{type:Boolean},enableCellSpan:{type:Boolean},enableRtl:{type:Boolean},suppressColumnVirtualisation:{type:Boolean},suppressMaxRenderedRowRestriction:{type:Boolean},suppressRowVirtualisation:{type:Boolean},rowDragManaged:{type:Boolean},rowDragInsertDelay:null,suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},dragAndDropImageComponent:null,dragAndDropImageComponentParams:null,fullWidthCellRenderer:null,fullWidthCellRendererParams:null,embedFullWidthRows:{type:Boolean},groupDisplayType:null,groupDefaultExpanded:null,autoGroupColumnDef:null,groupMaintainOrder:{type:Boolean},groupSelectsChildren:{type:Boolean},groupLockGroupColumns:null,groupAggFiltering:{type:Boolean},groupTotalRow:null,grandTotalRow:null,suppressStickyTotalRow:{type:[Boolean,String]},groupSuppressBlankHeader:{type:Boolean},groupSelectsFiltered:{type:Boolean},showOpenedGroup:{type:Boolean},groupHideParentOfSingleChild:{type:[Boolean,String]},groupRemoveSingleChildren:{type:Boolean},groupRemoveLowestSingleChildren:{type:Boolean},groupHideOpenParents:{type:Boolean},groupAllowUnbalanced:{type:Boolean},rowGroupPanelShow:null,groupRowRenderer:null,groupRowRendererParams:null,treeData:{type:Boolean},treeDataChildrenField:null,treeDataParentIdField:null,rowGroupPanelSuppressSort:{type:Boolean},suppressGroupRowsSticky:{type:Boolean},groupHierarchyConfig:null,pinnedTopRowData:null,pinnedBottomRowData:null,enableRowPinning:{type:[Boolean,String]},isRowPinnable:null,isRowPinned:null,rowModelType:null,rowData:null,asyncTransactionWaitMillis:null,suppressModelUpdateAfterUpdateTransaction:{type:Boolean},datasource:null,cacheOverflowSize:null,infiniteInitialRowCount:null,serverSideInitialRowCount:null,suppressServerSideFullWidthLoadingRow:{type:Boolean},cacheBlockSize:null,maxBlocksInCache:null,maxConcurrentDatasourceRequests:null,blockLoadDebounceMillis:null,purgeClosedRowNodes:{type:Boolean},serverSideDatasource:null,serverSideSortAllLevels:{type:Boolean},serverSideEnableClientSideSort:{type:Boolean},serverSideOnlyRefreshFilteredGroups:{type:Boolean},serverSidePivotResultFieldSeparator:null,viewportDatasource:null,viewportRowModelPageSize:null,viewportRowModelBufferSize:null,alwaysShowHorizontalScroll:{type:Boolean},alwaysShowVerticalScroll:{type:Boolean},debounceVerticalScrollbar:{type:Boolean},suppressHorizontalScroll:{type:Boolean},suppressScrollOnNewData:{type:Boolean},suppressScrollWhenPopupsAreOpen:{type:Boolean},suppressAnimationFrame:{type:Boolean},suppressMiddleClickScrolls:{type:Boolean},suppressPreventDefaultOnMouseWheel:{type:Boolean},scrollbarWidth:null,rowSelection:null,cellSelection:{type:Boolean},rowMultiSelectWithClick:{type:Boolean},suppressRowDeselection:{type:Boolean},suppressRowClickSelection:{type:Boolean},suppressCellFocus:{type:Boolean},suppressHeaderFocus:{type:Boolean},selectionColumnDef:null,rowNumbers:{type:Boolean},suppressMultiRangeSelection:{type:Boolean},enableCellTextSelection:{type:Boolean},enableRangeSelection:{type:Boolean},enableRangeHandle:{type:Boolean},enableFillHandle:{type:Boolean},fillHandleDirection:null,suppressClearOnFillReduction:{type:Boolean},sortingOrder:null,accentedSort:{type:Boolean},unSortIcon:{type:Boolean},suppressMultiSort:{type:Boolean},alwaysMultiSort:{type:Boolean},multiSortKey:null,suppressMaintainUnsortedOrder:{type:Boolean},icons:null,rowHeight:null,rowStyle:null,rowClass:null,rowClassRules:null,suppressRowHoverHighlight:{type:Boolean},suppressRowTransform:{type:Boolean},columnHoverHighlight:{type:Boolean},gridId:null,deltaSort:{type:Boolean},treeDataDisplayType:null,enableGroupEdit:{type:Boolean},initialState:null,theme:null,loadThemeGoogleFonts:{type:Boolean},themeCssLayer:null,styleNonce:null,themeStyleContainer:null,getContextMenuItems:null,getMainMenuItems:null,postProcessPopup:{type:Function},processUnpinnedColumns:{type:Function},processCellForClipboard:{type:Function},processHeaderForClipboard:{type:Function},processGroupHeaderForClipboard:{type:Function},processCellFromClipboard:{type:Function},sendToClipboard:{type:Function},processDataFromClipboard:{type:Function},isExternalFilterPresent:{type:Function},doesExternalFilterPass:{type:Function},getChartToolbarItems:null,createChartContainer:{type:Function},focusGridInnerElement:{type:Function},navigateToNextHeader:{type:Function},tabToNextHeader:{type:Function},navigateToNextCell:{type:Function},tabToNextCell:{type:Function},getLocaleText:{type:Function},getDocument:{type:Function},paginationNumberFormatter:{type:Function},getGroupRowAgg:{type:Function},isGroupOpenByDefault:{type:Function},ssrmExpandAllAffectsAllRows:{type:Boolean},initialGroupOrderComparator:{type:Function},processPivotResultColDef:{type:Function},processPivotResultColGroupDef:{type:Function},getDataPath:null,getChildCount:{type:Function},getServerSideGroupLevelParams:{type:Function},isServerSideGroupOpenByDefault:{type:Function},isApplyServerSideTransaction:null,isServerSideGroup:null,getServerSideGroupKey:null,getBusinessKeyForNode:{type:Function},getRowId:null,resetRowDataOnUpdate:{type:Boolean},processRowPostCreate:{type:Function},isRowSelectable:null,isRowMaster:null,fillOperation:{type:Function},postSortRows:{type:Function},getRowStyle:{type:Function},getRowClass:{type:Function},getRowHeight:{type:Function},isFullWidthRow:{type:Function},isRowValidDropPosition:null,"onTool-panel-visible-changed":null,"onTool-panel-size-changed":null,"onColumn-menu-visible-changed":null,"onContext-menu-visible-changed":null,"onCut-start":null,"onCut-end":null,"onPaste-start":null,"onPaste-end":null,"onColumn-visible":null,"onColumn-pinned":null,"onColumn-resized":null,"onColumn-moved":null,"onColumn-value-changed":null,"onColumn-pivot-mode-changed":null,"onColumn-pivot-changed":null,"onColumn-group-opened":null,"onNew-columns-loaded":null,"onGrid-columns-changed":null,"onDisplayed-columns-changed":null,"onVirtual-columns-changed":null,"onColumn-everything-changed":null,"onColumns-reset":null,"onColumn-header-mouse-over":null,"onColumn-header-mouse-leave":null,"onColumn-header-clicked":null,"onColumn-header-context-menu":null,"onComponent-state-changed":null,"onCell-value-changed":null,"onCell-edit-request":null,"onRow-value-changed":null,"onCell-editing-started":null,"onCell-editing-stopped":null,"onRow-editing-started":null,"onRow-editing-stopped":null,"onBulk-editing-started":null,"onBulk-editing-stopped":null,"onBatch-editing-started":null,"onBatch-editing-stopped":null,"onUndo-started":null,"onUndo-ended":null,"onRedo-started":null,"onRedo-ended":null,"onCell-selection-delete-start":null,"onCell-selection-delete-end":null,"onRange-delete-start":null,"onRange-delete-end":null,"onFill-start":null,"onFill-end":null,"onFilter-opened":null,"onFilter-changed":null,"onFilter-modified":null,"onFilter-ui-changed":null,"onFloating-filter-ui-changed":null,"onAdvanced-filter-builder-visible-changed":null,"onFind-changed":null,"onChart-created":null,"onChart-range-selection-changed":null,"onChart-options-changed":null,"onChart-destroyed":null,"onCell-key-down":null,"onGrid-ready":null,"onGrid-pre-destroyed":null,"onFirst-data-rendered":null,"onGrid-size-changed":null,"onModel-updated":null,"onVirtual-row-removed":null,"onViewport-changed":null,"onBody-scroll":null,"onBody-scroll-end":null,"onDrag-started":null,"onDrag-stopped":null,"onDrag-cancelled":null,"onState-updated":null,"onPagination-changed":null,"onRow-drag-enter":null,"onRow-drag-move":null,"onRow-drag-leave":null,"onRow-drag-end":null,"onRow-drag-cancel":null,"onRow-resize-started":null,"onRow-resize-ended":null,"onColumn-row-group-changed":null,"onRow-group-opened":null,"onExpand-or-collapse-all":null,"onPivot-max-columns-exceeded":null,"onPinned-row-data-changed":null,"onPinned-rows-changed":null,"onRow-data-updated":null,"onAsync-transactions-flushed":null,"onStore-refreshed":null,"onHeader-focused":null,"onCell-clicked":null,"onCell-double-clicked":null,"onCell-focused":null,"onCell-mouse-over":null,"onCell-mouse-out":null,"onCell-mouse-down":null,"onRow-clicked":null,"onRow-double-clicked":null,"onRow-selected":null,"onSelection-changed":null,"onCell-context-menu":null,"onRange-selection-changed":null,"onCell-selection-changed":null,"onTooltip-show":null,"onTooltip-hide":null,"onSort-changed":null},DR()),emits:["update:modelValue"],setup(e,{expose:t,emit:o}){const i=e,s=E.ref(),n=E.ref(void 0),r=E.ref(!1),a=E.ref(!1),l=E.ref(!1),d=E.ref({}),c=E.ref(null),u=E.toRefs(i);nn().filter(F=>F!="gridOptions").forEach(F=>{E.watch(()=>u[F],(P,H)=>{(F==="rowData"&&!f.value||F!=="rowData")&&T(F,P),f.value=!1},{deep:!0})});const h=new Set(["rowDataUpdated","cellValueChanged","rowValueChanged"]),g=E.ref(i.modelValue),p=E.ref(!1),f=E.ref(!1);E.watch(()=>i.modelValue,F=>{g.value=F}),E.watch(g,(F,P)=>{r.value&&(f.value||(p.value=!0,T("rowData",Ro(F),Ro(P))),f.value=!1)},{deep:!0});const C=FR(()=>{f.value=!0,o("update:modelValue",b())},10),m=E.getCurrentInstance(),w=F=>{var P;l.value&&h.has(F)&&(P=m==null?void 0:m.proxy)!=null&&P.$props["onUpdate:modelValue"]&&C()},S=()=>{var F;(i.rowData||(F=i.gridOptions)!=null&&F.rowData)&&g.value&&M(232)},v=()=>{var F;return g.value||i.rowData||((F=i.gridOptions)==null?void 0:F.rowData)},b=()=>{const F=[];return n==null||n.value.forEachLeafNode(P=>{F.push(P.data)}),F},D=F=>P=>{if(a.value)return;P==="gridReady"&&(l.value=!0);const H=po.has(P);H&&!F||!H&&F||h.has(P)&&(p.value||w(P),p.value=!1)},T=(F,P,H)=>{if(r.value){let W=P.value||P;F==="rowData"&&W!=null&&(W=Ro(W)),d.value[F]=W,c.value==null&&(c.value=window.setTimeout(()=>{c.value=null,Dc(d.value,n.value),d.value={}},0))}},G=()=>Object.create(E.getCurrentInstance().proxy._provided);return E.onMounted(()=>{Ft(Bl,void 0,!0);const F=new SR(E.getCurrentInstance(),G()),P={globalListener:D(),globalSyncListener:D(!0),frameworkOverrides:new xR(E.getCurrentInstance()),providedBeanInstances:{frameworkCompWrapper:F},modules:i.modules},H=E.markRaw(xc(Ro(i.gridOptions),i,[...nn(),...Object.values(yi)])),W=v();W!==void 0&&(H.rowData=Ro(W)),n.value=Lv(s.value,H,P),r.value=!0}),E.onUnmounted(()=>{var F;r.value&&((F=n==null?void 0:n.value)==null||F.destroy(),a.value=!0)}),t({api:n}),{__sfc:!0,props:i,rootRef:s,api:n,gridCreated:r,isDestroyed:a,gridReadyFired:l,batchChanges:d,batchTimeout:c,propsAsRefs:u,ROW_DATA_EVENTS:h,rowDataModel:g,rowDataUpdating:p,emittingRowData:f,emits:o,emitRowModel:C,thisInstance:m,updateModelIfUsed:w,checkForBindingConflicts:S,getRowDataBasedOnBindings:v,getRowData:b,globalEventListenerFactory:D,processChanges:T,getProvides:G}}});function ae(e,t,o,i,s,n,r,a){var l=typeof e=="function"?e.options:e;return t&&(l.render=t,l.staticRenderFns=o,l._compiled=!0),n&&(l._scopeId="data-v-"+n),{exports:e,options:l}}var IR=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{ref:"rootRef"})},AR=[],MR=ae(TR,IR,AR,!1,null,"60566900");const pd=MR.exports,kR=e=>{const t=E.getCurrentInstance(),o={id:e.id,rowIdMapper:e.rowIdMapper,columns:e.columns,rowData:e.rowData,pageSize:e.pageSize,enableCursorPage:e.enableCursorPage,gridOptions:e.gridOptions,footerHeight:e.footerHeight,editable:e.editable,onRowChange:e.onRowChange,onError:i=>Md.Message.error(i),instanceCtx:{getInstanceName:i=>{var s,n;return(n=(s=i==null?void 0:i.$options)==null?void 0:s.name)!=null?n:null},getParentInstance:i=>{var s;return(s=i==null?void 0:i.$parent)!=null?s:null}},currentInstance:t==null?void 0:t.proxy};return od(o)},fd={functional:!0,name:"VNodeRender",props:["params"],render(e,t){var o;const i=t.props.params;return i.render?i.render(i):e("span",(o=i.valueFormatted)!=null?o:i.value)}},LR={functional:!0,props:{params:{type:Object,required:!0}},render(e,t){const o=e("",{});return o.text=`${t.props.params.column.getColId()} holder`,o}},GR=E.defineComponent({name:"CellRenderer"}),HR=E.defineComponent({...GR,props:{params:null},setup(e){const t=e,o=E.computed(()=>{const r=t.params.data,a=r.isEditing()&&t.params.editeRender?t.params.editeRender:t.params.render,l={...t.params,render:a};if(r instanceof Nt){const d=r.getCell(l.column);if(!d)return l.render=t.params.render,l;const{hostArray:c,hostObject:u}=r.getHostObject(l);r.getActualRow().isCellEditing(t.params.node.id,t.params.column)||(l.render=t.params.render),l.hostObject=u,l.hostArrayHook=g=>{var p;let f=c;((p=l.colDef)==null?void 0:p.cellDataType)==="array"&&!c&&(f=[],O.set(r.getData(),d.path,f)),f&&(g(f),r.buildSpan(),l.context.reload(),l.api.redrawRows({rowNodes:l.api.getRenderedNodes().filter(C=>r.match(C))}))}}return l}),i=E.computed(()=>{const r=t.params.data,a=r.getActualRow();if(a.isEditing()&&t.params.editeRender){const d=a.getSourceRow().getData(),c=r.getCell(t.params.column);return c?!O.isEqual(O.get(d,c.getReadPath()),t.params.value):!1}return!1}),s=E.computed(()=>t.params.data.isTransient()),n=E.computed(()=>t.params.data.getRowSpan(t.params.column));return{__sfc:!0,props:t,eventParams:o,isChange:i,isDraft:s,rowSpan:n,VNodeRenderer:fd,CellHolder:LR}}});var OR=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return i.rowSpan>0?o("div",{staticClass:"custom-cell"},[i.isChange?o("span",{staticClass:"value-change"}):t._e(),i.isDraft?o("span",{staticClass:"value-change transient"}):t._e(),o(i.VNodeRenderer,{attrs:{params:i.eventParams}})],1):o(i.CellHolder,{attrs:{params:i.eventParams}})},BR=[],VR=ae(HR,OR,BR,!1,null,null);const NR=VR.exports,_R=E.defineComponent({name:"GridToolbar"}),WR=E.defineComponent({..._R,setup(e){return{__sfc:!0}}});var zR=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{staticClass:"grid-toolbar"},[o("div",{staticClass:"grid-toolbar-left"},[t._t("default")],2),o("div",{staticClass:"grid-toolbar-right"},[t._t("system")],2)])},$R=[],UR=ae(WR,zR,$R,!1,null,"f12c2536");const Cd=UR.exports,KR=E.defineComponent({__name:"FooterCellRender",props:{params:null},setup(e){return{__sfc:!0,props:e,VNodeRenderer:fd}}});var jR=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",{staticClass:"custom-cell"},[o(i.VNodeRenderer,{attrs:{params:t.params}})],1)},qR=[],YR=ae(KR,jR,qR,!1,null,"4998e205");const ZR=YR.exports,QR=E.defineComponent({name:"SearchItem",props:{search:{type:Object,required:!0},teleported:{type:Boolean}},setup(e){return()=>e.search.render(e.search)}});var XR=ae(QR,null,null,!1,null,"e1931525");const wn=XR.exports,JR=E.defineComponent({name:"ClSearch"}),eE=E.defineComponent({...JR,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},id:null,confirmButtonText:{default:"搜索"},resetButtonText:{default:"重置"},autoResetSearch:{type:Boolean,default:!0},enable:{type:Boolean,default:!0}},setup(e){const t=e,o=E.ref(),i=E.ref(),s=()=>{t.search.forEach(c=>{c.value=O.cloneDeep(c.initValue)})},n=E.computed(()=>`${t.id}_SEARCH`),r=()=>{localStorage.setItem(n.value,JSON.stringify(t.search.filter(c=>!c.transient).map(c=>({field:c.field,value:c.value}))))},a=()=>{var c;const u=JSON.parse((c=localStorage.getItem(n.value))!=null?c:"[]");t.search.forEach(h=>{const g=u.find(p=>h.field===p.field);h.transient||!g?h.value=O.cloneDeep(h.initValue):h.value=g.value})},l=async()=>{i.value=!0;try{await t.searchRemote(),t.id&&r()}catch(c){console.error(c)}finally{i.value=!1}},d=()=>{if(s(),t.autoResetSearch)return l()};return E.onBeforeMount(()=>{a()}),{__sfc:!0,searchForm:o,props:t,loading:i,reset:s,persistenceKey:n,doPersistence:r,restore:a,doSearch:l,handleReset:d,SearchItem:wn}}});var tE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("el-form",{ref:"searchForm"},[o("div",{staticClass:"search-container"},[t._l(t.search,function(s){return o("el-form-item",{key:s.field},[o(i.SearchItem,{attrs:{search:s}})],1)}),o("el-form-item",[o("el-button",{staticStyle:{width:"80px"},attrs:{disabled:!t.enable||i.loading,type:"primary"},on:{click:i.doSearch}},[t._v(" "+t._s(t.confirmButtonText)+" ")]),o("el-button",{staticStyle:{width:"80px"},attrs:{disabled:i.loading},on:{click:i.handleReset}},[t._v(t._s(t.resetButtonText))])],1),t._t("default")],2)])},oE=[],iE=ae(eE,tE,oE,!1,null,"962588ec");const sE=iE.exports,md=(e,t,o)=>{const i=E.ref(),s=E.ref(!1),n=E.computed(()=>{if(Array.isArray(o)){const h=o.map(g=>{var p;return(p=g.width)!=null?p:-1}).filter(g=>g);if(h.length>0)return Math.max(...h)}else return o==null?void 0:o.width}),r=h=>O.isEmpty(h)&&!O.isNumber(h),a=E.computed(()=>Array.isArray(o)?o.some(h=>!r(h.value)):!r(o==null?void 0:o.value)),l=E.computed(()=>[s.value?"is-loading":""]),d=E.computed(()=>a.value?"var(--el-color-primary)":void 0);return{visible:i,loading:s,width:n,loadingClass:l,hasCondition:a,hasConditionColor:d,doSearch:async()=>{s.value=!0;try{await e()}catch(h){console.error(h)}finally{s.value=!1,i.value=!1}},reset:()=>{Array.isArray(o)?o.forEach(h=>{h.value=O.cloneDeep(h.initValue)}):o.value=O.cloneDeep(o==null?void 0:o.initValue)}}},nE=E.defineComponent({name:"ClPopoverSearch"}),rE=E.defineComponent({...nE,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},field:null},setup(e){const t=e,o=E.computed(()=>{var u;return(u=t.search)==null?void 0:u.find(h=>h.field===t.field)}),{visible:i,loading:s,width:n,loadingClass:r,hasConditionColor:a,doSearch:l,reset:d}=md(t.searchRemote,t,o.value),c=E.computed(()=>{var u;return(u=n.value)!=null?u:300});return{__sfc:!0,props:t,search:o,visible:i,loading:s,width:n,loadingClass:r,hasConditionColor:a,doSearch:l,reset:d,popoverWidth:c,SearchItem:wn}}});var aE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return i.search?o("el-popover",{attrs:{width:i.popoverWidth,trigger:"click"},scopedSlots:t._u([{key:"reference",fn:function(){return[o("div",[t._t("default",function(){return[o("i",{class:["el-icon-search",i.loadingClass],attrs:{color:i.hasConditionColor}})]},null,{loading:i.loading})],2)]},proxy:!0}],null,!0),model:{value:i.visible,callback:function(s){i.visible=s},expression:"visible"}},[o("div",{on:{keyup:function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"enter",13,s.key,"Enter")?null:i.doSearch.apply(null,arguments)}}},[o("el-form",{on:{submit:function(s){s.preventDefault(),s.stopPropagation()}}},[o("el-form-item",[o(i.SearchItem,t._b({attrs:{search:i.search,teleported:!1}},"SearchItem",{style:"width: 100%"},!1))],1)],1),o("el-space",{staticStyle:{width:"100%","justify-content":"end"},attrs:{size:"small"}},[o("el-button",{attrs:{size:"small"},on:{click:i.reset}},[t._v(" 重置 ")]),o("el-button",{attrs:{loading:i.loading,size:"small",type:"primary"},on:{click:i.doSearch}},[t._v("搜索")])],1)],1)]):t._e()},lE=[],dE=ae(rE,aE,lE,!1,null,null);const cE=dE.exports,uE=E.defineComponent({name:"ClDrawerSearch"}),hE=E.defineComponent({...uE,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},attached:{type:Boolean}},setup(e){const t=e,{visible:o,loading:i,loadingClass:s,hasConditionColor:n,doSearch:r,reset:a}=md(t.searchRemote,t,t.search);return E.onMounted(()=>{t.attached||a()}),{__sfc:!0,props:t,visible:o,loading:i,loadingClass:s,hasConditionColor:n,doSearch:r,reset:a,SearchItem:wn}}});var gE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",[o("div",{on:{click:function(s){i.visible=!0}}},[t._t("default",function(){return[o("el-button",{attrs:{disabled:i.loading,circle:""}},[o("i",{class:["el-icon-search",i.loadingClass],attrs:{color:i.hasConditionColor}},[o("Search")],1)])]},null,{loading:i.loading})],2),o("el-drawer",{attrs:{"append-to-body":"","with-header":!1},on:{keyup:function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"enter",13,s.key,"Enter")?null:i.doSearch.apply(null,arguments)}},model:{value:i.visible,callback:function(s){i.visible=s},expression:"visible"}},[o("el-form",{staticStyle:{height:"calc(100% - 100px)"},attrs:{"label-position":"right","label-suffix":":","label-width":"auto"}},[o("el-scrollbar",t._l(t.search,function(s){return o("el-form-item",{key:s.field,attrs:{label:s.label}},[o(i.SearchItem,t._b({attrs:{search:s,teleported:""}},"SearchItem",{style:"width: 100%"},!1))],1)}),1)],1),o("el-divider"),o("el-space",{staticStyle:{width:"100%","justify-content":"end"},attrs:{size:"small"}},[o("el-button",{on:{click:i.reset}},[t._v(" 重置 ")]),o("el-button",{attrs:{loading:i.loading,type:"primary"},on:{click:i.doSearch}},[t._v("搜索")])],1)],1)],1)},pE=[],fE=ae(hE,gE,pE,!1,null,null);const wd=fE.exports;var CE=Object.defineProperty,mE=(e,t,o)=>t in e?CE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,wE=(e,t,o)=>mE(e,t+"",o);class vn{constructor(t){wE(this,"record"),this.record=t}static from(t){const o=t.filter(i=>{var s;return(s=i.value)!=null?s:!1}).reduce((i,s)=>({...i,...O.isPlainObject(s.value)?s.value:{[s.field]:s.value}}),{});return new vn(o)}transform(t,o){const i=this.record[t],s=o(i);return delete this.record[t],this.record={...this.record,...s},this}toCondition(t){return{...this.record,...t??{}}}}const vE=E.defineComponent({name:"SearchButton"}),SE=E.defineComponent({...vE,props:{searches:null},setup(e){const t=e,o=E.inject(gt);return{__sfc:!0,props:t,context:o,ClDrawerSearch:wd}}});var bE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o(i.ClDrawerSearch,{attrs:{search:t.searches,"search-remote":i.context.refresh}})},yE=[],RE=ae(SE,bE,yE,!1,null,"45be5dfc");const vd=RE.exports,EE=E.defineComponent({name:"RefreshButton"}),xE=E.defineComponent({...EE,setup(e){const t=E.ref(!1),{refresh:o}=E.inject(gt);return{__sfc:!0,loading:t,refresh:o,handlerRefreshClick:async()=>{if(!t.value){t.value=!0;try{await o()}catch(s){console.error(s)}finally{t.value=!1}}}}}});var DE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("el-button",{attrs:{disabled:i.loading,circle:""},on:{click:i.handlerRefreshClick}},[o("i",{class:["el-icon-refresh",i.loading?"is-loading":""]})])},FE=[],PE=ae(xE,DE,FE,!1,null,"0eaeb325");const Sd=PE.exports;function bd(e,t){const o=t(e);return TE(e)&&(o.children=e.children.map(i=>bd(i,t))),o}const TE=e=>!!e.children,IE=()=>{const e=E.inject(gt),t=E.ref(),o=E.ref([]),i=E.ref([]),s=E.ref(),n=C=>{const m=e.api.value.getAllDisplayedColumns(),w=m.find(S=>S.getColId()===C);return w?m.indexOf(w):-1},r=C=>{if(C.field)return C.field;if(C.groupId)return C.groupId;throw new Error(`${C.headerName} field or groupId not found`)},a=()=>{var C,m;o.value=(m=(C=e.api.value.getColumnDefs())==null?void 0:C.map(w=>bd(w,S=>{var v,b;return{id:r(S),label:S.headerName,pined:(b=(v=e.api.value.getColumnGroup(r(S)))==null?void 0:v.getPinned())!=null?b:S.pinned}})))!=null?m:[],i.value=e.api.value.getAllDisplayedColumns().map(w=>w.getColId())},l=(C,m,w)=>w!=="inner"&&C.parent===m.parent,d=()=>{s.value=t.value.getCheckedKeys()},c=C=>{if(C instanceof $e)return[C];const m=C.getChildren();return m?[...m.flatMap(w=>c(w))]:[]},u=(C,m,w)=>{const S=n(m[0].colId),v=n(w.colId);return C==="after"?v-m.length+1:v>S?v-m.length:v};return{treeData:o,defaultCheckedKeys:i,treeRef:t,refreshTreeData:a,checkColumnAllowDrop:l,onColumnDragStart:d,onColumnDragFinish:(C,m,w)=>{if(m&&C&&C.key!==m.key){const S=e.api.value.getColumnGroup(C.key),v=e.api.value.getColumn(C.key),b=e.api.value.getColumn(m.key),D=c(S??v);if(b){const T=u(w,D,b);e.api.value.moveColumns(D,T)}}t.value.setCheckedKeys(s.value),s.value=void 0},onColumnVisibleChange:(C,m)=>{e.api.value.setColumnsVisible([C.id],m)},onColumnPinedChange:(C,m)=>{var w;const S=e.api.value.getColumnGroup(C),v=S?S.getDisplayedLeafColumns().map(D=>D.getColId()):[C],b=S?S.getPinned():(w=e.api.value.getColumn(C))==null?void 0:w.getPinned();e.api.value.setColumnsPinned(v,b===m?null:m),a()},columnAutoResize:()=>{e.api.value.sizeColumnsToFit()}}},AE=E.defineComponent({name:"SettingButton"}),ME=E.defineComponent({...AE,setup(e){const{treeRef:t,treeData:o,defaultCheckedKeys:i,refreshTreeData:s,checkColumnAllowDrop:n,onColumnDragStart:r,onColumnDragFinish:a,onColumnVisibleChange:l,onColumnPinedChange:d,columnAutoResize:c}=IE(),u=E.ref(!1),h=E.inject(gt);return{__sfc:!0,treeRef:t,treeData:o,defaultCheckedKeys:i,refreshTreeData:s,checkColumnAllowDrop:n,onColumnDragStart:r,onColumnDragFinish:a,onColumnVisibleChange:l,onColumnPinedChange:d,columnAutoResize:c,visible:u,gridContext:h,handleResetGridState:()=>{h.resetGridState(),s()}}}});var kE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",[o("el-button",{attrs:{circle:""},on:{click:function(s){i.visible=!0}}},[o("i",{staticClass:"el-icon-setting"})]),o("el-drawer",{staticClass:"setting-drawer",attrs:{visible:i.visible,size:280,"modal-append-to-body":!0,"append-to-body":!0},on:{"update:visible":function(s){i.visible=s},open:i.refreshTreeData},scopedSlots:t._u([{key:"title",fn:function(){return[o("div",{staticStyle:{display:"flex","align-items":"center"}},[o("span",[t._v("表格显示设置")])])]},proxy:!0}])},[o("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",plain:"",size:"mini"},on:{click:i.handleResetGridState}},[t._v("重置")]),o("el-button",{attrs:{type:"primary",plain:"",size:"mini"},on:{click:i.columnAutoResize}},[t._v("自适应")]),i.treeData.length>0?o("el-tree",{ref:"treeRef",staticClass:"cl-grid-column-settings cl-scrollbar",attrs:{"allow-drop":i.checkColumnAllowDrop,"node-key":"id","default-checked-keys":i.defaultCheckedKeys,"show-checkbox":"",data:i.treeData,"default-expand-all":"",draggable:"","highlight-current":""},on:{"node-drag-start":i.onColumnDragStart,"node-drag-end":i.onColumnDragFinish,"check-change":i.onColumnVisibleChange},scopedSlots:t._u([{key:"default",fn:function({node:s}){return[o("div",{class:{"pined-row":s.data.pined==="left"||s.data.pined==="right"},staticStyle:{display:"flex","justify-content":"space-between",width:"100%"}},[o("span",{class:[s.data.pined==="left"||s.data.pined==="right"?"pined-active":""]},[t._v(" "+t._s(s.label)+" ")]),o("span",[o("i",{class:["el-icon-arrow-left",s.data.pined==="left"?"pined-active":""],on:{click:function(n){return n.stopPropagation(),(()=>i.onColumnPinedChange(s.key,"left")).apply(null,arguments)}}}),o("i",{class:["el-icon-arrow-right",s.data.pined==="right"?"pined-active":""],on:{click:function(n){return n.stopPropagation(),(()=>i.onColumnPinedChange(s.key,"right")).apply(null,arguments)}}})])])]}}],null,!1,2278526884)}):t._e()],1)],1)},LE=[],GE=ae(ME,kE,LE,!1,null,"522bf761");const yd=GE.exports,HE={functional:!0,name:"HeaderVNodeRender",props:["params"],render(e,t){const o=t.props.params;return o.headerRender?o.headerRender(o):e("span",o.displayName)}},OE=E.defineComponent({name:"HeaderRenderer"}),BE=E.defineComponent({...OE,props:{params:null},setup(e){const t=e,o=E.ref(),i=E.ref(-1),s=E.inject(gt),n=()=>{o.value=t.params.column.getSort(),i.value=Wl(t.params.api,t.params.column.getColId())},r=async(a,l)=>{try{o.value=a,t.params.setSort(a,l.shiftKey),await s.refresh()}catch{}};return E.onMounted(()=>{t.params.api.addEventListener("sortChanged",n),n()}),E.onUnmounted(()=>{t.params.api.removeEventListener("sortChanged",n)}),{__sfc:!0,props:t,sorted:o,sortIndex:i,context:s,handleSortChange:n,handleSortClick:r,HeaderVNodeRender:HE}}});var VE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",[t.params.headerRender?o(i.HeaderVNodeRender,{attrs:{params:t.params}}):o("span",[t._v(t._s(t.params.displayName))]),t.params.enableSorting?[i.sortIndex>=0?o("span",{staticStyle:{"line-height":"12px"}},[t._v(" "+t._s(i.sortIndex+1))]):t._e(),i.sorted==="asc"?o("i",{staticClass:"el-icon-sort-up",staticStyle:{cursor:"pointer"},attrs:{color:"var(--el-color-primary)"},on:{click:s=>i.handleSortClick(null,s)}}):i.sorted==="desc"?o("i",{staticClass:"el-icon-sort-down",staticStyle:{cursor:"pointer"},attrs:{color:"var(--el-color-danger, #F56C6C)"},on:{click:s=>i.handleSortClick("asc",s)}}):o("i",{staticClass:"el-icon-sort",staticStyle:{cursor:"pointer"},on:{click:s=>i.handleSortClick("desc",s)}})]:t._e()],2)},NE=[],_E=ae(BE,VE,NE,!1,null,"126699e0");const WE=_E.exports,zE=E.defineComponent({name:"GridEmptyDataOverlay"}),$E=E.defineComponent({...zE,setup(e){return{__sfc:!0}}});var UE=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("el-empty",{attrs:{description:"没有数据了","image-size":75}})},KE=[],jE=ae($E,UE,KE,!1,null,"05fc87c0");const qE=jE.exports,YE=E.defineComponent({name:"GridLoadingOverlay"}),ZE=E.defineComponent({...YE,setup(e){return{__sfc:!0}}});var QE=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{directives:[{name:"loading",rawName:"v-loading",value:!0,expression:"true"}],staticClass:"table-loading",staticStyle:{height:"100%",width:"100%"},attrs:{"element-loading-text":"加载中","element-loading-background":"rgba(0, 0, 0, 0.1)"}})},XE=[],JE=ae(ZE,QE,XE,!1,null,"c60c1386");const e0=JE.exports,t0=(e,t,o)=>{const i=id({columns:e.columns,gridOptions:e.gridOptions,footerHeight:e.footerHeight},t,o);return{...i,footerGridOptions:i.footerGridOptions}},o0=()=>({theme:E.ref("ag-theme-alpine")}),i0=E.defineComponent({name:"Grid",components:{SearchButton:vd,RefreshButton:Sd,SettingButton:yd,CellRenderer:NR,GridEmptyDataOverlay:qE,HeaderRenderer:WE,GridLoadingOverlay:e0,AgGridVue:pd,GridToolbar:Cd,FooterCellRender:ZR}}),s0=E.defineComponent({...i0,props:{id:null,rowIdMapper:{type:Function},columns:null,rowData:{type:Function},pageSize:{default:50},enableCursorPage:{type:Boolean,default:!1},footerHeight:null,tools:{default:()=>["search","refresh","setting"]},searches:null,gridOptions:{default:()=>({})},editable:null,onRowChange:{type:Function}},setup(e,{expose:t}){const o=e,i=E.ref(),s=E.ref(),{theme:n}=o0(),{gridOptions:r,dataCache:a,gridStyles:l,gridApi:d,gridElRef:c,reload:u,insertRows:h,existRow:g,getRows:p,refresh:f,resetGridState:C}=kR(o),{footerGridOptions:m,setFooterData:w,footerStyles:S}=t0(o,s,l);return E.provide(gt,{refresh:f,resetGridState:C,api:d}),E.watch(()=>r.value,()=>{d.value&&d.value.updateGridOptions(O.omit(r.value,["scrollbarWidth","getRowId","suppressRowTransform","defaultColGroupDef"]))},{deep:!0}),t({setFooterData:w,updateGridOptions:v=>{d.value.updateGridOptions(v)},reload:u,refresh:f,getRows:p,createRow(v,b=!1){const D=a.value.createRow(v);return b?new Ti(D,o.rowIdMapper,!0):D},existRow:g,insertRows:h,startEditing:()=>{const v=a.value.getRows().filter(b=>!b.isEditing());O.isEmpty(v)||(v.forEach(b=>b.startEditing()),u(),d.value.redrawRows())},stopEditing:()=>{const v=a.value.getRows().filter(b=>b.isEditing());O.isEmpty(v)||(v.forEach(b=>b.stopEditing()),u(),d.value.redrawRows())},deselectAll:(v,b)=>{d.value.deselectAll(v,b)}}),{__sfc:!0,props:o,bottomRef:i,gridRef:s,theme:n,options:r,dataCache:a,gridStyles:l,gridApi:d,gridElRef:c,reload:u,insertRows:h,existRow:g,getRows:p,refresh:f,resetGridState:C,footerGridOptions:m,setFooterData:w,footerStyles:S,AgGridVue:pd,GridToolbar:Cd,SearchButton:vd,RefreshButton:Sd,SettingButton:yd}}});var n0=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",{ref:"gridElRef",staticClass:"cl-grid"},[o(i.GridToolbar,{scopedSlots:t._u([{key:"system",fn:function(){return[t.searches&&t.tools.includes("search")?o(i.SearchButton,{attrs:{searches:t.searches}}):t._e(),t.tools.includes("refresh")?o(i.RefreshButton):t._e(),t.tools.includes("setting")?o(i.SettingButton):t._e()]},proxy:!0}])},[t._t("toolbar")],2),o("div",{staticClass:"cl-grid-container"},[o(i.AgGridVue,{ref:"gridRef",staticClass:"cl-scrollbar flex-1",class:[i.theme],style:i.gridStyles,attrs:{tooltipShowDelay:500,"loading-overlay-component":"GridLoadingOverlay","no-rows-overlay-component":"GridEmptyDataOverlay","grid-options":{...i.options,suppressHorizontalScroll:!!t.footerHeight,alignedGrids:()=>[i.bottomRef].filter(s=>s)}}}),t.footerHeight?o(i.AgGridVue,{ref:"bottomRef",staticClass:"cl-scrollbar footer-grid",class:[i.theme],style:i.footerStyles,attrs:{"grid-options":i.footerGridOptions}}):t._e()],1)],1)},r0=[],a0=ae(s0,n0,r0,!1,null,null);const l0=a0.exports;var d0=Object.defineProperty,c0=(e,t,o)=>t in e?d0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Eo=(e,t,o)=>c0(e,typeof t!="symbol"?t+"":t,o);const u0=e=>new Rd(e);class Rd{constructor(t){Eo(this,"colDef"),Eo(this,"agGridCellRenderParams"),this.colDef=t,this.agGridCellRenderParams={}}cellRender(t){return this.agGridCellRenderParams.render=t,this}footerRender(t){return this.agGridCellRenderParams.footerRender=t,this}editeRender(t){return this.agGridCellRenderParams.editeRender=t,this}headerRender(t){return this.agGridCellRenderParams.headerRender=t,this}build(){return this.agGridCellRenderParams.headerRender&&(this.colDef.headerComponentParams=this.agGridCellRenderParams.headerRender),this.colDef.cellRendererParams=this.agGridCellRenderParams,this.colDef}}const h0=e=>new Ed(e);class Ed{constructor(t){Eo(this,"colDefs"),Eo(this,"rendersMap",new Map),Eo(this,"headerRendersMap",new Map),this.colDefs=t,this.eachColDef(t,o=>{this.rendersMap.set(o.field,{}),this.headerRendersMap.set(o.field,{})})}eachColDef(t,o){for(const i of t)Yl.isGroupColDef(i)?this.eachColDef(i.children,o):o(i)}getRenderParams(t){if(!this.rendersMap.has(t))throw new Error(`${t} 不存在配置项`);return this.rendersMap.get(t)}getHeaderRenderParams(t){if(!this.headerRendersMap.has(t))throw new Error(`${t} 不存在配置项`);return this.headerRendersMap.get(t)}render(t,o){return this.getRenderParams(t).render=o,this}footerRender(t,o){return this.getRenderParams(t).footerRender=o,this}editRender(t,o){return this.getRenderParams(t).editeRender=o,this}headerRender(t,o){return this.getHeaderRenderParams(t).headerRender=o,this}alwaysRender(t){this.eachColDef(this.colDefs,o=>{o.field===t&&(o.enableCellChangeFlash=!1,o.tooltipValueGetter=()=>"",o.valueGetter=i=>i.data.getSignature())})}build(){return this.eachColDef(this.colDefs,t=>{const o=this.headerRendersMap.get(t.field);o!=null&&o.headerRender&&(t.headerComponentParams=o),t.cellRendererParams=this.rendersMap.get(t.field)}),this.colDefs}}const g0=(e,t)=>({model:{value:O.get(e,t),callback:o=>{O.set(e,t,o)}}});Hd({theme:"legacy"});const p0={install:()=>{Ku.registerModules([ZS,QS,XS,JS,tb,eb,Eb,lb,nS,za,Bl,Lb,Wb,jb,ey,cd,wv,cy,Cy,uy,yy,bv,wb,Fl,Ry,xy,of,ay,gd,hd,ob])}};k.ActualRow=vo,k.CLEAN_AG_GRID_OPTIONS=jl,k.CellEditableRow=Ii,k.CellRenderAdapter=Rd,k.CellValue=_t,k.ClDrawerSearch=wd,k.ClPopoverSearch=cE,k.ClSearch=sE,k.ClientSideRowModelApiModule=gd,k.ClientSideRowModelModule=hd,k.ColumnRendersBuilder=Ed,k.EditableRow=Ti,k.GRID_CONTEXT=gt,k.Grid=l0,k.GridDataCache=Kl,k.GridDataSource=zl,k.GridUtils=Yl,k.ID_FIRST_DEEP=ql,k.ID_SPLITTER=Ai,k.ProjectionRow=Nt,k.RowSelectionModule=cd,k.RowSpans=pn,k.Searches=vn,k.ServerGetRowsParamsRequest=Ye,k.SharedRowSelectionModule=dd,k.SpanMatrix=Ul,k.VueGridPlugin=p0,k._getColumnSortIndexe=Wl,k._getSortedColumns=gn,k._getSortedColumnsIndexes=_l,k.buildProxyOptions=Ql,k.defaultColDefCellClassRules=Jl,k.isActualRow=Ty,k.isGridRow=Py,k.mergeRowClass=fn,k.selectionColumnCellClassRules=Xl,k.useFooter=id,k.useGrid=od,k.useGridScroll=ed,k.useGridState=Zl,k.vModel=g0,k.withColumnRenderBuilder=h0,k.withRender=u0,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
|